@levo-so/site-runtime 0.3.20 → 0.3.21

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.
Files changed (53) hide show
  1. package/BillingStep-ByiYjJ0S.js +251 -0
  2. package/BookingCard-DdwLHVGw.js +816 -0
  3. package/CollectionLabel-CmUFfc_7.js +35 -0
  4. package/DateTimeWidget-Bk2tk_CT.js +254 -0
  5. package/{KBChatWidget-BMuZ-VI3.js → KBChatWidget-BXRRgelS.js} +1 -1
  6. package/{PhoneWidget-DPECohGT.js → PhoneWidget-FWE3jD_L.js} +3 -5
  7. package/{Popover-Cr0-X_ch.js → Popover-MSrVDAzg.js} +7 -7
  8. package/PopupBody-DWM55Zh5-B3ysApDM.js +158 -0
  9. package/PopupDialog-DwAAJ8JS-DkxjZaJL.js +260 -0
  10. package/PopupRenderer-BVtV4b9I-Dot4Syse.js +207 -0
  11. package/{RichTextWidget-C1QECDcg.js → RichTextWidget-KnIKESAD.js} +134 -135
  12. package/{RteThemeProvider-CMbSaFRQ.js → RteThemeProvider-DtTXGcCT.js} +2 -3
  13. package/Sonner-BsE4Y_t4.js +21 -0
  14. package/blog-content.js +8 -9
  15. package/dist-BVFCdirT.js +4471 -0
  16. package/dist-DEXGyFeH.js +376 -0
  17. package/index.js +12 -13
  18. package/{themeVars.cssm-ByhhC2Jm.js → inlineBaseTheme-DcNdMEYp.js} +35 -5
  19. package/{inlineCollectionTheme-CWcMCUti.js → inlineCollectionTheme-DjXuH3bK.js} +1 -1
  20. package/{inlineRteTheme-CRPtkNXy.js → inlineRteTheme-BYGIJM7P.js} +1 -1
  21. package/{kbChat-DtZ4vuCZ.js → kbChat-eFsau7hG.js} +2 -2
  22. package/package.json +23 -23
  23. package/{pillChrome-CEpWGNZB.js → pillChrome-Dy3ApFI5.js} +5 -5
  24. package/popups.js +1 -1
  25. package/{react-Cj_U6VZQ.js → react-CENbCy5d.js} +6 -5
  26. package/script.esm-uVCZU25S.js +62 -0
  27. package/start.js +1 -1
  28. package/styles.css +1 -1
  29. package/theme.cssm-iXnQwMCp.js +238 -0
  30. package/CollectionField-DCAXOmBN.js +0 -270
  31. package/CollectionInput-BJ__qcbk.js +0 -147
  32. package/DateTimeWidget-I0LvR-tO.js +0 -255
  33. package/Dialog-D-vRkU9N.js +0 -130
  34. package/LevoProvider-BkbKrvrI.js +0 -20
  35. package/PopupBody-BI-MJqmd-a-l3CaKZ.js +0 -159
  36. package/PopupRenderer-D66Gx63H-DpcNpbtU.js +0 -388
  37. package/ThemeProvider-DlFehjh1.js +0 -116
  38. package/Tooltip-BKQ5rIDh.js +0 -67
  39. package/VerifyButton-D0cj9Z5Q.js +0 -192
  40. package/createThemeExtension-4AUn51iJ.js +0 -15
  41. package/dist-IxiGbP-3.js +0 -3783
  42. package/dist-_lwl0kZw.js +0 -79
  43. package/inlineBaseTheme-BB9e6h5f.js +0 -9
  44. package/popupState-JmpeKzgM-D_77LiAa.js +0 -229
  45. package/react-B9yvlbH0.js +0 -74
  46. package/theme.cssm-DUzmx76l.js +0 -4
  47. package/usePopupRedirect-CAAdcpaW-BDa44PXN.js +0 -82
  48. /package/{content.cssm-XdMsTGIB.js → content.cssm-D_LSloGW.js} +0 -0
  49. /package/{es-CGQflL9T.js → es-CK20DkgT.js} +0 -0
  50. /package/{rolldown-runtime-CAFD8bLK.js → rolldown-runtime-Dy4uBu1J.js} +0 -0
  51. /package/{routes-CyKmkoRM.js → routes-DO1BLfh9.js} +0 -0
  52. /package/{rteTheme.cssm-W4gTOijw.js → rteTheme.cssm-BRxusHY4.js} +0 -0
  53. /package/{script.esm-wR2d7rrv.js → script.esm-D4nvz3-k.js} +0 -0
