@levo-so/studio 0.1.115 → 0.2.1
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/{BillingStep-DjNmSVkY.js → BillingStep-D4P_J_PJ.js} +1 -1
- package/Button-CmwbMGFV.js +505 -0
- package/{CollectionField-DrJuHNsg.js → CollectionField-D25BVweU.js} +29 -77
- package/{DateTimeWidget-CzBq92zC.js → DateTimeWidget-CG9ylSgA.js} +8 -8
- package/{EntryCard-C2KA5HMX.js → EntryCard-FxB1uCis.js} +4 -4
- package/{KBChatWidget-CPrg_etS.js → KBChatWidget-_kcueoxi.js} +388 -360
- package/{LoginCard-S_2jls6v.js → LoginCard-D8ZVZjbR.js} +3 -3
- package/{LoginForm-DeYsk4kd.js → LoginForm-Cg5F4guy.js} +2 -2
- package/{LoginModal-BbDfB4S9.js → LoginModal-Cn6Nsuz3.js} +4 -4
- package/{MessageCard-x6jPClGi.js → MessageCard-Bx6pC8wW.js} +2 -2
- package/{MessageFooter-CHuPnL_D.js → MessageFooter-CsY4uBIJ.js} +2 -2
- package/{ModalManager-DQVNPEuG.js → ModalManager-BIKunQ8D.js} +1 -1
- package/{PendingApprovalCard-C06B_Tg-.js → PendingApprovalCard-0ORO4y9v.js} +3 -3
- package/{PhoneWidget-DdX8_-2v.js → PhoneWidget-CZr1PZ4G.js} +3 -3
- package/{PopupRenderer-Bncp54gB-DysCmUdR.js → PopupRenderer-Bncp54gB-BOJj-taW.js} +15 -16
- package/{ProfileCard-DGanb4BY.js → ProfileCard-C2lXYYkC.js} +9 -8
- package/RichTextWidget-Dcq-NsEi.js +748 -0
- package/{RteThemeProvider-LFGzAYi1.js → RteThemeProvider-DxYOzcck.js} +1 -1
- package/Spinner-wdUA5kVe.js +7 -0
- package/{StripePaymentModal-BsYNQ4MB.js → StripePaymentModal-DfFlmYsp.js} +17 -17
- package/{bookingCard-CUv7WgqT.js → bookingCard-CZ3Jj9sL.js} +218 -217
- package/{dialog-LRLdr3kq.js → dialog-CznAfWcE.js} +32 -32
- package/{dist-D-y51gmU.js → dist-B91ZHPA-.js} +1103 -1261
- package/index.d.ts +0 -2
- package/index.js +2719 -2269
- package/kbChat-BpJkUcpv.js +163 -0
- package/{nodeAlignment-BC_Uferw.js → nodeAlignment-DS9_DLGB.js} +31 -23
- package/package.json +6 -9
- package/pillChrome-B4uuWJhY.js +16 -0
- package/studio.css +1 -1
- package/{useLogin-B2HHZxTi.js → useLogin-mEuzGlb2.js} +1 -1
- package/Button-Uwxgkriw.js +0 -1657
- package/RichTextWidget-BfZ3sCcx.js +0 -113
- package/Toolbar-6IXR9qAh.js +0 -645
- package/collection.d.ts +0 -500
- package/collection.js +0 -30
- package/inlineRteTheme-abXxag3B.js +0 -9
- package/kbChat-DCrdcXir.js +0 -166
- package/pillChrome-CQoJfFk3.js +0 -16
- package/utils-NDllPDUz.js +0 -5
- /package/{AuthProvider-C6bvedwF.js → AuthProvider-CFQqiIf1.js} +0 -0
- /package/{Beams-DboMUgCv.js → Beams-CDt4Mt3M.js} +0 -0
- /package/{Dots-a8xSboDv.js → Dots-DadBreAs.js} +0 -0
- /package/{Gradient-NacpoDCM.js → Gradient-CPoU73FR.js} +0 -0
- /package/{Grid-BJQvxnks.js → Grid-CAXyHMvM.js} +0 -0
- /package/{Popover-C_IQMM8H.js → Popover-Dt4--ulK.js} +0 -0
- /package/{Waves-DUuT_IFr.js → Waves-DPbfUhRX.js} +0 -0
- /package/{authentication-TdyaDNTn.js → authentication-BSNkm1-l.js} +0 -0
- /package/{card-D5fPArfa.js → card-DFSlAwCq.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./Button-
|
|
2
|
+
import { t as e } from "./Button-CmwbMGFV.js";
|
|
3
3
|
import { useState as t } from "react";
|
|
4
4
|
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/bookingCard/BillingStep.tsx
|
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "./Dialog-IrII0ugb.js";
|
|
3
|
+
import { a as e, c as t, h as n, l as r, n as i, r as a, t as o } from "./PopupRenderer-Bncp54gB-BOJj-taW.js";
|
|
4
|
+
import { n as s } from "./AuthProvider-CFQqiIf1.js";
|
|
5
|
+
import { n as c } from "./ModalManager-BIKunQ8D.js";
|
|
6
|
+
import { c as l } from "react/compiler-runtime";
|
|
7
|
+
import { $isIdentityContextReady as u } from "@levo-so/insights/stores";
|
|
8
|
+
import { useLevo as d } from "@levo-so/react";
|
|
9
|
+
import * as f from "react";
|
|
10
|
+
import { Suspense as p, createContext as m, forwardRef as h, lazy as g, memo as _, useContext as v, useEffect as y, useMemo as b, useRef as x, useState as S } from "react";
|
|
11
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
12
|
+
import "clsx";
|
|
13
|
+
import "@tabler/icons-react";
|
|
14
|
+
import { useStore as E } from "@nanostores/react";
|
|
15
|
+
import { animate as ee, scroll as te } from "motion/react";
|
|
16
|
+
import ne from "html-react-parser";
|
|
17
|
+
import { cn as D } from "@levo/utils/cn";
|
|
18
|
+
import { LoaderCircle as O } from "lucide-react";
|
|
19
|
+
import * as k from "motion/react-m";
|
|
20
|
+
import re from "next/link";
|
|
21
|
+
import ie from "isomorphic-dompurify";
|
|
22
|
+
//#region ../../libraries/popups/dist/index.js
|
|
23
|
+
var ae = async (e, t) => {
|
|
24
|
+
let n = {};
|
|
25
|
+
return t?.site_id && (n.site_id = t.site_id), t?.locale && (n.locale = t.locale), t?.country && (n.country = t.country), (await e.url("/v1/studio/popup/list-active").query(n).get().json())?.content?.data ?? [];
|
|
26
|
+
}, oe = g(() => import("./PopupRenderer-Bncp54gB-BOJj-taW.js").then((e) => e.o).then((e) => e.t).then((e) => ({ default: e.PopupRenderer }))), A = (e) => {
|
|
27
|
+
let t = l(9), { siteId: n, pageId: r } = e, { fetch: a, logger: o } = d(), [s, c] = S(null), f = x(!1), m, h;
|
|
28
|
+
if (t[0] !== a || t[1] !== o || t[2] !== n ? (m = () => {
|
|
29
|
+
if (f.current) return;
|
|
30
|
+
let e = () => {
|
|
31
|
+
f.current || (f.current = !0, ae(a, n ? { site_id: n } : void 0).then((e) => {
|
|
32
|
+
i(e), c(e);
|
|
33
|
+
}).catch((e) => {
|
|
34
|
+
o?.error("Failed to fetch popups", { exception: e }), i([]), c([]);
|
|
35
|
+
}).finally(j));
|
|
36
|
+
};
|
|
37
|
+
if (u.get()) {
|
|
38
|
+
e();
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
let t = u.listen((n) => {
|
|
42
|
+
n && (t(), e());
|
|
43
|
+
});
|
|
44
|
+
return () => t();
|
|
45
|
+
}, h = [
|
|
46
|
+
a,
|
|
47
|
+
o,
|
|
48
|
+
n
|
|
49
|
+
], t[0] = a, t[1] = o, t[2] = n, t[3] = m, t[4] = h) : (m = t[3], h = t[4]), y(m, h), !s || s.length === 0) return null;
|
|
50
|
+
let g;
|
|
51
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (g = {
|
|
52
|
+
position: "relative",
|
|
53
|
+
zIndex: 99999
|
|
54
|
+
}, t[5] = g) : g = t[5];
|
|
55
|
+
let _;
|
|
56
|
+
return t[6] !== r || t[7] !== s ? (_ = /* @__PURE__ */ w("div", {
|
|
57
|
+
style: g,
|
|
58
|
+
children: /* @__PURE__ */ w(p, { children: /* @__PURE__ */ w(oe, {
|
|
59
|
+
popups: s,
|
|
60
|
+
pageId: r
|
|
61
|
+
}) })
|
|
62
|
+
}), t[6] = r, t[7] = s, t[8] = _) : _ = t[8], _;
|
|
63
|
+
};
|
|
64
|
+
function j() {
|
|
65
|
+
return a(!1);
|
|
66
|
+
}
|
|
67
|
+
var M = () => {
|
|
68
|
+
let e = l(3), n = E(t), i = E(r), a = N, o = se, s;
|
|
69
|
+
return e[0] !== i || e[1] !== n ? (s = {
|
|
70
|
+
popups: n,
|
|
71
|
+
isLoading: i,
|
|
72
|
+
openPopup: a,
|
|
73
|
+
closePopup: o
|
|
74
|
+
}, e[0] = i, e[1] = n, e[2] = s) : s = e[2], s;
|
|
75
|
+
};
|
|
76
|
+
function N(n) {
|
|
77
|
+
let r = t.get().find((e) => e.id === n);
|
|
78
|
+
r && e(r, {
|
|
79
|
+
force: !0,
|
|
80
|
+
trigger_type: "manual"
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function se() {
|
|
84
|
+
let e = n.get().active_popup_id;
|
|
85
|
+
e && o(e);
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/providers/BlockContext.tsx
|
|
89
|
+
var P = m({
|
|
90
|
+
isStudio: !1,
|
|
91
|
+
renderMode: "live",
|
|
92
|
+
workspace_id: "",
|
|
93
|
+
pageSource: []
|
|
94
|
+
}), ce = ({ children: e, value: t }) => {
|
|
95
|
+
let [n, r] = S(t.parsedBlockData);
|
|
96
|
+
y(() => {
|
|
97
|
+
r((e) => t.parsedBlockData === e ? e : t.parsedBlockData);
|
|
98
|
+
}, [t.parsedBlockData]);
|
|
99
|
+
let i = b(() => ({
|
|
100
|
+
parsedBlockData: n,
|
|
101
|
+
setParsedBlockData: r,
|
|
102
|
+
blockData: t.blockData,
|
|
103
|
+
pageContext: t.pageContext,
|
|
104
|
+
pageMeta: t.pageMeta,
|
|
105
|
+
blockContext: t.blockContext,
|
|
106
|
+
isStudio: t.renderMode?.startsWith("studio.") ?? !1,
|
|
107
|
+
renderMode: t.renderMode,
|
|
108
|
+
workspace_id: t.workspace_id,
|
|
109
|
+
pageSource: t.pageSource,
|
|
110
|
+
languageVariants: t.languageVariants
|
|
111
|
+
}), [
|
|
112
|
+
n,
|
|
113
|
+
r,
|
|
114
|
+
t.blockData,
|
|
115
|
+
t.pageContext,
|
|
116
|
+
t.pageMeta,
|
|
117
|
+
t.blockContext,
|
|
118
|
+
t.renderMode,
|
|
119
|
+
t.workspace_id,
|
|
120
|
+
t.pageSource,
|
|
121
|
+
t.languageVariants
|
|
122
|
+
]);
|
|
123
|
+
return /* @__PURE__ */ w(P.Provider, {
|
|
124
|
+
value: i,
|
|
125
|
+
children: e
|
|
126
|
+
});
|
|
127
|
+
}, F = () => v(P), le = () => {
|
|
128
|
+
let { languageVariants: e } = F();
|
|
129
|
+
return { languageVariants: e ?? [] };
|
|
130
|
+
}, I = {
|
|
131
|
+
opacity: 1,
|
|
132
|
+
scale: 1,
|
|
133
|
+
rotate: 0,
|
|
134
|
+
rotateX: 0,
|
|
135
|
+
rotateY: 0,
|
|
136
|
+
x: 0,
|
|
137
|
+
y: 0,
|
|
138
|
+
skewX: 0,
|
|
139
|
+
skewY: 0
|
|
140
|
+
}, L = {
|
|
141
|
+
opacity: 0,
|
|
142
|
+
scale: 1,
|
|
143
|
+
rotate: 0,
|
|
144
|
+
rotateX: 0,
|
|
145
|
+
rotateY: 0,
|
|
146
|
+
x: 0,
|
|
147
|
+
y: 0,
|
|
148
|
+
skewX: 0,
|
|
149
|
+
skewY: 0
|
|
150
|
+
}, R = {
|
|
151
|
+
type: "spring",
|
|
152
|
+
duration: .5,
|
|
153
|
+
delay: 0,
|
|
154
|
+
bounce: .25,
|
|
155
|
+
ease: "easeOut"
|
|
156
|
+
}, z = {
|
|
157
|
+
once: !0,
|
|
158
|
+
amount: "some",
|
|
159
|
+
margin: "0px 0px -150px 0px"
|
|
160
|
+
}, B = (e, t) => {
|
|
161
|
+
if (!(!e || !t)) return t.split(".").reduce((e, t) => {
|
|
162
|
+
if (e == null) return;
|
|
163
|
+
let n = /^\d+$/.test(t), r = e;
|
|
164
|
+
if (n) {
|
|
165
|
+
let e = parseInt(t, 10);
|
|
166
|
+
return Array.isArray(r) ? r[e] : r?.[e];
|
|
167
|
+
}
|
|
168
|
+
return r?.[t];
|
|
169
|
+
}, e);
|
|
170
|
+
}, V = (e) => !!e && typeof e == "object" && "selectedVariants" in e, H = (e) => e?.replaceAll(".", "-").replace(/[^a-zA-Z0-9_-]/g, ""), U = (e) => {
|
|
171
|
+
let t = e.split(".");
|
|
172
|
+
for (let e = t.length - 2; e >= 1; e--) if (t[e] && /^\d+$/.test(t[e])) {
|
|
173
|
+
let n = t[e - 1], r = parseInt(t[e], 10), i = t.slice(e + 1).join("."), a = [];
|
|
174
|
+
for (let n = 0; n <= e - 1; n++) {
|
|
175
|
+
let e = t[n];
|
|
176
|
+
if (/^\d+$/.test(e)) continue;
|
|
177
|
+
let r = t[n + 1];
|
|
178
|
+
r && /^\d+$/.test(r) ? (a.push(`${e}_levoGroupItem`), n++) : a.push(e);
|
|
179
|
+
}
|
|
180
|
+
i && a.push(i);
|
|
181
|
+
let o = a.join(".");
|
|
182
|
+
return {
|
|
183
|
+
isGroupItem: !0,
|
|
184
|
+
groupKey: n,
|
|
185
|
+
itemIndex: r,
|
|
186
|
+
childKey: i,
|
|
187
|
+
groupItemKey: `${n}_levoGroupItem`,
|
|
188
|
+
sharedPath: o
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
return { isGroupItem: !1 };
|
|
192
|
+
}, W = (e) => {
|
|
193
|
+
let t = [];
|
|
194
|
+
return V(e) && Object.entries(e.selectedVariants).forEach(([e, n]) => {
|
|
195
|
+
typeof n == "string" && t.push(`levo-variant-${e}-${n}`);
|
|
196
|
+
}), t;
|
|
197
|
+
}, G = (e, t, n) => b(() => {
|
|
198
|
+
let r = W(n), i = `levo-${t}-${H(e)}`, a = U(e);
|
|
199
|
+
return a.isGroupItem && a.sharedPath ? [
|
|
200
|
+
`levo-${t}-${H(a.sharedPath)}`,
|
|
201
|
+
i,
|
|
202
|
+
...r
|
|
203
|
+
].filter(Boolean).join(" ") : [i, ...r].join(" ");
|
|
204
|
+
}, [
|
|
205
|
+
n?.selectedVariants,
|
|
206
|
+
e,
|
|
207
|
+
t
|
|
208
|
+
]), K = (e, t, n, r, i, a) => b(() => {
|
|
209
|
+
let { className: o, style: s, config: c, styles: l, content: u, ...d } = e;
|
|
210
|
+
return {
|
|
211
|
+
...d,
|
|
212
|
+
elementKey: t,
|
|
213
|
+
config: {
|
|
214
|
+
...n,
|
|
215
|
+
...c
|
|
216
|
+
},
|
|
217
|
+
styles: {
|
|
218
|
+
...r,
|
|
219
|
+
...l
|
|
220
|
+
},
|
|
221
|
+
content: u ?? i,
|
|
222
|
+
generatedClassName: a,
|
|
223
|
+
className: o,
|
|
224
|
+
style: s
|
|
225
|
+
};
|
|
226
|
+
}, [
|
|
227
|
+
e,
|
|
228
|
+
t,
|
|
229
|
+
n,
|
|
230
|
+
r,
|
|
231
|
+
i,
|
|
232
|
+
a
|
|
233
|
+
]), q = ({ children: e, ...t }) => {
|
|
234
|
+
let { isStudio: n, renderMode: r } = F();
|
|
235
|
+
return n ? e : /* @__PURE__ */ w(re, {
|
|
236
|
+
...t,
|
|
237
|
+
children: e
|
|
238
|
+
});
|
|
239
|
+
}, ue = (e) => {
|
|
240
|
+
if (e?.action) switch (e.action.type) {
|
|
241
|
+
case "external_link": {
|
|
242
|
+
let t = e.action.value;
|
|
243
|
+
return t ? /^([a-z][a-z0-9+.-]*:|\/\/)/.test(t) || t.startsWith("#") || t.startsWith("/") ? t : `https://${t}` : void 0;
|
|
244
|
+
}
|
|
245
|
+
case "page": return e.action.value;
|
|
246
|
+
case "page_section": return e.action.value ? `#${e.action.value}` : void 0;
|
|
247
|
+
case "email": return `mailto:${e.action.value}`;
|
|
248
|
+
case "phone": return `tel:${e.action.value}`;
|
|
249
|
+
default: return;
|
|
250
|
+
}
|
|
251
|
+
}, J = ({ children: e, config: t }) => {
|
|
252
|
+
let { openModal: n } = c(), { isLoggedIn: r } = s(), { openPopup: i } = M(), a = t?.action?.alt;
|
|
253
|
+
if (t?.action?.type === "popup") {
|
|
254
|
+
let n = t.action.value, r = () => {
|
|
255
|
+
n && i(n);
|
|
256
|
+
};
|
|
257
|
+
return /* @__PURE__ */ w("div", {
|
|
258
|
+
style: { display: "contents" },
|
|
259
|
+
role: "button",
|
|
260
|
+
tabIndex: 0,
|
|
261
|
+
"aria-label": a || void 0,
|
|
262
|
+
onClick: r,
|
|
263
|
+
onKeyDown: (e) => {
|
|
264
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), r());
|
|
265
|
+
},
|
|
266
|
+
children: e
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
if (t?.action?.type === "login") {
|
|
270
|
+
if (r) return /* @__PURE__ */ w(q, {
|
|
271
|
+
href: t?.action?.value || "",
|
|
272
|
+
style: { display: "contents" },
|
|
273
|
+
"aria-label": a || void 0,
|
|
274
|
+
children: e
|
|
275
|
+
});
|
|
276
|
+
let i = () => {
|
|
277
|
+
n("login", { redirect_uri: t?.action?.value });
|
|
278
|
+
};
|
|
279
|
+
return /* @__PURE__ */ w("div", {
|
|
280
|
+
style: { display: "contents" },
|
|
281
|
+
role: "button",
|
|
282
|
+
tabIndex: 0,
|
|
283
|
+
"aria-label": a || void 0,
|
|
284
|
+
onClick: i,
|
|
285
|
+
onKeyDown: (e) => {
|
|
286
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), i());
|
|
287
|
+
},
|
|
288
|
+
children: e
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
let o = ue(t), l = t?.action?.options?.openInNewTab ? "_blank" : void 0;
|
|
292
|
+
return o ? /* @__PURE__ */ w(q, {
|
|
293
|
+
href: o,
|
|
294
|
+
style: { display: "contents" },
|
|
295
|
+
...l && {
|
|
296
|
+
target: l,
|
|
297
|
+
rel: "noopener noreferrer"
|
|
298
|
+
},
|
|
299
|
+
...a && { "aria-label": a },
|
|
300
|
+
children: e
|
|
301
|
+
}) : e;
|
|
302
|
+
}, Y = {
|
|
303
|
+
once: !0,
|
|
304
|
+
margin: "0px 0px -150px 0px"
|
|
305
|
+
}, de = ({ children: e, MotionComponent: t, motionProps: n, scroll: r, entry: i, whileHover: a, exit: o }) => {
|
|
306
|
+
let s = x(null);
|
|
307
|
+
if (y(() => {
|
|
308
|
+
if (!r) return;
|
|
309
|
+
let e = s.current;
|
|
310
|
+
if (!e || !(e instanceof Element)) return;
|
|
311
|
+
let { from: t, to: n, offset: i } = r, a = {}, o = Array.from(new Set([...Object.keys(t), ...Object.keys(n)]));
|
|
312
|
+
for (let e of o) {
|
|
313
|
+
let r = t[e] ?? n[e], i = n[e] ?? t[e];
|
|
314
|
+
r !== i && typeof r == "number" && typeof i == "number" && (a[e] = [r, i]);
|
|
315
|
+
}
|
|
316
|
+
if (Object.keys(a).length === 0) return;
|
|
317
|
+
let c = ee(e, a, { ease: "linear" });
|
|
318
|
+
try {
|
|
319
|
+
return te(c, {
|
|
320
|
+
target: e,
|
|
321
|
+
offset: [i.start, i.end]
|
|
322
|
+
});
|
|
323
|
+
} catch (e) {
|
|
324
|
+
console.error("[AnimatedBlock] Failed to initialise scroll-linked animation", {
|
|
325
|
+
error: e,
|
|
326
|
+
offset: i
|
|
327
|
+
});
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
}, [r]), r) {
|
|
331
|
+
let i = {};
|
|
332
|
+
for (let [e, t] of Object.entries(r.from)) t !== void 0 && (i[e] = t);
|
|
333
|
+
return /* @__PURE__ */ w(t, {
|
|
334
|
+
ref: s,
|
|
335
|
+
...n,
|
|
336
|
+
style: {
|
|
337
|
+
...n.style || {},
|
|
338
|
+
...i
|
|
339
|
+
},
|
|
340
|
+
whileHover: a,
|
|
341
|
+
exit: o,
|
|
342
|
+
children: e
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
let c = i ? {
|
|
346
|
+
...I,
|
|
347
|
+
...i.to,
|
|
348
|
+
transition: i.transition
|
|
349
|
+
} : void 0, l = i ? {
|
|
350
|
+
once: i.viewport?.once ?? Y.once,
|
|
351
|
+
amount: i.viewport?.amount,
|
|
352
|
+
margin: i.viewport?.margin ?? Y.margin
|
|
353
|
+
} : void 0;
|
|
354
|
+
return /* @__PURE__ */ w(t, {
|
|
355
|
+
...n,
|
|
356
|
+
initial: i?.from,
|
|
357
|
+
whileInView: c,
|
|
358
|
+
viewport: l,
|
|
359
|
+
whileHover: a,
|
|
360
|
+
exit: o,
|
|
361
|
+
children: e
|
|
362
|
+
});
|
|
363
|
+
}, X = (e) => {
|
|
364
|
+
let t = k.create(e), n = ({ elementKey: n, children: r, ...i }) => {
|
|
365
|
+
let { parsedBlockData: a, renderMode: o } = F(), { config: s, styles: c, content: l, id: u } = a || {}, d = s ? B(s, n) : void 0, f = c ? B(c, n) : void 0, p = l ? B(l, n) : void 0, m = b(() => {
|
|
366
|
+
let e = d || {}, t = i.config || {}, n = e.selectedVariants || {}, r = t.selectedVariants || {};
|
|
367
|
+
return {
|
|
368
|
+
...e,
|
|
369
|
+
...t,
|
|
370
|
+
selectedVariants: {
|
|
371
|
+
...n,
|
|
372
|
+
...r
|
|
373
|
+
}
|
|
374
|
+
};
|
|
375
|
+
}, [d, i.config]), h = K(i, n, m, f, p, G(n, u || "", m)), g = h.config?.animation, _ = b(() => g?.scroll ? {
|
|
376
|
+
from: {
|
|
377
|
+
...L,
|
|
378
|
+
...g.scroll.from
|
|
379
|
+
},
|
|
380
|
+
to: {
|
|
381
|
+
...I,
|
|
382
|
+
...g.scroll.to
|
|
383
|
+
},
|
|
384
|
+
offset: g.scroll.offset ?? {
|
|
385
|
+
start: "start end",
|
|
386
|
+
end: "end center"
|
|
387
|
+
}
|
|
388
|
+
} : void 0, [g?.scroll]), v = b(() => g?.entry ? {
|
|
389
|
+
from: {
|
|
390
|
+
...L,
|
|
391
|
+
...g.entry.from
|
|
392
|
+
},
|
|
393
|
+
to: {
|
|
394
|
+
...I,
|
|
395
|
+
...g.entry.to
|
|
396
|
+
},
|
|
397
|
+
transition: g.entry.transition,
|
|
398
|
+
viewport: g.entry.viewport
|
|
399
|
+
} : void 0, [g?.entry]);
|
|
400
|
+
return !a || h.config?.enabled === !1 ? null : g && Object.keys(g).length > 0 && o !== "studio.block" ? /* @__PURE__ */ w(J, {
|
|
401
|
+
config: h?.config || {},
|
|
402
|
+
children: /* @__PURE__ */ w(de, {
|
|
403
|
+
MotionComponent: t,
|
|
404
|
+
motionProps: h,
|
|
405
|
+
scroll: _,
|
|
406
|
+
entry: v,
|
|
407
|
+
whileHover: g.whileHover,
|
|
408
|
+
exit: g.exit,
|
|
409
|
+
children: r
|
|
410
|
+
})
|
|
411
|
+
}) : /* @__PURE__ */ w(J, {
|
|
412
|
+
config: h?.config || {},
|
|
413
|
+
children: /* @__PURE__ */ w(e, {
|
|
414
|
+
...h,
|
|
415
|
+
children: r
|
|
416
|
+
})
|
|
417
|
+
});
|
|
418
|
+
};
|
|
419
|
+
return n.displayName = `withBlockProps(${e.displayName || e.name || "Component"})`, _(n);
|
|
420
|
+
}, Z = h(({ className: e, config: t, content: n, elementKey: r, generatedClassName: i, styles: a, noElementKey: o, ...s }, c) => {
|
|
421
|
+
if (!n) return /* @__PURE__ */ w("span", {
|
|
422
|
+
ref: c,
|
|
423
|
+
style: { display: "none" }
|
|
424
|
+
});
|
|
425
|
+
let { kind: l, data: u } = n, d = t?.icon?.alt, f = D(e, i), p = {
|
|
426
|
+
"data-levo_element_key": o ? void 0 : r,
|
|
427
|
+
"data-levo_element_type": "Icon",
|
|
428
|
+
className: f,
|
|
429
|
+
...s
|
|
430
|
+
}, m = d ? {
|
|
431
|
+
"aria-label": d,
|
|
432
|
+
role: "img"
|
|
433
|
+
} : {};
|
|
434
|
+
switch (l) {
|
|
435
|
+
case "emoji": return /* @__PURE__ */ w("p", {
|
|
436
|
+
style: {
|
|
437
|
+
width: "auto",
|
|
438
|
+
height: "auto",
|
|
439
|
+
...p.style
|
|
440
|
+
},
|
|
441
|
+
ref: c,
|
|
442
|
+
...p,
|
|
443
|
+
...m,
|
|
444
|
+
children: u?.unicode
|
|
445
|
+
});
|
|
446
|
+
case "icon": {
|
|
447
|
+
let e = u;
|
|
448
|
+
return e?.svgCode ? /* @__PURE__ */ w("div", {
|
|
449
|
+
ref: c,
|
|
450
|
+
...p,
|
|
451
|
+
...m,
|
|
452
|
+
style: {
|
|
453
|
+
display: a?.display ? void 0 : "inline-block",
|
|
454
|
+
...p.style
|
|
455
|
+
},
|
|
456
|
+
dangerouslySetInnerHTML: { __html: e.svgCode }
|
|
457
|
+
}) : /* @__PURE__ */ w("span", {
|
|
458
|
+
ref: c,
|
|
459
|
+
...p
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
case "custom": return /* @__PURE__ */ w("img", {
|
|
463
|
+
ref: c,
|
|
464
|
+
src: u?.location,
|
|
465
|
+
srcSet: u?.srcset?.path,
|
|
466
|
+
decoding: "async",
|
|
467
|
+
alt: d ?? "icon",
|
|
468
|
+
...p
|
|
469
|
+
});
|
|
470
|
+
default: return /* @__PURE__ */ w("span", {
|
|
471
|
+
ref: c,
|
|
472
|
+
...p
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
});
|
|
476
|
+
Z.displayName = "BaseIcon";
|
|
477
|
+
var Q = X(Z), $ = f.forwardRef(({ className: e, isLoading: t, loadingText: n, children: r, config: i = {}, styles: a, content: o, elementKey: s, generatedClassName: c, ...l }, u) => {
|
|
478
|
+
let d = r ?? o, f = i, p = typeof d == "string" ? ne(ie.sanitize(d)) : d, m = (e, t) => e?.enabled ? /* @__PURE__ */ w(Q, {
|
|
479
|
+
noElementKey: !0,
|
|
480
|
+
elementKey: `${s}_${t}Icon`
|
|
481
|
+
}) : null;
|
|
482
|
+
return d ? /* @__PURE__ */ w("button", {
|
|
483
|
+
"data-levo_element_key": s,
|
|
484
|
+
"data-levo_element_type": "Button",
|
|
485
|
+
type: "button",
|
|
486
|
+
className: D("inline-flex items-center justify-center", e, c),
|
|
487
|
+
ref: u,
|
|
488
|
+
...l,
|
|
489
|
+
children: t ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(O, { className: D("h-4 w-4 animate-spin", n ? "mr-2" : "") }), n] }) : /* @__PURE__ */ T(C, { children: [
|
|
490
|
+
m(f?.button_icons?.left, "left"),
|
|
491
|
+
/* @__PURE__ */ w("span", {
|
|
492
|
+
className: "button-content",
|
|
493
|
+
children: p
|
|
494
|
+
}),
|
|
495
|
+
m(f?.button_icons?.right, "right")
|
|
496
|
+
] })
|
|
497
|
+
}) : /* @__PURE__ */ w("span", {
|
|
498
|
+
ref: u,
|
|
499
|
+
style: { display: "none" }
|
|
500
|
+
});
|
|
501
|
+
});
|
|
502
|
+
$.displayName = "BaseButton";
|
|
503
|
+
var fe = X($);
|
|
504
|
+
//#endregion
|
|
505
|
+
export { F as _, W as a, A as b, U as c, G as d, L as f, ce as g, I as h, X as i, H as l, z as m, fe as n, B as o, R as p, Q as r, V as s, $ as t, K as u, le as v, M as y };
|