@wix/form-elements 1.108.0 → 1.109.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-ZAp8oWbK.js → appointment-rac-C9-XwsPI.js} +60 -60
- package/dist/component/{bookings-address-rac-x-Az7vHf.js → bookings-address-rac-jrrCPWjw.js} +1 -1
- package/dist/component/{bookings-email-rac-MoF_CaqB.js → bookings-email-rac-J9-RMEbf.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CWh3Rb0M.js → bookings-first-name-rac-CH7-6JmA.js} +1 -1
- package/dist/component/{bookings-header-rac-BVTiXUWk.js → bookings-header-rac-C2JV-ciN.js} +1 -1
- package/dist/component/{bookings-last-name-rac-kXRRlyHl.js → bookings-last-name-rac-0a9CwiaV.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-C4Zr6kXE.js → bookings-login-bar-rac-4Mb7MQYe.js} +3 -3
- package/dist/component/{bookings-phone-rac-2rz1m_xi.js → bookings-phone-rac-vYx5r5jn.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-BEjGypQw.js → bookings-rich-text-rac-CWg1FgUp.js} +1 -1
- package/dist/component/{checkbox-field-rac-DwEQLIaz.js → checkbox-field-rac-Dwx1leKA.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-BsOww_QB.js → checkbox-group-field-headless-AFWgXzx_.js} +8 -8
- package/dist/component/{checkbox-group-field-rac-DTcZcVS6.js → checkbox-group-field-rac-CO8kmWJp.js} +4 -4
- package/dist/component/{checkbox-group-rac-DQsML-pW.js → checkbox-group-rac-_79HsFF4.js} +1 -1
- package/dist/component/{checkbox-rac-irEBBOxP.js → checkbox-rac-B_tbMfjo.js} +1 -1
- package/dist/component/{contacts-address-rac-B5bSAYrm.js → contacts-address-rac-SJ5Tvzd0.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DyScj8f4.js → contacts-birthdate-rac-BU1L3sbW.js} +1 -1
- package/dist/component/{contacts-company-rac-C5X9-jXa.js → contacts-company-rac-Y4B8KhDa.js} +1 -1
- package/dist/component/{contacts-email-rac-B0vkfmrS.js → contacts-email-rac-CQW84o7C.js} +1 -1
- package/dist/component/{contacts-first-name-rac-Cfil3U_e.js → contacts-first-name-rac-Dtai-wtH.js} +1 -1
- package/dist/component/{contacts-last-name-rac-CtPLE-7-.js → contacts-last-name-rac--ixuu3ri.js} +1 -1
- package/dist/component/{contacts-phone-rac-YkzsAoBZ.js → contacts-phone-rac-HOHfSvT-.js} +1 -1
- package/dist/component/{contacts-position-rac-BS4j8QC-.js → contacts-position-rac-BPMkh6yf.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-z_9VsEZL.js → contacts-subscribe-rac-D0_RMwJb.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-WFkmKyZv.js → contacts-tax-id-rac-CZJmMiVf.js} +1 -1
- package/dist/component/{date-availability-NN3rxosk.js → date-availability-C4dDHvuc.js} +1 -1
- package/dist/component/{date-input-field-rac-mdhEC3oq.js → date-input-field-rac-8oERZcqh.js} +64 -64
- package/dist/component/{date-input-rac-CGciuoTx.js → date-input-rac-CYRojmW6.js} +1 -1
- package/dist/component/{date-picker-field-rac-CRZVODfF.js → date-picker-field-rac-CIspU7No.js} +31 -31
- package/dist/component/{date-picker-rac-Bfbvjy8W.js → date-picker-rac-D0Y0zf2J.js} +1 -1
- package/dist/component/{date-time-input-field-rac-TDWBXZ44.js → date-time-input-field-rac-0daWK65I.js} +70 -70
- package/dist/component/{date-time-input-rac-DY0qdSix.js → date-time-input-rac-BemKPk1j.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BFGM7SOt.js → dext-checkbox-group-rac-BpFNn56W.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DPZvTeUZ.js → dext-checkbox-rac-DOISgubJ.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Xd5kojsQ.js → dext-date-picker-rac-CNGhFg_g.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-C0RIdxJW.js → dext-date-time-input-rac-BuUIvJRr.js} +1 -1
- package/dist/component/{dext-dropdown-rac-D1m8vJvm.js → dext-dropdown-rac-DtND-Dbo.js} +1 -1
- package/dist/component/{dext-email-rac-BC81RFYY.js → dext-email-rac-CmjLFOi8.js} +1 -1
- package/dist/component/{dext-number-input-rac-Z_ih9FfX.js → dext-number-input-rac-DHTNg1dh.js} +1 -1
- package/dist/component/{dext-phone-rac-s3BOnXuI.js → dext-phone-rac-BrrU5qH_.js} +1 -1
- package/dist/component/{dext-radio-group-rac-CL3jcezs.js → dext-radio-group-rac-CD3MGfAM.js} +4 -4
- package/dist/component/{dext-rating-input-rac-wz1EyP5b.js → dext-rating-input-rac-BETGJZmt.js} +1 -1
- package/dist/component/{dext-tags-rac-BY4Rf2BP.js → dext-tags-rac-Coo9jN-T.js} +4 -4
- package/dist/component/{dext-text-area-rac-DRJzlsq8.js → dext-text-area-rac-CNWjqhUT.js} +1 -1
- package/dist/component/{dext-text-input-rac-BGcRNNAi.js → dext-text-input-rac-CCWyDexv.js} +1 -1
- package/dist/component/{dext-url-input-rac-CRAIm8yp.js → dext-url-input-rac-Dtakkgmk.js} +1 -1
- package/dist/component/{donation-rac-BlTfOIlE.js → donation-rac-BboGm_k_.js} +74 -74
- package/dist/component/{dropdown-field-headless-DhzRAMcM.js → dropdown-field-headless-BTMJGUwY.js} +10 -10
- package/dist/component/{dropdown-field-rac-DXyY5we-.js → dropdown-field-rac-CDRV8ckB.js} +3 -3
- package/dist/component/{dropdown-rac-C6YM6qxm.js → dropdown-rac-kEuU2pXW.js} +1 -1
- package/dist/component/{ecom-address-rac-CAdr7wya.js → ecom-address-rac-BgKL9ElH.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-Z2VMuCbt.js → ecom-subscription-checkbox-rac-CDhJsNPD.js} +2 -2
- package/dist/component/{email-input-field-rac-DpkfunVK.js → email-input-field-rac-DdOd86NX.js} +47 -47
- package/dist/component/{events-repeater-rac-CuJkdrPo.js → events-repeater-rac-_VJ30dpB.js} +8 -8
- package/dist/component/{events-rsvp-rac-BKWlSeQ9.js → events-rsvp-rac-DA-261bq.js} +10 -10
- package/dist/component/{field-error-headless-tsg9FQ-_.js → field-error-headless-CovyN0GI.js} +11 -11
- package/dist/component/{field-label-headless-CB8dEat8.js → field-label-headless-DVvX2QaH.js} +4 -4
- package/dist/component/file-upload-rac-bhEPUJPs.js +561 -0
- package/dist/component/{fixed-payment-rac-CuIQEeHh.js → fixed-payment-rac-DmI6MeKc.js} +15 -15
- package/dist/component/{form-0jt4L5xo.js → form-BTDgyr54.js} +950 -913
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +3 -3
- package/dist/component/{header-field-rac-CWVGzxKb.js → header-field-rac-C0rUjmo0.js} +4 -4
- package/dist/component/{header-rac-D6KsV-ko.js → header-rac-DRMO22PV.js} +1 -1
- package/dist/component/{image-choice-rac-CUCyVS8c.js → image-choice-rac-CQDQ7AlD.js} +9 -9
- package/dist/component/{index-iOqQidgV.js → index-B9QlosT1.js} +2 -2
- package/dist/component/{index-TJSnVtCO.js → index-CNWT9t6j.js} +43 -43
- package/dist/component/{isObjectLike-DQbx8r1c.js → isObjectLike-c0td2WCR.js} +1 -1
- package/dist/component/{multiline-address-field-rac-DtZ1NTfD.js → multiline-address-field-rac-D8bVxRsD.js} +78 -78
- package/dist/component/{multiline-address-rac-ub-_XzHU.js → multiline-address-rac-g-6RB7o8.js} +1 -1
- package/dist/component/{number-input-field-rac-DLItn4DK.js → number-input-field-rac-BaOwQ5Ya.js} +13 -13
- package/dist/component/{number-input-rac-UuxJzqEx.js → number-input-rac-BXv8-Pnj.js} +1 -1
- package/dist/component/{password-rac-Di6q96Rn.js → password-rac-BB9XeSSZ.js} +15 -15
- package/dist/component/{payment-input-rac-CG6c4-Ge.js → payment-input-rac-DwnSV9rM.js} +44 -44
- package/dist/component/{phone-input-field-rac-D4JphCuT.js → phone-input-field-rac-CC3C4ToW.js} +50 -50
- package/dist/component/{phone-rac-_vDw2usa.js → phone-rac-DpNhSaE0.js} +1 -1
- package/dist/component/{product-list-rac-CgxRlj1f.js → product-list-rac-BAESk3B6.js} +50 -50
- package/dist/component/{quiz-radio-group-rac-bi26aGxN.js → quiz-radio-group-rac-PS6AZr63.js} +1 -1
- package/dist/component/{radio-button-module-classes-DDJq2ESf.js → radio-button-module-classes-CXcn5unY.js} +14 -14
- package/dist/component/{radio-group-field-rac-D1aMVO6l.js → radio-group-field-rac-pt8xbDfS.js} +6 -6
- package/dist/component/{radio-group-rac-HKC85M6t.js → radio-group-rac-DkzkM6N_.js} +1 -1
- package/dist/component/{rating-input-field-rac-CpRehxFB.js → rating-input-field-rac-DDHBkR4x.js} +20 -20
- package/dist/component/{rating-input-rac-BMuCZ3oj.js → rating-input-rac-CcsDmLus.js} +1 -1
- package/dist/component/{rich-content-rac.module-mZ6xoAOd.js → rich-content-rac.module-B2vsO6fj.js} +1 -1
- package/dist/component/{rich-text-field-rac-CUK8V8Kf.js → rich-text-field-rac-CvKht2eC.js} +4 -4
- package/dist/component/{rich-text-rac-B-7sR2FJ.js → rich-text-rac-CRpSffQB.js} +1 -1
- package/dist/component/{service-dropdown-rac-1DDNT5bn.js → service-dropdown-rac-BOpdXNjG.js} +33 -33
- package/dist/component/{services-multi-choice-rac-CB-6dwxz.js → services-multi-choice-rac-t0wdSt_T.js} +13 -13
- package/dist/component/{signature-rac-7XBci6P2.js → signature-rac-2LsIYYIX.js} +133 -133
- package/dist/component/{submit-button-rac-B1-Mk8Gg.js → submit-button-rac-BbE8dS35.js} +17 -17
- package/dist/component/{tags-field-rac-CQ9Y7mq-.js → tags-field-rac-BnsBxReU.js} +32 -32
- package/dist/component/{tags-rac-Visic-Ml.js → tags-rac-BFH4RINA.js} +1 -1
- package/dist/component/{text-area-field-rac-C8fP1g-w.js → text-area-field-rac-Ag7_gniM.js} +14 -14
- package/dist/component/{text-area-rac-B6yZxzxm.js → text-area-rac-ByUX0p2O.js} +1 -1
- package/dist/component/{text-input-field-rac-CNjbOxD1.js → text-input-field-rac-D3MZ8teu.js} +5 -5
- package/dist/component/{text-input-headless-Bm8PJGep.js → text-input-headless-CwONErsY.js} +3 -3
- package/dist/component/{text-input-rac-BEPC1Z-4.js → text-input-rac-DLXdAhkK.js} +1 -1
- package/dist/component/{time-input-rac-3m6C_Jp5.js → time-input-rac-Bs55lTON.js} +27 -27
- package/dist/component/{url-input-field-rac-CIk_6Lf6.js → url-input-field-rac-FG-bCh-E.js} +19 -19
- package/dist/component/{url-input-rac-DyVoygXH.js → url-input-rac-BOKuCMTe.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-McG3ayOT.js → use-dropdown-option-class-name-DjV7FW5y.js} +2 -2
- package/dist/component/{use-element-state-class-name-B9MBWX44.js → use-element-state-class-name-DB1AzkvF.js} +1 -1
- package/dist/component/{use-is-forced-open-dropdown-r5G_sZsO.js → use-is-forced-open-dropdown-ifUIpuwL.js} +8 -8
- package/dist/component/{use-service-options-base-hcbkvhpw.js → use-service-options-base-B11cq0HH.js} +1 -1
- package/dist/component/{use-text-input-class-name-SnurFqAr.js → use-text-input-class-name-va1PzWFg.js} +2 -2
- package/dist/form.d.ts +18 -0
- package/package.json +2 -2
- package/dist/component/file-upload-rac-ZdgYt646.js +0 -483
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import t, { useMemo as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import t, { useMemo as $, useCallback as M, useRef as B } from "react";
|
|
2
|
+
import { RicosViewer as z } from "@wix/ricos/viewer";
|
|
3
3
|
import _ from "classnames";
|
|
4
|
-
import { CheckboxField as
|
|
5
|
-
import {
|
|
6
|
-
import { f as I, a as
|
|
7
|
-
import { L as ue, g as me } from "./field-label-headless-
|
|
4
|
+
import { CheckboxField as G, CheckboxButton as j, NumberField as X, Group as J, Button as U, Input as W } from "react-aria-components";
|
|
5
|
+
import { b9 as k, b6 as Y, b1 as w, bj as Z, bb as ee, I as te, U as ne, L as ae, O as oe, N as re, H as le, v as se, p as ie, M as ce } from "./form-BTDgyr54.js";
|
|
6
|
+
import { f as I, a as f } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { L as ue, g as me } from "./field-label-headless-DVvX2QaH.js";
|
|
8
8
|
import { f as pe } from "./format-currency-BwShJ9vM.js";
|
|
9
|
-
import { D as de, E as Ee } from "./field-error-headless-
|
|
9
|
+
import { D as de, E as Ee } from "./field-error-headless-CovyN0GI.js";
|
|
10
10
|
import { F as ye } from "./fieldset-headless-CD3fds9J.js";
|
|
11
|
-
import { g as
|
|
11
|
+
import { g as be } from "./payment-field-utils-DobiK5Xh.js";
|
|
12
12
|
import { S as _e } from "./selection-indicator-XQ8MYHUQ.js";
|
|
13
|
-
import { E as
|
|
13
|
+
import { E as fe } from "./error-icon-hZxQ6DEy.js";
|
|
14
14
|
import { C as Ie } from "./checkbox-indicator-module-classes-BpeSpGsW.js";
|
|
15
15
|
import { s as T } from "./field-rac.module-B4l_0KRU.js";
|
|
16
16
|
import { o as Q } from "./options-rac.module-CTDdATiz.js";
|
|
17
|
-
import { u as
|
|
18
|
-
var
|
|
17
|
+
import { u as Oe } from "./use-element-state-class-name-DB1AzkvF.js";
|
|
18
|
+
var Le = /* @__PURE__ */ (function(e) {
|
|
19
19
|
return e.crop = "CROP", e.fit = "FIT", e;
|
|
20
20
|
})({}), x = /* @__PURE__ */ (function(e) {
|
|
21
21
|
return e.oneByOne = "one-by-one", e.onlyOne = "only-one", e.many = "many", e;
|
|
@@ -28,7 +28,7 @@ function Ce({ maxItems: e, products: a } = {}) {
|
|
|
28
28
|
}
|
|
29
29
|
const o = ({ children: e }) => {
|
|
30
30
|
var D;
|
|
31
|
-
const { id: a, value: l, onChange: n, disabled: r, readOnly: c, required: y, onBlur:
|
|
31
|
+
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(), b = I(e, o.Label), g = I(e, o.Options), v = I(e, o.Description), L = I(e, o.Error), i = $(() => l || [], [
|
|
32
32
|
l
|
|
33
33
|
]), A = Ce((D = m == null ? void 0 : m.predefined) == null ? void 0 : D.paymentOptions) === x.many, F = M((S, R) => {
|
|
34
34
|
const d = i.filter((K) => K.productId !== S.productId), H = R ? [
|
|
@@ -42,15 +42,15 @@ const o = ({ children: e }) => {
|
|
|
42
42
|
]);
|
|
43
43
|
return /* @__PURE__ */ t.createElement(p, {
|
|
44
44
|
fieldId: a,
|
|
45
|
-
renderLabel: () =>
|
|
45
|
+
renderLabel: () => b,
|
|
46
46
|
renderInput: () => /* @__PURE__ */ t.createElement(ye, {
|
|
47
47
|
id: q,
|
|
48
48
|
ariaLabelledBy: N,
|
|
49
49
|
ariaDescribedBy: h,
|
|
50
50
|
required: y,
|
|
51
|
-
onBlur:
|
|
51
|
+
onBlur: O,
|
|
52
52
|
onFocus: s
|
|
53
|
-
}, g ?
|
|
53
|
+
}, g ? f(g, {
|
|
54
54
|
allowMany: A,
|
|
55
55
|
productValues: i,
|
|
56
56
|
onProductChange: F,
|
|
@@ -58,39 +58,39 @@ const o = ({ children: e }) => {
|
|
|
58
58
|
readOnly: c,
|
|
59
59
|
hasError: u
|
|
60
60
|
}) : null),
|
|
61
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null,
|
|
61
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, L, v)
|
|
62
62
|
});
|
|
63
63
|
}, V = ({ children: e, className: a, ...l }) => {
|
|
64
|
-
const { allowMany: n, productValues: r, onProductChange: c, disabled: y, readOnly:
|
|
64
|
+
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 = I(e, o.Option);
|
|
65
65
|
return /* @__PURE__ */ t.createElement("div", {
|
|
66
66
|
className: a
|
|
67
|
-
}, u == null ? void 0 : u.map((
|
|
67
|
+
}, u == null ? void 0 : u.map((b, g) => {
|
|
68
68
|
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 ===
|
|
70
|
-
return
|
|
71
|
-
key:
|
|
72
|
-
option:
|
|
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 === b.value)) == null ? void 0 : D.fixedPriceOptions) == null ? void 0 : S.price) || "0", L = be(N, q), i = r.find((R) => R.productId === b.value);
|
|
70
|
+
return f(h, {
|
|
71
|
+
key: b.id || b.value || b.label,
|
|
72
|
+
option: b,
|
|
73
73
|
price: v,
|
|
74
74
|
quantity: i == null ? void 0 : i.quantity,
|
|
75
75
|
isSelected: !!i,
|
|
76
76
|
allowMany: n,
|
|
77
77
|
onProductChange: c,
|
|
78
78
|
disabled: y,
|
|
79
|
-
readOnly:
|
|
79
|
+
readOnly: O,
|
|
80
80
|
hasError: s,
|
|
81
|
-
currencyAriaLabel:
|
|
81
|
+
currencyAriaLabel: L,
|
|
82
82
|
imageResize: p,
|
|
83
83
|
isFirst: g === 0
|
|
84
84
|
});
|
|
85
85
|
}));
|
|
86
86
|
}, E = ({ children: e, className: a, ...l }) => {
|
|
87
|
-
const { option: n, price: r, quantity: c = 0, isSelected: y, allowMany:
|
|
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: b } = k(), g = B(null), v = B(null), L = I(e, E.Image), i = I(e, E.Label), C = I(e, E.Price), A = I(e, E.Input), F = I(e, E.Quantity);
|
|
88
88
|
ee(() => {
|
|
89
89
|
var d;
|
|
90
90
|
h && ((d = g.current ?? v.current) == null || d.focus({
|
|
91
91
|
preventScroll: !0
|
|
92
92
|
}));
|
|
93
|
-
},
|
|
93
|
+
}, b);
|
|
94
94
|
const D = M((d) => {
|
|
95
95
|
s({
|
|
96
96
|
productId: n.value,
|
|
@@ -112,17 +112,17 @@ const o = ({ children: e }) => {
|
|
|
112
112
|
n.value,
|
|
113
113
|
r
|
|
114
114
|
]), R = `${n.label} ${q} ${r}`;
|
|
115
|
-
return
|
|
115
|
+
return O ? /* @__PURE__ */ t.createElement("div", {
|
|
116
116
|
className: a,
|
|
117
117
|
"data-hook": "product"
|
|
118
|
-
},
|
|
118
|
+
}, L ? f(L, {
|
|
119
119
|
option: n,
|
|
120
120
|
imageResize: N
|
|
121
|
-
}) : null, i ?
|
|
121
|
+
}) : null, i ? f(i, {
|
|
122
122
|
label: n.label
|
|
123
|
-
}) : null, C ?
|
|
123
|
+
}) : null, C ? f(C, {
|
|
124
124
|
price: r
|
|
125
|
-
}) : null, F ?
|
|
125
|
+
}) : null, F ? f(F, {
|
|
126
126
|
quantity: c,
|
|
127
127
|
onQuantityChange: S,
|
|
128
128
|
disabled: u,
|
|
@@ -130,25 +130,25 @@ const o = ({ children: e }) => {
|
|
|
130
130
|
hasError: p,
|
|
131
131
|
ariaLabel: R,
|
|
132
132
|
inputRef: h ? v : void 0
|
|
133
|
-
}) : null) : /* @__PURE__ */ t.createElement(
|
|
133
|
+
}) : null) : /* @__PURE__ */ t.createElement(G, {
|
|
134
134
|
isSelected: y,
|
|
135
135
|
onChange: D,
|
|
136
136
|
isDisabled: u,
|
|
137
137
|
isReadOnly: m,
|
|
138
138
|
isInvalid: p,
|
|
139
139
|
"aria-label": R
|
|
140
|
-
}, /* @__PURE__ */ t.createElement(
|
|
140
|
+
}, /* @__PURE__ */ t.createElement(j, {
|
|
141
141
|
ref: g,
|
|
142
142
|
className: a,
|
|
143
143
|
"data-hook": "product"
|
|
144
|
-
}, ({ isHovered: d }) => /* @__PURE__ */ t.createElement(t.Fragment, null,
|
|
144
|
+
}, ({ isHovered: d }) => /* @__PURE__ */ t.createElement(t.Fragment, null, L ? f(L, {
|
|
145
145
|
option: n,
|
|
146
146
|
imageResize: N
|
|
147
|
-
}) : null, i ?
|
|
147
|
+
}) : null, i ? f(i, {
|
|
148
148
|
label: n.label
|
|
149
|
-
}) : null, C ?
|
|
149
|
+
}) : null, C ? f(C, {
|
|
150
150
|
price: r
|
|
151
|
-
}) : null,
|
|
151
|
+
}) : null, f(A, {
|
|
152
152
|
isSelected: y,
|
|
153
153
|
isHovered: d
|
|
154
154
|
}))));
|
|
@@ -157,14 +157,14 @@ const o = ({ children: e }) => {
|
|
|
157
157
|
const { option: l, imageResize: n } = a, r = (s = l.media) == null ? void 0 : s.image;
|
|
158
158
|
if (!r)
|
|
159
159
|
return null;
|
|
160
|
-
const c = n ===
|
|
160
|
+
const c = n === Le.fit, y = me(r, 96, 96, c ? "fit" : "fill");
|
|
161
161
|
if (!y)
|
|
162
162
|
return null;
|
|
163
|
-
const
|
|
163
|
+
const O = r.altText || l.label || "";
|
|
164
164
|
return /* @__PURE__ */ t.createElement("img", {
|
|
165
165
|
className: e,
|
|
166
166
|
src: y,
|
|
167
|
-
alt:
|
|
167
|
+
alt: O,
|
|
168
168
|
"data-fit": c ? "contain" : "cover",
|
|
169
169
|
"data-hook": "product-image"
|
|
170
170
|
});
|
|
@@ -185,7 +185,7 @@ const o = ({ children: e }) => {
|
|
|
185
185
|
"data-hook": "product-price"
|
|
186
186
|
}, c);
|
|
187
187
|
}, De = ({ className: e, ...a }) => {
|
|
188
|
-
const { quantity: l, onQuantityChange: n, disabled: r, readOnly: c, hasError: y, ariaLabel:
|
|
188
|
+
const { quantity: l, onQuantityChange: n, disabled: r, readOnly: c, hasError: y, ariaLabel: O, inputRef: s } = a, u = M((p) => {
|
|
189
189
|
n(p < 0 ? 0 : p);
|
|
190
190
|
}, [
|
|
191
191
|
n
|
|
@@ -194,7 +194,7 @@ const o = ({ children: e }) => {
|
|
|
194
194
|
}, [
|
|
195
195
|
u
|
|
196
196
|
]);
|
|
197
|
-
return /* @__PURE__ */ t.createElement(
|
|
197
|
+
return /* @__PURE__ */ t.createElement(X, {
|
|
198
198
|
value: l,
|
|
199
199
|
onChange: u,
|
|
200
200
|
minValue: 0,
|
|
@@ -202,14 +202,14 @@ const o = ({ children: e }) => {
|
|
|
202
202
|
isDisabled: r,
|
|
203
203
|
isReadOnly: c,
|
|
204
204
|
isInvalid: y,
|
|
205
|
-
"aria-label":
|
|
205
|
+
"aria-label": O,
|
|
206
206
|
className: e,
|
|
207
207
|
"data-hook": "product-quantity"
|
|
208
|
-
}, /* @__PURE__ */ t.createElement(
|
|
208
|
+
}, /* @__PURE__ */ t.createElement(J, {
|
|
209
209
|
onKeyDown: m
|
|
210
210
|
}, /* @__PURE__ */ t.createElement(U, {
|
|
211
211
|
slot: "decrement"
|
|
212
|
-
}, "-"), /* @__PURE__ */ t.createElement(
|
|
212
|
+
}, "-"), /* @__PURE__ */ t.createElement(W, {
|
|
213
213
|
ref: s
|
|
214
214
|
}), /* @__PURE__ */ t.createElement(U, {
|
|
215
215
|
slot: "increment"
|
|
@@ -234,11 +234,11 @@ const Se = "_options_11x4v_1", Pe = "_option_11x4v_1", Ne = "_optionInput_11x4v_
|
|
|
234
234
|
optionLabel: ve,
|
|
235
235
|
optionPrice: Ae,
|
|
236
236
|
quantity: Te
|
|
237
|
-
}, qe = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(
|
|
237
|
+
}, qe = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(z, {
|
|
238
238
|
content: e,
|
|
239
239
|
locale: a
|
|
240
240
|
}), Me = () => {
|
|
241
|
-
const e =
|
|
241
|
+
const e = Oe({
|
|
242
242
|
globalClasses: ce,
|
|
243
243
|
moduleClasses: Ie
|
|
244
244
|
});
|
|
@@ -262,10 +262,10 @@ const Se = "_options_11x4v_1", Pe = "_option_11x4v_1", Ne = "_optionInput_11x4v_
|
|
|
262
262
|
className: _(le, T.inputGroup, P.quantity)
|
|
263
263
|
}))), /* @__PURE__ */ t.createElement(o.Error, {
|
|
264
264
|
className: _(se, T.error)
|
|
265
|
-
}, /* @__PURE__ */ t.createElement(
|
|
265
|
+
}, /* @__PURE__ */ t.createElement(fe, null), /* @__PURE__ */ t.createElement(o.Error.Text, null)), /* @__PURE__ */ t.createElement(o.Description, {
|
|
266
266
|
className: _(ie, T.description)
|
|
267
267
|
}, qe));
|
|
268
|
-
},
|
|
268
|
+
}, Ze = () => /* @__PURE__ */ t.createElement(Me, null);
|
|
269
269
|
export {
|
|
270
|
-
|
|
270
|
+
Ze as ProductListRAC
|
|
271
271
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import a, { useRef as S, useState as V, useEffect as T, useCallback as B } from "react";
|
|
2
2
|
import { RadioGroup as H, RadioField as k, RadioButton as A, TextField as G, Input as P } from "react-aria-components";
|
|
3
|
-
import {
|
|
3
|
+
import { b9 as v, b6 as $, bj as F, bb as x } from "./form-BTDgyr54.js";
|
|
4
4
|
import { f as u, a as g } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as U, E as
|
|
6
|
-
import { L as
|
|
5
|
+
import { D as U, E as j } from "./field-error-headless-CovyN0GI.js";
|
|
6
|
+
import { L as M } from "./field-label-headless-DVvX2QaH.js";
|
|
7
7
|
import { S as w } from "./selection-indicator-XQ8MYHUQ.js";
|
|
8
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
9
|
const l = t ? t.length + 2 : 0;
|
|
10
10
|
return e.slice(l);
|
|
11
11
|
}, i = ({ children: e, className: t }) => {
|
|
12
|
-
const { id: n, value: l, onChange: O, disabled: d, readOnly:
|
|
12
|
+
const { id: n, value: l, onChange: O, disabled: d, readOnly: _, required: m, onBlur: f, onFocus: b, hasError: r, FieldLayout: c, options: o } = v(), { inputId: h, labelId: C, ariaDescribedBy: I } = $(), s = u(e, i.Label), E = u(e, i.Options), q = u(e, i.Description), D = u(e, i.Error), N = y(o, l) ? L : l || null;
|
|
13
13
|
return /* @__PURE__ */ a.createElement(c, {
|
|
14
14
|
fieldId: n,
|
|
15
15
|
renderLabel: () => g(s, {
|
|
@@ -23,22 +23,22 @@ const L = "Other", z = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
23
23
|
value: N,
|
|
24
24
|
onChange: O,
|
|
25
25
|
isDisabled: d,
|
|
26
|
-
isReadOnly:
|
|
26
|
+
isReadOnly: _,
|
|
27
27
|
isRequired: m,
|
|
28
28
|
isInvalid: r,
|
|
29
|
-
onBlur:
|
|
29
|
+
onBlur: f,
|
|
30
30
|
onFocus: b
|
|
31
31
|
}, E),
|
|
32
32
|
renderDescription: () => /* @__PURE__ */ a.createElement(a.Fragment, null, D, q)
|
|
33
33
|
});
|
|
34
34
|
}, K = ({ children: e, className: t }) => {
|
|
35
|
-
const { options: n, addOther: l, addOtherLabel: O, id: d, numberOfColumns:
|
|
35
|
+
const { options: n, addOther: l, addOtherLabel: O, id: d, numberOfColumns: _, hasError: m } = v(), { t: f } = F(), b = u(e, i.Option), r = S(null), c = O || f("add-other.default-other-option-label") || L;
|
|
36
36
|
return x(() => {
|
|
37
37
|
var o;
|
|
38
38
|
(o = r.current) == null || o.focus();
|
|
39
39
|
}, d), /* @__PURE__ */ a.createElement("div", {
|
|
40
40
|
className: t,
|
|
41
|
-
"data-columns":
|
|
41
|
+
"data-columns": _,
|
|
42
42
|
"data-invalid": m
|
|
43
43
|
}, n.map((o, h) => g(b, {
|
|
44
44
|
key: o.value ?? o.label,
|
|
@@ -54,13 +54,13 @@ const L = "Other", z = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
54
54
|
}));
|
|
55
55
|
}, p = ({ children: e, className: t, ...n }) => {
|
|
56
56
|
var I;
|
|
57
|
-
const { value: l, label: O, isOther: d = !1, radioRef:
|
|
57
|
+
const { value: l, label: O, isOther: d = !1, radioRef: _ } = n, { value: m, options: f } = v(), b = u(e, p.Label), r = u(e, p.Input), c = u(e, p.Control), o = u(e, p.OtherInput), h = d ? y(f, m) : m === l, C = (I = r == null ? void 0 : r.props) == null ? void 0 : I.className;
|
|
58
58
|
return /* @__PURE__ */ a.createElement("div", {
|
|
59
59
|
className: t
|
|
60
60
|
}, /* @__PURE__ */ a.createElement(k, {
|
|
61
61
|
value: l
|
|
62
62
|
}, /* @__PURE__ */ a.createElement(A, {
|
|
63
|
-
ref:
|
|
63
|
+
ref: _,
|
|
64
64
|
className: C
|
|
65
65
|
}, ({ isSelected: s, isHovered: E }) => /* @__PURE__ */ a.createElement(a.Fragment, null, g(c, {
|
|
66
66
|
isSelected: s,
|
|
@@ -74,7 +74,7 @@ const L = "Other", z = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
74
74
|
className: e
|
|
75
75
|
}, n);
|
|
76
76
|
}, W = (e) => null, X = ({ className: e }) => {
|
|
77
|
-
const { value: t, onChange: n, addOtherLabel: l, addOtherPlaceholder: O, otherInputCharacterLimit: d, disabled:
|
|
77
|
+
const { value: t, onChange: n, addOtherLabel: l, addOtherPlaceholder: O, otherInputCharacterLimit: d, disabled: _, readOnly: m, options: f } = v(), { t: b } = F(), r = S(null), c = y(f, t), o = l || b("add-other.default-other-option-label") || L, [h, C] = V(c && t ? J(t, l) : "");
|
|
78
78
|
T(() => {
|
|
79
79
|
var s;
|
|
80
80
|
c && r.current && ((s = r.current) == null || s.focus());
|
|
@@ -93,7 +93,7 @@ const L = "Other", z = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
93
93
|
"aria-label": o,
|
|
94
94
|
value: h,
|
|
95
95
|
onChange: I,
|
|
96
|
-
isDisabled:
|
|
96
|
+
isDisabled: _,
|
|
97
97
|
isReadOnly: m
|
|
98
98
|
}, /* @__PURE__ */ a.createElement(P, {
|
|
99
99
|
ref: r,
|
|
@@ -106,11 +106,11 @@ p.Label = Q;
|
|
|
106
106
|
p.Input = W;
|
|
107
107
|
p.Control = w;
|
|
108
108
|
p.OtherInput = X;
|
|
109
|
-
i.Label =
|
|
109
|
+
i.Label = M;
|
|
110
110
|
i.Options = K;
|
|
111
111
|
i.Option = p;
|
|
112
112
|
i.Description = U;
|
|
113
|
-
i.Error =
|
|
113
|
+
i.Error = j;
|
|
114
114
|
const Y = "_labelImage_t7q71_1", Z = "_group_t7q71_26", ee = "_options_t7q71_30", te = "_option_t7q71_30", oe = "_optionInput_t7q71_57", ne = "_optionControl_t7q71_75", le = "_optionControlHover_t7q71_97", ae = "_optionControlSelected_t7q71_115", re = "_optionLabel_t7q71_150", R = {
|
|
115
115
|
labelImage: Y,
|
|
116
116
|
group: Z,
|
package/dist/component/{radio-group-field-rac-D1aMVO6l.js → radio-group-field-rac-pt8xbDfS.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
2
|
import t from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { a, s, R as n } from "./radio-button-module-classes-
|
|
4
|
+
import { a, s, R as n } from "./radio-button-module-classes-CXcn5unY.js";
|
|
5
5
|
import { E as c } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as r } from "./field-rac.module-B4l_0KRU.js";
|
|
7
|
-
import {
|
|
8
|
-
import { u as L } from "./use-element-state-class-name-
|
|
9
|
-
import { u as N } from "./use-text-input-class-name-
|
|
7
|
+
import { I as E, U as i, P as p, Q as R, v as O, p as _, R as I } from "./form-BTDgyr54.js";
|
|
8
|
+
import { u as L } from "./use-element-state-class-name-DB1AzkvF.js";
|
|
9
|
+
import { u as N } from "./use-text-input-class-name-va1PzWFg.js";
|
|
10
10
|
const u = ({ content: o, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
11
11
|
content: o,
|
|
12
12
|
locale: l
|
|
@@ -32,11 +32,11 @@ const u = ({ content: o, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
|
32
32
|
}), /* @__PURE__ */ e.createElement(a.Option.Control, {
|
|
33
33
|
className: o
|
|
34
34
|
}), /* @__PURE__ */ e.createElement(a.Option.Label, {
|
|
35
|
-
className: t(
|
|
35
|
+
className: t(R, s.optionLabel)
|
|
36
36
|
}), /* @__PURE__ */ e.createElement(a.Option.OtherInput, {
|
|
37
37
|
className: l
|
|
38
38
|
}))), /* @__PURE__ */ e.createElement(a.Error, {
|
|
39
|
-
className: t(
|
|
39
|
+
className: t(O, r.error)
|
|
40
40
|
}, /* @__PURE__ */ e.createElement(c, null), /* @__PURE__ */ e.createElement(a.Error.Text, null)), /* @__PURE__ */ e.createElement(a.Description, {
|
|
41
41
|
className: t(_, r.description)
|
|
42
42
|
}, u));
|
package/dist/component/{rating-input-field-rac-CpRehxFB.js → rating-input-field-rac-DDHBkR4x.js}
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { RicosViewer as y } from "@wix/ricos/viewer";
|
|
2
2
|
import m from "classnames";
|
|
3
3
|
import e, { useCallback as N, useState as O, useRef as A } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { b9 as I, b6 as v, bj as T, I as H, U as M, S as w, v as B, p as P, T as q } from "./form-BTDgyr54.js";
|
|
5
5
|
import { RadioGroup as G, RadioField as k, RadioButton as x } from "react-aria-components";
|
|
6
6
|
import { f as u, a as U } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as
|
|
8
|
-
import { L as
|
|
9
|
-
import { E as
|
|
7
|
+
import { D as j, E as z } from "./field-error-headless-CovyN0GI.js";
|
|
8
|
+
import { L as Q } from "./field-label-headless-DVvX2QaH.js";
|
|
9
|
+
import { E as Z } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { s as g } from "./field-rac.module-B4l_0KRU.js";
|
|
11
|
-
import { u as J } from "./use-element-state-class-name-
|
|
11
|
+
import { u as J } from "./use-element-state-class-name-DB1AzkvF.js";
|
|
12
12
|
const t = ({ children: a }) => {
|
|
13
|
-
const { id: n, value: r, onChange: o, disabled: l, readOnly: d, required: c, hasError: i, onBlur: E, onFocus:
|
|
13
|
+
const { id: n, value: r, onChange: o, disabled: l, readOnly: d, required: c, hasError: i, onBlur: E, onFocus: C, FieldLayout: R } = I(), { labelId: _ } = v(), L = N((D) => o(Number(D)), [
|
|
14
14
|
o
|
|
15
|
-
]),
|
|
16
|
-
return /* @__PURE__ */ e.createElement(
|
|
15
|
+
]), S = u(a, t.Label), s = u(a, t.Ratings), f = u(a, t.Description), h = u(a, t.Error);
|
|
16
|
+
return /* @__PURE__ */ e.createElement(R, {
|
|
17
17
|
fieldId: n,
|
|
18
|
-
renderLabel: () =>
|
|
18
|
+
renderLabel: () => S,
|
|
19
19
|
renderInput: () => /* @__PURE__ */ e.createElement(G, {
|
|
20
20
|
"aria-labelledby": _,
|
|
21
21
|
value: r ? String(r) : void 0,
|
|
@@ -25,21 +25,21 @@ const t = ({ children: a }) => {
|
|
|
25
25
|
isRequired: c,
|
|
26
26
|
isInvalid: i,
|
|
27
27
|
onBlur: E,
|
|
28
|
-
onFocus:
|
|
28
|
+
onFocus: C,
|
|
29
29
|
orientation: "horizontal"
|
|
30
30
|
}, s),
|
|
31
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, h,
|
|
31
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, h, f)
|
|
32
32
|
});
|
|
33
33
|
}, b = ({ children: a, className: n, getReactionLabel: r }) => {
|
|
34
|
-
const { value: o, readOnly: l, hasError: d } = I(), { inputId: c, ariaDescribedBy: i } = v(), [E,
|
|
34
|
+
const { value: o, readOnly: l, hasError: d } = I(), { inputId: c, ariaDescribedBy: i } = v(), [E, C] = O(), R = A(null), _ = u(a, b.Rating), L = [
|
|
35
35
|
"1",
|
|
36
36
|
"2",
|
|
37
37
|
"3",
|
|
38
38
|
"4",
|
|
39
39
|
"5"
|
|
40
|
-
],
|
|
40
|
+
], S = (s) => E && !l ? E >= s : !!o && o >= Number(s);
|
|
41
41
|
return /* @__PURE__ */ e.createElement("div", {
|
|
42
|
-
ref:
|
|
42
|
+
ref: R,
|
|
43
43
|
id: c,
|
|
44
44
|
"aria-describedby": i,
|
|
45
45
|
className: n,
|
|
@@ -48,8 +48,8 @@ const t = ({ children: a }) => {
|
|
|
48
48
|
}, L.map((s) => U(_, {
|
|
49
49
|
key: s,
|
|
50
50
|
value: s,
|
|
51
|
-
isSelected:
|
|
52
|
-
onHoverChange: (
|
|
51
|
+
isSelected: S(s),
|
|
52
|
+
onHoverChange: (f) => C(f ? s : void 0),
|
|
53
53
|
label: r == null ? void 0 : r(Number(s))
|
|
54
54
|
})));
|
|
55
55
|
}, K = {
|
|
@@ -81,11 +81,11 @@ const t = ({ children: a }) => {
|
|
|
81
81
|
}, c) : null)));
|
|
82
82
|
};
|
|
83
83
|
b.Rating = F;
|
|
84
|
-
t.Label =
|
|
84
|
+
t.Label = Q;
|
|
85
85
|
t.Ratings = b;
|
|
86
86
|
t.Rating = F;
|
|
87
|
-
t.Description =
|
|
88
|
-
t.Error =
|
|
87
|
+
t.Description = j;
|
|
88
|
+
t.Error = z;
|
|
89
89
|
const W = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
90
90
|
viewBox: "0 0 32 32",
|
|
91
91
|
width: 32,
|
|
@@ -126,7 +126,7 @@ const W = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
126
126
|
className: n
|
|
127
127
|
}, /* @__PURE__ */ e.createElement(W, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
128
128
|
className: m(B, g.error)
|
|
129
|
-
}, /* @__PURE__ */ e.createElement(
|
|
129
|
+
}, /* @__PURE__ */ e.createElement(Z, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
130
130
|
className: m(P, g.description)
|
|
131
131
|
}, ee));
|
|
132
132
|
};
|
package/dist/component/{rich-content-rac.module-mZ6xoAOd.js → rich-content-rac.module-B2vsO6fj.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import c, { useState as u } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { b9 as a, b1 as i, bj as T } from "./form-BTDgyr54.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,11 +1,11 @@
|
|
|
1
1
|
import l from "classnames";
|
|
2
2
|
import e from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { u as C, R as d, s as g, T as p } from "./rich-content-rac.module-
|
|
3
|
+
import { b9 as m, an as i, a5 as u, aM as R, aP as T } from "./form-BTDgyr54.js";
|
|
4
|
+
import { u as C, R as d, s as g, T as p } from "./rich-content-rac.module-B2vsO6fj.js";
|
|
5
5
|
const h = {
|
|
6
6
|
colorPalette: T(),
|
|
7
7
|
customStyles: R()
|
|
8
|
-
},
|
|
8
|
+
}, f = ({ truncate: t = !0 } = {}) => {
|
|
9
9
|
const { content: a, maxShownParagraphs: s } = m(), { displayedContent: n, isTruncated: o, isTruncateButtonShown: r, toggleTruncate: c } = C(a, t ? s : void 0);
|
|
10
10
|
return /* @__PURE__ */ e.createElement(d, null, () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(i, {
|
|
11
11
|
className: l(u, g.richContent),
|
|
@@ -17,5 +17,5 @@ const h = {
|
|
|
17
17
|
})));
|
|
18
18
|
};
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
f as R
|
|
21
21
|
};
|
package/dist/component/{service-dropdown-rac-1DDNT5bn.js → service-dropdown-rac-BOpdXNjG.js}
RENAMED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import t, { useRef as
|
|
2
|
-
import { RicosViewer as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { u as G } from "./use-service-options-base-
|
|
6
|
-
import { D as d } from "./dropdown-field-headless-
|
|
7
|
-
import { C as
|
|
8
|
-
import { E as
|
|
9
|
-
import { H as
|
|
1
|
+
import t, { useRef as b, useMemo as g, useCallback as D, useEffect as P } from "react";
|
|
2
|
+
import { RicosViewer as T } from "@wix/ricos/viewer";
|
|
3
|
+
import u from "classnames";
|
|
4
|
+
import { b5 as w, bj as A, F as M, b9 as y, b1 as U, ac as V, I as x, U as H, t as W, K as k, v as q, p as B } from "./form-BTDgyr54.js";
|
|
5
|
+
import { u as G } from "./use-service-options-base-B11cq0HH.js";
|
|
6
|
+
import { D as d } from "./dropdown-field-headless-BTMJGUwY.js";
|
|
7
|
+
import { C as j } from "./chevron-down-icon-CcpVm6B-.js";
|
|
8
|
+
import { E as K } from "./error-icon-hZxQ6DEy.js";
|
|
9
|
+
import { H as Q } from "./custom-focus-class-_483Pkwp.js";
|
|
10
10
|
import { s as i } from "./field-rac.module-B4l_0KRU.js";
|
|
11
|
-
import { u as
|
|
12
|
-
const
|
|
13
|
-
const { actions: r } = w(), { t: h } = A(), { addOther: n, addOtherLabel: p } = e, c = p || h("add-other.default-other-option-label"), a =
|
|
11
|
+
import { u as Y } from "./use-dropdown-option-class-name-DjV7FW5y.js";
|
|
12
|
+
const z = "00000000-0000-0000-0000-000000000000", J = (e) => {
|
|
13
|
+
const { actions: r } = w(), { t: h } = A(), { addOther: n, addOtherLabel: p } = e, c = p || h("add-other.default-other-option-label"), a = b(!0), E = g(() => {
|
|
14
14
|
var s;
|
|
15
|
-
return ((s = e.options) == null ? void 0 : s.map((
|
|
15
|
+
return ((s = e.options) == null ? void 0 : s.map((m) => m.id ?? "")) ?? [];
|
|
16
16
|
}, [
|
|
17
17
|
e.options
|
|
18
18
|
]), O = D((s) => n ? [
|
|
@@ -20,7 +20,7 @@ const j = "00000000-0000-0000-0000-000000000000", z = (e) => {
|
|
|
20
20
|
{
|
|
21
21
|
value: c,
|
|
22
22
|
label: c,
|
|
23
|
-
id:
|
|
23
|
+
id: z
|
|
24
24
|
}
|
|
25
25
|
] : s, [
|
|
26
26
|
n,
|
|
@@ -37,12 +37,12 @@ const j = "00000000-0000-0000-0000-000000000000", z = (e) => {
|
|
|
37
37
|
s = await r.fetchServices({
|
|
38
38
|
serviceIds: E
|
|
39
39
|
});
|
|
40
|
-
} catch (
|
|
41
|
-
console.error(
|
|
40
|
+
} catch (m) {
|
|
41
|
+
console.error(m);
|
|
42
42
|
}
|
|
43
43
|
if (s) {
|
|
44
|
-
const
|
|
45
|
-
S(!n &&
|
|
44
|
+
const m = F(s);
|
|
45
|
+
S(!n && m.length === 0), _(m);
|
|
46
46
|
} else
|
|
47
47
|
a.current = !0;
|
|
48
48
|
R(!1);
|
|
@@ -90,7 +90,7 @@ const j = "00000000-0000-0000-0000-000000000000", z = (e) => {
|
|
|
90
90
|
shouldRender: I
|
|
91
91
|
};
|
|
92
92
|
}, o = ({ children: e }) => {
|
|
93
|
-
const r = y(), { addOther: h } = r, n =
|
|
93
|
+
const r = y(), { addOther: h } = r, n = U(), p = r.isEditor || n.isEditor || n.isComposer, { isLoading: c, options: a, isEmpty: E, onFocus: O, onChange: f, shouldRender: l } = J({
|
|
94
94
|
...r,
|
|
95
95
|
isEditor: p
|
|
96
96
|
}), C = g(() => ({
|
|
@@ -117,29 +117,29 @@ o.Trigger = d.Trigger;
|
|
|
117
117
|
o.Options = d.Options;
|
|
118
118
|
o.Description = d.Description;
|
|
119
119
|
o.Error = d.Error;
|
|
120
|
-
const
|
|
120
|
+
const X = ({ content: e, locale: r }) => /* @__PURE__ */ t.createElement(T, {
|
|
121
121
|
content: e,
|
|
122
122
|
locale: r
|
|
123
|
-
}),
|
|
124
|
-
const e =
|
|
123
|
+
}), Z = () => {
|
|
124
|
+
const e = Y(Q);
|
|
125
125
|
return /* @__PURE__ */ t.createElement(o, null, /* @__PURE__ */ t.createElement(o.Label, {
|
|
126
|
-
className:
|
|
126
|
+
className: u(x, i.label)
|
|
127
127
|
}, /* @__PURE__ */ t.createElement(o.Label.Required, {
|
|
128
|
-
className:
|
|
128
|
+
className: u(H, i.requiredMark)
|
|
129
129
|
})), /* @__PURE__ */ t.createElement(o.Trigger, {
|
|
130
|
-
className:
|
|
131
|
-
}, /* @__PURE__ */ t.createElement(
|
|
130
|
+
className: u(W, i.input, i.dropdownTrigger)
|
|
131
|
+
}, /* @__PURE__ */ t.createElement(j, {
|
|
132
132
|
className: i.dropdownIcon
|
|
133
133
|
})), /* @__PURE__ */ t.createElement(o.Options, {
|
|
134
|
-
className:
|
|
134
|
+
className: u(k, i.selectPopover, i.dropdownPopover)
|
|
135
135
|
}, /* @__PURE__ */ t.createElement(o.Options.Option, {
|
|
136
136
|
className: e
|
|
137
137
|
})), /* @__PURE__ */ t.createElement(o.Error, {
|
|
138
|
-
className:
|
|
139
|
-
}, /* @__PURE__ */ t.createElement(
|
|
140
|
-
className:
|
|
141
|
-
},
|
|
142
|
-
},
|
|
138
|
+
className: u(q, i.error)
|
|
139
|
+
}, /* @__PURE__ */ t.createElement(K, null), /* @__PURE__ */ t.createElement(o.Error.Text, null)), /* @__PURE__ */ t.createElement(o.Description, {
|
|
140
|
+
className: u(B, i.description)
|
|
141
|
+
}, X));
|
|
142
|
+
}, me = () => /* @__PURE__ */ t.createElement(Z, null);
|
|
143
143
|
export {
|
|
144
|
-
|
|
144
|
+
me as ServiceDropdownRAC
|
|
145
145
|
};
|