@levo-so/site-runtime 0.3.17 → 0.3.19
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/CollectionField-C-6a1ud4.js +270 -0
- package/DateTimeWidget-U3lD0q1q.js +255 -0
- package/{Dialog-D-vRkU9N.js → Dialog-dT7y641z.js} +1 -1
- package/{KBChatWidget-BMuZ-VI3.js → KBChatWidget-GRi6sLpp.js} +222 -222
- package/{LevoProvider-BkbKrvrI.js → LevoProvider-Bsjkcwc8.js} +8 -8
- package/PhoneWidget-DQQa4bL6.js +99 -0
- package/{Popover-Cr0-X_ch.js → Popover-C29yJ7rz.js} +1 -1
- package/{PopupBody-BI-MJqmd-BnSl6jJr.js → PopupBody-BI-MJqmd-DgTQEzda.js} +23 -23
- package/{PopupRenderer-D66Gx63H-B_CFOeCl.js → PopupRenderer-D66Gx63H-Cd9xJv33.js} +47 -47
- package/{RichTextWidget-C1QECDcg.js → RichTextWidget-DfakML79.js} +127 -127
- package/{RteThemeProvider-CMbSaFRQ.js → RteThemeProvider-BQmfSXSl.js} +1 -1
- package/{ThemeProvider-DlFehjh1.js → ThemeProvider-DutrjSTF.js} +30 -30
- package/{Tooltip-BKQ5rIDh.js → Tooltip-CQB0LyxK.js} +1 -1
- package/{VerifyButton-D0cj9Z5Q.js → VerifyButton-BUT70lgz.js} +38 -38
- package/blog-content.js +67 -67
- package/{dist-C6-eVcUB.js → dist-6AIgW_iB.js} +10 -10
- package/{dist-CXoCodlj.js → dist-CEdznbFW.js} +1099 -1175
- package/index.d.ts +2 -6
- package/index.js +407 -411
- package/{kbChat-DtZ4vuCZ.js → kbChat-a2dXSeRc.js} +26 -26
- package/package.json +3 -3
- package/popups.js +1 -1
- package/{usePopupRedirect-CAAdcpaW-BDa44PXN.js → usePopupRedirect-CAAdcpaW-Ddjyf4KK.js} +14 -14
- package/CollectionField-DCAXOmBN.js +0 -270
- package/DateTimeWidget-I0LvR-tO.js +0 -255
- package/PhoneWidget-DPECohGT.js +0 -99
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { c as e } from "react/compiler-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import t from "clsx";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { createRuntimeFn as r } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
5
|
+
import { createContext as i, useContext as a, useEffect as o, useMemo as s, useRef as c } from "react";
|
|
6
6
|
//#region ../../libraries/levocn/dist/ui/button/Button.cssm.js
|
|
7
|
-
var l =
|
|
7
|
+
var l = r({
|
|
8
8
|
defaultClassName: "_1a7d0ek1 _1a7d0ek0",
|
|
9
9
|
variantClassNames: {
|
|
10
10
|
variant: {
|
|
@@ -31,24 +31,24 @@ var l = c({
|
|
|
31
31
|
size: "default"
|
|
32
32
|
},
|
|
33
33
|
compoundVariants: []
|
|
34
|
-
}), u = (
|
|
35
|
-
let
|
|
36
|
-
|
|
34
|
+
}), u = (r) => {
|
|
35
|
+
let i = e(14), a, o, s, c, u;
|
|
36
|
+
i[0] === r ? (a = i[1], o = i[2], s = i[3], c = i[4], u = i[5]) : ({className: a, variant: u, size: s, type: c, ...o} = r, i[0] = r, i[1] = a, i[2] = o, i[3] = s, i[4] = c, i[5] = u);
|
|
37
37
|
let d = c === void 0 ? "button" : c, f;
|
|
38
|
-
|
|
38
|
+
i[6] !== a || i[7] !== s || i[8] !== u ? (f = t(l({
|
|
39
39
|
variant: u,
|
|
40
|
-
size:
|
|
41
|
-
}),
|
|
40
|
+
size: s
|
|
41
|
+
}), a), i[6] = a, i[7] = s, i[8] = u, i[9] = f) : f = i[9];
|
|
42
42
|
let p;
|
|
43
|
-
return
|
|
43
|
+
return i[10] !== o || i[11] !== f || i[12] !== d ? (p = /* @__PURE__ */ n("button", {
|
|
44
44
|
"data-slot": "button",
|
|
45
45
|
type: d,
|
|
46
46
|
className: f,
|
|
47
|
-
...
|
|
48
|
-
}),
|
|
49
|
-
}, d = "_1er5g5a0", f = /* @__PURE__ */ new Set(), p = {}, m =
|
|
50
|
-
let t = e(1),
|
|
51
|
-
if (!
|
|
47
|
+
...o
|
|
48
|
+
}), i[10] = o, i[11] = f, i[12] = d, i[13] = p) : p = i[13], p;
|
|
49
|
+
}, d = "_1er5g5a0", f = /* @__PURE__ */ new Set(), p = {}, m = i(null), h = () => {
|
|
50
|
+
let t = e(1), n = a(m);
|
|
51
|
+
if (!n) {
|
|
52
52
|
let e;
|
|
53
53
|
return t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = {
|
|
54
54
|
portalRef: { current: null },
|
|
@@ -56,10 +56,10 @@ var l = c({
|
|
|
56
56
|
overrides: p
|
|
57
57
|
}, t[0] = e) : e = t[0], e;
|
|
58
58
|
}
|
|
59
|
-
return
|
|
60
|
-
}, g = ({ children: e, cssReset:
|
|
61
|
-
let g =
|
|
62
|
-
let e =
|
|
59
|
+
return n;
|
|
60
|
+
}, g = ({ children: e, cssReset: r, className: i, style: l, portalToThemeRoot: u, ...h }) => {
|
|
61
|
+
let g = a(m), _ = c(null), v = !g && r !== !1 ? d : "", y = g?.classes ?? f, b = g?.overrides ?? p, x = s(() => {
|
|
62
|
+
let e = i ? i.split(/\s+/).filter(Boolean) : [], t = new Set(y);
|
|
63
63
|
for (let n of e) t.add(n);
|
|
64
64
|
return {
|
|
65
65
|
portalRef: _,
|
|
@@ -71,36 +71,36 @@ var l = c({
|
|
|
71
71
|
};
|
|
72
72
|
}, [
|
|
73
73
|
y,
|
|
74
|
-
|
|
74
|
+
i,
|
|
75
75
|
b,
|
|
76
76
|
l
|
|
77
77
|
]);
|
|
78
|
-
|
|
78
|
+
o(() => {
|
|
79
79
|
if (u) return;
|
|
80
80
|
let e = document.createElement("div");
|
|
81
81
|
return document.body.appendChild(e), _.current = e, () => {
|
|
82
82
|
document.body.removeChild(e), _.current = null;
|
|
83
83
|
};
|
|
84
|
-
}, [u]),
|
|
84
|
+
}, [u]), o(() => {
|
|
85
85
|
if (u) return;
|
|
86
86
|
let e = _.current;
|
|
87
87
|
if (!e) return;
|
|
88
|
-
e.className =
|
|
89
|
-
let
|
|
88
|
+
e.className = t(v, ...x.classes), e.style.cssText = "";
|
|
89
|
+
let n = {
|
|
90
90
|
display: "contents",
|
|
91
91
|
...x.overrides
|
|
92
92
|
};
|
|
93
|
-
for (let [
|
|
93
|
+
for (let [t, r] of Object.entries(n)) r != null && e.style.setProperty(t, String(r));
|
|
94
94
|
}, [
|
|
95
95
|
x.classes,
|
|
96
96
|
x.overrides,
|
|
97
97
|
v,
|
|
98
98
|
u
|
|
99
99
|
]);
|
|
100
|
-
let S =
|
|
101
|
-
return /* @__PURE__ */
|
|
100
|
+
let S = t(v, ...i ? i.split(/\s+/).filter((e) => e && !y.has(e)) : []);
|
|
101
|
+
return /* @__PURE__ */ n(m.Provider, {
|
|
102
102
|
value: x,
|
|
103
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ n("div", {
|
|
104
104
|
...u ? { ref: _ } : {},
|
|
105
105
|
...S ? { className: S } : {},
|
|
106
106
|
style: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { r as e } from "./ThemeProvider-
|
|
3
|
-
import { t } from "./LevoProvider-
|
|
2
|
+
import { r as e } from "./ThemeProvider-DutrjSTF.js";
|
|
3
|
+
import { t } from "./LevoProvider-Bsjkcwc8.js";
|
|
4
4
|
import { t as n } from "./CollectionInput-BJ__qcbk.js";
|
|
5
|
-
import { i as r, n as i, o as a, t as o } from "./Dialog-
|
|
5
|
+
import { i as r, n as i, o as a, t as o } from "./Dialog-dT7y641z.js";
|
|
6
6
|
import { c as s } from "react/compiler-runtime";
|
|
7
|
-
import
|
|
8
|
-
import u from "
|
|
9
|
-
import {
|
|
7
|
+
import c from "clsx";
|
|
8
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
|
+
import { useEffect as f, useState as p } from "react";
|
|
10
10
|
import { IconCircleCheck as m, IconLoader as h } from "@tabler/icons-react";
|
|
11
11
|
import { toast as g } from "sonner";
|
|
12
12
|
//#region ../../libraries/levocn/dist/ui/spinner/Spinner.cssm.js
|
|
@@ -14,9 +14,9 @@ var _ = "_1k4xirc1", v = (e) => {
|
|
|
14
14
|
let t = s(8), n, r;
|
|
15
15
|
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
16
16
|
let i;
|
|
17
|
-
t[3] === n ? i = t[4] : (i =
|
|
17
|
+
t[3] === n ? i = t[4] : (i = c(_, n), t[3] = n, t[4] = i);
|
|
18
18
|
let a;
|
|
19
|
-
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */
|
|
19
|
+
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ u(h, {
|
|
20
20
|
role: "status",
|
|
21
21
|
"aria-label": "Loading",
|
|
22
22
|
className: i,
|
|
@@ -36,42 +36,42 @@ var _ = "_1k4xirc1", v = (e) => {
|
|
|
36
36
|
position: "bottom-right",
|
|
37
37
|
...n
|
|
38
38
|
});
|
|
39
|
-
}, x = "_6o7s4x0", S = "qkytrb0", C = "qkytrb1", w = "qkytrb2", T = "qkytrb3", E = "qkytrb4", D = "qkytrb5", O = "qkytrb6", k = ({ isOpen: s, onClose:
|
|
40
|
-
let { membership: g } = t(), [_, v] =
|
|
41
|
-
return
|
|
39
|
+
}, x = "_6o7s4x0", S = "qkytrb0", C = "qkytrb1", w = "qkytrb2", T = "qkytrb3", E = "qkytrb4", D = "qkytrb5", O = "qkytrb6", k = ({ isOpen: s, onClose: c, value: l, type: m = "email", onVerifySuccess: h }) => {
|
|
40
|
+
let { membership: g } = t(), [_, v] = p(""), [k, A] = p(!1), [j, M] = p(!1), [N, P] = p(30);
|
|
41
|
+
return f(() => {
|
|
42
42
|
let e;
|
|
43
43
|
return s && N > 0 && (e = setInterval(() => {
|
|
44
44
|
P((e) => e - 1);
|
|
45
45
|
}, 1e3)), () => clearInterval(e);
|
|
46
|
-
}, [s, N]),
|
|
46
|
+
}, [s, N]), f(() => {
|
|
47
47
|
s && (v(""), P(30), A(!1), M(!1));
|
|
48
|
-
}, [s]), /* @__PURE__ */
|
|
48
|
+
}, [s]), /* @__PURE__ */ u(a, {
|
|
49
49
|
open: s,
|
|
50
50
|
onOpenChange: (e) => {
|
|
51
|
-
e ||
|
|
51
|
+
e || c();
|
|
52
52
|
},
|
|
53
|
-
children: /* @__PURE__ */
|
|
53
|
+
children: /* @__PURE__ */ d(i, {
|
|
54
54
|
className: x,
|
|
55
|
-
children: [/* @__PURE__ */
|
|
55
|
+
children: [/* @__PURE__ */ u(o, { children: /* @__PURE__ */ u(r, { children: `Verify ${m === "email" ? "Email" : "Phone"}` }) }), /* @__PURE__ */ d("div", {
|
|
56
56
|
className: S,
|
|
57
57
|
children: [
|
|
58
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ d("div", {
|
|
59
59
|
className: C,
|
|
60
60
|
children: [
|
|
61
61
|
"Enter the 4-digit code sent to ",
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ u("strong", { children: l }),
|
|
63
63
|
".",
|
|
64
64
|
" ",
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
onClick: () =>
|
|
65
|
+
/* @__PURE__ */ u("button", {
|
|
66
|
+
onClick: () => c(),
|
|
67
67
|
className: w,
|
|
68
68
|
children: "Change?"
|
|
69
69
|
})
|
|
70
70
|
]
|
|
71
71
|
}),
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ u("div", {
|
|
73
73
|
className: T,
|
|
74
|
-
children: /* @__PURE__ */
|
|
74
|
+
children: /* @__PURE__ */ u(n, {
|
|
75
75
|
value: _,
|
|
76
76
|
onChange: (e) => {
|
|
77
77
|
v(e.target.value.replace(/\D/g, "").slice(0, 4));
|
|
@@ -81,17 +81,17 @@ var _ = "_1k4xirc1", v = (e) => {
|
|
|
81
81
|
className: D
|
|
82
82
|
})
|
|
83
83
|
}),
|
|
84
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ d("div", {
|
|
85
85
|
className: E,
|
|
86
|
-
children: [/* @__PURE__ */
|
|
86
|
+
children: [/* @__PURE__ */ u(e, {
|
|
87
87
|
onClick: async () => {
|
|
88
88
|
if (!(!_ || _.length !== 4)) {
|
|
89
89
|
A(!0);
|
|
90
90
|
try {
|
|
91
91
|
await g?.signInWithOtp({
|
|
92
|
-
content:
|
|
92
|
+
content: l,
|
|
93
93
|
code: _
|
|
94
|
-
}), b("Verification successful"), h(
|
|
94
|
+
}), b("Verification successful"), h(l), c();
|
|
95
95
|
} catch (e) {
|
|
96
96
|
let t = e;
|
|
97
97
|
y(t?.message || "Invalid OTP", t?.title || "Verification Failed");
|
|
@@ -103,19 +103,19 @@ var _ = "_1k4xirc1", v = (e) => {
|
|
|
103
103
|
disabled: _.length !== 4 || k,
|
|
104
104
|
className: "w-full",
|
|
105
105
|
children: k ? "Verifying..." : "Verify"
|
|
106
|
-
}), /* @__PURE__ */
|
|
106
|
+
}), /* @__PURE__ */ u("div", {
|
|
107
107
|
className: O,
|
|
108
|
-
children: N > 0 ? /* @__PURE__ */
|
|
108
|
+
children: N > 0 ? /* @__PURE__ */ d("span", { children: [
|
|
109
109
|
"Resend code in ",
|
|
110
110
|
N,
|
|
111
111
|
"s"
|
|
112
|
-
] }) : /* @__PURE__ */
|
|
112
|
+
] }) : /* @__PURE__ */ u("button", {
|
|
113
113
|
onClick: async () => {
|
|
114
114
|
if (!(N > 0)) {
|
|
115
115
|
M(!0);
|
|
116
116
|
try {
|
|
117
117
|
await g?.requestOtp({
|
|
118
|
-
content:
|
|
118
|
+
content: l,
|
|
119
119
|
medium: m === "phone" ? "whatsapp" : "email"
|
|
120
120
|
}), b("OTP resent successfully"), P(30);
|
|
121
121
|
} catch (e) {
|
|
@@ -137,7 +137,7 @@ var _ = "_1k4xirc1", v = (e) => {
|
|
|
137
137
|
})
|
|
138
138
|
});
|
|
139
139
|
}, A = "jfrbe10", j = "jfrbe11", M = "jfrbe12", N = ({ value: n, type: r, isVerified: i, onVerifySuccess: a, onStateChange: o }) => {
|
|
140
|
-
let { membership: s } = t(), [c,
|
|
140
|
+
let { membership: s } = t(), [c, f] = p(!1), [h, g] = p(!1), _ = (e) => {
|
|
141
141
|
o && o(e);
|
|
142
142
|
}, b = async () => {
|
|
143
143
|
let e = n?.trim()?.toLowerCase();
|
|
@@ -154,7 +154,7 @@ var _ = "_1k4xirc1", v = (e) => {
|
|
|
154
154
|
await s?.requestOtp({
|
|
155
155
|
content: e,
|
|
156
156
|
medium: r === "phone" ? "whatsapp" : "email"
|
|
157
|
-
}),
|
|
157
|
+
}), f(!0);
|
|
158
158
|
} catch (e) {
|
|
159
159
|
let t = e;
|
|
160
160
|
y(t?.message || "Failed to send OTP", t?.title || "Error"), _(!1);
|
|
@@ -162,23 +162,23 @@ var _ = "_1k4xirc1", v = (e) => {
|
|
|
162
162
|
g(!1);
|
|
163
163
|
}
|
|
164
164
|
}, x = () => {
|
|
165
|
-
|
|
165
|
+
f(!1), _(!1);
|
|
166
166
|
};
|
|
167
|
-
return i ? /* @__PURE__ */
|
|
167
|
+
return i ? /* @__PURE__ */ d("div", {
|
|
168
168
|
className: A,
|
|
169
|
-
children: [/* @__PURE__ */
|
|
169
|
+
children: [/* @__PURE__ */ u(m, { className: M }), /* @__PURE__ */ u("span", {
|
|
170
170
|
className: j,
|
|
171
171
|
children: "Verified"
|
|
172
172
|
})]
|
|
173
|
-
}) : /* @__PURE__ */
|
|
173
|
+
}) : /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(e, {
|
|
174
174
|
size: "default",
|
|
175
175
|
variant: "ghost",
|
|
176
176
|
onClick: b,
|
|
177
177
|
onMouseDown: (e) => e.preventDefault(),
|
|
178
178
|
disabled: !n || h,
|
|
179
179
|
type: "button",
|
|
180
|
-
children: h ? /* @__PURE__ */
|
|
181
|
-
}), c && /* @__PURE__ */
|
|
180
|
+
children: h ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(v, { size: 14 }), "Sending..."] }) : "Verify"
|
|
181
|
+
}), c && /* @__PURE__ */ u(k, {
|
|
182
182
|
isOpen: c,
|
|
183
183
|
onClose: x,
|
|
184
184
|
value: n?.trim()?.toLowerCase() || "",
|