@levo-so/site-runtime 0.3.7 → 0.3.8
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/{CollectionInput-B1qV4QEH.js → CollectionInput-BJ__qcbk.js} +40 -40
- package/DateTimeWidget-hFjcn3o6.js +255 -0
- package/{Dialog-DVB4WpBS.js → Dialog-dT7y641z.js} +43 -43
- package/{KBChatWidget-Cnq0DCOQ.js → KBChatWidget-ClHFDgJ5.js} +236 -236
- package/{LevoProvider-nmIbMlsk.js → LevoProvider-Bsjkcwc8.js} +8 -8
- package/PhoneWidget-BmBO-kvA.js +99 -0
- package/{Popover-C7zZHBIc.js → Popover-3N88sRp4.js} +20 -20
- package/{PopupBody-DZVwDLkg-yrot8Uqb.js → PopupBody-DZVwDLkg-Cfy3lWGs.js} +33 -33
- package/{PopupRenderer-BjW1jg70-Biwj2bIc.js → PopupRenderer-BjW1jg70-W2y-PEPH.js} +81 -81
- package/{RichTextWidget-BOrVIR2j.js → RichTextWidget-DkKHEq4j.js} +139 -139
- package/ThemeProvider-DutrjSTF.js +116 -0
- package/{Tooltip-BIgrpetu.js → Tooltip-CQB0LyxK.js} +20 -20
- package/{VerifyButton-CA1GtEZJ.js → VerifyButton-BUT70lgz.js} +65 -65
- package/dist-CRDgdAkQ.js +3631 -0
- package/{dist-Cb6sb7nO.js → dist-DPmVG7VB.js} +13 -13
- package/index.d.ts +560 -3
- package/index.js +1203 -713
- package/inlineBaseTheme-BB9e6h5f.js +9 -0
- package/{inlineCollectionTheme-DYYMrmcE.js → inlineCollectionTheme-CWcMCUti.js} +1 -1
- package/{kbChat-DIb4AS7E.js → kbChat-C00LVlxP.js} +27 -27
- package/{nodeAlignment-D70kOcui.js → nodeAlignment-BnJljFlw.js} +1 -1
- package/package.json +3 -3
- package/popups.js +1 -1
- package/{react-6kO0cqgr.js → react-CV3jf2mc.js} +1 -1
- package/styles.css +1 -1
- package/{generateRadiusScale-54mE9ikx.js → themeVars.cssm-ByhhC2Jm.js} +17 -17
- package/usePopupRedirect-BThP_YPW-COUseDik.js +80 -0
- package/CollectionField-C59pmeQw.js +0 -270
- package/DateTimeWidget-Cctsvcrs.js +0 -255
- package/PhoneWidget-J3VTMWJH.js +0 -99
- package/ThemeProvider-BQmIB5tr.js +0 -116
- package/dist-C8gLeklT.js +0 -3559
- package/inlineBaseTheme-B6E9zzyp.js +0 -9
- package/usePopupRedirect-BThP_YPW-DoixMAB9.js +0 -80
- /package/{createThemeExtension-DhGk81nV.js → createThemeExtension-4AUn51iJ.js} +0 -0
- /package/{theme.cssm-mkQwezuj.js → theme.cssm-DUzmx76l.js} +0 -0
package/PhoneWidget-J3VTMWJH.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { t as e } from "./VerifyButton-CA1GtEZJ.js";
|
|
3
|
-
import { r as t, t as n } from "./CollectionField-C59pmeQw.js";
|
|
4
|
-
import { t as r } from "./CollectionInput-B1qV4QEH.js";
|
|
5
|
-
import { useState as i } from "react";
|
|
6
|
-
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
-
import s, { isSupportedCountry as c } from "react-phone-number-input";
|
|
8
|
-
import { useController as ee } from "react-hook-form";
|
|
9
|
-
import { c as te } from "react/compiler-runtime";
|
|
10
|
-
import { IconPencil as ne } from "@tabler/icons-react";
|
|
11
|
-
//#region ../../libraries/react-collection/dist/widgets/phoneWidget/PhoneWidget.cssm.js
|
|
12
|
-
var re = "_89f1hw0", l = "_89f1hw1", u = "_89f1hw2", ie = "_89f1hw4", d = (d) => {
|
|
13
|
-
let f = te(51), { field: p, settings: ae } = d, { key: m, label: h, helper_text: g, readonly: _, options: v } = p, y = m === void 0 ? "" : m, b = h === void 0 ? "" : h, x = g === void 0 ? "" : g, S = _ === void 0 ? !1 : _, C = y, w = !!v?.verification && !!ae?.enableVerification, [T, E] = i(null), [D, oe] = i(!1), O;
|
|
14
|
-
f[0] !== D || f[1] !== w || f[2] !== T ? (O = (e) => D ? !0 : w && (!T || T !== e) ? "Phone verification required" : !0, f[0] = D, f[1] = w, f[2] = T, f[3] = O) : O = f[3];
|
|
15
|
-
let k;
|
|
16
|
-
f[4] !== p || f[5] !== O ? (k = t(p, O), f[4] = p, f[5] = O, f[6] = k) : k = f[6];
|
|
17
|
-
let A = k, j;
|
|
18
|
-
f[7] !== C || f[8] !== A ? (j = {
|
|
19
|
-
name: C,
|
|
20
|
-
rules: A
|
|
21
|
-
}, f[7] = C, f[8] = A, f[9] = j) : j = f[9];
|
|
22
|
-
let { field: M, fieldState: se } = ee(j), N, P, F, I;
|
|
23
|
-
f[10] === M ? (N = f[11], P = f[12], F = f[13], I = f[14]) : ({value: I, onBlur: N, onChange: P, ...F} = M, f[10] = M, f[11] = N, f[12] = P, f[13] = F, f[14] = I);
|
|
24
|
-
let { error: ce } = se, L = !!p?.required, R = ce?.message, z = !!T && !!I && T === I, B;
|
|
25
|
-
f[15] === v?.country ? B = f[16] : (B = () => {
|
|
26
|
-
let e = v?.country;
|
|
27
|
-
if (e && typeof e == "string") {
|
|
28
|
-
let t = e?.toUpperCase();
|
|
29
|
-
if (c(t)) return t;
|
|
30
|
-
}
|
|
31
|
-
return "IN";
|
|
32
|
-
}, f[15] = v?.country, f[16] = B);
|
|
33
|
-
let V = B, H;
|
|
34
|
-
f[17] === P ? H = f[18] : (H = (e) => {
|
|
35
|
-
E(e), P(e);
|
|
36
|
-
}, f[17] = P, f[18] = H);
|
|
37
|
-
let U = H, W = I ?? "", G;
|
|
38
|
-
f[19] === V ? G = f[20] : (G = V(), f[19] = V, f[20] = G);
|
|
39
|
-
let K;
|
|
40
|
-
f[21] === P ? K = f[22] : (K = (e) => {
|
|
41
|
-
P?.(e ?? "");
|
|
42
|
-
}, f[21] = P, f[22] = K);
|
|
43
|
-
let q;
|
|
44
|
-
f[23] === N ? q = f[24] : (q = () => {
|
|
45
|
-
N?.();
|
|
46
|
-
}, f[23] = N, f[24] = q);
|
|
47
|
-
let J = S || z, Y;
|
|
48
|
-
f[25] === z ? Y = f[26] : (Y = z ? /* @__PURE__ */ a("button", {
|
|
49
|
-
type: "button",
|
|
50
|
-
onClick: () => E(null),
|
|
51
|
-
className: ie,
|
|
52
|
-
title: "Change phone number",
|
|
53
|
-
children: /* @__PURE__ */ a(ne, { size: 14 })
|
|
54
|
-
}) : null, f[25] = z, f[26] = Y);
|
|
55
|
-
let X;
|
|
56
|
-
f[27] !== F || f[28] !== W || f[29] !== G || f[30] !== K || f[31] !== q || f[32] !== J || f[33] !== Y ? (X = /* @__PURE__ */ a("div", {
|
|
57
|
-
className: u,
|
|
58
|
-
children: /* @__PURE__ */ a(s, {
|
|
59
|
-
value: W,
|
|
60
|
-
international: !0,
|
|
61
|
-
inputComponent: r,
|
|
62
|
-
defaultCountry: G,
|
|
63
|
-
onChange: K,
|
|
64
|
-
onBlur: q,
|
|
65
|
-
className: re,
|
|
66
|
-
readOnly: J,
|
|
67
|
-
rightIcon: Y,
|
|
68
|
-
...F
|
|
69
|
-
})
|
|
70
|
-
}), f[27] = F, f[28] = W, f[29] = G, f[30] = K, f[31] = q, f[32] = J, f[33] = Y, f[34] = X) : X = f[34];
|
|
71
|
-
let Z;
|
|
72
|
-
f[35] !== U || f[36] !== z || f[37] !== w || f[38] !== I ? (Z = w && /* @__PURE__ */ a("div", {
|
|
73
|
-
className: "_89f1hw3",
|
|
74
|
-
children: /* @__PURE__ */ a(e, {
|
|
75
|
-
value: I,
|
|
76
|
-
type: "phone",
|
|
77
|
-
isVerified: z,
|
|
78
|
-
onVerifySuccess: U,
|
|
79
|
-
onStateChange: oe
|
|
80
|
-
})
|
|
81
|
-
}), f[35] = U, f[36] = z, f[37] = w, f[38] = I, f[39] = Z) : Z = f[39];
|
|
82
|
-
let Q;
|
|
83
|
-
f[40] !== X || f[41] !== Z ? (Q = /* @__PURE__ */ o("div", {
|
|
84
|
-
className: l,
|
|
85
|
-
children: [X, Z]
|
|
86
|
-
}), f[40] = X, f[41] = Z, f[42] = Q) : Q = f[42];
|
|
87
|
-
let $;
|
|
88
|
-
return f[43] !== R || f[44] !== x || f[45] !== L || f[46] !== b || f[47] !== C || f[48] !== S || f[49] !== Q ? ($ = /* @__PURE__ */ a(n, {
|
|
89
|
-
error: R,
|
|
90
|
-
helperText: x,
|
|
91
|
-
readOnly: S,
|
|
92
|
-
label: b,
|
|
93
|
-
htmlFor: C,
|
|
94
|
-
isRequired: L,
|
|
95
|
-
children: Q
|
|
96
|
-
}), f[43] = R, f[44] = x, f[45] = L, f[46] = b, f[47] = C, f[48] = S, f[49] = Q, f[50] = $) : $ = f[50], $;
|
|
97
|
-
};
|
|
98
|
-
//#endregion
|
|
99
|
-
export { d as PhoneWidget, d as default };
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { createContext as e, useContext as t, useEffect as n, useMemo as r, useRef as i } from "react";
|
|
2
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
-
import { c as o } from "react/compiler-runtime";
|
|
4
|
-
import s from "clsx";
|
|
5
|
-
import { createRuntimeFn as c } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
6
|
-
//#region ../../libraries/levocn/dist/styles/reset.cssm.js
|
|
7
|
-
var l = "_1er5g5a0", u = c({
|
|
8
|
-
defaultClassName: "_1a7d0ek1 _1a7d0ek0",
|
|
9
|
-
variantClassNames: {
|
|
10
|
-
variant: {
|
|
11
|
-
default: "_1a7d0ek2",
|
|
12
|
-
outline: "_1a7d0ek3",
|
|
13
|
-
secondary: "_1a7d0ek4",
|
|
14
|
-
ghost: "_1a7d0ek5",
|
|
15
|
-
destructive: "_1a7d0ek6",
|
|
16
|
-
link: "_1a7d0ek7"
|
|
17
|
-
},
|
|
18
|
-
size: {
|
|
19
|
-
default: "_1a7d0ek8",
|
|
20
|
-
xs: "_1a7d0ek9",
|
|
21
|
-
sm: "_1a7d0eka",
|
|
22
|
-
lg: "_1a7d0ekb",
|
|
23
|
-
icon: "_1a7d0ekc",
|
|
24
|
-
"icon-xs": "_1a7d0ekd",
|
|
25
|
-
"icon-sm": "_1a7d0eke",
|
|
26
|
-
"icon-lg": "_1a7d0ekf"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
defaultVariants: {
|
|
30
|
-
variant: "default",
|
|
31
|
-
size: "default"
|
|
32
|
-
},
|
|
33
|
-
compoundVariants: []
|
|
34
|
-
}), d = (e) => {
|
|
35
|
-
let t = o(14), n, r, i, c, l;
|
|
36
|
-
t[0] === e ? (n = t[1], r = t[2], i = t[3], c = t[4], l = t[5]) : ({className: n, variant: l, size: i, type: c, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = c, t[5] = l);
|
|
37
|
-
let d = c === void 0 ? "button" : c, f;
|
|
38
|
-
t[6] !== n || t[7] !== i || t[8] !== l ? (f = s(u({
|
|
39
|
-
variant: l,
|
|
40
|
-
size: i
|
|
41
|
-
}), n), t[6] = n, t[7] = i, t[8] = l, t[9] = f) : f = t[9];
|
|
42
|
-
let p;
|
|
43
|
-
return t[10] !== r || t[11] !== f || t[12] !== d ? (p = /* @__PURE__ */ a("button", {
|
|
44
|
-
"data-slot": "button",
|
|
45
|
-
type: d,
|
|
46
|
-
className: f,
|
|
47
|
-
...r
|
|
48
|
-
}), t[10] = r, t[11] = f, t[12] = d, t[13] = p) : p = t[13], p;
|
|
49
|
-
}, f = /* @__PURE__ */ new Set(), p = {}, m = e(null), h = () => {
|
|
50
|
-
let e = o(1), n = t(m);
|
|
51
|
-
if (!n) {
|
|
52
|
-
let t;
|
|
53
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = {
|
|
54
|
-
portalRef: { current: null },
|
|
55
|
-
classes: f,
|
|
56
|
-
overrides: p
|
|
57
|
-
}, e[0] = t) : t = e[0], t;
|
|
58
|
-
}
|
|
59
|
-
return n;
|
|
60
|
-
}, g = ({ children: e, cssReset: o, className: c, style: u, portalToThemeRoot: d, ...h }) => {
|
|
61
|
-
let g = t(m), _ = i(null), v = !g && o !== !1 ? l : "", y = g?.classes ?? f, b = g?.overrides ?? p, x = r(() => {
|
|
62
|
-
let e = c ? c.split(/\s+/).filter(Boolean) : [], t = new Set(y);
|
|
63
|
-
for (let n of e) t.add(n);
|
|
64
|
-
return {
|
|
65
|
-
portalRef: _,
|
|
66
|
-
classes: t,
|
|
67
|
-
overrides: {
|
|
68
|
-
...b,
|
|
69
|
-
...u
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
}, [
|
|
73
|
-
y,
|
|
74
|
-
c,
|
|
75
|
-
b,
|
|
76
|
-
u
|
|
77
|
-
]);
|
|
78
|
-
n(() => {
|
|
79
|
-
if (d) return;
|
|
80
|
-
let e = document.createElement("div");
|
|
81
|
-
return document.body.appendChild(e), _.current = e, () => {
|
|
82
|
-
document.body.removeChild(e), _.current = null;
|
|
83
|
-
};
|
|
84
|
-
}, [d]), n(() => {
|
|
85
|
-
if (d) return;
|
|
86
|
-
let e = _.current;
|
|
87
|
-
if (!e) return;
|
|
88
|
-
e.className = s(v, ...x.classes), e.style.cssText = "";
|
|
89
|
-
let t = {
|
|
90
|
-
display: "contents",
|
|
91
|
-
...x.overrides
|
|
92
|
-
};
|
|
93
|
-
for (let [n, r] of Object.entries(t)) r != null && e.style.setProperty(n, String(r));
|
|
94
|
-
}, [
|
|
95
|
-
x.classes,
|
|
96
|
-
x.overrides,
|
|
97
|
-
v,
|
|
98
|
-
d
|
|
99
|
-
]);
|
|
100
|
-
let S = s(v, ...c ? c.split(/\s+/).filter((e) => e && !y.has(e)) : []);
|
|
101
|
-
return /* @__PURE__ */ a(m.Provider, {
|
|
102
|
-
value: x,
|
|
103
|
-
children: /* @__PURE__ */ a("div", {
|
|
104
|
-
...d ? { ref: _ } : {},
|
|
105
|
-
...S ? { className: S } : {},
|
|
106
|
-
style: {
|
|
107
|
-
display: "contents",
|
|
108
|
-
...u
|
|
109
|
-
},
|
|
110
|
-
...h,
|
|
111
|
-
children: e
|
|
112
|
-
})
|
|
113
|
-
});
|
|
114
|
-
};
|
|
115
|
-
//#endregion
|
|
116
|
-
export { u as i, g as n, d as r, h as t };
|