@wix/form-elements 1.77.0 → 1.79.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-BQsFMmBg.js → appointment-rac-lokvpd_p.js} +48 -48
- package/dist/component/{bookings-address-rac-AJNyTdok.js → bookings-address-rac-CU5NjBsy.js} +1 -1
- package/dist/component/{bookings-email-rac-BHZ0MFgI.js → bookings-email-rac-h3VGXrSQ.js} +1 -1
- package/dist/component/{bookings-first-name-rac-Bw5FuWNX.js → bookings-first-name-rac-BtsTk_1b.js} +1 -1
- package/dist/component/{bookings-header-rac-C1M2Pg1f.js → bookings-header-rac-BApE1hIE.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DKkPY0CO.js → bookings-last-name-rac-BnO5iij1.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-P6pziSl1.js → bookings-login-bar-rac-BT1npKru.js} +2 -2
- package/dist/component/{bookings-phone-rac-CiOZWKHz.js → bookings-phone-rac-DWf0haGa.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-D9ZComtY.js → bookings-rich-text-rac-C79XHlRL.js} +1 -1
- package/dist/component/{checkbox-field-rac-4zG3Sf1c.js → checkbox-field-rac-DNvhTChN.js} +90 -89
- package/dist/component/{checkbox-group-field-headless-DN2aNw9g.js → checkbox-group-field-headless-6hzWQkif.js} +53 -53
- package/dist/component/{checkbox-group-field-rac-B1qhet83.js → checkbox-group-field-rac-DbaB5Fx6.js} +5 -5
- package/dist/component/{checkbox-group-rac-DGsE7xGu.js → checkbox-group-rac-BsKKhTeh.js} +1 -1
- package/dist/component/checkbox-indicator-module-classes-DqzGZQRQ.js +9 -0
- package/dist/component/{checkbox-rac-CFWQW9_K.js → checkbox-rac-Dx7LXOdw.js} +1 -1
- package/dist/component/{contacts-address-rac-G5ZH3Odo.js → contacts-address-rac-DJZ8_DKm.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-C7TDUfT0.js → contacts-birthdate-rac-CWvsa7Kq.js} +1 -1
- package/dist/component/{contacts-company-rac-8queUhWT.js → contacts-company-rac-DgF8QpOb.js} +1 -1
- package/dist/component/{contacts-email-rac-CYOs5N_I.js → contacts-email-rac-CVqiij34.js} +1 -1
- package/dist/component/{contacts-first-name-rac-D8Goc_Ym.js → contacts-first-name-rac-BwsRVRHq.js} +1 -1
- package/dist/component/{contacts-last-name-rac-lBmtuEnr.js → contacts-last-name-rac-Blgm2DBB.js} +1 -1
- package/dist/component/{contacts-phone-rac-DSUWUNBX.js → contacts-phone-rac-Dhtv3PGY.js} +1 -1
- package/dist/component/{contacts-position-rac-wA-aw5Id.js → contacts-position-rac-DYebFQea.js} +1 -1
- package/dist/component/contacts-subscribe-rac-B_cvGaYj.js +13 -0
- package/dist/component/{contacts-tax-id-rac-BpjVM1Ye.js → contacts-tax-id-rac-B_F4I7rf.js} +1 -1
- package/dist/component/{date-availability-CeiMjrtD.js → date-availability-Cc4kd1Yk.js} +1 -1
- package/dist/component/{date-input-field-rac-CVaajAFM.js → date-input-field-rac-C__QbeDM.js} +9 -9
- package/dist/component/{date-input-rac-DhEzawuM.js → date-input-rac-BhzbmHYK.js} +1 -1
- package/dist/component/{date-picker-field-rac-1Q6yyNmK.js → date-picker-field-rac-CASH891N.js} +9 -9
- package/dist/component/{date-picker-rac-BCGtmXMJ.js → date-picker-rac-CMYAA925.js} +1 -1
- package/dist/component/{date-time-input-field-rac-Dd-HNgKP.js → date-time-input-field-rac-DPuxZ68o.js} +16 -16
- package/dist/component/{date-time-input-rac-CsCWEsH5.js → date-time-input-rac-BTJhrUXG.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-CauN5uuV.js → dext-checkbox-group-rac-5zlp2x1M.js} +2 -2
- package/dist/component/{dext-checkbox-rac-q-g9gDnw.js → dext-checkbox-rac-Cn5u395b.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CZT3dTLv.js → dext-date-picker-rac-CFfQwbC_.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DVUoZZbX.js → dext-date-time-input-rac-zRYi-0W6.js} +1 -1
- package/dist/component/{dext-dropdown-rac-GRltutt5.js → dext-dropdown-rac-CtlNh5vF.js} +1 -1
- package/dist/component/{dext-email-rac-74Y8S9GA.js → dext-email-rac-BQF4M5Mf.js} +1 -1
- package/dist/component/{dext-number-input-rac-CF9d_GTl.js → dext-number-input-rac-GR4vTWMp.js} +1 -1
- package/dist/component/{dext-phone-rac-DObx_gOd.js → dext-phone-rac-COCdZPr9.js} +1 -1
- package/dist/component/{dext-radio-group-rac-CzU9KX5_.js → dext-radio-group-rac-ZpHitbT0.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BjRwwgXr.js → dext-rating-input-rac-Er2HC9eD.js} +1 -1
- package/dist/component/{dext-tags-rac-Vif4x1yF.js → dext-tags-rac-EciVMPQ0.js} +2 -2
- package/dist/component/{dext-text-area-rac-DmZwl_ax.js → dext-text-area-rac-D6JxrykV.js} +1 -1
- package/dist/component/{dext-text-input-rac-B6FVbjUM.js → dext-text-input-rac-CD3xkLpw.js} +1 -1
- package/dist/component/{dext-url-input-rac-17Dj3ICM.js → dext-url-input-rac-BNqCYy-H.js} +1 -1
- package/dist/component/{donation-rac-bgHep0Xi.js → donation-rac-Du_qsPD6.js} +24 -24
- package/dist/component/{dropdown-field-headless-BGfJ1FyZ.js → dropdown-field-headless-NMc4cFx2.js} +3 -3
- package/dist/component/{dropdown-field-rac-DGiysJQY.js → dropdown-field-rac-hSbwxz3M.js} +3 -3
- package/dist/component/{dropdown-rac-FHjz8fKp.js → dropdown-rac-DY2QSx-Q.js} +1 -1
- package/dist/component/{ecom-address-rac-DSbpf4z8.js → ecom-address-rac-CGlQmW6l.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DiZWNwnt.js → ecom-subscription-checkbox-rac-K3Dx-Boa.js} +3 -3
- package/dist/component/{email-input-field-rac-BQKK2O7L.js → email-input-field-rac-DCKR6Yco.js} +48 -48
- package/dist/component/{events-repeater-rac-Dudnyhal.js → events-repeater-rac-DS2hIZ81.js} +61 -60
- package/dist/component/events-rsvp-rac-iSG0hWt3.js +45 -0
- package/dist/component/{field-error-headless-C5ZsFUKv.js → field-error-headless-Lb5aaoR3.js} +1 -1
- package/dist/component/{field-label-headless-CS5OYsiI.js → field-label-headless-C1VDQVhB.js} +1 -1
- package/dist/component/field-rac.module-ColNPUt0.js +23 -0
- package/dist/component/{file-upload-rac-bQ2QOO8Q.js → file-upload-rac-BEUXTVXa.js} +35 -35
- package/dist/component/{fixed-payment-rac-B6FvXoCU.js → fixed-payment-rac-BwrQJQ6w.js} +5 -5
- package/dist/component/{form-BpHElSwH.js → form-1k13yOes.js} +69 -69
- package/dist/component/form-element-classes-BuM-vthE.js +141 -0
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-D4UYcmok.js → header-field-rac-BeFf5qfw.js} +3 -3
- package/dist/component/{header-rac-KavPiBdn.js → header-rac-Cqvmjc8G.js} +1 -1
- package/dist/component/{image-choice-rac-BJQqBhBD.js → image-choice-rac-DU1Tf2-T.js} +9 -9
- package/dist/component/{index-Y8iTxLat.js → index-B0SdXZJm.js} +4 -4
- package/dist/component/{index-RSEYrQef.js → index-DhL-iYwY.js} +2 -2
- package/dist/component/{isObjectLike-jwHec4Ap.js → isObjectLike-DOWF1bjK.js} +1 -1
- package/dist/component/{multiline-address-field-rac-D4Ibno80.js → multiline-address-field-rac-CBhxL2MB.js} +38 -38
- package/dist/component/{multiline-address-rac-CrTSjzBN.js → multiline-address-rac-BgZnu3UR.js} +1 -1
- package/dist/component/{number-input-field-rac-DW1SjB-Z.js → number-input-field-rac-Cq0KLrSv.js} +8 -8
- package/dist/component/{number-input-rac-CdE_hRbA.js → number-input-rac-ovbP_aP5.js} +1 -1
- package/dist/component/{password-rac-BCxl5mMQ.js → password-rac-DLKw8FXz.js} +11 -11
- package/dist/component/{payment-input-rac-DmO4s4ue.js → payment-input-rac-EHufj8Y0.js} +11 -11
- package/dist/component/{phone-input-field-rac-BYAnwk5h.js → phone-input-field-rac-D1KzskYy.js} +27 -27
- package/dist/component/{phone-rac-gS4k9Yn8.js → phone-rac-D71sfMS7.js} +1 -1
- package/dist/component/{product-list-rac-CO0o3yOg.js → product-list-rac-BGrTM8kv.js} +23 -22
- package/dist/component/quiz-radio-group-rac-BU2GBlqo.js +13 -0
- package/dist/component/radio-button-module-classes-BqNsWvgU.js +132 -0
- package/dist/component/radio-group-field-rac-BSY-fyxl.js +47 -0
- package/dist/component/{radio-group-rac-B-9q91fJ.js → radio-group-rac-geRsORyh.js} +1 -1
- package/dist/component/rating-input-field-rac-D6gRUiSX.js +136 -0
- package/dist/component/{rating-input-rac-BVO62LmE.js → rating-input-rac-BMtu7e5q.js} +1 -1
- package/dist/component/{rich-content-rac.module-CdiaAjxG.js → rich-content-rac.module-CFMzPWHV.js} +1 -1
- package/dist/component/{rich-text-field-rac-C4RrbyEX.js → rich-text-field-rac-D0Klsdj7.js} +3 -3
- package/dist/component/{rich-text-rac-BG376ww9.js → rich-text-rac-o7idQY51.js} +1 -1
- package/dist/component/selection-indicator-XQ8MYHUQ.js +11 -0
- package/dist/component/{service-dropdown-rac-Dy6-OpVR.js → service-dropdown-rac-BXq358Pw.js} +12 -12
- package/dist/component/{services-multi-choice-rac-BKW9MP_b.js → services-multi-choice-rac-DVRk7Ayt.js} +13 -13
- package/dist/component/{signature-rac-Cxgixp4o.js → signature-rac-CblU7c_6.js} +36 -36
- package/dist/component/{submit-button-rac-BqPJ7WPI.js → submit-button-rac-DYz_oLbv.js} +2 -2
- package/dist/component/{tags-field-rac-wwqpztG7.js → tags-field-rac-D068ijAD.js} +16 -16
- package/dist/component/{tags-rac-DUxITYxU.js → tags-rac-yRjGACmm.js} +1 -1
- package/dist/component/{text-area-field-rac-Cen6O33S.js → text-area-field-rac-C4ytlqwT.js} +14 -14
- package/dist/component/{text-area-rac-CRlO56GA.js → text-area-rac-DkCdp41z.js} +1 -1
- package/dist/component/{text-input-field-rac-CbnKn03g.js → text-input-field-rac-TSY90sCu.js} +3 -3
- package/dist/component/{text-input-headless-C_NTJmLe.js → text-input-headless-D3b0XErK.js} +3 -3
- package/dist/component/{text-input-rac-DvwV7Igm.js → text-input-rac-CKiScYKV.js} +1 -1
- package/dist/component/{time-input-rac-TSEXiODs.js → time-input-rac-Cjs21F9f.js} +8 -8
- package/dist/component/{url-input-field-rac-Cxgh9T8s.js → url-input-field-rac-Bf5NoN4o.js} +15 -15
- package/dist/component/{url-input-rac-DNw-Jg1U.js → url-input-rac-DqgvJboS.js} +1 -1
- package/dist/component/{use-element-state-class-name-CC65g9mT.js → use-element-state-class-name-DkaI8J4Y.js} +1 -1
- package/dist/component/{use-service-options-base-EFrxTpGm.js → use-service-options-base-cL2N21mJ.js} +1 -1
- package/package.json +2 -2
- package/dist/component/checkbox-indicator-module-classes-BcScu147.js +0 -17
- package/dist/component/contacts-subscribe-rac-CAbBbFxZ.js +0 -13
- package/dist/component/events-rsvp-rac-008H5Ska.js +0 -38
- package/dist/component/field-rac.module-DjmaTYkc.js +0 -23
- package/dist/component/form-element-classes-BXNs5k3q.js +0 -119
- package/dist/component/quiz-radio-group-rac-Dhk7nkzb.js +0 -13
- package/dist/component/radio-group-field-rac-DdlyQ3m6.js +0 -40
- package/dist/component/radio-group-field-rac.module-emin6sSc.js +0 -124
- package/dist/component/rating-input-field-rac-VDaJKq-n.js +0 -126
|
@@ -2,35 +2,36 @@ import t, { useMemo as H, useCallback as x, useRef as B } from "react";
|
|
|
2
2
|
import { RicosViewer as K } from "@wix/ricos/viewer";
|
|
3
3
|
import _ from "classnames";
|
|
4
4
|
import { CheckboxField as $, CheckboxButton as X, NumberField as j, Group as J, Button as U, Input as W } from "react-aria-components";
|
|
5
|
-
import { ai as
|
|
5
|
+
import { ai as k, af as Y, ab as w, as as Z, ak as ee } from "./form-1k13yOes.js";
|
|
6
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-
|
|
7
|
+
import { L as te, g as ne } from "./field-label-headless-C1VDQVhB.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-Lb5aaoR3.js";
|
|
10
10
|
import { F as le } from "./fieldset-headless-CD3fds9J.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { E as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
11
|
+
import { g as se } from "./payment-field-utils-DobiK5Xh.js";
|
|
12
|
+
import { S as ie } from "./selection-indicator-XQ8MYHUQ.js";
|
|
13
|
+
import { E as ce } from "./error-icon-hZxQ6DEy.js";
|
|
14
|
+
import { C as ue } from "./checkbox-indicator-module-classes-DqzGZQRQ.js";
|
|
15
|
+
import { s as T } from "./field-rac.module-ColNPUt0.js";
|
|
16
|
+
import { z as me, P as pe, C as de, G as Ee, E as ye, y as fe, p as _e, i as Ie, D as be } from "./form-element-classes-BuM-vthE.js";
|
|
16
17
|
import { o as Q } from "./options-rac.module-KM-VT_KY.js";
|
|
17
|
-
import { u as Oe } from "./use-element-state-class-name-
|
|
18
|
+
import { u as Oe } from "./use-element-state-class-name-DkaI8J4Y.js";
|
|
18
19
|
var Le = /* @__PURE__ */ (function(e) {
|
|
19
20
|
return e.crop = "CROP", e.fit = "FIT", e;
|
|
20
|
-
})({}),
|
|
21
|
+
})({}), M = /* @__PURE__ */ (function(e) {
|
|
21
22
|
return e.oneByOne = "one-by-one", e.onlyOne = "only-one", e.many = "many", e;
|
|
22
23
|
})({});
|
|
23
24
|
function Ce({ maxItems: e, products: a } = {}) {
|
|
24
|
-
return e === 1 ?
|
|
25
|
+
return e === 1 ? M.onlyOne : a != null && a.length && a.every((l) => {
|
|
25
26
|
var n;
|
|
26
27
|
return typeof ((n = l.quantityLimit) == null ? void 0 : n.maximum) > "u";
|
|
27
|
-
}) ?
|
|
28
|
+
}) ? M.many : M.oneByOne;
|
|
28
29
|
}
|
|
29
30
|
const o = ({ children: e }) => {
|
|
30
31
|
var D;
|
|
31
|
-
const { id: a, value: l, onChange: n, disabled: r, readOnly: c, required: y, onBlur: O, onFocus: s, hasError: u, validation: m, FieldLayout: p } =
|
|
32
|
+
const { id: a, value: l, onChange: n, disabled: r, readOnly: c, required: y, onBlur: O, onFocus: s, hasError: u, validation: m, FieldLayout: p } = k(), { inputId: q, labelId: N, ariaDescribedBy: h } = Y(), f = b(e, o.Label), g = b(e, o.Options), v = b(e, o.Description), L = b(e, o.Error), i = H(() => l || [], [
|
|
32
33
|
l
|
|
33
|
-
]), A = Ce((D = m == null ? void 0 : m.predefined) == null ? void 0 : D.paymentOptions) ===
|
|
34
|
+
]), A = Ce((D = m == null ? void 0 : m.predefined) == null ? void 0 : D.paymentOptions) === M.many, F = x((S, R) => {
|
|
34
35
|
const d = i.filter((G) => G.productId !== S.productId), z = R ? [
|
|
35
36
|
...d,
|
|
36
37
|
S
|
|
@@ -61,12 +62,12 @@ const o = ({ children: e }) => {
|
|
|
61
62
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, L, v)
|
|
62
63
|
});
|
|
63
64
|
}, V = ({ children: e, className: a, ...l }) => {
|
|
64
|
-
const { allowMany: n, productValues: r, onProductChange: c, disabled: y, readOnly: O, hasError: s } = l, { options: u, validation: m, imageResize: p } =
|
|
65
|
+
const { allowMany: n, productValues: r, onProductChange: c, disabled: y, readOnly: O, hasError: s } = l, { options: u, validation: m, imageResize: p } = k(), { currency: q } = w(), { t: N } = Z(), h = b(e, o.Option);
|
|
65
66
|
return /* @__PURE__ */ t.createElement("div", {
|
|
66
67
|
className: a
|
|
67
68
|
}, u == null ? void 0 : u.map((f, g) => {
|
|
68
69
|
var C, A, F, D, S;
|
|
69
|
-
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 === f.value)) == null ? void 0 : D.fixedPriceOptions) == null ? void 0 : S.price) || "0", L =
|
|
70
|
+
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 === f.value)) == null ? void 0 : D.fixedPriceOptions) == null ? void 0 : S.price) || "0", L = se(N, q), i = r.find((R) => R.productId === f.value);
|
|
70
71
|
return I(h, {
|
|
71
72
|
key: f.id || f.value || f.label,
|
|
72
73
|
option: f,
|
|
@@ -84,7 +85,7 @@ const o = ({ children: e }) => {
|
|
|
84
85
|
});
|
|
85
86
|
}));
|
|
86
87
|
}, E = ({ children: e, className: a, ...l }) => {
|
|
87
|
-
const { option: n, price: r, quantity: c = 0, isSelected: y, allowMany: O, onProductChange: s, disabled: u, readOnly: m, hasError: p, currencyAriaLabel: q, imageResize: N, isFirst: h } = l, { id: f } =
|
|
88
|
+
const { option: n, price: r, quantity: c = 0, isSelected: y, allowMany: O, onProductChange: s, disabled: u, readOnly: m, hasError: p, currencyAriaLabel: q, imageResize: N, isFirst: h } = l, { id: f } = k(), 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);
|
|
88
89
|
ee(() => {
|
|
89
90
|
var d;
|
|
90
91
|
h && ((d = g.current ?? v.current) == null || d.focus({
|
|
@@ -218,7 +219,7 @@ const o = ({ children: e }) => {
|
|
|
218
219
|
E.Image = Re;
|
|
219
220
|
E.Label = ge;
|
|
220
221
|
E.Price = Fe;
|
|
221
|
-
E.Input =
|
|
222
|
+
E.Input = ie;
|
|
222
223
|
E.Quantity = De;
|
|
223
224
|
V.Option = E;
|
|
224
225
|
o.Label = te;
|
|
@@ -240,7 +241,7 @@ const Se = "_options_11x4v_1", Pe = "_option_11x4v_1", Ne = "_optionInput_11x4v_
|
|
|
240
241
|
}), xe = () => {
|
|
241
242
|
const e = Oe({
|
|
242
243
|
globalClasses: be,
|
|
243
|
-
moduleClasses:
|
|
244
|
+
moduleClasses: ue
|
|
244
245
|
});
|
|
245
246
|
return /* @__PURE__ */ t.createElement(o, null, /* @__PURE__ */ t.createElement(o.Label, {
|
|
246
247
|
className: _(me, T.label)
|
|
@@ -262,10 +263,10 @@ const Se = "_options_11x4v_1", Pe = "_option_11x4v_1", Ne = "_optionInput_11x4v_
|
|
|
262
263
|
className: _(fe, T.inputGroup, P.quantity)
|
|
263
264
|
}))), /* @__PURE__ */ t.createElement(o.Error, {
|
|
264
265
|
className: _(_e, T.error)
|
|
265
|
-
}, /* @__PURE__ */ t.createElement(
|
|
266
|
+
}, /* @__PURE__ */ t.createElement(ce, null), /* @__PURE__ */ t.createElement(o.Error.Text, null)), /* @__PURE__ */ t.createElement(o.Description, {
|
|
266
267
|
className: _(Ie, T.description)
|
|
267
268
|
}, qe));
|
|
268
|
-
},
|
|
269
|
+
}, et = () => /* @__PURE__ */ t.createElement(xe, null);
|
|
269
270
|
export {
|
|
270
|
-
|
|
271
|
+
et as ProductListRAC
|
|
271
272
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import _ from "react";
|
|
2
|
+
import { R } from "./radio-group-field-rac-BSY-fyxl.js";
|
|
3
|
+
import { J as o, I as r, H as O } from "./form-element-classes-BuM-vthE.js";
|
|
4
|
+
const e = () => /* @__PURE__ */ _.createElement(R, {
|
|
5
|
+
classes: {
|
|
6
|
+
container: O,
|
|
7
|
+
label: r,
|
|
8
|
+
radioButton: o
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
e as QuizRadioGroupRAC
|
|
13
|
+
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import l, { useRef as S, useState as V, useEffect as B, useCallback as T } from "react";
|
|
2
|
+
import { RadioGroup as H, RadioField as k, RadioButton as M, TextField as U, Input as A } from "react-aria-components";
|
|
3
|
+
import { ai as v, af as G, as as F, ab as P, ak as $ } from "./form-1k13yOes.js";
|
|
4
|
+
import { f as p, a as y } from "./find-child-C60k4CxG.js";
|
|
5
|
+
import { D as q, E as x } from "./field-error-headless-Lb5aaoR3.js";
|
|
6
|
+
import { L as j } from "./field-label-headless-C1VDQVhB.js";
|
|
7
|
+
import { N as w } from "./options-layout-constants-DEfIEJWD.js";
|
|
8
|
+
import { S as z } from "./selection-indicator-XQ8MYHUQ.js";
|
|
9
|
+
const L = "Other", J = (e, t) => e == null ? void 0 : e.find((o) => (o.value ?? o.label) === t), R = (e, t) => !!t && !J(e, t), K = (e, t) => {
|
|
10
|
+
const a = t ? t.length + 2 : 0;
|
|
11
|
+
return e.slice(a);
|
|
12
|
+
}, c = ({ children: e }) => {
|
|
13
|
+
const { id: t, value: o, onChange: a, disabled: O, readOnly: b, required: h, onBlur: f, onFocus: _, hasError: E, FieldLayout: r, options: s } = v(), { inputId: u, labelId: C, ariaDescribedBy: n } = G(), d = p(e, c.Label), i = p(e, c.Options), I = p(e, c.Description), N = p(e, c.Error), D = R(s, o) ? L : o || null;
|
|
14
|
+
return /* @__PURE__ */ l.createElement(r, {
|
|
15
|
+
fieldId: t,
|
|
16
|
+
renderLabel: () => y(d, {
|
|
17
|
+
as: "div"
|
|
18
|
+
}),
|
|
19
|
+
renderInput: () => /* @__PURE__ */ l.createElement(H, {
|
|
20
|
+
id: u,
|
|
21
|
+
"aria-labelledby": C,
|
|
22
|
+
"aria-describedby": n,
|
|
23
|
+
value: D,
|
|
24
|
+
onChange: a,
|
|
25
|
+
isDisabled: O,
|
|
26
|
+
isReadOnly: b,
|
|
27
|
+
isRequired: h,
|
|
28
|
+
isInvalid: E,
|
|
29
|
+
onBlur: f,
|
|
30
|
+
onFocus: _
|
|
31
|
+
}, i),
|
|
32
|
+
renderDescription: () => /* @__PURE__ */ l.createElement(l.Fragment, null, N, I)
|
|
33
|
+
});
|
|
34
|
+
}, Q = ({ children: e, className: t }) => {
|
|
35
|
+
const { options: o, addOther: a, addOtherLabel: O, id: b, numberOfColumns: h, hasError: f } = v(), { t: _ } = F(), { isMobile: E } = P(), r = p(e, c.Option), s = S(null), u = O || _("add-other.default-other-option-label") || L, C = E ? w.ONE : h;
|
|
36
|
+
return $(() => {
|
|
37
|
+
var n;
|
|
38
|
+
(n = s.current) == null || n.focus();
|
|
39
|
+
}, b), /* @__PURE__ */ l.createElement("div", {
|
|
40
|
+
className: t,
|
|
41
|
+
"data-columns": C,
|
|
42
|
+
"data-invalid": f
|
|
43
|
+
}, o.map((n, d) => y(r, {
|
|
44
|
+
key: n.value ?? n.label,
|
|
45
|
+
value: n.value ?? n.label,
|
|
46
|
+
label: n.label,
|
|
47
|
+
index: d,
|
|
48
|
+
radioRef: d === 0 ? s : void 0
|
|
49
|
+
})), a && y(r, {
|
|
50
|
+
key: L,
|
|
51
|
+
value: L,
|
|
52
|
+
label: u,
|
|
53
|
+
isOther: !0
|
|
54
|
+
}));
|
|
55
|
+
}, m = ({ children: e, className: t, ...o }) => {
|
|
56
|
+
var d;
|
|
57
|
+
const { value: a, label: O, isOther: b = !1, radioRef: h } = o, { value: f, options: _ } = v(), E = p(e, m.Label), r = p(e, m.Input), s = p(e, m.Control), u = p(e, m.OtherInput), C = b ? R(_, f) : f === a, n = (d = r == null ? void 0 : r.props) == null ? void 0 : d.className;
|
|
58
|
+
return /* @__PURE__ */ l.createElement("div", {
|
|
59
|
+
className: t
|
|
60
|
+
}, /* @__PURE__ */ l.createElement(k, {
|
|
61
|
+
value: a
|
|
62
|
+
}, /* @__PURE__ */ l.createElement(M, {
|
|
63
|
+
ref: h,
|
|
64
|
+
className: n
|
|
65
|
+
}, ({ isSelected: i, isHovered: I }) => /* @__PURE__ */ l.createElement(l.Fragment, null, y(s, {
|
|
66
|
+
isSelected: i,
|
|
67
|
+
isHovered: I
|
|
68
|
+
}), y(E, {
|
|
69
|
+
label: O
|
|
70
|
+
})))), b && C && u);
|
|
71
|
+
}, W = ({ className: e, ...t }) => {
|
|
72
|
+
const { label: o } = t;
|
|
73
|
+
return /* @__PURE__ */ l.createElement("span", {
|
|
74
|
+
className: e
|
|
75
|
+
}, o);
|
|
76
|
+
}, X = (e) => null, Y = ({ className: e }) => {
|
|
77
|
+
const { value: t, onChange: o, addOtherLabel: a, addOtherPlaceholder: O, otherInputCharacterLimit: b, disabled: h, readOnly: f, options: _ } = v(), { t: E } = F(), r = S(null), s = R(_, t), u = a || E("add-other.default-other-option-label") || L, [C, n] = V(s && t ? K(t, a) : "");
|
|
78
|
+
B(() => {
|
|
79
|
+
var i;
|
|
80
|
+
s && r.current && ((i = r.current) == null || i.focus());
|
|
81
|
+
}, [
|
|
82
|
+
s
|
|
83
|
+
]);
|
|
84
|
+
const d = T((i) => {
|
|
85
|
+
let I;
|
|
86
|
+
i ? I = `${a}: ${i}` : I = u, o(I), n(i);
|
|
87
|
+
}, [
|
|
88
|
+
o,
|
|
89
|
+
a,
|
|
90
|
+
u
|
|
91
|
+
]);
|
|
92
|
+
return /* @__PURE__ */ l.createElement(U, {
|
|
93
|
+
"aria-label": u,
|
|
94
|
+
value: C,
|
|
95
|
+
onChange: d,
|
|
96
|
+
isDisabled: h,
|
|
97
|
+
isReadOnly: f
|
|
98
|
+
}, /* @__PURE__ */ l.createElement(A, {
|
|
99
|
+
ref: r,
|
|
100
|
+
className: e,
|
|
101
|
+
placeholder: O,
|
|
102
|
+
maxLength: b
|
|
103
|
+
}));
|
|
104
|
+
};
|
|
105
|
+
m.Label = W;
|
|
106
|
+
m.Input = X;
|
|
107
|
+
m.Control = z;
|
|
108
|
+
m.OtherInput = Y;
|
|
109
|
+
c.Label = j;
|
|
110
|
+
c.Options = Q;
|
|
111
|
+
c.Option = m;
|
|
112
|
+
c.Description = q;
|
|
113
|
+
c.Error = x;
|
|
114
|
+
const Z = "_labelImage_1neyf_1", ee = "_options_1neyf_26", te = "_option_1neyf_26", oe = "_optionInput_1neyf_46", ne = "_optionControl_1neyf_64", ae = "_optionControlHover_1neyf_86", le = "_optionControlSelected_1neyf_104", re = "_optionLabel_1neyf_139", g = {
|
|
115
|
+
labelImage: Z,
|
|
116
|
+
options: ee,
|
|
117
|
+
option: te,
|
|
118
|
+
optionInput: oe,
|
|
119
|
+
optionControl: ne,
|
|
120
|
+
optionControlHover: ae,
|
|
121
|
+
optionControlSelected: le,
|
|
122
|
+
optionLabel: re
|
|
123
|
+
}, fe = {
|
|
124
|
+
base: g.optionControl,
|
|
125
|
+
selected: g.optionControlSelected,
|
|
126
|
+
hover: g.optionControlHover
|
|
127
|
+
};
|
|
128
|
+
export {
|
|
129
|
+
fe as R,
|
|
130
|
+
c as a,
|
|
131
|
+
g as s
|
|
132
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { RicosViewer as n } from "@wix/ricos/viewer";
|
|
2
|
+
import t from "classnames";
|
|
3
|
+
import e from "react";
|
|
4
|
+
import { a, s as o, R as m } from "./radio-button-module-classes-BqNsWvgU.js";
|
|
5
|
+
import { E as c } from "./error-icon-hZxQ6DEy.js";
|
|
6
|
+
import { s } from "./field-rac.module-ColNPUt0.js";
|
|
7
|
+
import { M as i, L as E, K as _, z as R, P as O, y as p, p as L, i as I } from "./form-element-classes-BuM-vthE.js";
|
|
8
|
+
import { u as D } from "./use-element-state-class-name-DkaI8J4Y.js";
|
|
9
|
+
const N = ({ content: r, locale: l }) => /* @__PURE__ */ e.createElement(n, {
|
|
10
|
+
content: r,
|
|
11
|
+
locale: l
|
|
12
|
+
}), f = ({ classes: r = {
|
|
13
|
+
container: _,
|
|
14
|
+
label: E,
|
|
15
|
+
radioButton: i
|
|
16
|
+
} }) => {
|
|
17
|
+
const l = D({
|
|
18
|
+
globalClasses: r.radioButton,
|
|
19
|
+
moduleClasses: m
|
|
20
|
+
});
|
|
21
|
+
return /* @__PURE__ */ e.createElement(a, null, /* @__PURE__ */ e.createElement(a.Label, {
|
|
22
|
+
className: t(R, s.label)
|
|
23
|
+
}, /* @__PURE__ */ e.createElement(a.Label.Required, {
|
|
24
|
+
className: t(O, s.requiredMark)
|
|
25
|
+
}), /* @__PURE__ */ e.createElement(a.Label.Image, {
|
|
26
|
+
className: o.labelImage
|
|
27
|
+
})), /* @__PURE__ */ e.createElement(a.Options, {
|
|
28
|
+
className: t(r.container, o.options)
|
|
29
|
+
}, /* @__PURE__ */ e.createElement(a.Option, {
|
|
30
|
+
className: o.option
|
|
31
|
+
}, /* @__PURE__ */ e.createElement(a.Option.Input, {
|
|
32
|
+
className: o.optionInput
|
|
33
|
+
}), /* @__PURE__ */ e.createElement(a.Option.Control, {
|
|
34
|
+
className: l
|
|
35
|
+
}), /* @__PURE__ */ e.createElement(a.Option.Label, {
|
|
36
|
+
className: t(r.label, o.optionLabel)
|
|
37
|
+
}), /* @__PURE__ */ e.createElement(a.Option.OtherInput, {
|
|
38
|
+
className: t(p, s.input)
|
|
39
|
+
}))), /* @__PURE__ */ e.createElement(a.Error, {
|
|
40
|
+
className: t(L, s.error)
|
|
41
|
+
}, /* @__PURE__ */ e.createElement(c, null), /* @__PURE__ */ e.createElement(a.Error.Text, null)), /* @__PURE__ */ e.createElement(a.Description, {
|
|
42
|
+
className: t(I, s.description)
|
|
43
|
+
}, N));
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
f as R
|
|
47
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { RicosViewer as N } from "@wix/ricos/viewer";
|
|
2
|
+
import m from "classnames";
|
|
3
|
+
import e, { useCallback as y, useState as O, useRef as A } from "react";
|
|
4
|
+
import { ai as b, af as v, as as T } from "./form-1k13yOes.js";
|
|
5
|
+
import { RadioGroup as H, RadioField as M, RadioButton as w } from "react-aria-components";
|
|
6
|
+
import { f as u, a as P } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { D as B, E as q } from "./field-error-headless-Lb5aaoR3.js";
|
|
8
|
+
import { L as G } from "./field-label-headless-C1VDQVhB.js";
|
|
9
|
+
import { E as k } from "./error-icon-hZxQ6DEy.js";
|
|
10
|
+
import { s as g } from "./field-rac.module-ColNPUt0.js";
|
|
11
|
+
import { z as x, P as z, N as U, p as Q, i as Z, O as j } from "./form-element-classes-BuM-vthE.js";
|
|
12
|
+
import { u as J } from "./use-element-state-class-name-DkaI8J4Y.js";
|
|
13
|
+
const t = ({ children: a }) => {
|
|
14
|
+
const { id: n, value: r, onChange: l, disabled: o, readOnly: d, required: c, hasError: i, onBlur: E, onFocus: C, FieldLayout: R } = b(), { labelId: _ } = v(), L = y((D) => l(Number(D)), [
|
|
15
|
+
l
|
|
16
|
+
]), f = u(a, t.Label), s = u(a, t.Ratings), S = u(a, t.Description), h = u(a, t.Error);
|
|
17
|
+
return /* @__PURE__ */ e.createElement(R, {
|
|
18
|
+
fieldId: n,
|
|
19
|
+
renderLabel: () => f,
|
|
20
|
+
renderInput: () => /* @__PURE__ */ e.createElement(H, {
|
|
21
|
+
"aria-labelledby": _,
|
|
22
|
+
value: r ? String(r) : void 0,
|
|
23
|
+
onChange: L,
|
|
24
|
+
isDisabled: o,
|
|
25
|
+
isReadOnly: d,
|
|
26
|
+
isRequired: c,
|
|
27
|
+
isInvalid: i,
|
|
28
|
+
onBlur: E,
|
|
29
|
+
onFocus: C,
|
|
30
|
+
orientation: "horizontal"
|
|
31
|
+
}, s),
|
|
32
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, h, S)
|
|
33
|
+
});
|
|
34
|
+
}, I = ({ children: a, className: n, getReactionLabel: r }) => {
|
|
35
|
+
const { value: l, readOnly: o, hasError: d } = b(), { inputId: c, ariaDescribedBy: i } = v(), [E, C] = O(), R = A(null), _ = u(a, I.Rating), L = [
|
|
36
|
+
"1",
|
|
37
|
+
"2",
|
|
38
|
+
"3",
|
|
39
|
+
"4",
|
|
40
|
+
"5"
|
|
41
|
+
], f = (s) => E && !o ? E >= s : !!l && l >= Number(s);
|
|
42
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
43
|
+
ref: R,
|
|
44
|
+
id: c,
|
|
45
|
+
"aria-describedby": i,
|
|
46
|
+
className: n,
|
|
47
|
+
"data-invalid": d,
|
|
48
|
+
"data-readonly": o
|
|
49
|
+
}, L.map((s) => P(_, {
|
|
50
|
+
key: s,
|
|
51
|
+
value: s,
|
|
52
|
+
isSelected: f(s),
|
|
53
|
+
onHoverChange: (S) => C(S ? s : void 0),
|
|
54
|
+
label: r == null ? void 0 : r(Number(s))
|
|
55
|
+
})));
|
|
56
|
+
}, K = {
|
|
57
|
+
border: 0,
|
|
58
|
+
clipPath: "inset(50%)",
|
|
59
|
+
height: 1,
|
|
60
|
+
margin: -1,
|
|
61
|
+
overflow: "hidden",
|
|
62
|
+
padding: 0,
|
|
63
|
+
position: "absolute",
|
|
64
|
+
width: 1,
|
|
65
|
+
whiteSpace: "nowrap"
|
|
66
|
+
}, F = ({ className: a, children: n, ...r }) => {
|
|
67
|
+
const { value: l, isSelected: o, onHoverChange: d, label: c } = r;
|
|
68
|
+
return /* @__PURE__ */ e.createElement(M, {
|
|
69
|
+
value: l
|
|
70
|
+
}, /* @__PURE__ */ e.createElement(w, {
|
|
71
|
+
className: ({ isHovered: i }) => typeof a == "function" ? a({
|
|
72
|
+
isSelected: o,
|
|
73
|
+
isHovered: i
|
|
74
|
+
}) : a ?? "",
|
|
75
|
+
"data-active": o || void 0,
|
|
76
|
+
onHoverChange: d
|
|
77
|
+
}, ({ isHovered: i }) => /* @__PURE__ */ e.createElement(e.Fragment, null, typeof n == "function" ? n({
|
|
78
|
+
isSelected: o,
|
|
79
|
+
isHovered: i
|
|
80
|
+
}) : n, c ? /* @__PURE__ */ e.createElement("span", {
|
|
81
|
+
style: K
|
|
82
|
+
}, c) : null)));
|
|
83
|
+
};
|
|
84
|
+
I.Rating = F;
|
|
85
|
+
t.Label = G;
|
|
86
|
+
t.Ratings = I;
|
|
87
|
+
t.Rating = F;
|
|
88
|
+
t.Description = B;
|
|
89
|
+
t.Error = q;
|
|
90
|
+
const W = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
91
|
+
viewBox: "0 0 32 32",
|
|
92
|
+
width: 32,
|
|
93
|
+
height: 32,
|
|
94
|
+
fill: "currentColor",
|
|
95
|
+
"aria-hidden": "true",
|
|
96
|
+
...a
|
|
97
|
+
}, /* @__PURE__ */ e.createElement("path", {
|
|
98
|
+
fillRule: "evenodd",
|
|
99
|
+
d: "M28.6265,13.6325 C28.9655,13.3015 29.0845,12.8175 28.9385,12.3665 C28.7925,11.9165 28.4105,11.5945 27.9415,11.5265 L20.5785,10.4565 C20.5015,10.4445 20.4345,10.3965 20.4005,10.3275 L17.1075,3.6545 L17.1075,3.6535 C16.8975,3.2295 16.4735,2.9655 16.0005,2.9655 L15.9995,2.9655 C15.5255,2.9655 15.1025,3.2295 14.8925,3.6545 L11.5985,10.3275 C11.5645,10.3965 11.4985,10.4445 11.4225,10.4565 L4.0575,11.5265 C3.5895,11.5945 3.2075,11.9165 3.0615,12.3665 C2.9155,12.8175 3.0345,13.3015 3.3735,13.6325 L8.7025,18.8265 C8.7575,18.8805 8.7835,18.9585 8.7705,19.0345 L7.5125,26.3695 C7.4325,26.8355 7.6205,27.2985 8.0035,27.5765 C8.2195,27.7345 8.4735,27.8145 8.7285,27.8145 C8.9245,27.8145 9.1215,27.7665 9.3045,27.6705 L15.8895,24.2085 C15.9595,24.1725 16.0415,24.1725 16.1085,24.2075 L22.6955,27.6705 C23.1155,27.8915 23.6135,27.8555 23.9965,27.5765 C24.3795,27.2985 24.5675,26.8355 24.4875,26.3695 L23.2305,19.0355 C23.2165,18.9585 23.2425,18.8805 23.2975,18.8265 L28.6265,13.6325 Z"
|
|
100
|
+
})), X = "_ratings_a5lgi_1", Y = "_rating_a5lgi_1", $ = "_ratingSelected_a5lgi_37", V = "_ratingHover_a5lgi_44", p = {
|
|
101
|
+
ratings: X,
|
|
102
|
+
rating: Y,
|
|
103
|
+
ratingSelected: $,
|
|
104
|
+
ratingHover: V
|
|
105
|
+
}, ee = ({ content: a, locale: n }) => /* @__PURE__ */ e.createElement(N, {
|
|
106
|
+
content: a,
|
|
107
|
+
locale: n
|
|
108
|
+
}), te = {
|
|
109
|
+
base: p.rating,
|
|
110
|
+
selected: p.ratingSelected,
|
|
111
|
+
hover: p.ratingHover
|
|
112
|
+
}, ge = () => {
|
|
113
|
+
const { t: a } = T(), n = J({
|
|
114
|
+
globalClasses: j,
|
|
115
|
+
moduleClasses: te
|
|
116
|
+
});
|
|
117
|
+
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
118
|
+
className: m(x, g.label)
|
|
119
|
+
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
120
|
+
className: m(z, g.requiredMark)
|
|
121
|
+
})), /* @__PURE__ */ e.createElement(t.Ratings, {
|
|
122
|
+
className: m(U, p.ratings),
|
|
123
|
+
getReactionLabel: (r) => a("rating-input.a11y.reaction-label", {
|
|
124
|
+
count: r
|
|
125
|
+
})
|
|
126
|
+
}, /* @__PURE__ */ e.createElement(t.Rating, {
|
|
127
|
+
className: n
|
|
128
|
+
}, /* @__PURE__ */ e.createElement(W, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
129
|
+
className: m(Q, g.error)
|
|
130
|
+
}, /* @__PURE__ */ e.createElement(k, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
131
|
+
className: m(Z, g.description)
|
|
132
|
+
}, ee));
|
|
133
|
+
};
|
|
134
|
+
export {
|
|
135
|
+
ge as R
|
|
136
|
+
};
|
package/dist/component/{rich-content-rac.module-CdiaAjxG.js → rich-content-rac.module-CFMzPWHV.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-1k13yOes.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-1k13yOes.js";
|
|
4
|
+
import { u as T, R as C, s as d, T as p } from "./rich-content-rac.module-CFMzPWHV.js";
|
|
5
|
+
import { a6 as g } from "./form-element-classes-BuM-vthE.js";
|
|
6
6
|
const h = {
|
|
7
7
|
colorPalette: R(),
|
|
8
8
|
customStyles: u()
|
package/dist/component/{service-dropdown-rac-Dy6-OpVR.js → service-dropdown-rac-BXq358Pw.js}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import t, { useRef as
|
|
1
|
+
import t, { useRef as N, 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 U, h as V } from "./form-
|
|
5
|
-
import { u as x } from "./use-service-options-base-
|
|
6
|
-
import { D as d } from "./dropdown-field-headless-
|
|
4
|
+
import { ae as w, as as b, F as M, ai as y, ab as U, h as V } from "./form-1k13yOes.js";
|
|
5
|
+
import { u as x } from "./use-service-options-base-cL2N21mJ.js";
|
|
6
|
+
import { D as d } from "./dropdown-field-headless-NMc4cFx2.js";
|
|
7
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 { z as q,
|
|
10
|
+
import { s as n } from "./field-rac.module-ColNPUt0.js";
|
|
11
|
+
import { z as q, P as W, y as z, B as Q, p as Y, i as j } from "./form-element-classes-BuM-vthE.js";
|
|
12
12
|
const G = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
13
|
-
const { actions: r } = w(), { t: C } = b(), { addOther: i, addOtherLabel: p } = e, c = p || C("add-other.default-other-option-label"), a =
|
|
13
|
+
const { actions: r } = w(), { t: C } = b(), { addOther: i, addOtherLabel: p } = e, c = p || C("add-other.default-other-option-label"), a = N(!0), E = g(() => {
|
|
14
14
|
var s;
|
|
15
15
|
return ((s = e.options) == null ? void 0 : s.map((u) => u.id ?? "")) ?? [];
|
|
16
16
|
}, [
|
|
@@ -72,7 +72,7 @@ const G = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
|
72
72
|
}, [
|
|
73
73
|
R,
|
|
74
74
|
e.onFocus
|
|
75
|
-
]),
|
|
75
|
+
]), P = h(
|
|
76
76
|
(s) => {
|
|
77
77
|
e.onChange && e.onChange(s), a.current = !0;
|
|
78
78
|
},
|
|
@@ -86,7 +86,7 @@ const G = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
|
86
86
|
options: l,
|
|
87
87
|
isEmpty: D,
|
|
88
88
|
onFocus: v,
|
|
89
|
-
onChange:
|
|
89
|
+
onChange: P,
|
|
90
90
|
shouldRender: I
|
|
91
91
|
};
|
|
92
92
|
}, o = ({ children: e }) => {
|
|
@@ -123,13 +123,13 @@ const K = ({ content: e, locale: r }) => /* @__PURE__ */ t.createElement(A, {
|
|
|
123
123
|
}), X = () => /* @__PURE__ */ t.createElement(o, null, /* @__PURE__ */ t.createElement(o.Label, {
|
|
124
124
|
className: m(q, n.label)
|
|
125
125
|
}, /* @__PURE__ */ t.createElement(o.Label.Required, {
|
|
126
|
-
className: m(
|
|
126
|
+
className: m(W, n.requiredMark)
|
|
127
127
|
})), /* @__PURE__ */ t.createElement(o.Trigger, {
|
|
128
|
-
className: m(
|
|
128
|
+
className: m(z, n.input, n.dropdownTrigger)
|
|
129
129
|
}, /* @__PURE__ */ t.createElement(B, {
|
|
130
130
|
className: n.dropdownIcon
|
|
131
131
|
})), /* @__PURE__ */ t.createElement(o.Options, {
|
|
132
|
-
className: m(
|
|
132
|
+
className: m(Q, 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, {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import e, { useEffect as _, useMemo as I } from "react";
|
|
2
2
|
import { RicosViewer as L } from "@wix/ricos/viewer";
|
|
3
3
|
import r from "classnames";
|
|
4
|
-
import { F as R, ai as d, h as D } from "./form-
|
|
5
|
-
import { u as F } from "./use-service-options-base-
|
|
6
|
-
import { C as a } from "./checkbox-group-field-headless-
|
|
4
|
+
import { F as R, ai as d, h as D } from "./form-1k13yOes.js";
|
|
5
|
+
import { u as F } from "./use-service-options-base-cL2N21mJ.js";
|
|
6
|
+
import { C as a } from "./checkbox-group-field-headless-6hzWQkif.js";
|
|
7
7
|
import { E as f } from "./error-icon-hZxQ6DEy.js";
|
|
8
|
-
import { C as N } from "./checkbox-indicator-module-classes-
|
|
9
|
-
import { s as i } from "./field-rac.module-
|
|
10
|
-
import { z as h,
|
|
8
|
+
import { C as N } from "./checkbox-indicator-module-classes-DqzGZQRQ.js";
|
|
9
|
+
import { s as i } from "./field-rac.module-ColNPUt0.js";
|
|
10
|
+
import { z as h, P as M, T as b, V as A, y as T, p as v, i as x, U as P } from "./form-element-classes-BuM-vthE.js";
|
|
11
11
|
import { o as O } from "./options-rac.module-KM-VT_KY.js";
|
|
12
|
-
import { u as
|
|
12
|
+
import { u as y } from "./use-element-state-class-name-DkaI8J4Y.js";
|
|
13
13
|
const k = (s) => {
|
|
14
14
|
var C;
|
|
15
15
|
const { isLoading: o, options: n, isEmpty: c, shouldRender: m, setOptions: l, setIsEmpty: E, setHasInitialDataLoaded: p } = F({
|
|
@@ -55,8 +55,8 @@ const V = ({ content: s, locale: o }) => /* @__PURE__ */ e.createElement(L, {
|
|
|
55
55
|
content: s,
|
|
56
56
|
locale: o
|
|
57
57
|
}), U = () => {
|
|
58
|
-
const s =
|
|
59
|
-
globalClasses:
|
|
58
|
+
const s = y({
|
|
59
|
+
globalClasses: P,
|
|
60
60
|
moduleClasses: N
|
|
61
61
|
});
|
|
62
62
|
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
@@ -72,13 +72,13 @@ const V = ({ content: s, locale: o }) => /* @__PURE__ */ e.createElement(L, {
|
|
|
72
72
|
}), /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Label, {
|
|
73
73
|
className: r(A, O.optionLabel)
|
|
74
74
|
})), /* @__PURE__ */ e.createElement(t.Options.Option.OtherInput, {
|
|
75
|
-
inputClassName: r(
|
|
75
|
+
inputClassName: r(T, i.input)
|
|
76
76
|
}))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
77
|
-
className: r(
|
|
77
|
+
className: r(v, i.error)
|
|
78
78
|
}, /* @__PURE__ */ e.createElement(f, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
79
79
|
className: r(x, i.description)
|
|
80
80
|
}, V));
|
|
81
|
-
},
|
|
81
|
+
}, J = () => /* @__PURE__ */ e.createElement(U, null);
|
|
82
82
|
export {
|
|
83
|
-
|
|
83
|
+
J as ServicesMultiChoiceRAC
|
|
84
84
|
};
|