@levo-so/site-runtime 0.3.19 → 0.3.20
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-DCAXOmBN.js +270 -0
- package/DateTimeWidget-I0LvR-tO.js +255 -0
- package/{Dialog-dT7y641z.js → Dialog-D-vRkU9N.js} +1 -1
- package/{KBChatWidget-GRi6sLpp.js → KBChatWidget-BMuZ-VI3.js} +222 -222
- package/{LevoProvider-Bsjkcwc8.js → LevoProvider-BkbKrvrI.js} +8 -8
- package/PhoneWidget-DPECohGT.js +99 -0
- package/{Popover-C29yJ7rz.js → Popover-Cr0-X_ch.js} +1 -1
- package/{PopupBody-BI-MJqmd-DgTQEzda.js → PopupBody-BI-MJqmd-a-l3CaKZ.js} +23 -23
- package/{PopupRenderer-D66Gx63H-Cd9xJv33.js → PopupRenderer-D66Gx63H-DpcNpbtU.js} +47 -47
- package/{RichTextWidget-DfakML79.js → RichTextWidget-C1QECDcg.js} +127 -127
- package/{RteThemeProvider-BQmfSXSl.js → RteThemeProvider-CMbSaFRQ.js} +1 -1
- package/{ThemeProvider-DutrjSTF.js → ThemeProvider-DlFehjh1.js} +30 -30
- package/{Tooltip-CQB0LyxK.js → Tooltip-BKQ5rIDh.js} +1 -1
- package/{VerifyButton-BUT70lgz.js → VerifyButton-D0cj9Z5Q.js} +38 -38
- package/blog-content.js +67 -67
- package/{dist-CEdznbFW.js → dist-IxiGbP-3.js} +1254 -1139
- package/{dist-6AIgW_iB.js → dist-_lwl0kZw.js} +10 -10
- package/index.d.ts +21 -11
- package/index.js +1698 -1385
- package/{kbChat-a2dXSeRc.js → kbChat-DtZ4vuCZ.js} +26 -26
- package/package.json +3 -3
- package/popups.js +1 -1
- package/script.esm-wR2d7rrv.js +62 -0
- package/{usePopupRedirect-CAAdcpaW-Ddjyf4KK.js → usePopupRedirect-CAAdcpaW-BDa44PXN.js} +14 -14
- package/CollectionField-C-6a1ud4.js +0 -270
- package/DateTimeWidget-U3lD0q1q.js +0 -255
- package/PhoneWidget-DQQa4bL6.js +0 -99
- /package/{es-ByBbirnH.js → es-CGQflL9T.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { c as e } from "react/compiler-runtime";
|
|
2
|
-
import t from "
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { createContext as t, useContext as n, useEffect as r, useMemo as i, useRef as a } from "react";
|
|
3
|
+
import o from "clsx";
|
|
4
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
5
|
+
import { createRuntimeFn as c } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
6
6
|
//#region ../../libraries/levocn/dist/ui/button/Button.cssm.js
|
|
7
|
-
var l =
|
|
7
|
+
var l = c({
|
|
8
8
|
defaultClassName: "_1a7d0ek1 _1a7d0ek0",
|
|
9
9
|
variantClassNames: {
|
|
10
10
|
variant: {
|
|
@@ -31,24 +31,24 @@ var l = r({
|
|
|
31
31
|
size: "default"
|
|
32
32
|
},
|
|
33
33
|
compoundVariants: []
|
|
34
|
-
}), u = (
|
|
35
|
-
let
|
|
36
|
-
|
|
34
|
+
}), u = (t) => {
|
|
35
|
+
let n = e(14), r, i, a, c, u;
|
|
36
|
+
n[0] === t ? (r = n[1], i = n[2], a = n[3], c = n[4], u = n[5]) : ({className: r, variant: u, size: a, type: c, ...i} = t, n[0] = t, n[1] = r, n[2] = i, n[3] = a, n[4] = c, n[5] = u);
|
|
37
37
|
let d = c === void 0 ? "button" : c, f;
|
|
38
|
-
|
|
38
|
+
n[6] !== r || n[7] !== a || n[8] !== u ? (f = o(l({
|
|
39
39
|
variant: u,
|
|
40
|
-
size:
|
|
41
|
-
}),
|
|
40
|
+
size: a
|
|
41
|
+
}), r), n[6] = r, n[7] = a, n[8] = u, n[9] = f) : f = n[9];
|
|
42
42
|
let p;
|
|
43
|
-
return
|
|
43
|
+
return n[10] !== i || n[11] !== f || n[12] !== d ? (p = /* @__PURE__ */ s("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
|
+
...i
|
|
48
|
+
}), n[10] = i, n[11] = f, n[12] = d, n[13] = p) : p = n[13], p;
|
|
49
|
+
}, d = "_1er5g5a0", f = /* @__PURE__ */ new Set(), p = {}, m = t(null), h = () => {
|
|
50
|
+
let t = e(1), r = n(m);
|
|
51
|
+
if (!r) {
|
|
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 = r({
|
|
|
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 r;
|
|
60
|
+
}, g = ({ children: e, cssReset: t, className: c, style: l, portalToThemeRoot: u, ...h }) => {
|
|
61
|
+
let g = n(m), _ = a(null), v = !g && t !== !1 ? d : "", y = g?.classes ?? f, b = g?.overrides ?? p, x = i(() => {
|
|
62
|
+
let e = c ? c.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 = r({
|
|
|
71
71
|
};
|
|
72
72
|
}, [
|
|
73
73
|
y,
|
|
74
|
-
|
|
74
|
+
c,
|
|
75
75
|
b,
|
|
76
76
|
l
|
|
77
77
|
]);
|
|
78
|
-
|
|
78
|
+
r(() => {
|
|
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]), r(() => {
|
|
85
85
|
if (u) return;
|
|
86
86
|
let e = _.current;
|
|
87
87
|
if (!e) return;
|
|
88
|
-
e.className =
|
|
89
|
-
let
|
|
88
|
+
e.className = o(v, ...x.classes), e.style.cssText = "";
|
|
89
|
+
let t = {
|
|
90
90
|
display: "contents",
|
|
91
91
|
...x.overrides
|
|
92
92
|
};
|
|
93
|
-
for (let [
|
|
93
|
+
for (let [n, r] of Object.entries(t)) r != null && e.style.setProperty(n, 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 = o(v, ...c ? c.split(/\s+/).filter((e) => e && !y.has(e)) : []);
|
|
101
|
+
return /* @__PURE__ */ s(m.Provider, {
|
|
102
102
|
value: x,
|
|
103
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ s("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-DlFehjh1.js";
|
|
3
|
+
import { t } from "./LevoProvider-BkbKrvrI.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-D-vRkU9N.js";
|
|
6
6
|
import { c as s } from "react/compiler-runtime";
|
|
7
|
-
import c from "
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
7
|
+
import { useEffect as c, useState as l } from "react";
|
|
8
|
+
import u from "clsx";
|
|
9
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
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 = u(_, 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__ */ f(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: u, value: d, type: m = "email", onVerifySuccess: h }) => {
|
|
40
|
+
let { membership: g } = t(), [_, v] = l(""), [k, A] = l(!1), [j, M] = l(!1), [N, P] = l(30);
|
|
41
|
+
return c(() => {
|
|
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]), c(() => {
|
|
47
47
|
s && (v(""), P(30), A(!1), M(!1));
|
|
48
|
-
}, [s]), /* @__PURE__ */
|
|
48
|
+
}, [s]), /* @__PURE__ */ f(a, {
|
|
49
49
|
open: s,
|
|
50
50
|
onOpenChange: (e) => {
|
|
51
|
-
e ||
|
|
51
|
+
e || u();
|
|
52
52
|
},
|
|
53
|
-
children: /* @__PURE__ */
|
|
53
|
+
children: /* @__PURE__ */ p(i, {
|
|
54
54
|
className: x,
|
|
55
|
-
children: [/* @__PURE__ */
|
|
55
|
+
children: [/* @__PURE__ */ f(o, { children: /* @__PURE__ */ f(r, { children: `Verify ${m === "email" ? "Email" : "Phone"}` }) }), /* @__PURE__ */ p("div", {
|
|
56
56
|
className: S,
|
|
57
57
|
children: [
|
|
58
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ p("div", {
|
|
59
59
|
className: C,
|
|
60
60
|
children: [
|
|
61
61
|
"Enter the 4-digit code sent to ",
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ f("strong", { children: d }),
|
|
63
63
|
".",
|
|
64
64
|
" ",
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
onClick: () =>
|
|
65
|
+
/* @__PURE__ */ f("button", {
|
|
66
|
+
onClick: () => u(),
|
|
67
67
|
className: w,
|
|
68
68
|
children: "Change?"
|
|
69
69
|
})
|
|
70
70
|
]
|
|
71
71
|
}),
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ f("div", {
|
|
73
73
|
className: T,
|
|
74
|
-
children: /* @__PURE__ */
|
|
74
|
+
children: /* @__PURE__ */ f(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__ */ p("div", {
|
|
85
85
|
className: E,
|
|
86
|
-
children: [/* @__PURE__ */
|
|
86
|
+
children: [/* @__PURE__ */ f(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: d,
|
|
93
93
|
code: _
|
|
94
|
-
}), b("Verification successful"), h(
|
|
94
|
+
}), b("Verification successful"), h(d), u();
|
|
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__ */ f("div", {
|
|
107
107
|
className: O,
|
|
108
|
-
children: N > 0 ? /* @__PURE__ */
|
|
108
|
+
children: N > 0 ? /* @__PURE__ */ p("span", { children: [
|
|
109
109
|
"Resend code in ",
|
|
110
110
|
N,
|
|
111
111
|
"s"
|
|
112
|
-
] }) : /* @__PURE__ */
|
|
112
|
+
] }) : /* @__PURE__ */ f("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: d,
|
|
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, u] = l(!1), [h, g] = l(!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
|
+
}), u(!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
|
+
u(!1), _(!1);
|
|
166
166
|
};
|
|
167
|
-
return i ? /* @__PURE__ */
|
|
167
|
+
return i ? /* @__PURE__ */ p("div", {
|
|
168
168
|
className: A,
|
|
169
|
-
children: [/* @__PURE__ */
|
|
169
|
+
children: [/* @__PURE__ */ f(m, { className: M }), /* @__PURE__ */ f("span", {
|
|
170
170
|
className: j,
|
|
171
171
|
children: "Verified"
|
|
172
172
|
})]
|
|
173
|
-
}) : /* @__PURE__ */ d
|
|
173
|
+
}) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(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__ */ d
|
|
181
|
-
}), c && /* @__PURE__ */
|
|
180
|
+
children: h ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(v, { size: 14 }), "Sending..."] }) : "Verify"
|
|
181
|
+
}), c && /* @__PURE__ */ f(k, {
|
|
182
182
|
isOpen: c,
|
|
183
183
|
onClose: x,
|
|
184
184
|
value: n?.trim()?.toLowerCase() || "",
|