@@ -1,192 +0,0 @@
1
- "use client";
2
- import { r as e } from "./ThemeProvider-DlFehjh1.js";
3
- import { t } from "./LevoProvider-BkbKrvrI.js";
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-D-vRkU9N.js";
6
- import { c as s } from "react/compiler-runtime";
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
- import { IconCircleCheck as m, IconLoader as h } from "@tabler/icons-react";
11
- import { toast as g } from "sonner";
12
- //#region ../../libraries/levocn/dist/ui/spinner/Spinner.cssm.js
13
- var _ = "_1k4xirc1", v = (e) => {
14
- let t = s(8), n, r;
15
- t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
16
- let i;
17
- t[3] === n ? i = t[4] : (i = u(_, n), t[3] = n, t[4] = i);
18
- let a;
19
- return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ f(h, {
20
- role: "status",
21
- "aria-label": "Loading",
22
- className: i,
23
- ...r
24
- }), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
25
- }, y = (e, t = "Error", n = {}) => {
26
- g.error(t, {
27
- description: e,
28
- duration: 4e3,
29
- position: "bottom-right",
30
- ...n
31
- });
32
- }, b = (e, t = "Success", n = {}) => {
33
- n?.id && g.dismiss(n?.id), g.success(t, {
34
- description: e,
35
- duration: 4e3,
36
- position: "bottom-right",
37
- ...n
38
- });
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
- let e;
43
- return s && N > 0 && (e = setInterval(() => {
44
- P((e) => e - 1);
45
- }, 1e3)), () => clearInterval(e);
46
- }, [s, N]), c(() => {
47
- s && (v(""), P(30), A(!1), M(!1));
48
- }, [s]), /* @__PURE__ */ f(a, {
49
- open: s,
50
- onOpenChange: (e) => {
51
- e || u();
52
- },
53
- children: /* @__PURE__ */ p(i, {
54
- className: x,
55
- children: [/* @__PURE__ */ f(o, { children: /* @__PURE__ */ f(r, { children: `Verify ${m === "email" ? "Email" : "Phone"}` }) }), /* @__PURE__ */ p("div", {
56
- className: S,
57
- children: [
58
- /* @__PURE__ */ p("div", {
59
- className: C,
60
- children: [
61
- "Enter the 4-digit code sent to ",
62
- /* @__PURE__ */ f("strong", { children: d }),
63
- ".",
64
- " ",
65
- /* @__PURE__ */ f("button", {
66
- onClick: () => u(),
67
- className: w,
68
- children: "Change?"
69
- })
70
- ]
71
- }),
72
- /* @__PURE__ */ f("div", {
73
- className: T,
74
- children: /* @__PURE__ */ f(n, {
75
- value: _,
76
- onChange: (e) => {
77
- v(e.target.value.replace(/\D/g, "").slice(0, 4));
78
- },
79
- placeholder: "0000",
80
- maxLength: 4,
81
- className: D
82
- })
83
- }),
84
- /* @__PURE__ */ p("div", {
85
- className: E,
86
- children: [/* @__PURE__ */ f(e, {
87
- onClick: async () => {
88
- if (!(!_ || _.length !== 4)) {
89
- A(!0);
90
- try {
91
- await g?.signInWithOtp({
92
- content: d,
93
- code: _
94
- }), b("Verification successful"), h(d), u();
95
- } catch (e) {
96
- let t = e;
97
- y(t?.message || "Invalid OTP", t?.title || "Verification Failed");
98
- } finally {
99
- A(!1);
100
- }
101
- }
102
- },
103
- disabled: _.length !== 4 || k,
104
- className: "w-full",
105
- children: k ? "Verifying..." : "Verify"
106
- }), /* @__PURE__ */ f("div", {
107
- className: O,
108
- children: N > 0 ? /* @__PURE__ */ p("span", { children: [
109
- "Resend code in ",
110
- N,
111
- "s"
112
- ] }) : /* @__PURE__ */ f("button", {
113
- onClick: async () => {
114
- if (!(N > 0)) {
115
- M(!0);
116
- try {
117
- await g?.requestOtp({
118
- content: d,
119
- medium: m === "phone" ? "whatsapp" : "email"
120
- }), b("OTP resent successfully"), P(30);
121
- } catch (e) {
122
- let t = e;
123
- y(t?.message || "Failed to resend OTP", t?.title || "Error");
124
- } finally {
125
- M(!1);
126
- }
127
- }
128
- },
129
- disabled: j,
130
- className: w,
131
- children: j ? "Resending..." : "Resend Code"
132
- })
133
- })]
134
- })
135
- ]
136
- })]
137
- })
138
- });
139
- }, A = "jfrbe10", j = "jfrbe11", M = "jfrbe12", N = ({ value: n, type: r, isVerified: i, onVerifySuccess: a, onStateChange: o }) => {
140
- let { membership: s } = t(), [c, u] = l(!1), [h, g] = l(!1), _ = (e) => {
141
- o && o(e);
142
- }, b = async () => {
143
- let e = n?.trim()?.toLowerCase();
144
- if (!e) {
145
- y(`Please enter a ${r}`);
146
- return;
147
- }
148
- if (r === "email" && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)) {
149
- y("Please enter a valid email address");
150
- return;
151
- }
152
- g(!0), _(!0);
153
- try {
154
- await s?.requestOtp({
155
- content: e,
156
- medium: r === "phone" ? "whatsapp" : "email"
157
- }), u(!0);
158
- } catch (e) {
159
- let t = e;
160
- y(t?.message || "Failed to send OTP", t?.title || "Error"), _(!1);
161
- } finally {
162
- g(!1);
163
- }
164
- }, x = () => {
165
- u(!1), _(!1);
166
- };
167
- return i ? /* @__PURE__ */ p("div", {
168
- className: A,
169
- children: [/* @__PURE__ */ f(m, { className: M }), /* @__PURE__ */ f("span", {
170
- className: j,
171
- children: "Verified"
172
- })]
173
- }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(e, {
174
- size: "default",
175
- variant: "ghost",
176
- onClick: b,
177
- onMouseDown: (e) => e.preventDefault(),
178
- disabled: !n || h,
179
- type: "button",
180
- children: h ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(v, { size: 14 }), "Sending..."] }) : "Verify"
181
- }), c && /* @__PURE__ */ f(k, {
182
- isOpen: c,
183
- onClose: x,
184
- value: n?.trim()?.toLowerCase() || "",
185
- type: r,
186
- onVerifySuccess: (e) => {
187
- a(e), x();
188
- }
189
- })] });
190
- };
191
- //#endregion
192
- export { v as a, y as i, x as n, b as r, N as t };
@@ -1,15 +0,0 @@
1
- import { assignInlineVars as e } from "@vanilla-extract/dynamic";
2
- //#region ../../libraries/levocn/dist/theme/utils/createThemeExtension.js
3
- var t = (e, n) => {
4
- let r = {};
5
- for (let i of Object.keys(n)) {
6
- let a = n[i], o = e[i];
7
- if (!(a === void 0 || o === void 0)) if (typeof a == "object" && a && !Array.isArray(a)) {
8
- let e = t(o, a);
9
- Object.assign(r, e);
10
- } else typeof o == "string" && (r[o] = String(a));
11
- }
12
- return r;
13
- }, n = (n) => (r) => r ? e(t(n, r)) : {};
14
- //#endregion
15
- export { n as t };