@wix/form-elements 1.158.0 → 1.160.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-m5-FH9kU.js → appointment-rac-BmHu56e5.js} +63 -63
- package/dist/component/{bookings-address-rac-VtG7wH0l.js → bookings-address-rac-DY9l2g0h.js} +1 -1
- package/dist/component/{bookings-email-rac-C8T3aTQH.js → bookings-email-rac-B5vNSOsS.js} +1 -1
- package/dist/component/{bookings-first-name-rac-BlhIWWNj.js → bookings-first-name-rac-CJiefCNz.js} +1 -1
- package/dist/component/{bookings-header-rac-adwR7PKJ.js → bookings-header-rac-BFu7Ko5w.js} +1 -1
- package/dist/component/{bookings-last-name-rac-z5z1GJQL.js → bookings-last-name-rac-DegMM13h.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DMgVxy8J.js → bookings-login-bar-rac-DrA-5tBH.js} +7 -7
- package/dist/component/{bookings-phone-rac-DS7ffO6T.js → bookings-phone-rac-DsaeqxCI.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-BNWI0o60.js → bookings-rich-text-rac-jRHiwqi8.js} +1 -1
- package/dist/component/{checkbox-field-rac-CUKZ9NHF.js → checkbox-field-rac-CyoBb6Yf.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-Didam2ZD.js → checkbox-group-field-headless-Bv1gU3oL.js} +54 -54
- package/dist/component/{checkbox-group-field-rac-C3WCeVA8.js → checkbox-group-field-rac-DasArcdV.js} +6 -6
- package/dist/component/{checkbox-group-rac-Bkq-wm7_.js → checkbox-group-rac-CzmufV1U.js} +1 -1
- package/dist/component/{checkbox-rac-66ga9Lph.js → checkbox-rac-6C7XoUoZ.js} +1 -1
- package/dist/component/{contacts-address-rac-DSOk97te.js → contacts-address-rac-BZobbFtz.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-1qguKm9O.js → contacts-birthdate-rac-DIzf41DS.js} +1 -1
- package/dist/component/{contacts-company-rac-Chefzmw3.js → contacts-company-rac-BiBDO28r.js} +1 -1
- package/dist/component/{contacts-email-rac-DG6eAnz2.js → contacts-email-rac-5mqokCSD.js} +1 -1
- package/dist/component/{contacts-first-name-rac-tSGE0w5w.js → contacts-first-name-rac-BXe3_Nz5.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BjZWfbM5.js → contacts-last-name-rac-Cfqgh7u1.js} +1 -1
- package/dist/component/{contacts-phone-rac-jfGNKLoZ.js → contacts-phone-rac-cmLUWnAc.js} +1 -1
- package/dist/component/{contacts-position-rac-kv8I-m_Q.js → contacts-position-rac-DTyvklfN.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-BkUG0AMs.js → contacts-subscribe-rac-D-ZEX1A3.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BtFrK_Ci.js → contacts-tax-id-rac-B4NYJwWt.js} +1 -1
- package/dist/component/{date-availability-_A9DS6za.js → date-availability-Dach9aRC.js} +1 -1
- package/dist/component/date-input-field-rac-B72mHcya.js +309 -0
- package/dist/component/{date-input-rac-CpseQkV4.js → date-input-rac-CYix11gT.js} +1 -1
- package/dist/component/{date-picker-field-rac-B4gjhxG6.js → date-picker-field-rac-B8pvtPir.js} +86 -86
- package/dist/component/{date-picker-rac-DDJfUDCM.js → date-picker-rac-D6cR0zH9.js} +1 -1
- package/dist/component/date-time-input-field-rac-B7Y3Yf5l.js +441 -0
- package/dist/component/{date-time-input-rac-BkvcyU3H.js → date-time-input-rac-DMN-noQX.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-UWDhIjU-.js → dext-checkbox-group-rac-Kq0GnteP.js} +2 -2
- package/dist/component/{dext-checkbox-rac-q9UJnqsC.js → dext-checkbox-rac-BY9GZ4n1.js} +1 -1
- package/dist/component/{dext-date-picker-rac-C164FDSF.js → dext-date-picker-rac-CXArIddp.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BvbnfRYU.js → dext-date-time-input-rac-B39TtxGq.js} +1 -1
- package/dist/component/{dext-dropdown-rac-z0xU1mRO.js → dext-dropdown-rac-C3y0G8cS.js} +1 -1
- package/dist/component/{dext-email-rac-BkiWpfNw.js → dext-email-rac-BIg3cq7Q.js} +1 -1
- package/dist/component/{dext-number-input-rac-DeQWO-RK.js → dext-number-input-rac-27sHJ7yN.js} +1 -1
- package/dist/component/{dext-phone-rac-CGlVpadW.js → dext-phone-rac-CcohoFQp.js} +1 -1
- package/dist/component/dext-radio-group-rac-eead3Gve.js +18 -0
- package/dist/component/{dext-rating-input-rac-ibIctxU_.js → dext-rating-input-rac-B_E6OcBr.js} +1 -1
- package/dist/component/{dext-tags-rac-snCgM6u0.js → dext-tags-rac-Yd9aAtnF.js} +2 -2
- package/dist/component/{dext-text-area-rac-BHVs8ixR.js → dext-text-area-rac-CMACri2C.js} +1 -1
- package/dist/component/{dext-text-input-rac-DGI747Od.js → dext-text-input-rac-sNjSCfQ-.js} +1 -1
- package/dist/component/{dext-url-input-rac-CpO2VDPE.js → dext-url-input-rac-DwhbzJty.js} +1 -1
- package/dist/component/{donation-rac-Ck6HkRcW.js → donation-rac-BVAN3kMk.js} +90 -90
- package/dist/component/{dropdown-field-rac-e5MjWn5B.js → dropdown-field-rac-DdoGigWx.js} +14 -14
- package/dist/component/{dropdown-rac-B2jprC8G.js → dropdown-rac-CRkt5w47.js} +1 -1
- package/dist/component/{ecom-address-rac-D0stOqRv.js → ecom-address-rac-C36hFHW0.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BRzaQKx3.js → ecom-subscription-checkbox-rac-BKfQ348w.js} +2 -2
- package/dist/component/{email-input-field-rac-0UIjNipg.js → email-input-field-rac-MOaISYxa.js} +59 -59
- package/dist/component/{events-repeater-rac-BBQZzP7U.js → events-repeater-rac-D6p-NgE8.js} +20 -20
- package/dist/component/{events-rsvp-rac-Ck7BXGKy.js → events-rsvp-rac-DVpgN8gm.js} +18 -18
- package/dist/component/{field-error-headless-vApyo-y9.js → field-error-headless-XNWmDH3E.js} +4 -4
- package/dist/component/{field-label-headless-C8-ShLxy.js → field-label-headless-CORRAJGt.js} +4 -4
- package/dist/component/{file-upload-rac-BzWJOM6C.js → file-upload-rac-DRMr7E4b.js} +89 -89
- package/dist/component/{fixed-payment-rac-C4_xI103.js → fixed-payment-rac-BUXzNex9.js} +18 -18
- package/dist/component/{form-D7ulDPh1.js → form-DSpx-AO8.js} +785 -728
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-BnBbhsOZ.js → header-field-rac-CiDXlNsa.js} +6 -6
- package/dist/component/{header-rac-CEWayr6b.js → header-rac-B5Rg-h8u.js} +1 -1
- package/dist/component/{image-choice-rac-DTZrz6oP.js → image-choice-rac-CtoA_KDp.js} +44 -44
- package/dist/component/{index-CKtw7kvn.js → index-Bz7ZhQsF.js} +53 -53
- package/dist/component/{index-DBbgIHYT.js → index-CwruESwc.js} +5 -5
- package/dist/component/{isObjectLike-BHfPE26c.js → isObjectLike-C5dHxHP0.js} +11 -11
- package/dist/component/multiline-address-field-rac-Z-qF366L.js +1664 -0
- package/dist/component/{multiline-address-rac-YQj_QROS.js → multiline-address-rac-CJIHTMw5.js} +1 -1
- package/dist/component/{number-input-field-rac-A7xM2c6F.js → number-input-field-rac-D4vf6I6N.js} +29 -29
- package/dist/component/{number-input-rac-DeDatLY5.js → number-input-rac-B2jW6JUQ.js} +1 -1
- package/dist/component/{password-rac-7Si7JHee.js → password-rac-DGRZ17Jl.js} +29 -29
- package/dist/component/{payment-input-rac-D4JKZl-5.js → payment-input-rac-BtD-tAKv.js} +27 -27
- package/dist/component/phone-input-field-rac-KD4-APhr.js +512 -0
- package/dist/component/{phone-rac-Y2mWnseb.js → phone-rac-Cw2yccgg.js} +1 -1
- package/dist/component/{product-list-rac-CYUcNqf3.js → product-list-rac-XbzTDdbp.js} +33 -33
- package/dist/component/{quiz-radio-group-rac-f3O7fksW.js → quiz-radio-group-rac-BDw_mAw5.js} +1 -1
- package/dist/component/{radio-button-module-classes-BgVUqcvD.js → radio-button-module-classes-CFGf0Hzh.js} +23 -23
- package/dist/component/{radio-group-field-rac-DrOiyk5C.js → radio-group-field-rac-CXN7tyVu.js} +6 -6
- package/dist/component/{radio-group-rac-Btt_bz_K.js → radio-group-rac-COHzqjBh.js} +1 -1
- package/dist/component/{rating-input-field-rac-CwN7wyaw.js → rating-input-field-rac-DCXNZgf1.js} +37 -37
- package/dist/component/{rating-input-rac-sTy0SV3L.js → rating-input-rac-DwQt9ML7.js} +1 -1
- package/dist/component/{rich-content-rac.module-C11w9mXa.js → rich-content-rac.module-B7rPwNns.js} +8 -8
- package/dist/component/{rich-text-field-rac-kGwuDtNs.js → rich-text-field-rac-DlER7NRD.js} +4 -4
- package/dist/component/{rich-text-rac-T4ic2hrA.js → rich-text-rac-CjicsHA7.js} +1 -1
- package/dist/component/service-dropdown-rac-B81LC_6_.js +145 -0
- package/dist/component/{services-multi-choice-rac-CLQ4dLxO.js → services-multi-choice-rac-BR6gZeHk.js} +16 -16
- package/dist/component/{signature-rac-DLiFeCNL.js → signature-rac-XFj7Ddtp.js} +69 -69
- package/dist/component/{submit-button-rac-CccO80E1.js → submit-button-rac-Bz7zs_3W.js} +12 -12
- package/dist/component/{tags-field-rac-DaghCGJU.js → tags-field-rac-DWWkNKqc.js} +79 -79
- package/dist/component/{tags-rac-3ly5shW2.js → tags-rac-BXyiQ9i1.js} +1 -1
- package/dist/component/{text-area-field-rac-2-TYC5Lb.js → text-area-field-rac-DsIRYi0d.js} +21 -21
- package/dist/component/{text-area-rac-Bx0pgw80.js → text-area-rac-CF9pDP9d.js} +1 -1
- package/dist/component/{text-input-field-rac-Dyur2Wby.js → text-input-field-rac-BwIDZACz.js} +5 -5
- package/dist/component/{text-input-headless-DZ-Pjpm4.js → text-input-headless-5kQs2_Xu.js} +14 -14
- package/dist/component/{text-input-rac-BuBtJDX_.js → text-input-rac-CRmSuw1k.js} +1 -1
- package/dist/component/{time-input-rac-AlDEpfXZ.js → time-input-rac-BRMNpe51.js} +20 -20
- package/dist/component/{url-input-field-rac-BzP4-8yP.js → url-input-field-rac-CKLS3QDk.js} +17 -17
- package/dist/component/{url-input-rac-DaBXuedf.js → url-input-rac-Dv-kp50D.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-BQi_qE_-.js +116 -0
- package/dist/component/use-dropdown-trigger-class-name-bAK8aHiG.js +96 -0
- package/dist/component/{use-element-state-class-name-DY0UyIQg.js → use-element-state-class-name-rXM_lHug.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-C_Wh4Qfc.js → use-hoverable-input-class-name-BnV_uerV.js} +2 -2
- package/dist/component/use-is-forced-open-dropdown-Bp-5Xpmw.js +53 -0
- package/dist/component/{use-service-options-base-DgSaAuGy.js → use-service-options-base-CLeE9-Tx.js} +10 -10
- package/dist/component/use-text-input-class-name-DIKWvfkm.js +6 -0
- package/dist/form.d.ts +8 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-QZUxFX5e.js +0 -303
- package/dist/component/date-time-input-field-rac-DcwKQKHf.js +0 -433
- package/dist/component/dext-radio-group-rac-D8hMWNIQ.js +0 -18
- package/dist/component/dropdown-field-headless-Bv6LrkeA.js +0 -93
- package/dist/component/multiline-address-field-rac-jhcWn4wT.js +0 -1659
- package/dist/component/phone-input-field-rac-GxcQ_Pyl.js +0 -508
- package/dist/component/service-dropdown-rac-BfliE4hs.js +0 -145
- package/dist/component/use-dropdown-trigger-class-name-BKOFwNvc.js +0 -117
- package/dist/component/use-is-forced-open-dropdown-Bw_IFUKt.js +0 -48
- package/dist/component/use-text-input-class-name-DFMQAg_E.js +0 -6
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import t, { useMemo as
|
|
2
|
-
import { RicosViewer as
|
|
1
|
+
import t, { useMemo as H, useCallback as M, useRef as x } from "react";
|
|
2
|
+
import { RicosViewer as K } from "@wix/ricos/viewer";
|
|
3
3
|
import b from "classnames";
|
|
4
|
-
import { CheckboxField as
|
|
5
|
-
import {
|
|
4
|
+
import { CheckboxField as $, CheckboxButton as G, NumberField as J, Group as X, Button as Q, Input as Y } from "react-aria-components";
|
|
5
|
+
import { bz as U, bw as W, br as w, bJ as Z, bB as ee, V as te, ab as ne, a1 as ae, a4 as oe, a3 as re, a5 as le, L as se, z as ie, a2 as ce } from "./form-DSpx-AO8.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-CORRAJGt.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-XNWmDH3E.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 Le } from "./use-element-state-class-name-rXM_lHug.js";
|
|
18
|
+
var Oe = /* @__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: L, onFocus: s, hasError: u, validation: m, FieldLayout: p } = U(), { inputId: v, labelId: N, ariaDescribedBy: h } = W(), _ = I(e, o.Label), g = I(e, o.Options), T = I(e, o.Description), O = I(e, o.Error), i = H(() => l || [], [
|
|
32
32
|
l
|
|
33
33
|
]), A = Ce((D = m == null ? void 0 : m.predefined) == null ? void 0 : D.paymentOptions) === k.many, F = M((S, R) => {
|
|
34
|
-
const d = i.filter((
|
|
34
|
+
const d = i.filter((z) => z.productId !== S.productId), B = R ? [
|
|
35
35
|
...d,
|
|
36
36
|
S
|
|
37
37
|
] : d;
|
|
@@ -48,7 +48,7 @@ const o = ({ children: e }) => {
|
|
|
48
48
|
ariaLabelledBy: N,
|
|
49
49
|
ariaDescribedBy: h,
|
|
50
50
|
required: y,
|
|
51
|
-
onBlur:
|
|
51
|
+
onBlur: L,
|
|
52
52
|
onFocus: s
|
|
53
53
|
}, g ? f(g, {
|
|
54
54
|
allowMany: A,
|
|
@@ -58,15 +58,15 @@ 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, O, T)
|
|
62
62
|
});
|
|
63
|
-
},
|
|
64
|
-
const { allowMany: n, productValues: r, onProductChange: c, disabled: y, readOnly:
|
|
63
|
+
}, V = ({ children: e, className: a, ...l }) => {
|
|
64
|
+
const { allowMany: n, productValues: r, onProductChange: c, disabled: y, readOnly: L, hasError: s } = l, { options: u, validation: m, imageResize: p } = U(), { currency: v } = 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
68
|
var C, A, F, D, S;
|
|
69
|
-
const T = ((S = (D = (F = (A = (C = m == null ? void 0 : m.predefined) == null ? void 0 : C.paymentOptions) == null ? void 0 : A.products) == null ? void 0 : F.find((R) => R.id === _.value)) == null ? void 0 : D.fixedPriceOptions) == null ? void 0 : S.price) || "0",
|
|
69
|
+
const T = ((S = (D = (F = (A = (C = m == null ? void 0 : m.predefined) == null ? void 0 : C.paymentOptions) == null ? void 0 : A.products) == null ? void 0 : F.find((R) => R.id === _.value)) == null ? void 0 : D.fixedPriceOptions) == null ? void 0 : S.price) || "0", O = _e(N, v), i = r.find((R) => R.productId === _.value);
|
|
70
70
|
return f(h, {
|
|
71
71
|
key: _.id || _.value || _.label,
|
|
72
72
|
option: _,
|
|
@@ -76,15 +76,15 @@ const o = ({ children: e }) => {
|
|
|
76
76
|
allowMany: n,
|
|
77
77
|
onProductChange: c,
|
|
78
78
|
disabled: y,
|
|
79
|
-
readOnly:
|
|
79
|
+
readOnly: L,
|
|
80
80
|
hasError: s,
|
|
81
|
-
currencyAriaLabel:
|
|
81
|
+
currencyAriaLabel: O,
|
|
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: L, onProductChange: s, disabled: u, readOnly: m, hasError: p, currencyAriaLabel: v, imageResize: N, isFirst: h } = l, { id: _ } = U(), g = x(null), T = x(null), O = 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 ?? T.current) == null || d.focus({
|
|
@@ -112,10 +112,10 @@ const o = ({ children: e }) => {
|
|
|
112
112
|
n.value,
|
|
113
113
|
r
|
|
114
114
|
]), R = `${n.label} ${v} ${r}`;
|
|
115
|
-
return
|
|
115
|
+
return L ? /* @__PURE__ */ t.createElement("div", {
|
|
116
116
|
className: a,
|
|
117
117
|
"data-hook": "product"
|
|
118
|
-
},
|
|
118
|
+
}, O ? f(O, {
|
|
119
119
|
option: n,
|
|
120
120
|
imageResize: N
|
|
121
121
|
}) : null, i ? f(i, {
|
|
@@ -130,7 +130,7 @@ const o = ({ children: e }) => {
|
|
|
130
130
|
hasError: p,
|
|
131
131
|
ariaLabel: R,
|
|
132
132
|
inputRef: h ? T : void 0
|
|
133
|
-
}) : null) : /* @__PURE__ */ t.createElement(
|
|
133
|
+
}) : null) : /* @__PURE__ */ t.createElement($, {
|
|
134
134
|
isSelected: y,
|
|
135
135
|
onChange: D,
|
|
136
136
|
isDisabled: u,
|
|
@@ -141,7 +141,7 @@ const o = ({ children: e }) => {
|
|
|
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, O ? f(O, {
|
|
145
145
|
option: n,
|
|
146
146
|
imageResize: N
|
|
147
147
|
}) : null, i ? f(i, {
|
|
@@ -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 === Oe.fit, y = me(r, 96, 96, c ? "fit" : "fill");
|
|
162
162
|
if (!y)
|
|
163
163
|
return null;
|
|
164
|
-
const
|
|
164
|
+
const L = r.altText || l.label || "";
|
|
165
165
|
return /* @__PURE__ */ t.createElement("img", {
|
|
166
166
|
className: e,
|
|
167
167
|
src: y,
|
|
168
|
-
alt:
|
|
168
|
+
alt: L,
|
|
169
169
|
"data-fit": c ? "contain" : "cover",
|
|
170
170
|
"data-hook": "product-image"
|
|
171
171
|
});
|
|
@@ -176,7 +176,7 @@ const o = ({ children: e }) => {
|
|
|
176
176
|
"data-hook": "product-label"
|
|
177
177
|
}, l || "");
|
|
178
178
|
}, Fe = ({ className: e, ...a }) => {
|
|
179
|
-
const { price: l } = a, { currency: n, regionalFormat: r } =
|
|
179
|
+
const { price: l } = a, { currency: n, regionalFormat: r } = w(), c = pe({
|
|
180
180
|
amount: l,
|
|
181
181
|
currency: n == null ? void 0 : n.code,
|
|
182
182
|
locale: r
|
|
@@ -186,7 +186,7 @@ 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: L, inputRef: s } = a, u = M((p) => {
|
|
190
190
|
n(p < 0 ? 0 : p);
|
|
191
191
|
}, [
|
|
192
192
|
n
|
|
@@ -195,7 +195,7 @@ const o = ({ children: e }) => {
|
|
|
195
195
|
}, [
|
|
196
196
|
u
|
|
197
197
|
]);
|
|
198
|
-
return /* @__PURE__ */ t.createElement(
|
|
198
|
+
return /* @__PURE__ */ t.createElement(J, {
|
|
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": L,
|
|
207
207
|
className: e,
|
|
208
208
|
"data-hook": "product-quantity"
|
|
209
209
|
}, /* @__PURE__ */ t.createElement(X, {
|
|
@@ -221,9 +221,9 @@ E.Label = ge;
|
|
|
221
221
|
E.Price = Fe;
|
|
222
222
|
E.Input = be;
|
|
223
223
|
E.Quantity = De;
|
|
224
|
-
|
|
224
|
+
V.Option = E;
|
|
225
225
|
o.Label = ue;
|
|
226
|
-
o.Options =
|
|
226
|
+
o.Options = V;
|
|
227
227
|
o.Option = E;
|
|
228
228
|
o.Description = de;
|
|
229
229
|
o.Error = Ee;
|
|
@@ -235,11 +235,11 @@ const Se = "_options_1jnru_1", Pe = "_option_1jnru_1", Ne = "_optionInput_1jnru_
|
|
|
235
235
|
optionLabel: Te,
|
|
236
236
|
optionPrice: Ae,
|
|
237
237
|
quantity: qe
|
|
238
|
-
}, ve = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(
|
|
238
|
+
}, ve = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(K, {
|
|
239
239
|
content: e,
|
|
240
240
|
locale: a
|
|
241
241
|
}), Me = () => {
|
|
242
|
-
const e =
|
|
242
|
+
const e = Le({
|
|
243
243
|
globalClasses: ce,
|
|
244
244
|
moduleClasses: Ie
|
|
245
245
|
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import a, { useRef as F, useState as
|
|
2
|
-
import { RadioGroup as k, RadioField as
|
|
3
|
-
import {
|
|
1
|
+
import a, { useRef as F, useState as B, useEffect as T, useCallback as H } from "react";
|
|
2
|
+
import { RadioGroup as k, RadioField as A, RadioButton as G, TextField as P, Input as $ } from "react-aria-components";
|
|
3
|
+
import { bz as g, bw as q, bJ as D, bB as x } from "./form-DSpx-AO8.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 w } from "./field-error-headless-XNWmDH3E.js";
|
|
6
|
+
import { L as z } from "./field-label-headless-CORRAJGt.js";
|
|
7
|
+
import { S as J } from "./selection-indicator-XQ8MYHUQ.js";
|
|
8
|
+
const v = "Other", M = (e, t) => e == null ? void 0 : e.find((n) => (n.value ?? n.label) === t), y = (e, t) => !!t && !M(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: h, disabled: p, readOnly: O, required: m, onBlur: E, onFocus: b, hasError: r, FieldLayout: c, options: o } = g(), { inputId: f, labelId: C, ariaDescribedBy: I } =
|
|
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: C, ariaDescribedBy: I } = q(), 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, {
|
|
@@ -56,12 +56,12 @@ const v = "Other", z = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
56
56
|
}));
|
|
57
57
|
}, d = ({ children: e, className: t, ...n }) => {
|
|
58
58
|
var I;
|
|
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 ?
|
|
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, C = (I = r == null ? void 0 : r.props) == null ? void 0 : I.className;
|
|
60
60
|
return /* @__PURE__ */ a.createElement("div", {
|
|
61
61
|
className: t
|
|
62
|
-
}, /* @__PURE__ */ a.createElement(q, {
|
|
63
|
-
value: l
|
|
64
62
|
}, /* @__PURE__ */ a.createElement(A, {
|
|
63
|
+
value: l
|
|
64
|
+
}, /* @__PURE__ */ a.createElement(G, {
|
|
65
65
|
ref: O,
|
|
66
66
|
className: C
|
|
67
67
|
}, ({ isSelected: s, isHovered: _, isFocused: R }) => /* @__PURE__ */ a.createElement(a.Fragment, null, L(c, {
|
|
@@ -77,8 +77,8 @@ const v = "Other", z = (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 =
|
|
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, C] = B(c && t ? j(t, l) : "");
|
|
81
|
+
T(() => {
|
|
82
82
|
var s;
|
|
83
83
|
c && r.current && ((s = r.current) == null || s.focus());
|
|
84
84
|
}, [
|
|
@@ -92,13 +92,13 @@ const v = "Other", z = (e, t) => e == null ? void 0 : e.find((n) => (n.value ??
|
|
|
92
92
|
l,
|
|
93
93
|
o
|
|
94
94
|
]);
|
|
95
|
-
return /* @__PURE__ */ a.createElement(
|
|
95
|
+
return /* @__PURE__ */ a.createElement(P, {
|
|
96
96
|
"aria-label": o,
|
|
97
97
|
value: f,
|
|
98
98
|
onChange: I,
|
|
99
99
|
isDisabled: O,
|
|
100
100
|
isReadOnly: m
|
|
101
|
-
}, /* @__PURE__ */ a.createElement(
|
|
101
|
+
}, /* @__PURE__ */ a.createElement($, {
|
|
102
102
|
ref: r,
|
|
103
103
|
className: e,
|
|
104
104
|
placeholder: h,
|
|
@@ -107,14 +107,14 @@ const v = "Other", z = (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 =
|
|
112
|
+
i.Label = z;
|
|
113
113
|
i.Options = K;
|
|
114
114
|
i.Option = d;
|
|
115
115
|
i.Description = U;
|
|
116
|
-
i.Error =
|
|
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",
|
|
116
|
+
i.Error = w;
|
|
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,
|
|
120
120
|
optionInput: ee,
|
|
@@ -123,12 +123,12 @@ const Y = "_labelImage_1u9f2_1", Z = "_option_1u9f2_26", ee = "_optionInput_1u9f
|
|
|
123
123
|
optionControlSelected: ne,
|
|
124
124
|
optionLabel: le
|
|
125
125
|
}, pe = {
|
|
126
|
-
base:
|
|
127
|
-
selected:
|
|
128
|
-
hover:
|
|
126
|
+
base: S.optionControl,
|
|
127
|
+
selected: S.optionControlSelected,
|
|
128
|
+
hover: S.optionControlHover
|
|
129
129
|
};
|
|
130
130
|
export {
|
|
131
131
|
pe as R,
|
|
132
132
|
i as a,
|
|
133
|
-
|
|
133
|
+
S as s
|
|
134
134
|
};
|
package/dist/component/{radio-group-field-rac-DrOiyk5C.js → radio-group-field-rac-CXN7tyVu.js}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
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-CFGf0Hzh.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 { V as i, ab as E, a6 as p, a7 as O, L as R, z as _, a8 as I } from "./form-DSpx-AO8.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-rXM_lHug.js";
|
|
10
|
+
import { u } from "./use-text-input-class-name-DIKWvfkm.js";
|
|
11
11
|
const D = ({ content: o, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
12
12
|
content: o,
|
|
13
13
|
locale: l
|
|
@@ -31,11 +31,11 @@ const D = ({ content: o, locale: l }) => /* @__PURE__ */ e.createElement(m, {
|
|
|
31
31
|
}), /* @__PURE__ */ e.createElement(a.Option.Control, {
|
|
32
32
|
className: o
|
|
33
33
|
}), /* @__PURE__ */ e.createElement(a.Option.Label, {
|
|
34
|
-
className: t(
|
|
34
|
+
className: t(O, s.optionLabel)
|
|
35
35
|
}), /* @__PURE__ */ e.createElement(a.Option.OtherInput, {
|
|
36
36
|
className: l
|
|
37
37
|
}))), /* @__PURE__ */ e.createElement(a.Error, {
|
|
38
|
-
className: t(
|
|
38
|
+
className: t(R, r.error)
|
|
39
39
|
}, /* @__PURE__ */ e.createElement(c, null), /* @__PURE__ */ e.createElement(a.Error.Text, null)), /* @__PURE__ */ e.createElement(a.Description, {
|
|
40
40
|
className: t(_, r.description)
|
|
41
41
|
}, D));
|
package/dist/component/{rating-input-field-rac-CwN7wyaw.js → rating-input-field-rac-DCXNZgf1.js}
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
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 {
|
|
4
|
+
import { bz as I, bw as v, bJ as T, V as H, ab as M, a9 as w, L as B, z as P, aa as q } from "./form-DSpx-AO8.js";
|
|
5
5
|
import { RadioGroup as G, RadioField as k, RadioButton as x } from "react-aria-components";
|
|
6
|
-
import { f as E, a as
|
|
7
|
-
import { D as
|
|
8
|
-
import { L as
|
|
9
|
-
import { E as
|
|
6
|
+
import { f as E, a as z } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { D as U, E as J } from "./field-error-headless-XNWmDH3E.js";
|
|
8
|
+
import { L as Q } from "./field-label-headless-CORRAJGt.js";
|
|
9
|
+
import { E as Z } from "./error-icon-hZxQ6DEy.js";
|
|
10
10
|
import { s as g } from "./field-rac.module-DP0lkkEv.js";
|
|
11
|
-
import { u as j } from "./use-element-state-class-name-
|
|
11
|
+
import { u as j } from "./use-element-state-class-name-rXM_lHug.js";
|
|
12
12
|
const t = ({ children: a }) => {
|
|
13
|
-
const { id: n, value: r, onChange: i, disabled: l, readOnly: m, required: d, hasError: c, onBlur: o, onFocus:
|
|
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
|
|
15
|
-
]),
|
|
16
|
-
return /* @__PURE__ */ e.createElement(
|
|
15
|
+
]), b = E(a, t.Label), s = E(a, t.Ratings), f = E(a, t.Description), h = E(a, t.Error);
|
|
16
|
+
return /* @__PURE__ */ e.createElement(R, {
|
|
17
17
|
fieldId: n,
|
|
18
|
-
renderLabel: () =>
|
|
18
|
+
renderLabel: () => b,
|
|
19
19
|
renderInput: () => /* @__PURE__ */ e.createElement(G, {
|
|
20
20
|
"aria-labelledby": _,
|
|
21
21
|
value: r ? String(r) : void 0,
|
|
@@ -25,34 +25,34 @@ const t = ({ children: a }) => {
|
|
|
25
25
|
isRequired: d,
|
|
26
26
|
isInvalid: c,
|
|
27
27
|
onBlur: o,
|
|
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
|
-
},
|
|
34
|
-
const { value: i, readOnly: l, hasError: m } =
|
|
33
|
+
}, S = ({ children: a, className: n, getReactionLabel: r }) => {
|
|
34
|
+
const { value: i, readOnly: l, hasError: m } = I(), { inputId: d, ariaDescribedBy: c } = v(), [o, C] = O(), R = A(null), _ = E(a, S.Rating), L = [
|
|
35
35
|
"1",
|
|
36
36
|
"2",
|
|
37
37
|
"3",
|
|
38
38
|
"4",
|
|
39
39
|
"5"
|
|
40
|
-
],
|
|
40
|
+
], b = (s) => o && !l ? o >= s : !!i && i >= Number(s);
|
|
41
41
|
return /* @__PURE__ */ e.createElement("div", {
|
|
42
|
-
ref:
|
|
42
|
+
ref: R,
|
|
43
43
|
id: d,
|
|
44
44
|
"aria-describedby": c,
|
|
45
45
|
className: n,
|
|
46
46
|
"data-invalid": m,
|
|
47
47
|
"data-readonly": l
|
|
48
|
-
}, L.map((s) =>
|
|
48
|
+
}, L.map((s) => z(_, {
|
|
49
49
|
key: s,
|
|
50
50
|
value: s,
|
|
51
|
-
isSelected:
|
|
52
|
-
onHoverChange: (
|
|
51
|
+
isSelected: b(s),
|
|
52
|
+
onHoverChange: (f) => C(f ? s : void 0),
|
|
53
53
|
label: r == null ? void 0 : r(Number(s))
|
|
54
54
|
})));
|
|
55
|
-
},
|
|
55
|
+
}, K = {
|
|
56
56
|
border: 0,
|
|
57
57
|
clipPath: "inset(50%)",
|
|
58
58
|
height: 1,
|
|
@@ -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: K
|
|
83
83
|
}, d) : null)));
|
|
84
84
|
};
|
|
85
|
-
|
|
86
|
-
t.Label =
|
|
87
|
-
t.Ratings =
|
|
85
|
+
S.Rating = F;
|
|
86
|
+
t.Label = Q;
|
|
87
|
+
t.Ratings = S;
|
|
88
88
|
t.Rating = F;
|
|
89
|
-
t.Description =
|
|
90
|
-
t.Error =
|
|
91
|
-
const
|
|
89
|
+
t.Description = U;
|
|
90
|
+
t.Error = J;
|
|
91
|
+
const W = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
92
92
|
viewBox: "0 0 32 32",
|
|
93
93
|
width: 32,
|
|
94
94
|
height: 32,
|
|
@@ -98,12 +98,12 @@ const K = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
98
98
|
}, /* @__PURE__ */ e.createElement("path", {
|
|
99
99
|
fillRule: "evenodd",
|
|
100
100
|
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"
|
|
101
|
-
})),
|
|
102
|
-
ratings:
|
|
103
|
-
rating:
|
|
104
|
-
ratingSelected:
|
|
101
|
+
})), X = "_ratings_a5lgi_1", Y = "_rating_a5lgi_1", $ = "_ratingSelected_a5lgi_37", V = "_ratingHover_a5lgi_44", p = {
|
|
102
|
+
ratings: X,
|
|
103
|
+
rating: Y,
|
|
104
|
+
ratingSelected: $,
|
|
105
105
|
ratingHover: V
|
|
106
|
-
}, ee = ({ content: a, locale: n }) => /* @__PURE__ */ e.createElement(
|
|
106
|
+
}, ee = ({ content: a, locale: n }) => /* @__PURE__ */ e.createElement(y, {
|
|
107
107
|
content: a,
|
|
108
108
|
locale: n
|
|
109
109
|
}), te = {
|
|
@@ -111,12 +111,12 @@ const K = (a) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
111
111
|
selected: p.ratingSelected,
|
|
112
112
|
hover: p.ratingHover
|
|
113
113
|
}, Ee = () => {
|
|
114
|
-
const { t: a } =
|
|
114
|
+
const { t: a } = T(), n = j({
|
|
115
115
|
globalClasses: q,
|
|
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(H, g.label)
|
|
120
120
|
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
121
121
|
className: u(M, g.requiredMark)
|
|
122
122
|
})), /* @__PURE__ */ e.createElement(t.Ratings, {
|
|
@@ -126,9 +126,9 @@ const K = (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(W, null))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
130
130
|
className: u(B, g.error)
|
|
131
|
-
}, /* @__PURE__ */ e.createElement(
|
|
131
|
+
}, /* @__PURE__ */ e.createElement(Z, 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-C11w9mXa.js → rich-content-rac.module-B7rPwNns.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import c, { useState as u } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { bz as a, br as i, bJ as T } from "./form-DSpx-AO8.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";
|
|
@@ -14,17 +14,17 @@ const O = ({ children: e }) => {
|
|
|
14
14
|
}),
|
|
15
15
|
renderDescription: () => null
|
|
16
16
|
});
|
|
17
|
-
},
|
|
18
|
-
toggleTruncate:
|
|
17
|
+
}, f = "_toggleTruncate_5jt03_1", g = {
|
|
18
|
+
toggleTruncate: f
|
|
19
19
|
}, p = ({ isTruncated: e, onClick: t }) => {
|
|
20
20
|
const { t: n } = T(), o = n(e ? "field.rich-text.read-more-button.label" : "field.rich-text.read-less-button.label"), s = e ? r.TOGGLE_TRUNCATE_BUTTON_READ_MORE : r.TOGGLE_TRUNCATE_BUTTON_READ_LESS;
|
|
21
21
|
return /* @__PURE__ */ c.createElement(d, {
|
|
22
22
|
onPress: t,
|
|
23
|
-
className:
|
|
23
|
+
className: g.toggleTruncate,
|
|
24
24
|
"data-hook": s
|
|
25
25
|
}, o);
|
|
26
26
|
};
|
|
27
|
-
function
|
|
27
|
+
function B(e, t) {
|
|
28
28
|
const [n, o] = u(!0);
|
|
29
29
|
function s() {
|
|
30
30
|
o((l) => !l);
|
|
@@ -38,12 +38,12 @@ function y(e, t) {
|
|
|
38
38
|
toggleTruncate: s
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
const C = "_richContent_1galb_1",
|
|
41
|
+
const C = "_richContent_1galb_1", D = {
|
|
42
42
|
richContent: C
|
|
43
43
|
};
|
|
44
44
|
export {
|
|
45
45
|
O as R,
|
|
46
46
|
p as T,
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
D as s,
|
|
48
|
+
B as u
|
|
49
49
|
};
|
|
@@ -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 { bz as m, aM as u, au as i, ba as R, bd as T } from "./form-DSpx-AO8.js";
|
|
4
|
+
import { u as C, R as d, s as g, T as p } from "./rich-content-rac.module-B7rPwNns.js";
|
|
5
5
|
const h = {
|
|
6
6
|
colorPalette: T(),
|
|
7
7
|
customStyles: R()
|
|
8
8
|
}, P = ({ 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(u, {
|
|
11
|
+
className: l(i, g.richContent),
|
|
12
12
|
content: n,
|
|
13
13
|
customTheme: h
|
|
14
14
|
}), r && /* @__PURE__ */ e.createElement(p, {
|