@wix/form-elements 1.73.0 → 1.75.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-Bze1s2XD.js → appointment-rac-7xVKSm2N.js} +27 -27
- package/dist/component/{bookings-address-rac-BcrkXf63.js → bookings-address-rac-VXnUSx8U.js} +1 -1
- package/dist/component/{bookings-email-rac-DYq5RxOP.js → bookings-email-rac-B2_ad7Y2.js} +1 -1
- package/dist/component/{bookings-first-name-rac-ZJ_sQ-01.js → bookings-first-name-rac-9BAY5vLx.js} +1 -1
- package/dist/component/{bookings-header-rac-Cv8kl01f.js → bookings-header-rac-B6IgiMOA.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BmnulSZ6.js → bookings-last-name-rac-DoXEDO8K.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-Bdi4xs9y.js → bookings-login-bar-rac-DprQIFyj.js} +2 -2
- package/dist/component/{bookings-phone-rac-C8DjSzUY.js → bookings-phone-rac-VMoXtejZ.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DYu011oy.js → bookings-rich-text-rac-DSzD2jBy.js} +1 -1
- package/dist/component/{checkbox-field-rac-BH3yEE5j.js → checkbox-field-rac-BLihwz3C.js} +327 -320
- package/dist/component/checkbox-group-field-headless-BItyo_iD.js +205 -0
- package/dist/component/checkbox-group-field-rac-Bov3yFC6.js +40 -0
- package/dist/component/{checkbox-group-rac-CgW0DnhX.js → checkbox-group-rac-Fit-qssk.js} +1 -1
- package/dist/component/{checkbox-rac-DOAYMMsi.js → checkbox-rac-CSsY83Nx.js} +1 -1
- package/dist/component/{contacts-address-rac-DXJa4J_k.js → contacts-address-rac-iJuzUQe4.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-CVsuRq3B.js → contacts-birthdate-rac-0g2e8cQP.js} +1 -1
- package/dist/component/{contacts-company-rac-b2bwHSNC.js → contacts-company-rac-BC0tK4WQ.js} +1 -1
- package/dist/component/{contacts-email-rac-DMPcpQ1c.js → contacts-email-rac-dkuclkiH.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CL2BsHuJ.js → contacts-first-name-rac-BSUkCuht.js} +1 -1
- package/dist/component/{contacts-last-name-rac-hdBsWaqb.js → contacts-last-name-rac-08bjVdN2.js} +1 -1
- package/dist/component/{contacts-phone-rac-DQF6aV9B.js → contacts-phone-rac-DVb0Z_0M.js} +1 -1
- package/dist/component/{contacts-position-rac-CVX-WCfx.js → contacts-position-rac-AGUDkv7U.js} +1 -1
- package/dist/component/contacts-subscribe-rac-6jAQHibT.js +13 -0
- package/dist/component/{contacts-tax-id-rac-0KTXvF81.js → contacts-tax-id-rac-C7moEz5b.js} +1 -1
- package/dist/component/{date-availability-DBljhBgO.js → date-availability-DagbE0C8.js} +1 -1
- package/dist/component/{date-input-field-rac-CfflD2Ar.js → date-input-field-rac-BWHKsJGy.js} +30 -30
- package/dist/component/{date-input-rac-fQclCKoa.js → date-input-rac-BlZlmf-s.js} +1 -1
- package/dist/component/{date-picker-field-rac-BSmFOaH-.js → date-picker-field-rac-BSNbYirD.js} +36 -36
- package/dist/component/{date-picker-rac-D7I3ramu.js → date-picker-rac-D3IWMst5.js} +1 -1
- package/dist/component/{date-time-input-field-rac-vjZDQ_Fp.js → date-time-input-field-rac-YKTwuIUs.js} +25 -25
- package/dist/component/{date-time-input-rac-CDbS0VZR.js → date-time-input-rac-CZRsKm1P.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BBiPt6_a.js → dext-checkbox-group-rac-BE7ILz-f.js} +2 -2
- package/dist/component/{dext-checkbox-rac-Cqp--0SO.js → dext-checkbox-rac-B6-94A1N.js} +1 -1
- package/dist/component/{dext-date-picker-rac-5Wft0w9m.js → dext-date-picker-rac-Bx2hUFNm.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-Bbs7bgtn.js → dext-date-time-input-rac-DPKD6quz.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CSvhtqbc.js → dext-dropdown-rac-WrSfNRa5.js} +1 -1
- package/dist/component/{dext-email-rac-BoLeXqyI.js → dext-email-rac-8PSMKNYG.js} +1 -1
- package/dist/component/{dext-number-input-rac-DzaJYTSz.js → dext-number-input-rac-b9YSzEkN.js} +1 -1
- package/dist/component/{dext-phone-rac-BagPg_CT.js → dext-phone-rac-CkapN3c1.js} +1 -1
- package/dist/component/{dext-radio-group-rac-B5HSQt7a.js → dext-radio-group-rac-CfNMkwUa.js} +2 -2
- package/dist/component/{dext-rating-input-rac-DrtaAf-E.js → dext-rating-input-rac-Cun_t7HQ.js} +1 -1
- package/dist/component/{dext-tags-rac-Cg4jJ4jr.js → dext-tags-rac-DLZ91c3w.js} +2 -2
- package/dist/component/{dext-text-area-rac-C_t-W7lk.js → dext-text-area-rac-N9A7QfYw.js} +1 -1
- package/dist/component/{dext-text-input-rac-ChvV21Jf.js → dext-text-input-rac-XbVzAPHH.js} +1 -1
- package/dist/component/{dext-url-input-rac-DclbSYTr.js → dext-url-input-rac-BiaWZ49r.js} +1 -1
- package/dist/component/{donation-rac-FYQIMm5m.js → donation-rac-BEIBjLHK.js} +46 -47
- package/dist/component/{dropdown-field-headless-CTZ-zGqZ.js → dropdown-field-headless-CQfZ3zPD.js} +3 -3
- package/dist/component/{dropdown-field-rac-C1KVtxwv.js → dropdown-field-rac-ubZN_Abg.js} +7 -7
- package/dist/component/{dropdown-rac-CkkDEDje.js → dropdown-rac-CHYFrEjY.js} +1 -1
- package/dist/component/{ecom-address-rac-BOuugSxX.js → ecom-address-rac-C7qJlrsv.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-IZeMlljb.js → ecom-subscription-checkbox-rac-CONIZsTy.js} +6 -6
- package/dist/component/{email-input-field-rac-CNzmm1j7.js → email-input-field-rac-Dg0p6WZe.js} +63 -63
- package/dist/component/events-repeater-rac-BoxNl7gn.js +254 -0
- package/dist/component/{events-rsvp-rac-BmjboAco.js → events-rsvp-rac-BU5d2n4k.js} +3 -3
- package/dist/component/{field-error-headless-DQZ5XAdn.js → field-error-headless-uQOcm2Ak.js} +1 -1
- package/dist/component/{field-label-headless-DoxfHHaj.js → field-label-headless-Bzh7f2Ji.js} +1 -1
- package/dist/component/field-rac.module-DjmaTYkc.js +23 -0
- package/dist/component/{file-upload-rac-YEQ7uXhm.js → file-upload-rac-BTt-rJE5.js} +74 -74
- package/dist/component/{fixed-payment-rac-DDufIQBT.js → fixed-payment-rac-1NOx3D-U.js} +17 -17
- package/dist/component/{form-C6WwBcGP.js → form-DCmjj8mZ.js} +69 -69
- package/dist/component/form-element-classes-Dn33C01k.js +111 -0
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-DGfjrjQC.js → header-field-rac-lyvjy6h2.js} +3 -3
- package/dist/component/{header-rac-C_JE2cTg.js → header-rac-B4iPEbNj.js} +1 -1
- package/dist/component/{image-choice-rac-LDLPQwrN.js → image-choice-rac-CmEG-waj.js} +29 -30
- package/dist/component/{index-C2srcuHD.js → index-D-CKLZBh.js} +4 -4
- package/dist/component/{index-CIOoaQ8Z.js → index-UZsDOe8e.js} +2 -2
- package/dist/component/{isObjectLike-E5QfEa1u.js → isObjectLike-BSGOU4jF.js} +1 -1
- package/dist/component/{multiline-address-field-rac-Biyj2tIN.js → multiline-address-field-rac-Dz0NEjSO.js} +125 -125
- package/dist/component/{multiline-address-rac-BCqCvG7a.js → multiline-address-rac-D_MAanxb.js} +1 -1
- package/dist/component/{number-input-field-rac-CwUoIbM8.js → number-input-field-rac-CvjeAm-W.js} +13 -13
- package/dist/component/{number-input-rac-CdYdTDem.js → number-input-rac-oKo2Wx_c.js} +1 -1
- package/dist/component/{password-rac-D62npVHY.js → password-rac-CrnkKtfp.js} +21 -21
- package/dist/component/{payment-input-rac-D4u-3vcW.js → payment-input-rac-BoVdGyvV.js} +18 -18
- package/dist/component/{phone-input-field-rac-uHxR3ozd.js → phone-input-field-rac-DksXoAnr.js} +54 -54
- package/dist/component/{phone-rac-Bf99_BGi.js → phone-rac-BR0iX5TL.js} +1 -1
- package/dist/component/product-list-rac-C4rvv5k-.js +270 -0
- package/dist/component/{quiz-radio-group-rac-CPGS0LEb.js → quiz-radio-group-rac-BxKmUUf8.js} +2 -2
- package/dist/component/{radio-group-field-rac-BWpTNAbO.js → radio-group-field-rac-Dj4rkkKF.js} +3 -3
- package/dist/component/{radio-group-field-rac.module-WxU5zxvM.js → radio-group-field-rac.module-CeBLm9QF.js} +3 -3
- package/dist/component/{radio-group-rac-dA4WZ1Vj.js → radio-group-rac-BpnfptSZ.js} +1 -1
- package/dist/component/{rating-input-field-rac-CJnFsBvH.js → rating-input-field-rac-BP0928qI.js} +30 -31
- package/dist/component/{rating-input-rac-DXVYozFV.js → rating-input-rac-DaEgvjIS.js} +1 -1
- package/dist/component/{rich-content-rac.module-DkKwzJS7.js → rich-content-rac.module-zvvH-tWq.js} +1 -1
- package/dist/component/{rich-text-field-rac-8FWCRrpb.js → rich-text-field-rac-CFCRiMl_.js} +3 -3
- package/dist/component/{rich-text-rac-OeM_mPRy.js → rich-text-rac-BRuLnyN4.js} +1 -1
- package/dist/component/{service-dropdown-rac-mvUMpcS_.js → service-dropdown-rac-C82l5y0C.js} +21 -21
- package/dist/component/services-multi-choice-rac-BAHBSgAT.js +83 -0
- package/dist/component/{signature-rac-D44U9Uyp.js → signature-rac-CIkm3SCW.js} +56 -56
- package/dist/component/{submit-button-rac-BqtcgVAn.js → submit-button-rac-Bz-X9Tbo.js} +2 -2
- package/dist/component/{tags-field-rac-CemsTKWz.js → tags-field-rac-Dn8VyPzT.js} +29 -30
- package/dist/component/{tags-rac-fVjCf6qo.js → tags-rac-BJpVdunR.js} +1 -1
- package/dist/component/{text-area-field-rac-BPciZlZb.js → text-area-field-rac-Pp9HnCS5.js} +18 -18
- package/dist/component/{text-area-rac-CRTORdZM.js → text-area-rac-DbwAFdel.js} +1 -1
- package/dist/component/{text-input-field-rac-CvFoWlRN.js → text-input-field-rac-x4ByKmBv.js} +6 -6
- package/dist/component/{text-input-headless-BQ3TWU9G.js → text-input-headless-fbiKci5q.js} +3 -3
- package/dist/component/{text-input-rac-DSFkEmob.js → text-input-rac-jyCKxyCt.js} +1 -1
- package/dist/component/{time-input-rac-CGgs7ncp.js → time-input-rac-C5Cvmxtt.js} +17 -17
- package/dist/component/{url-input-field-rac-CqvgTc-F.js → url-input-field-rac-CGpCEn2A.js} +20 -20
- package/dist/component/{url-input-rac-C45KOwnr.js → url-input-rac-DhFL8fGq.js} +1 -1
- package/dist/component/use-element-state-class-name-Bnw7sY9P.js +29 -0
- package/dist/component/{use-service-options-base-D4Zl-iGW.js → use-service-options-base-CgT1IKB3.js} +1 -1
- package/package.json +3 -3
- package/dist/component/checkbox-group-field-headless-D_GG5LHM.js +0 -210
- package/dist/component/checkbox-group-field-rac-Cj7Erubs.js +0 -41
- package/dist/component/contacts-subscribe-rac-Dl1ot9qw.js +0 -13
- package/dist/component/events-repeater-rac-CMV0Lmwz.js +0 -247
- package/dist/component/field-rac.module-Cac83bU5.js +0 -21
- package/dist/component/form-element-classes-DDKCTFQj.js +0 -65
- package/dist/component/form-element-keys-D0sEdpFo.js +0 -8
- package/dist/component/product-list-rac-iRf6Ra7i.js +0 -263
- package/dist/component/services-multi-choice-rac-DrgUrn_N.js +0 -76
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import t, { useMemo as K, useCallback as q, useRef as B } from "react";
|
|
2
|
+
import { RicosViewer as $ } from "@wix/ricos/viewer";
|
|
3
|
+
import f from "classnames";
|
|
4
|
+
import { CheckboxField as z, CheckboxButton as X, NumberField as j, Group as J, Button as U, Input as W } from "react-aria-components";
|
|
5
|
+
import { ai as M, af as Y, ab as w, as as Z, ak as ee } from "./form-DCmjj8mZ.js";
|
|
6
|
+
import { f as b, a as I } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { L as te, g as ne } from "./field-label-headless-Bzh7f2Ji.js";
|
|
8
|
+
import { f as ae } from "./format-currency-BwShJ9vM.js";
|
|
9
|
+
import { D as oe, E as re } from "./field-error-headless-uQOcm2Ak.js";
|
|
10
|
+
import { F as le } from "./fieldset-headless-CD3fds9J.js";
|
|
11
|
+
import { a as se, u as ie, C as ce } from "./use-element-state-class-name-Bnw7sY9P.js";
|
|
12
|
+
import { g as ue } from "./payment-field-utils-DobiK5Xh.js";
|
|
13
|
+
import { E as me } from "./error-icon-hZxQ6DEy.js";
|
|
14
|
+
import { s as T } from "./field-rac.module-DjmaTYkc.js";
|
|
15
|
+
import { y as pe, Q as de, C as Ee, G as ye, E as _e, x as fe, p as Ie, i as be, D as Oe } from "./form-element-classes-Dn33C01k.js";
|
|
16
|
+
import { o as Q } from "./options-rac.module-KM-VT_KY.js";
|
|
17
|
+
var Le = /* @__PURE__ */ (function(e) {
|
|
18
|
+
return e.crop = "CROP", e.fit = "FIT", e;
|
|
19
|
+
})({}), k = /* @__PURE__ */ (function(e) {
|
|
20
|
+
return e.oneByOne = "one-by-one", e.onlyOne = "only-one", e.many = "many", e;
|
|
21
|
+
})({});
|
|
22
|
+
function Ce({ maxItems: e, products: a } = {}) {
|
|
23
|
+
return e === 1 ? k.onlyOne : a != null && a.length && a.every((l) => {
|
|
24
|
+
var n;
|
|
25
|
+
return typeof ((n = l.quantityLimit) == null ? void 0 : n.maximum) > "u";
|
|
26
|
+
}) ? k.many : k.oneByOne;
|
|
27
|
+
}
|
|
28
|
+
const o = ({ children: e }) => {
|
|
29
|
+
var D;
|
|
30
|
+
const { id: a, value: l, onChange: n, disabled: r, readOnly: c, required: y, onBlur: O, onFocus: s, hasError: u, validation: m, FieldLayout: p } = M(), { inputId: x, labelId: N, ariaDescribedBy: h } = Y(), _ = b(e, o.Label), g = b(e, o.Options), v = b(e, o.Description), L = b(e, o.Error), i = K(() => l || [], [
|
|
31
|
+
l
|
|
32
|
+
]), A = Ce((D = m == null ? void 0 : m.predefined) == null ? void 0 : D.paymentOptions) === k.many, F = q((S, R) => {
|
|
33
|
+
const d = i.filter((H) => H.productId !== S.productId), G = R ? [
|
|
34
|
+
...d,
|
|
35
|
+
S
|
|
36
|
+
] : d;
|
|
37
|
+
n == null || n(G);
|
|
38
|
+
}, [
|
|
39
|
+
i,
|
|
40
|
+
n
|
|
41
|
+
]);
|
|
42
|
+
return /* @__PURE__ */ t.createElement(p, {
|
|
43
|
+
fieldId: a,
|
|
44
|
+
renderLabel: () => _,
|
|
45
|
+
renderInput: () => /* @__PURE__ */ t.createElement(le, {
|
|
46
|
+
id: x,
|
|
47
|
+
ariaLabelledBy: N,
|
|
48
|
+
ariaDescribedBy: h,
|
|
49
|
+
required: y,
|
|
50
|
+
onBlur: O,
|
|
51
|
+
onFocus: s
|
|
52
|
+
}, g ? I(g, {
|
|
53
|
+
allowMany: A,
|
|
54
|
+
productValues: i,
|
|
55
|
+
onProductChange: F,
|
|
56
|
+
disabled: r,
|
|
57
|
+
readOnly: c,
|
|
58
|
+
hasError: u
|
|
59
|
+
}) : null),
|
|
60
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, L, v)
|
|
61
|
+
});
|
|
62
|
+
}, V = ({ children: e, className: a, ...l }) => {
|
|
63
|
+
const { allowMany: n, productValues: r, onProductChange: c, disabled: y, readOnly: O, hasError: s } = l, { options: u, validation: m, imageResize: p } = M(), { currency: x } = w(), { t: N } = Z(), h = b(e, o.Option);
|
|
64
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
65
|
+
className: a
|
|
66
|
+
}, u == null ? void 0 : u.map((_, g) => {
|
|
67
|
+
var C, A, F, D, S;
|
|
68
|
+
const v = ((S = (D = (F = (A = (C = m == null ? void 0 : m.predefined) == null ? void 0 : C.paymentOptions) == null ? void 0 : A.products) == null ? void 0 : F.find((R) => R.id === _.value)) == null ? void 0 : D.fixedPriceOptions) == null ? void 0 : S.price) || "0", L = ue(N, x), i = r.find((R) => R.productId === _.value);
|
|
69
|
+
return I(h, {
|
|
70
|
+
key: _.id || _.value || _.label,
|
|
71
|
+
option: _,
|
|
72
|
+
price: v,
|
|
73
|
+
quantity: i == null ? void 0 : i.quantity,
|
|
74
|
+
isSelected: !!i,
|
|
75
|
+
allowMany: n,
|
|
76
|
+
onProductChange: c,
|
|
77
|
+
disabled: y,
|
|
78
|
+
readOnly: O,
|
|
79
|
+
hasError: s,
|
|
80
|
+
currencyAriaLabel: L,
|
|
81
|
+
imageResize: p,
|
|
82
|
+
isFirst: g === 0
|
|
83
|
+
});
|
|
84
|
+
}));
|
|
85
|
+
}, E = ({ children: e, className: a, ...l }) => {
|
|
86
|
+
const { option: n, price: r, quantity: c = 0, isSelected: y, allowMany: O, onProductChange: s, disabled: u, readOnly: m, hasError: p, currencyAriaLabel: x, imageResize: N, isFirst: h } = l, { id: _ } = M(), g = B(null), v = B(null), L = b(e, E.Image), i = b(e, E.Label), C = b(e, E.Price), A = b(e, E.Input), F = b(e, E.Quantity);
|
|
87
|
+
ee(() => {
|
|
88
|
+
var d;
|
|
89
|
+
h && ((d = g.current ?? v.current) == null || d.focus({
|
|
90
|
+
preventScroll: !0
|
|
91
|
+
}));
|
|
92
|
+
}, _);
|
|
93
|
+
const D = q((d) => {
|
|
94
|
+
s({
|
|
95
|
+
productId: n.value,
|
|
96
|
+
price: r,
|
|
97
|
+
quantity: 1
|
|
98
|
+
}, d);
|
|
99
|
+
}, [
|
|
100
|
+
s,
|
|
101
|
+
n.value,
|
|
102
|
+
r
|
|
103
|
+
]), S = q((d) => {
|
|
104
|
+
s({
|
|
105
|
+
productId: n.value,
|
|
106
|
+
price: r,
|
|
107
|
+
quantity: d
|
|
108
|
+
}, d > 0);
|
|
109
|
+
}, [
|
|
110
|
+
s,
|
|
111
|
+
n.value,
|
|
112
|
+
r
|
|
113
|
+
]), R = `${n.label} ${x} ${r}`;
|
|
114
|
+
return O ? /* @__PURE__ */ t.createElement("div", {
|
|
115
|
+
className: a,
|
|
116
|
+
"data-hook": "product"
|
|
117
|
+
}, L ? I(L, {
|
|
118
|
+
option: n,
|
|
119
|
+
imageResize: N
|
|
120
|
+
}) : null, i ? I(i, {
|
|
121
|
+
label: n.label
|
|
122
|
+
}) : null, C ? I(C, {
|
|
123
|
+
price: r
|
|
124
|
+
}) : null, F ? I(F, {
|
|
125
|
+
quantity: c,
|
|
126
|
+
onQuantityChange: S,
|
|
127
|
+
disabled: u,
|
|
128
|
+
readOnly: m,
|
|
129
|
+
hasError: p,
|
|
130
|
+
ariaLabel: R,
|
|
131
|
+
inputRef: h ? v : void 0
|
|
132
|
+
}) : null) : /* @__PURE__ */ t.createElement(z, {
|
|
133
|
+
isSelected: y,
|
|
134
|
+
onChange: D,
|
|
135
|
+
isDisabled: u,
|
|
136
|
+
isReadOnly: m,
|
|
137
|
+
isInvalid: p,
|
|
138
|
+
"aria-label": R
|
|
139
|
+
}, /* @__PURE__ */ t.createElement(X, {
|
|
140
|
+
ref: g,
|
|
141
|
+
className: a,
|
|
142
|
+
"data-hook": "product"
|
|
143
|
+
}, ({ isHovered: d }) => /* @__PURE__ */ t.createElement(t.Fragment, null, L ? I(L, {
|
|
144
|
+
option: n,
|
|
145
|
+
imageResize: N
|
|
146
|
+
}) : null, i ? I(i, {
|
|
147
|
+
label: n.label
|
|
148
|
+
}) : null, C ? I(C, {
|
|
149
|
+
price: r
|
|
150
|
+
}) : null, I(A, {
|
|
151
|
+
isSelected: y,
|
|
152
|
+
isHovered: d
|
|
153
|
+
}))));
|
|
154
|
+
}, Re = ({ className: e, ...a }) => {
|
|
155
|
+
var s;
|
|
156
|
+
const { option: l, imageResize: n } = a, r = (s = l.media) == null ? void 0 : s.image;
|
|
157
|
+
if (!r)
|
|
158
|
+
return null;
|
|
159
|
+
const c = n === Le.fit, y = ne(r, 96, 96, c ? "fit" : "fill");
|
|
160
|
+
if (!y)
|
|
161
|
+
return null;
|
|
162
|
+
const O = r.altText || l.label || "";
|
|
163
|
+
return /* @__PURE__ */ t.createElement("img", {
|
|
164
|
+
className: e,
|
|
165
|
+
src: y,
|
|
166
|
+
alt: O,
|
|
167
|
+
"data-fit": c ? "contain" : "cover",
|
|
168
|
+
"data-hook": "product-image"
|
|
169
|
+
});
|
|
170
|
+
}, ge = ({ className: e, ...a }) => {
|
|
171
|
+
const { label: l } = a;
|
|
172
|
+
return /* @__PURE__ */ t.createElement("span", {
|
|
173
|
+
className: e,
|
|
174
|
+
"data-hook": "product-label"
|
|
175
|
+
}, l || "");
|
|
176
|
+
}, Fe = ({ className: e, ...a }) => {
|
|
177
|
+
const { price: l } = a, { currency: n, regionalFormat: r } = w(), c = ae({
|
|
178
|
+
amount: l,
|
|
179
|
+
currency: n == null ? void 0 : n.code,
|
|
180
|
+
locale: r
|
|
181
|
+
});
|
|
182
|
+
return /* @__PURE__ */ t.createElement("span", {
|
|
183
|
+
className: e,
|
|
184
|
+
"data-hook": "product-price"
|
|
185
|
+
}, c);
|
|
186
|
+
}, De = ({ className: e, ...a }) => {
|
|
187
|
+
const { quantity: l, onQuantityChange: n, disabled: r, readOnly: c, hasError: y, ariaLabel: O, inputRef: s } = a, u = q((p) => {
|
|
188
|
+
n(p < 0 ? 0 : p);
|
|
189
|
+
}, [
|
|
190
|
+
n
|
|
191
|
+
]), m = q((p) => {
|
|
192
|
+
p.key === "Home" && (p.preventDefault(), u(0));
|
|
193
|
+
}, [
|
|
194
|
+
u
|
|
195
|
+
]);
|
|
196
|
+
return /* @__PURE__ */ t.createElement(j, {
|
|
197
|
+
value: l,
|
|
198
|
+
onChange: u,
|
|
199
|
+
minValue: 0,
|
|
200
|
+
step: 1,
|
|
201
|
+
isDisabled: r,
|
|
202
|
+
isReadOnly: c,
|
|
203
|
+
isInvalid: y,
|
|
204
|
+
"aria-label": O,
|
|
205
|
+
className: e,
|
|
206
|
+
"data-hook": "product-quantity"
|
|
207
|
+
}, /* @__PURE__ */ t.createElement(J, {
|
|
208
|
+
onKeyDown: m
|
|
209
|
+
}, /* @__PURE__ */ t.createElement(U, {
|
|
210
|
+
slot: "decrement"
|
|
211
|
+
}, "-"), /* @__PURE__ */ t.createElement(W, {
|
|
212
|
+
ref: s
|
|
213
|
+
}), /* @__PURE__ */ t.createElement(U, {
|
|
214
|
+
slot: "increment"
|
|
215
|
+
}, "+")));
|
|
216
|
+
};
|
|
217
|
+
E.Image = Re;
|
|
218
|
+
E.Label = ge;
|
|
219
|
+
E.Price = Fe;
|
|
220
|
+
E.Input = se;
|
|
221
|
+
E.Quantity = De;
|
|
222
|
+
V.Option = E;
|
|
223
|
+
o.Label = te;
|
|
224
|
+
o.Options = V;
|
|
225
|
+
o.Option = E;
|
|
226
|
+
o.Description = oe;
|
|
227
|
+
o.Error = re;
|
|
228
|
+
const Se = "_options_11x4v_1", Pe = "_option_11x4v_1", Ne = "_optionInput_11x4v_21", he = "_optionImage_11x4v_32", ve = "_optionLabel_11x4v_66", Ae = "_optionPrice_11x4v_73", Te = "_quantity_11x4v_87", P = {
|
|
229
|
+
options: Se,
|
|
230
|
+
option: Pe,
|
|
231
|
+
optionInput: Ne,
|
|
232
|
+
optionImage: he,
|
|
233
|
+
optionLabel: ve,
|
|
234
|
+
optionPrice: Ae,
|
|
235
|
+
quantity: Te
|
|
236
|
+
}, xe = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement($, {
|
|
237
|
+
content: e,
|
|
238
|
+
locale: a
|
|
239
|
+
}), qe = () => {
|
|
240
|
+
const e = ie({
|
|
241
|
+
globalClasses: Oe,
|
|
242
|
+
moduleClasses: ce
|
|
243
|
+
});
|
|
244
|
+
return /* @__PURE__ */ t.createElement(o, null, /* @__PURE__ */ t.createElement(o.Label, {
|
|
245
|
+
className: f(pe, T.label)
|
|
246
|
+
}, /* @__PURE__ */ t.createElement(o.Label.Required, {
|
|
247
|
+
className: f(de, T.requiredMark)
|
|
248
|
+
})), /* @__PURE__ */ t.createElement(o.Options, {
|
|
249
|
+
className: f(Ee, Q.options, P.options)
|
|
250
|
+
}, /* @__PURE__ */ t.createElement(o.Option, {
|
|
251
|
+
className: f(T.checkbox, P.option)
|
|
252
|
+
}, /* @__PURE__ */ t.createElement(o.Option.Image, {
|
|
253
|
+
className: P.optionImage
|
|
254
|
+
}), /* @__PURE__ */ t.createElement(o.Option.Label, {
|
|
255
|
+
className: f(ye, Q.optionLabel, P.optionLabel)
|
|
256
|
+
}), /* @__PURE__ */ t.createElement(o.Option.Price, {
|
|
257
|
+
className: f(_e, P.optionPrice)
|
|
258
|
+
}), /* @__PURE__ */ t.createElement(o.Option.Input, {
|
|
259
|
+
className: (a) => f(e(a), P.optionInput)
|
|
260
|
+
}), /* @__PURE__ */ t.createElement(o.Option.Quantity, {
|
|
261
|
+
className: f(fe, T.inputGroup, P.quantity)
|
|
262
|
+
}))), /* @__PURE__ */ t.createElement(o.Error, {
|
|
263
|
+
className: f(Ie, T.error)
|
|
264
|
+
}, /* @__PURE__ */ t.createElement(me, null), /* @__PURE__ */ t.createElement(o.Error.Text, null)), /* @__PURE__ */ t.createElement(o.Description, {
|
|
265
|
+
className: f(be, T.description)
|
|
266
|
+
}, xe));
|
|
267
|
+
}, Ye = () => /* @__PURE__ */ t.createElement(qe, null);
|
|
268
|
+
export {
|
|
269
|
+
Ye as ProductListRAC
|
|
270
|
+
};
|
package/dist/component/{quiz-radio-group-rac-CPGS0LEb.js → quiz-radio-group-rac-BxKmUUf8.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _ from "react";
|
|
2
|
-
import { R } from "./radio-group-field-rac-
|
|
3
|
-
import {
|
|
2
|
+
import { R } from "./radio-group-field-rac-Dj4rkkKF.js";
|
|
3
|
+
import { J as o, I as r, H as O } from "./form-element-classes-Dn33C01k.js";
|
|
4
4
|
const t = () => /* @__PURE__ */ _.createElement(R, {
|
|
5
5
|
classes: {
|
|
6
6
|
container: O,
|
package/dist/component/{radio-group-field-rac-BWpTNAbO.js → radio-group-field-rac-Dj4rkkKF.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { RicosViewer as s } from "@wix/ricos/viewer";
|
|
2
2
|
import a from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { R as t, s as r } from "./radio-group-field-rac.module-
|
|
4
|
+
import { R as t, s as r } from "./radio-group-field-rac.module-CeBLm9QF.js";
|
|
5
5
|
import { E as m } from "./error-icon-hZxQ6DEy.js";
|
|
6
|
-
import { s as l } from "./field-rac.module-
|
|
7
|
-
import {
|
|
6
|
+
import { s as l } from "./field-rac.module-DjmaTYkc.js";
|
|
7
|
+
import { y as c, Q as i, M as E, L as _, K as R, x as p, p as O, i as L } from "./form-element-classes-Dn33C01k.js";
|
|
8
8
|
const I = ({ content: o, locale: n }) => /* @__PURE__ */ e.createElement(s, {
|
|
9
9
|
content: o,
|
|
10
10
|
locale: n
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import s, { useRef as y, useState as V, useEffect as S, useCallback as B } from "react";
|
|
2
2
|
import { RadioGroup as T, RadioField as k, RadioButton as G, TextField as M, Input as P } from "react-aria-components";
|
|
3
|
-
import { ai as C, af as $, as as F, ab as q, ak as x } from "./form-
|
|
3
|
+
import { ai as C, af as $, as as F, ab as q, ak as x } from "./form-DCmjj8mZ.js";
|
|
4
4
|
import { f as d, a as g } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as U, E as A } from "./field-error-headless-
|
|
6
|
-
import { L as H } from "./field-label-headless-
|
|
5
|
+
import { D as U, E as A } from "./field-error-headless-uQOcm2Ak.js";
|
|
6
|
+
import { L as H } from "./field-label-headless-Bzh7f2Ji.js";
|
|
7
7
|
import { N as j } from "./options-layout-constants-DEfIEJWD.js";
|
|
8
8
|
const L = "Other", w = (e, t) => e == null ? void 0 : e.find((o) => (o.value ?? o.label) === t), R = (e, t) => !!t && !w(e, t), z = (e, t) => {
|
|
9
9
|
const a = t ? t.length + 2 : 0;
|
package/dist/component/{rating-input-field-rac-CJnFsBvH.js → rating-input-field-rac-BP0928qI.js}
RENAMED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as D } from "@wix/ricos/viewer";
|
|
2
2
|
import c from "classnames";
|
|
3
|
-
import e, { useCallback as
|
|
4
|
-
import { ai as
|
|
3
|
+
import e, { useCallback as y, useState as h, useRef as A } from "react";
|
|
4
|
+
import { ai as F, af as N, as as T, ac as M } from "./form-DCmjj8mZ.js";
|
|
5
5
|
import { RadioGroup as P, RadioField as w, RadioButton as B } from "react-aria-components";
|
|
6
|
-
import { f as E, a as
|
|
7
|
-
import { D as
|
|
8
|
-
import { L as
|
|
6
|
+
import { f as E, a as x } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { D as G, E as H } from "./field-error-headless-uQOcm2Ak.js";
|
|
8
|
+
import { L as q } from "./field-label-headless-Bzh7f2Ji.js";
|
|
9
9
|
import { E as k } from "./error-icon-hZxQ6DEy.js";
|
|
10
|
-
import { s as p } from "./field-rac.module-
|
|
11
|
-
import {
|
|
12
|
-
import { R as J } from "./form-element-keys-D0sEdpFo.js";
|
|
10
|
+
import { s as p } from "./field-rac.module-DjmaTYkc.js";
|
|
11
|
+
import { y as Q, Q as z, N as K, O as U, P as Y, p as Z, i as j, F as J } from "./form-element-classes-Dn33C01k.js";
|
|
13
12
|
const t = ({ children: a }) => {
|
|
14
|
-
const { id: r, value: n, onChange: i, disabled: o, readOnly: d, required: l, hasError: m, onBlur: u, onFocus: R, FieldLayout: C } =
|
|
13
|
+
const { id: r, value: n, onChange: i, disabled: o, readOnly: d, required: l, hasError: m, onBlur: u, onFocus: R, FieldLayout: C } = F(), { labelId: L } = N(), _ = y((v) => i(Number(v)), [
|
|
15
14
|
i
|
|
16
|
-
]), f = E(a, t.Label), s = E(a, t.Ratings), g = E(a, t.Description),
|
|
15
|
+
]), f = E(a, t.Label), s = E(a, t.Ratings), g = E(a, t.Description), O = E(a, t.Error);
|
|
17
16
|
return /* @__PURE__ */ e.createElement(C, {
|
|
18
17
|
fieldId: r,
|
|
19
18
|
renderLabel: () => f,
|
|
@@ -29,10 +28,10 @@ const t = ({ children: a }) => {
|
|
|
29
28
|
onFocus: R,
|
|
30
29
|
orientation: "horizontal"
|
|
31
30
|
}, s),
|
|
32
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null,
|
|
31
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, O, g)
|
|
33
32
|
});
|
|
34
33
|
}, I = ({ children: a, className: r, getReactionLabel: n }) => {
|
|
35
|
-
const { value: i, readOnly: o, hasError: d } =
|
|
34
|
+
const { value: i, readOnly: o, hasError: d } = F(), { inputId: l, ariaDescribedBy: m } = N(), [u, R] = h(), C = A(null), L = E(a, I.Rating), _ = [
|
|
36
35
|
"1",
|
|
37
36
|
"2",
|
|
38
37
|
"3",
|
|
@@ -46,7 +45,7 @@ const t = ({ children: a }) => {
|
|
|
46
45
|
className: r,
|
|
47
46
|
"data-invalid": d,
|
|
48
47
|
"data-readonly": o
|
|
49
|
-
}, _.map((s) =>
|
|
48
|
+
}, _.map((s) => x(L, {
|
|
50
49
|
key: s,
|
|
51
50
|
value: s,
|
|
52
51
|
isSelected: f(s),
|
|
@@ -63,7 +62,7 @@ const t = ({ children: a }) => {
|
|
|
63
62
|
position: "absolute",
|
|
64
63
|
width: 1,
|
|
65
64
|
whiteSpace: "nowrap"
|
|
66
|
-
},
|
|
65
|
+
}, b = ({ className: a, children: r, ...n }) => {
|
|
67
66
|
const { value: i, isSelected: o, onHoverChange: d, label: l } = n, m = typeof a == "function" ? a({
|
|
68
67
|
isSelected: o
|
|
69
68
|
}) : a;
|
|
@@ -79,12 +78,12 @@ const t = ({ children: a }) => {
|
|
|
79
78
|
style: W
|
|
80
79
|
}, l) : null));
|
|
81
80
|
};
|
|
82
|
-
I.Rating =
|
|
83
|
-
t.Label =
|
|
81
|
+
I.Rating = b;
|
|
82
|
+
t.Label = q;
|
|
84
83
|
t.Ratings = I;
|
|
85
|
-
t.Rating =
|
|
86
|
-
t.Description =
|
|
87
|
-
t.Error =
|
|
84
|
+
t.Rating = b;
|
|
85
|
+
t.Description = G;
|
|
86
|
+
t.Error = H;
|
|
88
87
|
const X = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
89
88
|
viewBox: "0 0 32 32",
|
|
90
89
|
width: 32,
|
|
@@ -98,30 +97,30 @@ const X = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
98
97
|
})), $ = "_ratings_1n24x_1", V = "_rating_1n24x_1", S = {
|
|
99
98
|
ratings: $,
|
|
100
99
|
rating: V
|
|
101
|
-
}, ee = ({ content: a, locale: r }) => /* @__PURE__ */ e.createElement(
|
|
100
|
+
}, ee = ({ content: a, locale: r }) => /* @__PURE__ */ e.createElement(D, {
|
|
102
101
|
content: a,
|
|
103
102
|
locale: r
|
|
104
|
-
}),
|
|
105
|
-
const { t: a } = T(), r = M(J);
|
|
103
|
+
}), Ee = () => {
|
|
104
|
+
const { t: a } = T(), r = M(J.RATING_OPTION);
|
|
106
105
|
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
107
|
-
className: c(
|
|
106
|
+
className: c(Q, p.label)
|
|
108
107
|
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
109
|
-
className: c(
|
|
108
|
+
className: c(z, p.requiredMark)
|
|
110
109
|
})), /* @__PURE__ */ e.createElement(t.Ratings, {
|
|
111
|
-
className: c(
|
|
110
|
+
className: c(K, S.ratings),
|
|
112
111
|
getReactionLabel: (n) => a("rating-input.a11y.reaction-label", {
|
|
113
112
|
count: n
|
|
114
113
|
})
|
|
115
114
|
}, /* @__PURE__ */ e.createElement(t.Rating, {
|
|
116
|
-
className: ({ isSelected: n }) => c(
|
|
117
|
-
[
|
|
115
|
+
className: ({ isSelected: n }) => c(U, r, S.rating, {
|
|
116
|
+
[Y]: n
|
|
118
117
|
})
|
|
119
118
|
}, /* @__PURE__ */ e.createElement(X, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
120
|
-
className: c(
|
|
119
|
+
className: c(Z, p.error)
|
|
121
120
|
}, /* @__PURE__ */ e.createElement(k, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
122
|
-
className: c(
|
|
121
|
+
className: c(j, p.description)
|
|
123
122
|
}, ee));
|
|
124
123
|
};
|
|
125
124
|
export {
|
|
126
|
-
|
|
125
|
+
Ee as R
|
|
127
126
|
};
|
package/dist/component/{rich-content-rac.module-DkKwzJS7.js → rich-content-rac.module-zvvH-tWq.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import c, { useState as u } from "react";
|
|
2
|
-
import { ai as a, ab as i, as as T } from "./form-
|
|
2
|
+
import { ai as a, ab as i, as as T } from "./form-DCmjj8mZ.js";
|
|
3
3
|
import { Button as d } from "react-aria-components";
|
|
4
4
|
import { D as r } from "./data-hooks-Dkw1pbRj.js";
|
|
5
5
|
import { truncateRichContent as _ } from "@wix/ricos/content";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import l from "classnames";
|
|
2
2
|
import e from "react";
|
|
3
|
-
import { ai as m, L as i, W as u, Z as R } from "./form-
|
|
4
|
-
import { u as T, R as C, s as d, T as p } from "./rich-content-rac.module-
|
|
5
|
-
import {
|
|
3
|
+
import { ai as m, L as i, W as u, Z as R } from "./form-DCmjj8mZ.js";
|
|
4
|
+
import { u as T, R as C, s as d, T as p } from "./rich-content-rac.module-zvvH-tWq.js";
|
|
5
|
+
import { a5 as g } from "./form-element-classes-Dn33C01k.js";
|
|
6
6
|
const h = {
|
|
7
7
|
colorPalette: R(),
|
|
8
8
|
customStyles: u()
|
package/dist/component/{service-dropdown-rac-mvUMpcS_.js → service-dropdown-rac-C82l5y0C.js}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import t, { useRef as P, useMemo as g, useCallback as h, useEffect as T } from "react";
|
|
2
2
|
import { RicosViewer as A } from "@wix/ricos/viewer";
|
|
3
3
|
import m from "classnames";
|
|
4
|
-
import { ae as w, as as b, F as M, ai as y, ab as
|
|
5
|
-
import { u as
|
|
6
|
-
import { D as d } from "./dropdown-field-headless-
|
|
7
|
-
import { C as
|
|
4
|
+
import { ae as w, as as b, F as M, ai as y, ab as x, h as U } from "./form-DCmjj8mZ.js";
|
|
5
|
+
import { u as V } from "./use-service-options-base-CgT1IKB3.js";
|
|
6
|
+
import { D as d } from "./dropdown-field-headless-CQfZ3zPD.js";
|
|
7
|
+
import { C as B } from "./chevron-down-icon-CcpVm6B-.js";
|
|
8
8
|
import { E as H } from "./error-icon-hZxQ6DEy.js";
|
|
9
9
|
import { H as k } from "./custom-focus-class-_483Pkwp.js";
|
|
10
|
-
import { s as n } from "./field-rac.module-
|
|
11
|
-
import {
|
|
10
|
+
import { s as n } from "./field-rac.module-DjmaTYkc.js";
|
|
11
|
+
import { y as q, Q, x as W, B as Y, p as j, i as z } from "./form-element-classes-Dn33C01k.js";
|
|
12
12
|
const G = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
13
13
|
const { actions: r } = w(), { 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;
|
|
@@ -25,11 +25,11 @@ const G = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
|
25
25
|
] : s, [
|
|
26
26
|
i,
|
|
27
27
|
c
|
|
28
|
-
]), { isLoading: f, options: l, isEmpty: D, shouldRender: I, setIsLoading: F, setOptions: L, setIsEmpty: S, processOptions:
|
|
28
|
+
]), { isLoading: f, options: l, isEmpty: D, shouldRender: I, setIsLoading: F, setOptions: L, setIsEmpty: S, processOptions: _ } = V({
|
|
29
29
|
fieldType: M.SERVICES_DROPDOWN,
|
|
30
30
|
isEditor: e.isEditor,
|
|
31
31
|
postProcessOptions: O
|
|
32
|
-
}),
|
|
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;
|
|
@@ -41,7 +41,7 @@ const G = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
|
41
41
|
console.error(u);
|
|
42
42
|
}
|
|
43
43
|
if (s) {
|
|
44
|
-
const u =
|
|
44
|
+
const u = _(s);
|
|
45
45
|
S(!i && u.length === 0), L(u);
|
|
46
46
|
} else
|
|
47
47
|
a.current = !0;
|
|
@@ -50,7 +50,7 @@ const G = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
|
50
50
|
}, [
|
|
51
51
|
r,
|
|
52
52
|
E,
|
|
53
|
-
|
|
53
|
+
_,
|
|
54
54
|
i,
|
|
55
55
|
F,
|
|
56
56
|
L,
|
|
@@ -68,9 +68,9 @@ const G = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
|
68
68
|
e.isEditor
|
|
69
69
|
]);
|
|
70
70
|
const v = h(() => {
|
|
71
|
-
e.onFocus && e.onFocus(), a.current &&
|
|
71
|
+
e.onFocus && e.onFocus(), a.current && R();
|
|
72
72
|
}, [
|
|
73
|
-
|
|
73
|
+
R,
|
|
74
74
|
e.onFocus
|
|
75
75
|
]), N = h(
|
|
76
76
|
(s) => {
|
|
@@ -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 = x(), p = r.isEditor || i.isEditor || i.isComposer, { isLoading: c, options: a, isEmpty: E, onFocus: O, onChange: f, shouldRender: l } = J({
|
|
94
94
|
...r,
|
|
95
95
|
isEditor: p
|
|
96
96
|
}), D = g(() => ({
|
|
@@ -106,7 +106,7 @@ 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(U.Provider, {
|
|
110
110
|
value: {
|
|
111
111
|
v2: D
|
|
112
112
|
}
|
|
@@ -121,21 +121,21 @@ const K = ({ content: e, locale: r }) => /* @__PURE__ */ t.createElement(A, {
|
|
|
121
121
|
content: e,
|
|
122
122
|
locale: r
|
|
123
123
|
}), X = () => /* @__PURE__ */ t.createElement(o, null, /* @__PURE__ */ t.createElement(o.Label, {
|
|
124
|
-
className: m(
|
|
124
|
+
className: m(q, n.label)
|
|
125
125
|
}, /* @__PURE__ */ t.createElement(o.Label.Required, {
|
|
126
|
-
className: m(
|
|
126
|
+
className: m(Q, n.requiredMark)
|
|
127
127
|
})), /* @__PURE__ */ t.createElement(o.Trigger, {
|
|
128
|
-
className: m(
|
|
129
|
-
}, /* @__PURE__ */ t.createElement(
|
|
128
|
+
className: m(W, n.input, n.dropdownTrigger)
|
|
129
|
+
}, /* @__PURE__ */ t.createElement(B, {
|
|
130
130
|
className: n.dropdownIcon
|
|
131
131
|
})), /* @__PURE__ */ t.createElement(o.Options, {
|
|
132
|
-
className: m(
|
|
132
|
+
className: m(Y, n.selectPopover, n.dropdownPopover)
|
|
133
133
|
}, /* @__PURE__ */ t.createElement(o.Options.Option, {
|
|
134
134
|
className: m(n.selectOption, k)
|
|
135
135
|
})), /* @__PURE__ */ t.createElement(o.Error, {
|
|
136
|
-
className: m(
|
|
136
|
+
className: m(j, n.error)
|
|
137
137
|
}, /* @__PURE__ */ t.createElement(H, null), /* @__PURE__ */ t.createElement(o.Error.Text, null)), /* @__PURE__ */ t.createElement(o.Description, {
|
|
138
|
-
className: m(
|
|
138
|
+
className: m(z, n.description)
|
|
139
139
|
}, K)), le = () => /* @__PURE__ */ t.createElement(X, null);
|
|
140
140
|
export {
|
|
141
141
|
le as ServiceDropdownRAC
|
|
@@ -0,0 +1,83 @@
|
|
|
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, ai as d, h as D } from "./form-DCmjj8mZ.js";
|
|
5
|
+
import { u as F } from "./use-service-options-base-CgT1IKB3.js";
|
|
6
|
+
import { C as a } from "./checkbox-group-field-headless-BItyo_iD.js";
|
|
7
|
+
import { E as f } from "./error-icon-hZxQ6DEy.js";
|
|
8
|
+
import { u as N, C as h } from "./use-element-state-class-name-Bnw7sY9P.js";
|
|
9
|
+
import { s as i } from "./field-rac.module-DjmaTYkc.js";
|
|
10
|
+
import { y as M, Q as b, U as A, W as v, x, p as T, i as y, V as P } from "./form-element-classes-Dn33C01k.js";
|
|
11
|
+
import { o as O } from "./options-rac.module-KM-VT_KY.js";
|
|
12
|
+
const k = (s) => {
|
|
13
|
+
var C;
|
|
14
|
+
const { isLoading: o, options: n, isEmpty: c, shouldRender: E, setOptions: l, setIsEmpty: m, setHasInitialDataLoaded: p } = F({
|
|
15
|
+
fieldType: R.SERVICES_MULTI_CHOICE,
|
|
16
|
+
isEditor: s.isEditor
|
|
17
|
+
}), u = (C = s.options) == null ? void 0 : C.every((S) => S.label && S.id);
|
|
18
|
+
return _(() => {
|
|
19
|
+
if (u && s.options) {
|
|
20
|
+
l(s.options), m(s.options.length === 0), p(!0);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
}, [
|
|
24
|
+
u,
|
|
25
|
+
s.options,
|
|
26
|
+
l,
|
|
27
|
+
m,
|
|
28
|
+
p
|
|
29
|
+
]), {
|
|
30
|
+
isLoading: o,
|
|
31
|
+
options: n,
|
|
32
|
+
isEmpty: c,
|
|
33
|
+
shouldRender: E
|
|
34
|
+
};
|
|
35
|
+
}, t = ({ children: s }) => {
|
|
36
|
+
const o = d(), { options: n, isEmpty: c, shouldRender: E } = k(o), l = I(() => ({
|
|
37
|
+
...o,
|
|
38
|
+
options: n
|
|
39
|
+
}), [
|
|
40
|
+
o,
|
|
41
|
+
n
|
|
42
|
+
]);
|
|
43
|
+
return !o.isEditor && c || !E ? null : /* @__PURE__ */ e.createElement(D.Provider, {
|
|
44
|
+
value: {
|
|
45
|
+
v2: l
|
|
46
|
+
}
|
|
47
|
+
}, /* @__PURE__ */ e.createElement(a, null, s));
|
|
48
|
+
};
|
|
49
|
+
t.Label = a.Label;
|
|
50
|
+
t.Options = a.Options;
|
|
51
|
+
t.Description = a.Description;
|
|
52
|
+
t.Error = a.Error;
|
|
53
|
+
const V = ({ content: s, locale: o }) => /* @__PURE__ */ e.createElement(L, {
|
|
54
|
+
content: s,
|
|
55
|
+
locale: o
|
|
56
|
+
}), U = () => {
|
|
57
|
+
const s = N({
|
|
58
|
+
globalClasses: P,
|
|
59
|
+
moduleClasses: h
|
|
60
|
+
});
|
|
61
|
+
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
62
|
+
className: r(M, i.label)
|
|
63
|
+
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
64
|
+
className: r(b, i.requiredMark)
|
|
65
|
+
})), /* @__PURE__ */ e.createElement(t.Options, {
|
|
66
|
+
className: r(A, O.options)
|
|
67
|
+
}, /* @__PURE__ */ e.createElement(t.Options.Option, null, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox, {
|
|
68
|
+
className: i.checkbox
|
|
69
|
+
}, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Input, {
|
|
70
|
+
className: s
|
|
71
|
+
}), /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Label, {
|
|
72
|
+
className: r(v, O.optionLabel)
|
|
73
|
+
})), /* @__PURE__ */ e.createElement(t.Options.Option.OtherInput, {
|
|
74
|
+
inputClassName: r(x, i.input)
|
|
75
|
+
}))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
76
|
+
className: r(T, i.error)
|
|
77
|
+
}, /* @__PURE__ */ e.createElement(f, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
78
|
+
className: r(y, i.description)
|
|
79
|
+
}, V));
|
|
80
|
+
}, j = () => /* @__PURE__ */ e.createElement(U, null);
|
|
81
|
+
export {
|
|
82
|
+
j as ServicesMultiChoiceRAC
|
|
83
|
+
};
|