@wix/form-elements 1.160.0 → 1.161.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-BmHu56e5.js → appointment-rac-BubC8I9X.js} +395 -388
- package/dist/component/{bookings-address-rac-DY9l2g0h.js → bookings-address-rac-BbwvVs86.js} +1 -1
- package/dist/component/{bookings-email-rac-B5vNSOsS.js → bookings-email-rac-C2HCkcfa.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CJiefCNz.js → bookings-first-name-rac-Uy7c5EBs.js} +1 -1
- package/dist/component/{bookings-header-rac-BFu7Ko5w.js → bookings-header-rac-nmwsWRjS.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DegMM13h.js → bookings-last-name-rac-BAioQLCg.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DrA-5tBH.js → bookings-login-bar-rac-CO6vOBjG.js} +7 -7
- package/dist/component/{bookings-phone-rac-DsaeqxCI.js → bookings-phone-rac-Cr16h-_R.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-jRHiwqi8.js → bookings-rich-text-rac-CHLH3jd7.js} +1 -1
- package/dist/component/{checkbox-field-rac-CyoBb6Yf.js → checkbox-field-rac-CMwmwFMD.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-Bv1gU3oL.js → checkbox-group-field-headless-BNs_S-nT.js} +24 -24
- package/dist/component/{checkbox-group-field-rac-DasArcdV.js → checkbox-group-field-rac-BA60EPAN.js} +12 -12
- package/dist/component/{checkbox-group-rac-CzmufV1U.js → checkbox-group-rac-BJZ4Oer9.js} +1 -1
- package/dist/component/{checkbox-rac-6C7XoUoZ.js → checkbox-rac-KsVlI6_V.js} +1 -1
- package/dist/component/{contacts-address-rac-BZobbFtz.js → contacts-address-rac-CRYkz87z.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DIzf41DS.js → contacts-birthdate-rac-BIz-1-ZX.js} +1 -1
- package/dist/component/{contacts-company-rac-BiBDO28r.js → contacts-company-rac-B8G__j6I.js} +1 -1
- package/dist/component/{contacts-email-rac-5mqokCSD.js → contacts-email-rac-Dztkvp5i.js} +1 -1
- package/dist/component/{contacts-first-name-rac-BXe3_Nz5.js → contacts-first-name-rac-CVSEWpLU.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Cfqgh7u1.js → contacts-last-name-rac-Blz4M5bk.js} +1 -1
- package/dist/component/{contacts-phone-rac-cmLUWnAc.js → contacts-phone-rac-CPCE5soY.js} +1 -1
- package/dist/component/{contacts-position-rac-DTyvklfN.js → contacts-position-rac-Dd_kBjqG.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-D-ZEX1A3.js → contacts-subscribe-rac-C6AlsP10.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-B4NYJwWt.js → contacts-tax-id-rac-CQ1n29zI.js} +1 -1
- package/dist/component/{date-availability-Dach9aRC.js → date-availability-DDj1j0z5.js} +1 -1
- package/dist/component/{date-input-field-rac-B72mHcya.js → date-input-field-rac-D5r1n_ah.js} +59 -59
- package/dist/component/{date-input-rac-CYix11gT.js → date-input-rac-Cyi5mU_P.js} +1 -1
- package/dist/component/{date-picker-field-rac-B8pvtPir.js → date-picker-field-rac-CeG391Zo.js} +34 -34
- package/dist/component/{date-picker-rac-D6cR0zH9.js → date-picker-rac-Ci9aHgav.js} +1 -1
- package/dist/component/{date-time-input-field-rac-B7Y3Yf5l.js → date-time-input-field-rac-CrbYEbJJ.js} +89 -89
- package/dist/component/{date-time-input-rac-DMN-noQX.js → date-time-input-rac-DDJLkqs0.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-Kq0GnteP.js → dext-checkbox-group-rac-C3ftVHBA.js} +4 -4
- package/dist/component/{dext-checkbox-rac-BY9GZ4n1.js → dext-checkbox-rac-BGLYWn68.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CXArIddp.js → dext-date-picker-rac-Cy9RlDlt.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-B39TtxGq.js → dext-date-time-input-rac-88ZoTd5e.js} +1 -1
- package/dist/component/{dext-dropdown-rac-C3y0G8cS.js → dext-dropdown-rac-CPxDUuk9.js} +1 -1
- package/dist/component/{dext-email-rac-BIg3cq7Q.js → dext-email-rac-BAvQwDPA.js} +1 -1
- package/dist/component/{dext-number-input-rac-27sHJ7yN.js → dext-number-input-rac-D7HYQVKq.js} +1 -1
- package/dist/component/{dext-phone-rac-CcohoFQp.js → dext-phone-rac--FhcplSI.js} +1 -1
- package/dist/component/{dext-radio-group-rac-eead3Gve.js → dext-radio-group-rac-DBz8iCKW.js} +2 -2
- package/dist/component/{dext-rating-input-rac-B_E6OcBr.js → dext-rating-input-rac-Cv7nThfe.js} +1 -1
- package/dist/component/{dext-tags-rac-Yd9aAtnF.js → dext-tags-rac-CRUUc5dr.js} +2 -2
- package/dist/component/{dext-text-area-rac-CMACri2C.js → dext-text-area-rac-DQBQXV1L.js} +1 -1
- package/dist/component/{dext-text-input-rac-sNjSCfQ-.js → dext-text-input-rac-4CpM581y.js} +1 -1
- package/dist/component/{dext-url-input-rac-DwhbzJty.js → dext-url-input-rac-0C1jTEr9.js} +1 -1
- package/dist/component/{donation-rac-BVAN3kMk.js → donation-rac-Cgt0ZE50.js} +68 -68
- package/dist/component/{dropdown-field-rac-DdoGigWx.js → dropdown-field-rac-DlGKR7pZ.js} +3 -3
- package/dist/component/{dropdown-rac-CRkt5w47.js → dropdown-rac-CYFW_3x_.js} +1 -1
- package/dist/component/{ecom-address-rac-C36hFHW0.js → ecom-address-rac-CQfQHpXC.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BKfQ348w.js → ecom-subscription-checkbox-rac-D2v2Upvz.js} +2 -2
- package/dist/component/{email-input-field-rac-MOaISYxa.js → email-input-field-rac-CVw25yRo.js} +45 -45
- package/dist/component/{events-repeater-rac-D6p-NgE8.js → events-repeater-rac-BCVUcmFj.js} +22 -22
- package/dist/component/{events-rsvp-rac-DVpgN8gm.js → events-rsvp-rac-DwbqEr8z.js} +3 -3
- package/dist/component/{field-error-headless-XNWmDH3E.js → field-error-headless-XnVcMmsL.js} +3 -3
- package/dist/component/{field-label-headless-CORRAJGt.js → field-label-headless-BRTLT2Yt.js} +14 -14
- package/dist/component/{file-upload-rac-DRMr7E4b.js → file-upload-rac-Dkwg9Jk4.js} +115 -115
- package/dist/component/{fixed-payment-rac-BUXzNex9.js → fixed-payment-rac-ST98xAa2.js} +20 -20
- package/dist/component/{form-DSpx-AO8.js → form-BUqSKOvc.js} +235 -234
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CiDXlNsa.js → header-field-rac-CzNTGYWq.js} +5 -5
- package/dist/component/{header-rac-B5Rg-h8u.js → header-rac-DUt6AIAE.js} +1 -1
- package/dist/component/{image-choice-rac-CtoA_KDp.js → image-choice-rac-DuBgrSt2.js} +21 -21
- package/dist/component/{index-Bz7ZhQsF.js → index-CDO22hht.js} +106 -106
- package/dist/component/{index-CwruESwc.js → index-cZZeAuuu.js} +5 -5
- package/dist/component/{isObjectLike-C5dHxHP0.js → isObjectLike-cs4bARpC.js} +3 -3
- package/dist/component/{multiline-address-field-rac-Z-qF366L.js → multiline-address-field-rac-vcEWhUCV.js} +73 -73
- package/dist/component/{multiline-address-rac-CJIHTMw5.js → multiline-address-rac-WQaI2eUX.js} +1 -1
- package/dist/component/{number-input-field-rac-D4vf6I6N.js → number-input-field-rac-CBUMqATk.js} +26 -26
- package/dist/component/{number-input-rac-B2jW6JUQ.js → number-input-rac-B4j5hyzS.js} +1 -1
- package/dist/component/{password-rac-DGRZ17Jl.js → password-rac-DwLyf45N.js} +28 -28
- package/dist/component/{payment-input-rac-BtD-tAKv.js → payment-input-rac-D0Od---y.js} +28 -28
- package/dist/component/{phone-input-field-rac-KD4-APhr.js → phone-input-field-rac-COlu9IeC.js} +64 -64
- package/dist/component/{phone-rac-Cw2yccgg.js → phone-rac-Dh4RacOF.js} +1 -1
- package/dist/component/{product-list-rac-XbzTDdbp.js → product-list-rac-D7zHDE2D.js} +47 -47
- package/dist/component/{quiz-radio-group-rac-BDw_mAw5.js → quiz-radio-group-rac-1AaKphJt.js} +1 -1
- package/dist/component/{radio-button-module-classes-CFGf0Hzh.js → radio-button-module-classes-VqaP6vpA.js} +29 -29
- package/dist/component/{radio-group-field-rac-CXN7tyVu.js → radio-group-field-rac-Cp3LRN3C.js} +6 -6
- package/dist/component/{radio-group-rac-COHzqjBh.js → radio-group-rac-KhmhzYGf.js} +1 -1
- package/dist/component/{rating-input-field-rac-DCXNZgf1.js → rating-input-field-rac-10n6ciCr.js} +22 -22
- package/dist/component/{rating-input-rac-DwQt9ML7.js → rating-input-rac-XZjjY2Gp.js} +1 -1
- package/dist/component/{rich-content-rac.module-B7rPwNns.js → rich-content-rac.module-kMwDoLBa.js} +1 -1
- package/dist/component/{rich-text-field-rac-DlER7NRD.js → rich-text-field-rac-H5bd8fAt.js} +6 -6
- package/dist/component/{rich-text-rac-CjicsHA7.js → rich-text-rac-88GSQR62.js} +1 -1
- package/dist/component/{service-dropdown-rac-B81LC_6_.js → service-dropdown-rac-B1_Xr_X3.js} +31 -31
- package/dist/component/{services-multi-choice-rac-BR6gZeHk.js → services-multi-choice-rac-DWp_Llbi.js} +17 -17
- package/dist/component/{signature-rac-XFj7Ddtp.js → signature-rac-zN_6KRDp.js} +44 -44
- package/dist/component/{submit-button-rac-Bz7zs_3W.js → submit-button-rac-Dv6UarYX.js} +2 -2
- package/dist/component/{tags-field-rac-DWWkNKqc.js → tags-field-rac-sVN6MHfJ.js} +38 -38
- package/dist/component/{tags-rac-BXyiQ9i1.js → tags-rac-DhTHs_XN.js} +1 -1
- package/dist/component/{text-area-field-rac-DsIRYi0d.js → text-area-field-rac-DrWkww7W.js} +21 -21
- package/dist/component/{text-area-rac-CF9pDP9d.js → text-area-rac-CXXh-ZdY.js} +1 -1
- package/dist/component/{text-input-field-rac-BwIDZACz.js → text-input-field-rac-C2YiMr-g.js} +3 -3
- package/dist/component/{text-input-headless-5kQs2_Xu.js → text-input-headless-BJMNbsMY.js} +12 -12
- package/dist/component/{text-input-rac-CRmSuw1k.js → text-input-rac-CpsPh7FH.js} +1 -1
- package/dist/component/{time-input-rac-BRMNpe51.js → time-input-rac-DG_1KxS4.js} +23 -23
- package/dist/component/{url-input-field-rac-CKLS3QDk.js → url-input-field-rac-twxRREnl.js} +26 -26
- package/dist/component/{url-input-rac-Dv-kp50D.js → url-input-rac-BTStO0NP.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-BQi_qE_-.js → use-dropdown-option-class-name-DbMMg1ws.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-bAK8aHiG.js → use-dropdown-trigger-class-name-Yes4kC_0.js} +17 -17
- package/dist/component/{use-element-state-class-name-rXM_lHug.js → use-element-state-class-name-DlncY4hk.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-BnV_uerV.js → use-hoverable-input-class-name-C__zqP5j.js} +2 -2
- package/dist/component/use-is-forced-open-dropdown-DnK_MQRO.js +53 -0
- package/dist/component/{use-service-options-base-CLeE9-Tx.js → use-service-options-base-DKJe52Vk.js} +6 -6
- package/dist/component/use-text-input-class-name-D9tJTR-b.js +6 -0
- package/dist/form.d.ts +3 -0
- package/package.json +2 -2
- package/dist/component/use-is-forced-open-dropdown-Bp-5Xpmw.js +0 -53
- package/dist/component/use-text-input-class-name-DIKWvfkm.js +0 -6
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import t, { useMemo as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import t, { useMemo as G, useCallback as v, useRef as U } from "react";
|
|
2
|
+
import { RicosViewer as H } from "@wix/ricos/viewer";
|
|
3
3
|
import b from "classnames";
|
|
4
|
-
import { CheckboxField as $, CheckboxButton as
|
|
5
|
-
import {
|
|
4
|
+
import { CheckboxField as $, CheckboxButton as z, NumberField as W, Group as X, Button as Q, Input as Y } from "react-aria-components";
|
|
5
|
+
import { bA as x, bx as J, bs as w, bK as Z, bC as ee, W as te, ac as ne, a2 as ae, a5 as oe, a4 as re, a6 as le, M as se, G as ie, a3 as ce } from "./form-BUqSKOvc.js";
|
|
6
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-
|
|
7
|
+
import { L as ue, g as me } from "./field-label-headless-BRTLT2Yt.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-XnVcMmsL.js";
|
|
10
10
|
import { F as ye } from "./fieldset-headless-CD3fds9J.js";
|
|
11
11
|
import { g as _e } from "./payment-field-utils-DobiK5Xh.js";
|
|
12
12
|
import { S as be } from "./selection-indicator-XQ8MYHUQ.js";
|
|
@@ -14,8 +14,8 @@ import { E as fe } from "./error-icon-hZxQ6DEy.js";
|
|
|
14
14
|
import { C as Ie } from "./checkbox-indicator-module-classes-akWZsZNn.js";
|
|
15
15
|
import { s as q } from "./field-rac.module-DP0lkkEv.js";
|
|
16
16
|
import { o as j } from "./options-rac.module-_THNq6Qq.js";
|
|
17
|
-
import { u as
|
|
18
|
-
var
|
|
17
|
+
import { u as Oe } from "./use-element-state-class-name-DlncY4hk.js";
|
|
18
|
+
var Le = /* @__PURE__ */ (function(e) {
|
|
19
19
|
return e.crop = "CROP", e.fit = "FIT", e;
|
|
20
20
|
})({}), k = /* @__PURE__ */ (function(e) {
|
|
21
21
|
return e.oneByOne = "one-by-one", e.onlyOne = "only-one", e.many = "many", e;
|
|
@@ -28,10 +28,10 @@ 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 } = x(), { inputId: M, labelId: N, ariaDescribedBy: h } = J(), _ = I(e, o.Label), g = I(e, o.Options), A = I(e, o.Description), L = I(e, o.Error), i = G(() => l || [], [
|
|
32
32
|
l
|
|
33
|
-
]),
|
|
34
|
-
const d = i.filter((
|
|
33
|
+
]), T = Ce((D = m == null ? void 0 : m.predefined) == null ? void 0 : D.paymentOptions) === k.many, F = v((S, R) => {
|
|
34
|
+
const d = i.filter((K) => K.productId !== S.productId), B = R ? [
|
|
35
35
|
...d,
|
|
36
36
|
S
|
|
37
37
|
] : d;
|
|
@@ -44,54 +44,54 @@ const o = ({ children: e }) => {
|
|
|
44
44
|
fieldId: a,
|
|
45
45
|
renderLabel: () => _,
|
|
46
46
|
renderInput: () => /* @__PURE__ */ t.createElement(ye, {
|
|
47
|
-
id:
|
|
47
|
+
id: M,
|
|
48
48
|
ariaLabelledBy: N,
|
|
49
49
|
ariaDescribedBy: h,
|
|
50
50
|
required: y,
|
|
51
|
-
onBlur:
|
|
51
|
+
onBlur: O,
|
|
52
52
|
onFocus: s
|
|
53
53
|
}, g ? f(g, {
|
|
54
|
-
allowMany:
|
|
54
|
+
allowMany: T,
|
|
55
55
|
productValues: i,
|
|
56
56
|
onProductChange: F,
|
|
57
57
|
disabled: r,
|
|
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, A)
|
|
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 } = x(), { currency: M } = w(), { t: N } = Z(), h = I(e, o.Option);
|
|
65
65
|
return /* @__PURE__ */ t.createElement("div", {
|
|
66
66
|
className: a
|
|
67
67
|
}, u == null ? void 0 : u.map((_, g) => {
|
|
68
|
-
var C,
|
|
69
|
-
const
|
|
68
|
+
var C, T, F, D, S;
|
|
69
|
+
const A = ((S = (D = (F = (T = (C = m == null ? void 0 : m.predefined) == null ? void 0 : C.paymentOptions) == null ? void 0 : T.products) == null ? void 0 : F.find((R) => R.id === _.value)) == null ? void 0 : D.fixedPriceOptions) == null ? void 0 : S.price) || "0", L = _e(N, M), i = r.find((R) => R.productId === _.value);
|
|
70
70
|
return f(h, {
|
|
71
71
|
key: _.id || _.value || _.label,
|
|
72
72
|
option: _,
|
|
73
|
-
price:
|
|
73
|
+
price: A,
|
|
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: M, imageResize: N, isFirst: h } = l, { id: _ } = x(), g = U(null), A = U(null), L = I(e, E.Image), i = I(e, E.Label), C = I(e, E.Price), T = I(e, E.Input), F = I(e, E.Quantity);
|
|
88
88
|
ee(() => {
|
|
89
89
|
var d;
|
|
90
|
-
h && ((d = g.current ??
|
|
90
|
+
h && ((d = g.current ?? A.current) == null || d.focus({
|
|
91
91
|
preventScroll: !0
|
|
92
92
|
}));
|
|
93
93
|
}, _);
|
|
94
|
-
const D =
|
|
94
|
+
const D = v((d) => {
|
|
95
95
|
s({
|
|
96
96
|
productId: n.value,
|
|
97
97
|
price: r,
|
|
@@ -101,7 +101,7 @@ const o = ({ children: e }) => {
|
|
|
101
101
|
s,
|
|
102
102
|
n.value,
|
|
103
103
|
r
|
|
104
|
-
]), S =
|
|
104
|
+
]), S = v((d) => {
|
|
105
105
|
s({
|
|
106
106
|
productId: n.value,
|
|
107
107
|
price: r,
|
|
@@ -111,11 +111,11 @@ const o = ({ children: e }) => {
|
|
|
111
111
|
s,
|
|
112
112
|
n.value,
|
|
113
113
|
r
|
|
114
|
-
]), R = `${n.label} ${
|
|
115
|
-
return
|
|
114
|
+
]), R = `${n.label} ${M} ${r}`;
|
|
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
121
|
}) : null, i ? f(i, {
|
|
@@ -129,7 +129,7 @@ const o = ({ children: e }) => {
|
|
|
129
129
|
readOnly: m,
|
|
130
130
|
hasError: p,
|
|
131
131
|
ariaLabel: R,
|
|
132
|
-
inputRef: h ?
|
|
132
|
+
inputRef: h ? A : void 0
|
|
133
133
|
}) : null) : /* @__PURE__ */ t.createElement($, {
|
|
134
134
|
isSelected: y,
|
|
135
135
|
onChange: D,
|
|
@@ -137,18 +137,18 @@ const o = ({ children: e }) => {
|
|
|
137
137
|
isReadOnly: m,
|
|
138
138
|
isInvalid: p,
|
|
139
139
|
"aria-label": R
|
|
140
|
-
}, /* @__PURE__ */ t.createElement(
|
|
140
|
+
}, /* @__PURE__ */ t.createElement(z, {
|
|
141
141
|
ref: g,
|
|
142
142
|
className: a,
|
|
143
143
|
"data-hook": "product"
|
|
144
|
-
}, ({ isHovered: d, isFocused: B }) => /* @__PURE__ */ t.createElement(t.Fragment, null,
|
|
144
|
+
}, ({ isHovered: d, isFocused: B }) => /* @__PURE__ */ t.createElement(t.Fragment, null, L ? f(L, {
|
|
145
145
|
option: n,
|
|
146
146
|
imageResize: N
|
|
147
147
|
}) : null, i ? f(i, {
|
|
148
148
|
label: n.label
|
|
149
149
|
}) : null, C ? f(C, {
|
|
150
150
|
price: r
|
|
151
|
-
}) : null, f(
|
|
151
|
+
}) : null, f(T, {
|
|
152
152
|
isSelected: y,
|
|
153
153
|
isHovered: d,
|
|
154
154
|
isFocused: B
|
|
@@ -158,14 +158,14 @@ const o = ({ children: e }) => {
|
|
|
158
158
|
const { option: l, imageResize: n } = a, r = (s = l.media) == null ? void 0 : s.image;
|
|
159
159
|
if (!r)
|
|
160
160
|
return null;
|
|
161
|
-
const c = n ===
|
|
161
|
+
const c = n === Le.fit, y = me(r, 96, 96, c ? "fit" : "fill");
|
|
162
162
|
if (!y)
|
|
163
163
|
return null;
|
|
164
|
-
const
|
|
164
|
+
const O = r.altText || l.label || "";
|
|
165
165
|
return /* @__PURE__ */ t.createElement("img", {
|
|
166
166
|
className: e,
|
|
167
167
|
src: y,
|
|
168
|
-
alt:
|
|
168
|
+
alt: O,
|
|
169
169
|
"data-fit": c ? "contain" : "cover",
|
|
170
170
|
"data-hook": "product-image"
|
|
171
171
|
});
|
|
@@ -186,16 +186,16 @@ const o = ({ children: e }) => {
|
|
|
186
186
|
"data-hook": "product-price"
|
|
187
187
|
}, c);
|
|
188
188
|
}, De = ({ className: e, ...a }) => {
|
|
189
|
-
const { quantity: l, onQuantityChange: n, disabled: r, readOnly: c, hasError: y, ariaLabel:
|
|
189
|
+
const { quantity: l, onQuantityChange: n, disabled: r, readOnly: c, hasError: y, ariaLabel: O, inputRef: s } = a, u = v((p) => {
|
|
190
190
|
n(p < 0 ? 0 : p);
|
|
191
191
|
}, [
|
|
192
192
|
n
|
|
193
|
-
]), m =
|
|
193
|
+
]), m = v((p) => {
|
|
194
194
|
p.key === "Home" && (p.preventDefault(), u(0));
|
|
195
195
|
}, [
|
|
196
196
|
u
|
|
197
197
|
]);
|
|
198
|
-
return /* @__PURE__ */ t.createElement(
|
|
198
|
+
return /* @__PURE__ */ t.createElement(W, {
|
|
199
199
|
value: l,
|
|
200
200
|
onChange: u,
|
|
201
201
|
minValue: 0,
|
|
@@ -203,7 +203,7 @@ const o = ({ children: e }) => {
|
|
|
203
203
|
isDisabled: r,
|
|
204
204
|
isReadOnly: c,
|
|
205
205
|
isInvalid: y,
|
|
206
|
-
"aria-label":
|
|
206
|
+
"aria-label": O,
|
|
207
207
|
className: e,
|
|
208
208
|
"data-hook": "product-quantity"
|
|
209
209
|
}, /* @__PURE__ */ t.createElement(X, {
|
|
@@ -227,19 +227,19 @@ o.Options = V;
|
|
|
227
227
|
o.Option = E;
|
|
228
228
|
o.Description = de;
|
|
229
229
|
o.Error = Ee;
|
|
230
|
-
const Se = "_options_1jnru_1", Pe = "_option_1jnru_1", Ne = "_optionInput_1jnru_21", he = "_optionImage_1jnru_32",
|
|
230
|
+
const Se = "_options_1jnru_1", Pe = "_option_1jnru_1", Ne = "_optionInput_1jnru_21", he = "_optionImage_1jnru_32", Ae = "_optionLabel_1jnru_66", Te = "_optionPrice_1jnru_73", qe = "_quantity_1jnru_87", P = {
|
|
231
231
|
options: Se,
|
|
232
232
|
option: Pe,
|
|
233
233
|
optionInput: Ne,
|
|
234
234
|
optionImage: he,
|
|
235
|
-
optionLabel:
|
|
236
|
-
optionPrice:
|
|
235
|
+
optionLabel: Ae,
|
|
236
|
+
optionPrice: Te,
|
|
237
237
|
quantity: qe
|
|
238
|
-
},
|
|
238
|
+
}, Me = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(H, {
|
|
239
239
|
content: e,
|
|
240
240
|
locale: a
|
|
241
|
-
}),
|
|
242
|
-
const e =
|
|
241
|
+
}), ve = () => {
|
|
242
|
+
const e = Oe({
|
|
243
243
|
globalClasses: ce,
|
|
244
244
|
moduleClasses: Ie
|
|
245
245
|
});
|
|
@@ -265,8 +265,8 @@ const Se = "_options_1jnru_1", Pe = "_option_1jnru_1", Ne = "_optionInput_1jnru_
|
|
|
265
265
|
className: b(se, q.error)
|
|
266
266
|
}, /* @__PURE__ */ t.createElement(fe, null), /* @__PURE__ */ t.createElement(o.Error.Text, null)), /* @__PURE__ */ t.createElement(o.Description, {
|
|
267
267
|
className: b(ie, q.description)
|
|
268
|
-
},
|
|
269
|
-
}, Ze = () => /* @__PURE__ */ t.createElement(
|
|
268
|
+
}, Me));
|
|
269
|
+
}, Ze = () => /* @__PURE__ */ t.createElement(ve, null);
|
|
270
270
|
export {
|
|
271
271
|
Ze as ProductListRAC
|
|
272
272
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import a, { useRef as F, useState as
|
|
2
|
-
import { RadioGroup as
|
|
3
|
-
import {
|
|
1
|
+
import a, { useRef as F, useState as T, useEffect as B, useCallback as H } from "react";
|
|
2
|
+
import { RadioGroup as A, RadioField as k, RadioButton as x, TextField as G, Input as P } from "react-aria-components";
|
|
3
|
+
import { bA as g, bx as $, bK as D, bC as q } from "./form-BUqSKOvc.js";
|
|
4
4
|
import { f as u, a as L } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as U, E as
|
|
6
|
-
import { L as
|
|
7
|
-
import { S as
|
|
8
|
-
const v = "Other",
|
|
5
|
+
import { D as U, E as K } from "./field-error-headless-XnVcMmsL.js";
|
|
6
|
+
import { L as M } from "./field-label-headless-BRTLT2Yt.js";
|
|
7
|
+
import { S as j } from "./selection-indicator-XQ8MYHUQ.js";
|
|
8
|
+
const v = "Other", w = (e, t) => e == null ? void 0 : e.find((n) => (n.value ?? n.label) === t), y = (e, t) => !!t && !w(e, t), z = (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: h, disabled: p, readOnly: O, required: m, onBlur: E, onFocus: b, hasError: r, FieldLayout: c, options: o } = g(), { inputId: f, labelId:
|
|
12
|
+
const { id: n, value: l, onChange: h, disabled: p, readOnly: O, required: m, onBlur: E, onFocus: b, hasError: r, FieldLayout: c, options: o } = g(), { inputId: f, labelId: I, ariaDescribedBy: C } = $(), s = u(e, i.Label), _ = u(e, i.Options), R = u(e, i.Description), N = u(e, i.Error), V = y(o, l) ? v : l || null;
|
|
13
13
|
return /* @__PURE__ */ a.createElement(c, {
|
|
14
14
|
fieldId: n,
|
|
15
15
|
renderLabel: () => L(s, {
|
|
16
16
|
as: "div"
|
|
17
17
|
}),
|
|
18
|
-
renderInput: () => /* @__PURE__ */ a.createElement(
|
|
18
|
+
renderInput: () => /* @__PURE__ */ a.createElement(A, {
|
|
19
19
|
id: f,
|
|
20
20
|
className: t,
|
|
21
|
-
"aria-labelledby":
|
|
22
|
-
"aria-describedby":
|
|
21
|
+
"aria-labelledby": I,
|
|
22
|
+
"aria-describedby": C,
|
|
23
23
|
value: V,
|
|
24
24
|
onChange: h,
|
|
25
25
|
isDisabled: p,
|
|
@@ -31,9 +31,9 @@ const v = "Other", M = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
31
31
|
}, _),
|
|
32
32
|
renderDescription: () => /* @__PURE__ */ a.createElement(a.Fragment, null, N, R)
|
|
33
33
|
});
|
|
34
|
-
},
|
|
34
|
+
}, J = ({ children: e, className: t }) => {
|
|
35
35
|
const { options: n, addOther: l, addOtherLabel: h, id: p, numberOfColumns: O, hasError: m } = g(), { t: E } = D(), b = u(e, i.Option), r = F(null), c = h || E("add-other.default-other-option-label") || v;
|
|
36
|
-
return
|
|
36
|
+
return q(() => {
|
|
37
37
|
var o;
|
|
38
38
|
(o = r.current) == null || o.focus({
|
|
39
39
|
preventScroll: !0
|
|
@@ -55,15 +55,15 @@ const v = "Other", M = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
55
55
|
isOther: !0
|
|
56
56
|
}));
|
|
57
57
|
}, d = ({ children: e, className: t, ...n }) => {
|
|
58
|
-
var
|
|
59
|
-
const { value: l, label: h, isOther: p = !1, radioRef: O } = n, { value: m, options: E } = g(), b = u(e, d.Label), r = u(e, d.Input), c = u(e, d.Control), o = u(e, d.OtherInput), f = p ? y(E, m) : m === l,
|
|
58
|
+
var C;
|
|
59
|
+
const { value: l, label: h, isOther: p = !1, radioRef: O } = n, { value: m, options: E } = g(), b = u(e, d.Label), r = u(e, d.Input), c = u(e, d.Control), o = u(e, d.OtherInput), f = p ? y(E, m) : m === l, I = (C = r == null ? void 0 : r.props) == null ? void 0 : C.className;
|
|
60
60
|
return /* @__PURE__ */ a.createElement("div", {
|
|
61
61
|
className: t
|
|
62
|
-
}, /* @__PURE__ */ a.createElement(
|
|
62
|
+
}, /* @__PURE__ */ a.createElement(k, {
|
|
63
63
|
value: l
|
|
64
|
-
}, /* @__PURE__ */ a.createElement(
|
|
64
|
+
}, /* @__PURE__ */ a.createElement(x, {
|
|
65
65
|
ref: O,
|
|
66
|
-
className:
|
|
66
|
+
className: I
|
|
67
67
|
}, ({ isSelected: s, isHovered: _, isFocused: R }) => /* @__PURE__ */ a.createElement(a.Fragment, null, L(c, {
|
|
68
68
|
isSelected: s,
|
|
69
69
|
isHovered: _,
|
|
@@ -77,28 +77,28 @@ const v = "Other", M = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
77
77
|
className: e
|
|
78
78
|
}, n);
|
|
79
79
|
}, W = (e) => null, X = ({ className: e }) => {
|
|
80
|
-
const { value: t, onChange: n, addOtherLabel: l, addOtherPlaceholder: h, otherInputCharacterLimit: p, disabled: O, readOnly: m, options: E } = g(), { t: b } = D(), r = F(null), c = y(E, t), o = l || b("add-other.default-other-option-label") || v, [f,
|
|
81
|
-
|
|
80
|
+
const { value: t, onChange: n, addOtherLabel: l, addOtherPlaceholder: h, otherInputCharacterLimit: p, disabled: O, readOnly: m, options: E } = g(), { t: b } = D(), r = F(null), c = y(E, t), o = l || b("add-other.default-other-option-label") || v, [f, I] = T(c && t ? z(t, l) : "");
|
|
81
|
+
B(() => {
|
|
82
82
|
var s;
|
|
83
83
|
c && r.current && ((s = r.current) == null || s.focus());
|
|
84
84
|
}, [
|
|
85
85
|
c
|
|
86
86
|
]);
|
|
87
|
-
const
|
|
87
|
+
const C = H((s) => {
|
|
88
88
|
let _;
|
|
89
|
-
s ? _ = `${l}: ${s}` : _ = o, n(_),
|
|
89
|
+
s ? _ = `${l}: ${s}` : _ = o, n(_), I(s);
|
|
90
90
|
}, [
|
|
91
91
|
n,
|
|
92
92
|
l,
|
|
93
93
|
o
|
|
94
94
|
]);
|
|
95
|
-
return /* @__PURE__ */ a.createElement(
|
|
95
|
+
return /* @__PURE__ */ a.createElement(G, {
|
|
96
96
|
"aria-label": o,
|
|
97
97
|
value: f,
|
|
98
|
-
onChange:
|
|
98
|
+
onChange: C,
|
|
99
99
|
isDisabled: O,
|
|
100
100
|
isReadOnly: m
|
|
101
|
-
}, /* @__PURE__ */ a.createElement(
|
|
101
|
+
}, /* @__PURE__ */ a.createElement(P, {
|
|
102
102
|
ref: r,
|
|
103
103
|
className: e,
|
|
104
104
|
placeholder: h,
|
|
@@ -107,13 +107,13 @@ const v = "Other", M = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
107
107
|
};
|
|
108
108
|
d.Label = Q;
|
|
109
109
|
d.Input = W;
|
|
110
|
-
d.Control =
|
|
110
|
+
d.Control = j;
|
|
111
111
|
d.OtherInput = X;
|
|
112
|
-
i.Label =
|
|
113
|
-
i.Options =
|
|
112
|
+
i.Label = M;
|
|
113
|
+
i.Options = J;
|
|
114
114
|
i.Option = d;
|
|
115
115
|
i.Description = U;
|
|
116
|
-
i.Error =
|
|
116
|
+
i.Error = K;
|
|
117
117
|
const Y = "_labelImage_1u9f2_1", Z = "_option_1u9f2_26", ee = "_optionInput_1u9f2_32", te = "_optionControl_1u9f2_50", oe = "_optionControlHover_1u9f2_72", ne = "_optionControlSelected_1u9f2_90", le = "_optionLabel_1u9f2_137", S = {
|
|
118
118
|
labelImage: Y,
|
|
119
119
|
option: Z,
|
package/dist/component/{radio-group-field-rac-CXN7tyVu.js → radio-group-field-rac-Cp3LRN3C.js}
RENAMED
|
@@ -1,17 +1,17 @@
|
|
|
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-VqaP6vpA.js";
|
|
5
5
|
import { E as c } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { s as r } from "./field-rac.module-DP0lkkEv.js";
|
|
7
|
-
import {
|
|
7
|
+
import { W as i, ac as E, a7 as p, a8 as O, M as R, G as _, a9 as I } from "./form-BUqSKOvc.js";
|
|
8
8
|
import { o as L } from "./options-rac.module-_THNq6Qq.js";
|
|
9
|
-
import { u as N } from "./use-element-state-class-name-
|
|
10
|
-
import { u } from "./use-text-input-class-name-
|
|
9
|
+
import { u as N } from "./use-element-state-class-name-DlncY4hk.js";
|
|
10
|
+
import { u } from "./use-text-input-class-name-D9tJTR-b.js";
|
|
11
11
|
const D = ({ content: o, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
12
12
|
content: o,
|
|
13
13
|
locale: l
|
|
14
|
-
}),
|
|
14
|
+
}), G = () => {
|
|
15
15
|
const o = N({
|
|
16
16
|
globalClasses: I,
|
|
17
17
|
moduleClasses: n
|
|
@@ -41,5 +41,5 @@ const D = ({ content: o, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
|
41
41
|
}, D));
|
|
42
42
|
};
|
|
43
43
|
export {
|
|
44
|
-
|
|
44
|
+
G as R
|
|
45
45
|
};
|
package/dist/component/{rating-input-field-rac-DCXNZgf1.js → rating-input-field-rac-10n6ciCr.js}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { RicosViewer as y } from "@wix/ricos/viewer";
|
|
2
2
|
import u from "classnames";
|
|
3
3
|
import e, { useCallback as N, useState as O, useRef as A } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import { RadioGroup as
|
|
6
|
-
import { f as E, a as
|
|
7
|
-
import { D as
|
|
8
|
-
import { L as Q } from "./field-label-headless-
|
|
9
|
-
import { E as
|
|
4
|
+
import { bA as I, bx as v, bK as M, W as T, ac as H, aa as w, M as B, G as P, ab as G } from "./form-BUqSKOvc.js";
|
|
5
|
+
import { RadioGroup as q, RadioField as x, RadioButton as k } from "react-aria-components";
|
|
6
|
+
import { f as E, a as U } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { D as z, E as K } from "./field-error-headless-XnVcMmsL.js";
|
|
8
|
+
import { L as Q } from "./field-label-headless-BRTLT2Yt.js";
|
|
9
|
+
import { E as W } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { s as g } from "./field-rac.module-DP0lkkEv.js";
|
|
11
|
-
import { u as
|
|
11
|
+
import { u as Z } from "./use-element-state-class-name-DlncY4hk.js";
|
|
12
12
|
const t = ({ children: a }) => {
|
|
13
13
|
const { id: n, value: r, onChange: i, disabled: l, readOnly: m, required: d, hasError: c, onBlur: o, onFocus: C, FieldLayout: R } = I(), { labelId: _ } = v(), L = N((D) => i(Number(D)), [
|
|
14
14
|
i
|
|
@@ -16,7 +16,7 @@ const t = ({ children: a }) => {
|
|
|
16
16
|
return /* @__PURE__ */ e.createElement(R, {
|
|
17
17
|
fieldId: n,
|
|
18
18
|
renderLabel: () => b,
|
|
19
|
-
renderInput: () => /* @__PURE__ */ e.createElement(
|
|
19
|
+
renderInput: () => /* @__PURE__ */ e.createElement(q, {
|
|
20
20
|
"aria-labelledby": _,
|
|
21
21
|
value: r ? String(r) : void 0,
|
|
22
22
|
onChange: L,
|
|
@@ -45,14 +45,14 @@ const t = ({ children: a }) => {
|
|
|
45
45
|
className: n,
|
|
46
46
|
"data-invalid": m,
|
|
47
47
|
"data-readonly": l
|
|
48
|
-
}, L.map((s) =>
|
|
48
|
+
}, L.map((s) => U(_, {
|
|
49
49
|
key: s,
|
|
50
50
|
value: s,
|
|
51
51
|
isSelected: b(s),
|
|
52
52
|
onHoverChange: (f) => C(f ? s : void 0),
|
|
53
53
|
label: r == null ? void 0 : r(Number(s))
|
|
54
54
|
})));
|
|
55
|
-
},
|
|
55
|
+
}, j = {
|
|
56
56
|
border: 0,
|
|
57
57
|
clipPath: "inset(50%)",
|
|
58
58
|
height: 1,
|
|
@@ -64,9 +64,9 @@ const t = ({ children: a }) => {
|
|
|
64
64
|
whiteSpace: "nowrap"
|
|
65
65
|
}, F = ({ className: a, children: n, ...r }) => {
|
|
66
66
|
const { value: i, isSelected: l, onHoverChange: m, label: d } = r;
|
|
67
|
-
return /* @__PURE__ */ e.createElement(
|
|
67
|
+
return /* @__PURE__ */ e.createElement(x, {
|
|
68
68
|
value: i
|
|
69
|
-
}, /* @__PURE__ */ e.createElement(
|
|
69
|
+
}, /* @__PURE__ */ e.createElement(k, {
|
|
70
70
|
className: ({ isHovered: c, isFocused: o }) => typeof a == "function" ? a({
|
|
71
71
|
isSelected: l,
|
|
72
72
|
isHovered: c,
|
|
@@ -79,16 +79,16 @@ const t = ({ children: a }) => {
|
|
|
79
79
|
isHovered: c,
|
|
80
80
|
isFocused: o
|
|
81
81
|
}) : n, d ? /* @__PURE__ */ e.createElement("span", {
|
|
82
|
-
style:
|
|
82
|
+
style: j
|
|
83
83
|
}, d) : null)));
|
|
84
84
|
};
|
|
85
85
|
S.Rating = F;
|
|
86
86
|
t.Label = Q;
|
|
87
87
|
t.Ratings = S;
|
|
88
88
|
t.Rating = F;
|
|
89
|
-
t.Description =
|
|
90
|
-
t.Error =
|
|
91
|
-
const
|
|
89
|
+
t.Description = z;
|
|
90
|
+
t.Error = K;
|
|
91
|
+
const J = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
92
92
|
viewBox: "0 0 32 32",
|
|
93
93
|
width: 32,
|
|
94
94
|
height: 32,
|
|
@@ -111,14 +111,14 @@ const W = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
111
111
|
selected: p.ratingSelected,
|
|
112
112
|
hover: p.ratingHover
|
|
113
113
|
}, Ee = () => {
|
|
114
|
-
const { t: a } =
|
|
115
|
-
globalClasses:
|
|
114
|
+
const { t: a } = M(), n = Z({
|
|
115
|
+
globalClasses: G,
|
|
116
116
|
moduleClasses: te
|
|
117
117
|
});
|
|
118
118
|
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
119
|
-
className: u(
|
|
119
|
+
className: u(T, g.label)
|
|
120
120
|
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
121
|
-
className: u(
|
|
121
|
+
className: u(H, g.requiredMark)
|
|
122
122
|
})), /* @__PURE__ */ e.createElement(t.Ratings, {
|
|
123
123
|
className: u(w, p.ratings),
|
|
124
124
|
getReactionLabel: (r) => a("rating-input.a11y.reaction-label", {
|
|
@@ -126,9 +126,9 @@ const W = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
126
126
|
})
|
|
127
127
|
}, /* @__PURE__ */ e.createElement(t.Rating, {
|
|
128
128
|
className: n
|
|
129
|
-
}, /* @__PURE__ */ e.createElement(
|
|
129
|
+
}, /* @__PURE__ */ e.createElement(J, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
130
130
|
className: u(B, g.error)
|
|
131
|
-
}, /* @__PURE__ */ e.createElement(
|
|
131
|
+
}, /* @__PURE__ */ e.createElement(W, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
132
132
|
className: u(P, g.description)
|
|
133
133
|
}, ee));
|
|
134
134
|
};
|
package/dist/component/{rich-content-rac.module-B7rPwNns.js → rich-content-rac.module-kMwDoLBa.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import c, { useState as u } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { bA as a, bs as i, bK as T } from "./form-BUqSKOvc.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,14 +1,14 @@
|
|
|
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 { bA as m, aN as i, av as u, bb as R, be as T } from "./form-BUqSKOvc.js";
|
|
4
|
+
import { u as C, R as d, s as g, T as p } from "./rich-content-rac.module-kMwDoLBa.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
|
-
return /* @__PURE__ */ e.createElement(d, null, () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
|
|
11
|
-
className: l(
|
|
10
|
+
return /* @__PURE__ */ e.createElement(d, null, () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(i, {
|
|
11
|
+
className: l(u, g.richContent),
|
|
12
12
|
content: n,
|
|
13
13
|
customTheme: h
|
|
14
14
|
}), r && /* @__PURE__ */ e.createElement(p, {
|
|
@@ -17,5 +17,5 @@ const h = {
|
|
|
17
17
|
})));
|
|
18
18
|
};
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
f as R
|
|
21
21
|
};
|