@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.
- package/BillingStep-ByiYjJ0S.js +251 -0
- package/BookingCard-DdwLHVGw.js +816 -0
- package/CollectionLabel-CmUFfc_7.js +35 -0
- package/DateTimeWidget-Bk2tk_CT.js +254 -0
- package/{KBChatWidget-BMuZ-VI3.js → KBChatWidget-BXRRgelS.js} +1 -1
- package/{PhoneWidget-DPECohGT.js → PhoneWidget-FWE3jD_L.js} +3 -5
- package/{Popover-Cr0-X_ch.js → Popover-MSrVDAzg.js} +7 -7
- package/PopupBody-DWM55Zh5-B3ysApDM.js +158 -0
- package/PopupDialog-DwAAJ8JS-DkxjZaJL.js +260 -0
- package/PopupRenderer-BVtV4b9I-Dot4Syse.js +207 -0
- package/{RichTextWidget-C1QECDcg.js → RichTextWidget-KnIKESAD.js} +134 -135
- package/{RteThemeProvider-CMbSaFRQ.js → RteThemeProvider-DtTXGcCT.js} +2 -3
- package/Sonner-BsE4Y_t4.js +21 -0
- package/blog-content.js +8 -9
- package/dist-BVFCdirT.js +4471 -0
- package/dist-DEXGyFeH.js +376 -0
- package/index.js +12 -13
- package/{themeVars.cssm-ByhhC2Jm.js → inlineBaseTheme-DcNdMEYp.js} +35 -5
- package/{inlineCollectionTheme-CWcMCUti.js → inlineCollectionTheme-DjXuH3bK.js} +1 -1
- package/{inlineRteTheme-CRPtkNXy.js → inlineRteTheme-BYGIJM7P.js} +1 -1
- package/{kbChat-DtZ4vuCZ.js → kbChat-eFsau7hG.js} +2 -2
- package/package.json +23 -23
- package/{pillChrome-CEpWGNZB.js → pillChrome-Dy3ApFI5.js} +5 -5
- package/popups.js +1 -1
- package/{react-Cj_U6VZQ.js → react-CENbCy5d.js} +6 -5
- package/script.esm-uVCZU25S.js +62 -0
- package/start.js +1 -1
- package/styles.css +1 -1
- package/theme.cssm-iXnQwMCp.js +238 -0
- package/CollectionField-DCAXOmBN.js +0 -270
- package/CollectionInput-BJ__qcbk.js +0 -147
- package/DateTimeWidget-I0LvR-tO.js +0 -255
- package/Dialog-D-vRkU9N.js +0 -130
- package/LevoProvider-BkbKrvrI.js +0 -20
- package/PopupBody-BI-MJqmd-a-l3CaKZ.js +0 -159
- package/PopupRenderer-D66Gx63H-DpcNpbtU.js +0 -388
- package/ThemeProvider-DlFehjh1.js +0 -116
- package/Tooltip-BKQ5rIDh.js +0 -67
- package/VerifyButton-D0cj9Z5Q.js +0 -192
- package/createThemeExtension-4AUn51iJ.js +0 -15
- package/dist-IxiGbP-3.js +0 -3783
- package/dist-_lwl0kZw.js +0 -79
- package/inlineBaseTheme-BB9e6h5f.js +0 -9
- package/popupState-JmpeKzgM-D_77LiAa.js +0 -229
- package/react-B9yvlbH0.js +0 -74
- package/theme.cssm-DUzmx76l.js +0 -4
- package/usePopupRedirect-CAAdcpaW-BDa44PXN.js +0 -82
- /package/{content.cssm-XdMsTGIB.js → content.cssm-D_LSloGW.js} +0 -0
- /package/{es-CGQflL9T.js → es-CK20DkgT.js} +0 -0
- /package/{rolldown-runtime-CAFD8bLK.js → rolldown-runtime-Dy4uBu1J.js} +0 -0
- /package/{routes-CyKmkoRM.js → routes-DO1BLfh9.js} +0 -0
- /package/{rteTheme.cssm-W4gTOijw.js → rteTheme.cssm-BRxusHY4.js} +0 -0
- /package/{script.esm-wR2d7rrv.js → script.esm-D4nvz3-k.js} +0 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { c as e } from "react/compiler-runtime";
|
|
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, jsxs as c } from "react/jsx-runtime";
|
|
5
|
+
import { createRuntimeFn as l } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
6
|
+
import { IconX as u } from "@tabler/icons-react";
|
|
7
|
+
import { Dialog as d } from "@base-ui/react/dialog";
|
|
8
|
+
//#region ../../libraries/levocn/dist/ui/button/Button.cssm.js
|
|
9
|
+
var f = l({
|
|
10
|
+
defaultClassName: "_1a7d0ek1 _1a7d0ek0",
|
|
11
|
+
variantClassNames: {
|
|
12
|
+
variant: {
|
|
13
|
+
default: "_1a7d0ek2",
|
|
14
|
+
outline: "_1a7d0ek3",
|
|
15
|
+
secondary: "_1a7d0ek4",
|
|
16
|
+
ghost: "_1a7d0ek5",
|
|
17
|
+
destructive: "_1a7d0ek6",
|
|
18
|
+
link: "_1a7d0ek7"
|
|
19
|
+
},
|
|
20
|
+
size: {
|
|
21
|
+
default: "_1a7d0ek8",
|
|
22
|
+
xs: "_1a7d0ek9",
|
|
23
|
+
sm: "_1a7d0eka",
|
|
24
|
+
lg: "_1a7d0ekb",
|
|
25
|
+
icon: "_1a7d0ekc",
|
|
26
|
+
"icon-xs": "_1a7d0ekd",
|
|
27
|
+
"icon-sm": "_1a7d0eke",
|
|
28
|
+
"icon-lg": "_1a7d0ekf"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
variant: "default",
|
|
33
|
+
size: "default"
|
|
34
|
+
},
|
|
35
|
+
compoundVariants: []
|
|
36
|
+
}), p = (t) => {
|
|
37
|
+
let n = e(14), r, i, a, c, l;
|
|
38
|
+
n[0] === t ? (r = n[1], i = n[2], a = n[3], c = n[4], l = n[5]) : ({className: r, variant: l, size: a, type: c, ...i} = t, n[0] = t, n[1] = r, n[2] = i, n[3] = a, n[4] = c, n[5] = l);
|
|
39
|
+
let u = c === void 0 ? "button" : c, d;
|
|
40
|
+
n[6] !== r || n[7] !== a || n[8] !== l ? (d = o(f({
|
|
41
|
+
variant: l,
|
|
42
|
+
size: a
|
|
43
|
+
}), r), n[6] = r, n[7] = a, n[8] = l, n[9] = d) : d = n[9];
|
|
44
|
+
let p;
|
|
45
|
+
return n[10] !== i || n[11] !== d || n[12] !== u ? (p = /* @__PURE__ */ s("button", {
|
|
46
|
+
"data-slot": "button",
|
|
47
|
+
type: u,
|
|
48
|
+
className: d,
|
|
49
|
+
...i
|
|
50
|
+
}), n[10] = i, n[11] = d, n[12] = u, n[13] = p) : p = n[13], p;
|
|
51
|
+
}, m = "_1er5g5a0", h = /* @__PURE__ */ new Set(), g = {}, _ = t(null), v = () => {
|
|
52
|
+
let t = e(1), r = n(_);
|
|
53
|
+
if (!r) {
|
|
54
|
+
let e;
|
|
55
|
+
return t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = {
|
|
56
|
+
portalRef: { current: null },
|
|
57
|
+
classes: h,
|
|
58
|
+
overrides: g
|
|
59
|
+
}, t[0] = e) : e = t[0], e;
|
|
60
|
+
}
|
|
61
|
+
return r;
|
|
62
|
+
}, y = ({ children: e, cssReset: t, className: c, style: l, portalToThemeRoot: u, ...d }) => {
|
|
63
|
+
let f = n(_), p = a(null), v = !f && t !== !1 ? m : "", y = f?.classes ?? h, b = f?.overrides ?? g, x = i(() => {
|
|
64
|
+
let e = c ? c.split(/\s+/).filter(Boolean) : [], t = new Set(y);
|
|
65
|
+
for (let n of e) t.add(n);
|
|
66
|
+
return {
|
|
67
|
+
portalRef: p,
|
|
68
|
+
classes: t,
|
|
69
|
+
overrides: {
|
|
70
|
+
...b,
|
|
71
|
+
...l
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}, [
|
|
75
|
+
y,
|
|
76
|
+
c,
|
|
77
|
+
b,
|
|
78
|
+
l
|
|
79
|
+
]);
|
|
80
|
+
r(() => {
|
|
81
|
+
if (u) return;
|
|
82
|
+
let e = document.createElement("div");
|
|
83
|
+
return document.body.appendChild(e), p.current = e, () => {
|
|
84
|
+
document.body.removeChild(e), p.current = null;
|
|
85
|
+
};
|
|
86
|
+
}, [u]), r(() => {
|
|
87
|
+
if (u) return;
|
|
88
|
+
let e = p.current;
|
|
89
|
+
if (!e) return;
|
|
90
|
+
e.className = o(v, ...x.classes), e.style.cssText = "";
|
|
91
|
+
let t = {
|
|
92
|
+
display: "contents",
|
|
93
|
+
...x.overrides
|
|
94
|
+
};
|
|
95
|
+
for (let [n, r] of Object.entries(t)) r != null && e.style.setProperty(n, String(r));
|
|
96
|
+
}, [
|
|
97
|
+
x.classes,
|
|
98
|
+
x.overrides,
|
|
99
|
+
v,
|
|
100
|
+
u
|
|
101
|
+
]);
|
|
102
|
+
let S = o(v, ...c ? c.split(/\s+/).filter((e) => e && !y.has(e)) : []);
|
|
103
|
+
return /* @__PURE__ */ s(_.Provider, {
|
|
104
|
+
value: x,
|
|
105
|
+
children: /* @__PURE__ */ s("div", {
|
|
106
|
+
...u ? { ref: p } : {},
|
|
107
|
+
...S ? { className: S } : {},
|
|
108
|
+
style: {
|
|
109
|
+
display: "contents",
|
|
110
|
+
...l
|
|
111
|
+
},
|
|
112
|
+
...d,
|
|
113
|
+
children: e
|
|
114
|
+
})
|
|
115
|
+
});
|
|
116
|
+
}, b = "ch8h0x0", x = "ch8h0x1", S = "ch8h0x2", C = "ch8h0x3", w = "ch8h0x5", T = "ch8h0x6", E = (t) => {
|
|
117
|
+
let n = e(4), r;
|
|
118
|
+
n[0] === t ? r = n[1] : ({...r} = t, n[0] = t, n[1] = r);
|
|
119
|
+
let i;
|
|
120
|
+
return n[2] === r ? i = n[3] : (i = /* @__PURE__ */ s(d.Root, {
|
|
121
|
+
"data-slot": "dialog",
|
|
122
|
+
...r
|
|
123
|
+
}), n[2] = r, n[3] = i), i;
|
|
124
|
+
}, D = (t) => {
|
|
125
|
+
let n = e(5), r;
|
|
126
|
+
n[0] === t ? r = n[1] : ({...r} = t, n[0] = t, n[1] = r);
|
|
127
|
+
let { portalRef: i } = v(), a;
|
|
128
|
+
return n[2] !== i || n[3] !== r ? (a = /* @__PURE__ */ s(d.Portal, {
|
|
129
|
+
container: i,
|
|
130
|
+
...r
|
|
131
|
+
}), n[2] = i, n[3] = r, n[4] = a) : a = n[4], a;
|
|
132
|
+
}, O = (t) => {
|
|
133
|
+
let n = e(8), r, i;
|
|
134
|
+
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
135
|
+
let a;
|
|
136
|
+
n[3] === r ? a = n[4] : (a = o(x, r), n[3] = r, n[4] = a);
|
|
137
|
+
let c;
|
|
138
|
+
return n[5] !== i || n[6] !== a ? (c = /* @__PURE__ */ s(d.Viewport, {
|
|
139
|
+
"data-slot": "dialog-viewport",
|
|
140
|
+
className: a,
|
|
141
|
+
...i
|
|
142
|
+
}), n[5] = i, n[6] = a, n[7] = c) : c = n[7], c;
|
|
143
|
+
}, k = (t) => {
|
|
144
|
+
let n = e(10), r, i, a;
|
|
145
|
+
n[0] === t ? (r = n[1], i = n[2], a = n[3]) : ({variant: a, size: i, ...r} = t, n[0] = t, n[1] = r, n[2] = i, n[3] = a);
|
|
146
|
+
let o;
|
|
147
|
+
n[4] !== i || n[5] !== a ? (o = /* @__PURE__ */ s(p, {
|
|
148
|
+
variant: a,
|
|
149
|
+
size: i
|
|
150
|
+
}), n[4] = i, n[5] = a, n[6] = o) : o = n[6];
|
|
151
|
+
let c;
|
|
152
|
+
return n[7] !== r || n[8] !== o ? (c = /* @__PURE__ */ s(d.Close, {
|
|
153
|
+
"data-slot": "dialog-close",
|
|
154
|
+
render: o,
|
|
155
|
+
...r
|
|
156
|
+
}), n[7] = r, n[8] = o, n[9] = c) : c = n[9], c;
|
|
157
|
+
}, A = (t) => {
|
|
158
|
+
let n = e(8), r, i;
|
|
159
|
+
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
160
|
+
let a;
|
|
161
|
+
n[3] === r ? a = n[4] : (a = o(b, r), n[3] = r, n[4] = a);
|
|
162
|
+
let c;
|
|
163
|
+
return n[5] !== i || n[6] !== a ? (c = /* @__PURE__ */ s(d.Backdrop, {
|
|
164
|
+
"data-slot": "dialog-backdrop",
|
|
165
|
+
className: a,
|
|
166
|
+
...i
|
|
167
|
+
}), n[5] = i, n[6] = a, n[7] = c) : c = n[7], c;
|
|
168
|
+
}, j = (t) => {
|
|
169
|
+
let n = e(14), r, i, a, l;
|
|
170
|
+
n[0] === t ? (r = n[1], i = n[2], a = n[3], l = n[4]) : ({className: i, children: r, showCloseButton: l, ...a} = t, n[0] = t, n[1] = r, n[2] = i, n[3] = a, n[4] = l);
|
|
171
|
+
let f = l === void 0 ? !0 : l, m;
|
|
172
|
+
n[5] === i ? m = n[6] : (m = o(S, i), n[5] = i, n[6] = m);
|
|
173
|
+
let h;
|
|
174
|
+
n[7] === f ? h = n[8] : (h = f && /* @__PURE__ */ s(d.Close, {
|
|
175
|
+
"data-slot": "dialog-close",
|
|
176
|
+
render: /* @__PURE__ */ s(p, {
|
|
177
|
+
variant: "ghost",
|
|
178
|
+
size: "icon-sm",
|
|
179
|
+
className: "ch8h0x7",
|
|
180
|
+
"aria-label": "Close"
|
|
181
|
+
}),
|
|
182
|
+
children: /* @__PURE__ */ s(u, { size: 16 })
|
|
183
|
+
}), n[7] = f, n[8] = h);
|
|
184
|
+
let g;
|
|
185
|
+
return n[9] !== r || n[10] !== a || n[11] !== m || n[12] !== h ? (g = /* @__PURE__ */ c(d.Popup, {
|
|
186
|
+
"data-slot": "dialog-popup",
|
|
187
|
+
className: m,
|
|
188
|
+
...a,
|
|
189
|
+
children: [r, h]
|
|
190
|
+
}), n[9] = r, n[10] = a, n[11] = m, n[12] = h, n[13] = g) : g = n[13], g;
|
|
191
|
+
}, M = (t) => {
|
|
192
|
+
let n = e(8), r, i;
|
|
193
|
+
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
194
|
+
let a;
|
|
195
|
+
n[3] === r ? a = n[4] : (a = o(C, r), n[3] = r, n[4] = a);
|
|
196
|
+
let c;
|
|
197
|
+
return n[5] !== i || n[6] !== a ? (c = /* @__PURE__ */ s("div", {
|
|
198
|
+
"data-slot": "dialog-header",
|
|
199
|
+
className: a,
|
|
200
|
+
...i
|
|
201
|
+
}), n[5] = i, n[6] = a, n[7] = c) : c = n[7], c;
|
|
202
|
+
}, N = (t) => {
|
|
203
|
+
let n = e(8), r, i;
|
|
204
|
+
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
205
|
+
let a;
|
|
206
|
+
n[3] === r ? a = n[4] : (a = o(w, r), n[3] = r, n[4] = a);
|
|
207
|
+
let c;
|
|
208
|
+
return n[5] !== i || n[6] !== a ? (c = /* @__PURE__ */ s(d.Title, {
|
|
209
|
+
"data-slot": "dialog-title",
|
|
210
|
+
className: a,
|
|
211
|
+
...i
|
|
212
|
+
}), n[5] = i, n[6] = a, n[7] = c) : c = n[7], c;
|
|
213
|
+
}, P = (t) => {
|
|
214
|
+
let n = e(8), r, i;
|
|
215
|
+
n[0] === t ? (r = n[1], i = n[2]) : ({className: r, ...i} = t, n[0] = t, n[1] = r, n[2] = i);
|
|
216
|
+
let a;
|
|
217
|
+
n[3] === r ? a = n[4] : (a = o(T, r), n[3] = r, n[4] = a);
|
|
218
|
+
let c;
|
|
219
|
+
return n[5] !== i || n[6] !== a ? (c = /* @__PURE__ */ s(d.Description, {
|
|
220
|
+
"data-slot": "dialog-description",
|
|
221
|
+
className: a,
|
|
222
|
+
...i
|
|
223
|
+
}), n[5] = i, n[6] = a, n[7] = c) : c = n[7], c;
|
|
224
|
+
}, F = (t) => {
|
|
225
|
+
let n = e(11), r, i, a, o;
|
|
226
|
+
n[0] === t ? (r = n[1], i = n[2], a = n[3], o = n[4]) : ({className: i, children: r, showCloseButton: o, ...a} = t, n[0] = t, n[1] = r, n[2] = i, n[3] = a, n[4] = o);
|
|
227
|
+
let l = o === void 0 ? !0 : o, u;
|
|
228
|
+
n[5] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ s(A, {}), n[5] = u) : u = n[5];
|
|
229
|
+
let d;
|
|
230
|
+
return n[6] !== r || n[7] !== i || n[8] !== a || n[9] !== l ? (d = /* @__PURE__ */ c(D, { children: [u, /* @__PURE__ */ s(O, { children: /* @__PURE__ */ s(j, {
|
|
231
|
+
className: i,
|
|
232
|
+
showCloseButton: l,
|
|
233
|
+
...a,
|
|
234
|
+
children: r
|
|
235
|
+
}) })] }), n[6] = r, n[7] = i, n[8] = a, n[9] = l, n[10] = d) : d = n[10], d;
|
|
236
|
+
}, I = "_1bi3v3x0";
|
|
237
|
+
//#endregion
|
|
238
|
+
export { N as a, d as c, O as d, v as f, f as h, P as i, D as l, p as m, M as n, k as o, y as p, F as r, E as s, I as t, A as u };
|
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
import { FieldInterfaces as e } from "@levo-so/core";
|
|
2
|
-
import { c as t } from "react/compiler-runtime";
|
|
3
|
-
import { isValidPhoneNumber as n } from "react-phone-number-input";
|
|
4
|
-
import * as r from "yup";
|
|
5
|
-
import i, { clsx as a } from "clsx";
|
|
6
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
-
import { createRuntimeFn as c } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
8
|
-
import { Separator as l } from "@base-ui/react/separator";
|
|
9
|
-
//#region ../../libraries/react-collection/dist/components/collectionField/CollectionField.cssm.js
|
|
10
|
-
var u = "_1ompjs11", d = "_1d7f2b80", f = (e) => {
|
|
11
|
-
let n = t(8), r, a;
|
|
12
|
-
n[0] === e ? (r = n[1], a = n[2]) : ({className: r, ...a} = e, n[0] = e, n[1] = r, n[2] = a);
|
|
13
|
-
let s;
|
|
14
|
-
n[3] === r ? s = n[4] : (s = i(d, r), n[3] = r, n[4] = s);
|
|
15
|
-
let c;
|
|
16
|
-
return n[5] !== a || n[6] !== s ? (c = /* @__PURE__ */ o("label", {
|
|
17
|
-
"data-slot": "label",
|
|
18
|
-
className: s,
|
|
19
|
-
...a
|
|
20
|
-
}), n[5] = a, n[6] = s, n[7] = c) : c = n[7], c;
|
|
21
|
-
};
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region ../../libraries/react-collection/dist/components/collectionLabel/CollectionLabel.js
|
|
24
|
-
function p(e) {
|
|
25
|
-
let n = t(6), { label: r, isRequired: i, htmlFor: a } = e;
|
|
26
|
-
if (!r) return null;
|
|
27
|
-
let c;
|
|
28
|
-
n[0] === i ? c = n[1] : (c = i && /* @__PURE__ */ o("span", {
|
|
29
|
-
className: "_1ompjs10",
|
|
30
|
-
children: "*"
|
|
31
|
-
}), n[0] = i, n[1] = c);
|
|
32
|
-
let l;
|
|
33
|
-
return n[2] !== a || n[3] !== r || n[4] !== c ? (l = /* @__PURE__ */ s(f, {
|
|
34
|
-
htmlFor: a,
|
|
35
|
-
className: u,
|
|
36
|
-
children: [r, c]
|
|
37
|
-
}), n[2] = a, n[3] = r, n[4] = c, n[5] = l) : l = n[5], l;
|
|
38
|
-
}
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region ../../libraries/react-collection/dist/utils/getFieldValidations.js
|
|
41
|
-
var m = (t, i) => {
|
|
42
|
-
let a = (t?.label || t?.key || "")?.replace(/_/g, " ");
|
|
43
|
-
if (a?.endsWith("Id") && (a = a?.replace("Id", "")), a.includes(".")) {
|
|
44
|
-
let [e] = a.split(".");
|
|
45
|
-
e && (a = e);
|
|
46
|
-
}
|
|
47
|
-
let o = (e) => {
|
|
48
|
-
let n = e;
|
|
49
|
-
return t.max !== void 0 && t.max !== null && t.max !== "" && (n = n.max(Number(t.max), `The ${a} value is too large (max ${t.max})`)), t.min !== void 0 && t.min !== null && t.min !== "" && (n = n.min(Number(t.min), `The ${a} value is too small (min ${t.min})`)), n;
|
|
50
|
-
}, s;
|
|
51
|
-
switch (t.field_interface) {
|
|
52
|
-
case e.NumberWidget:
|
|
53
|
-
s = o(r.number());
|
|
54
|
-
break;
|
|
55
|
-
case e.ArrayWidget:
|
|
56
|
-
s = o(r.array().typeError("The field must be an array"));
|
|
57
|
-
break;
|
|
58
|
-
case e.RecordWidget:
|
|
59
|
-
s = r.object();
|
|
60
|
-
break;
|
|
61
|
-
case e.EmailWidget:
|
|
62
|
-
s = o(r.string().email("The email address is not valid"));
|
|
63
|
-
break;
|
|
64
|
-
case e.PhoneWidget:
|
|
65
|
-
s = o(r.string().test("phone", "The phone number has incorrect format", (e) => {
|
|
66
|
-
if (e) try {
|
|
67
|
-
return n(e);
|
|
68
|
-
} catch {
|
|
69
|
-
return !1;
|
|
70
|
-
}
|
|
71
|
-
return !0;
|
|
72
|
-
}));
|
|
73
|
-
break;
|
|
74
|
-
case e.URLWidget:
|
|
75
|
-
s = o(r.string().matches(/^(?:https?:\/\/)?(?:[a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+(?:\.[a-zA-Z]{2,})+(?:\/[^\s?#]*)?(?:\?[^\s]*)?$/, "The URL is not valid"));
|
|
76
|
-
break;
|
|
77
|
-
case e.ImageUploadWidget:
|
|
78
|
-
case e.FileUploadWidget:
|
|
79
|
-
case e.GeocoderWidget:
|
|
80
|
-
s = r.object();
|
|
81
|
-
break;
|
|
82
|
-
case e.MultiImageUploadWidget:
|
|
83
|
-
case e.MultiFileUploadWidget:
|
|
84
|
-
case e.MultiGeocoderWidget:
|
|
85
|
-
s = r.array().of(r.object());
|
|
86
|
-
break;
|
|
87
|
-
case e.JSONWidget:
|
|
88
|
-
case e.DropdownWidget:
|
|
89
|
-
s = r.string();
|
|
90
|
-
break;
|
|
91
|
-
case e.MultiTextWidget:
|
|
92
|
-
case e.MultiDropdownWidget:
|
|
93
|
-
case e.CheckboxWidget:
|
|
94
|
-
s = r.array().of(r.string());
|
|
95
|
-
break;
|
|
96
|
-
case e.ToggleCheckboxWidget:
|
|
97
|
-
s = r.boolean();
|
|
98
|
-
break;
|
|
99
|
-
case e.CollectionWidget:
|
|
100
|
-
s = t.options.current_have_many_connected ? r.array() : r.object();
|
|
101
|
-
break;
|
|
102
|
-
default:
|
|
103
|
-
s = o(r.string());
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
if (t.options?.validationsPresets && Array.isArray(t.options.validationsPresets)) {
|
|
107
|
-
let n = t.options.validationsPresets;
|
|
108
|
-
(t.field_interface === e.TextWidget || t.field_interface === e.TextareaWidget) && (n.includes("exclude_special_chars") && (s = s.matches(/^[a-zA-Z0-9\s]*$/, "Special characters are not allowed")), n.includes("exclude_numbers") && (s = s.matches(/^[^0-9]*$/, "Numbers are not allowed")));
|
|
109
|
-
}
|
|
110
|
-
return {
|
|
111
|
-
required: {
|
|
112
|
-
value: !!t?.required,
|
|
113
|
-
message: `The ${a} field is required`
|
|
114
|
-
},
|
|
115
|
-
validate: (e) => {
|
|
116
|
-
if (t?.options?.disableValidation || e === "" || e == null) return !0;
|
|
117
|
-
try {
|
|
118
|
-
return s.validateSync(e), i ? i(e) : !0;
|
|
119
|
-
} catch (e) {
|
|
120
|
-
return e instanceof r.ValidationError ? e.message : !0;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
}, h = c({
|
|
125
|
-
defaultClassName: "_11sljvf3",
|
|
126
|
-
variantClassNames: { orientation: {
|
|
127
|
-
vertical: "_11sljvf4",
|
|
128
|
-
horizontal: "_11sljvf5"
|
|
129
|
-
} },
|
|
130
|
-
defaultVariants: { orientation: "vertical" },
|
|
131
|
-
compoundVariants: []
|
|
132
|
-
}), g = "_11sljvf9", _ = "_11sljvfc", v = "_11sljvfd", y = c({
|
|
133
|
-
defaultClassName: "d292um0",
|
|
134
|
-
variantClassNames: { orientation: {
|
|
135
|
-
horizontal: "d292um1",
|
|
136
|
-
vertical: "d292um2"
|
|
137
|
-
} },
|
|
138
|
-
defaultVariants: {},
|
|
139
|
-
compoundVariants: []
|
|
140
|
-
});
|
|
141
|
-
//#endregion
|
|
142
|
-
//#region ../../libraries/levocn/dist/ui/separator/Separator.js
|
|
143
|
-
function b(e) {
|
|
144
|
-
let n = t(11), r, a, s;
|
|
145
|
-
n[0] === e ? (r = n[1], a = n[2], s = n[3]) : ({className: r, orientation: s, ...a} = e, n[0] = e, n[1] = r, n[2] = a, n[3] = s);
|
|
146
|
-
let c = s === void 0 ? "horizontal" : s, u;
|
|
147
|
-
n[4] !== r || n[5] !== c ? (u = i(y({ orientation: c }), r), n[4] = r, n[5] = c, n[6] = u) : u = n[6];
|
|
148
|
-
let d;
|
|
149
|
-
return n[7] !== c || n[8] !== a || n[9] !== u ? (d = /* @__PURE__ */ o(l, {
|
|
150
|
-
"data-slot": "separator",
|
|
151
|
-
orientation: c,
|
|
152
|
-
className: u,
|
|
153
|
-
...a
|
|
154
|
-
}), n[7] = c, n[8] = a, n[9] = u, n[10] = d) : d = n[10], d;
|
|
155
|
-
}
|
|
156
|
-
//#endregion
|
|
157
|
-
//#region ../../libraries/levocn/dist/ui/field/Field.js
|
|
158
|
-
function x(e) {
|
|
159
|
-
let n = t(11), r, i, s;
|
|
160
|
-
n[0] === e ? (r = n[1], i = n[2], s = n[3]) : ({className: r, orientation: s, ...i} = e, n[0] = e, n[1] = r, n[2] = i, n[3] = s);
|
|
161
|
-
let c = s === void 0 ? "vertical" : s, l;
|
|
162
|
-
n[4] !== r || n[5] !== c ? (l = a(h({ orientation: c }), r), n[4] = r, n[5] = c, n[6] = l) : l = n[6];
|
|
163
|
-
let u;
|
|
164
|
-
return n[7] !== c || n[8] !== i || n[9] !== l ? (u = /* @__PURE__ */ o("div", {
|
|
165
|
-
role: "group",
|
|
166
|
-
"data-slot": "field",
|
|
167
|
-
"data-orientation": c,
|
|
168
|
-
className: l,
|
|
169
|
-
...i
|
|
170
|
-
}), n[7] = c, n[8] = i, n[9] = l, n[10] = u) : u = n[10], u;
|
|
171
|
-
}
|
|
172
|
-
function S(e) {
|
|
173
|
-
let n = t(8), r, i;
|
|
174
|
-
n[0] === e ? (r = n[1], i = n[2]) : ({className: r, ...i} = e, n[0] = e, n[1] = r, n[2] = i);
|
|
175
|
-
let s;
|
|
176
|
-
n[3] === r ? s = n[4] : (s = a(g, r), n[3] = r, n[4] = s);
|
|
177
|
-
let c;
|
|
178
|
-
return n[5] !== i || n[6] !== s ? (c = /* @__PURE__ */ o("p", {
|
|
179
|
-
"data-slot": "field-description",
|
|
180
|
-
className: s,
|
|
181
|
-
...i
|
|
182
|
-
}), n[5] = i, n[6] = s, n[7] = c) : c = n[7], c;
|
|
183
|
-
}
|
|
184
|
-
function C(e) {
|
|
185
|
-
let n = t(15), r, i, s, c;
|
|
186
|
-
n[0] === e ? (r = n[1], i = n[2], s = n[3], c = n[4]) : ({className: i, children: r, errors: s, ...c} = e, n[0] = e, n[1] = r, n[2] = i, n[3] = s, n[4] = c);
|
|
187
|
-
let l;
|
|
188
|
-
bb0: {
|
|
189
|
-
if (r) {
|
|
190
|
-
l = r;
|
|
191
|
-
break bb0;
|
|
192
|
-
}
|
|
193
|
-
if (!s?.length) {
|
|
194
|
-
l = null;
|
|
195
|
-
break bb0;
|
|
196
|
-
}
|
|
197
|
-
let e;
|
|
198
|
-
n[5] === s ? e = n[6] : (e = [...new Map(s.map(T)).values()], n[5] = s, n[6] = e);
|
|
199
|
-
let t = e;
|
|
200
|
-
if (t.length === 1) {
|
|
201
|
-
l = t[0]?.message;
|
|
202
|
-
break bb0;
|
|
203
|
-
}
|
|
204
|
-
let i;
|
|
205
|
-
n[7] === t ? i = n[8] : (i = /* @__PURE__ */ o("ul", {
|
|
206
|
-
className: v,
|
|
207
|
-
children: t.map(w)
|
|
208
|
-
}), n[7] = t, n[8] = i), l = i;
|
|
209
|
-
}
|
|
210
|
-
let u = l;
|
|
211
|
-
if (!u) return null;
|
|
212
|
-
let d;
|
|
213
|
-
n[9] === i ? d = n[10] : (d = a(_, i), n[9] = i, n[10] = d);
|
|
214
|
-
let f;
|
|
215
|
-
return n[11] !== u || n[12] !== c || n[13] !== d ? (f = /* @__PURE__ */ o("div", {
|
|
216
|
-
role: "alert",
|
|
217
|
-
"data-slot": "field-error",
|
|
218
|
-
className: d,
|
|
219
|
-
...c,
|
|
220
|
-
children: u
|
|
221
|
-
}), n[11] = u, n[12] = c, n[13] = d, n[14] = f) : f = n[14], f;
|
|
222
|
-
}
|
|
223
|
-
function w(e, t) {
|
|
224
|
-
return e?.message && /* @__PURE__ */ o("li", { children: e.message }, t);
|
|
225
|
-
}
|
|
226
|
-
function T(e) {
|
|
227
|
-
return [e?.message, e];
|
|
228
|
-
}
|
|
229
|
-
//#endregion
|
|
230
|
-
//#region ../../libraries/react-collection/dist/components/collectionField/CollectionField.js
|
|
231
|
-
function E(e) {
|
|
232
|
-
let n = t(21), { label: r, error: a, helperText: c, topHelperText: l, isRequired: u, readOnly: d, htmlFor: f, className: m, children: h, ref: g } = e, _ = d && "_1ompjs14", v;
|
|
233
|
-
n[0] !== m || n[1] !== _ ? (v = i(_, m), n[0] = m, n[1] = _, n[2] = v) : v = n[2];
|
|
234
|
-
let y;
|
|
235
|
-
n[3] !== f || n[4] !== u || n[5] !== r ? (y = /* @__PURE__ */ o(p, {
|
|
236
|
-
label: r,
|
|
237
|
-
isRequired: u,
|
|
238
|
-
htmlFor: f
|
|
239
|
-
}), n[3] = f, n[4] = u, n[5] = r, n[6] = y) : y = n[6];
|
|
240
|
-
let b;
|
|
241
|
-
n[7] === l ? b = n[8] : (b = !!l && /* @__PURE__ */ o(S, {
|
|
242
|
-
className: "_1ompjs12",
|
|
243
|
-
children: l
|
|
244
|
-
}), n[7] = l, n[8] = b);
|
|
245
|
-
let w;
|
|
246
|
-
n[9] === a ? w = n[10] : (w = !!a && /* @__PURE__ */ o(C, {
|
|
247
|
-
className: "_1ompjs13",
|
|
248
|
-
children: a
|
|
249
|
-
}), n[9] = a, n[10] = w);
|
|
250
|
-
let T;
|
|
251
|
-
n[11] === c ? T = n[12] : (T = !!c && /* @__PURE__ */ o(S, {
|
|
252
|
-
className: "_1ompjs12",
|
|
253
|
-
children: c
|
|
254
|
-
}), n[11] = c, n[12] = T);
|
|
255
|
-
let E;
|
|
256
|
-
return n[13] !== h || n[14] !== g || n[15] !== v || n[16] !== y || n[17] !== b || n[18] !== w || n[19] !== T ? (E = /* @__PURE__ */ s(x, {
|
|
257
|
-
ref: g,
|
|
258
|
-
orientation: "vertical",
|
|
259
|
-
className: v,
|
|
260
|
-
children: [
|
|
261
|
-
y,
|
|
262
|
-
b,
|
|
263
|
-
h,
|
|
264
|
-
w,
|
|
265
|
-
T
|
|
266
|
-
]
|
|
267
|
-
}), n[13] = h, n[14] = g, n[15] = v, n[16] = y, n[17] = b, n[18] = w, n[19] = T, n[20] = E) : E = n[20], E;
|
|
268
|
-
}
|
|
269
|
-
//#endregion
|
|
270
|
-
export { f as a, p as i, b as n, m as r, E as t };
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { c as e } from "react/compiler-runtime";
|
|
2
|
-
import t from "clsx";
|
|
3
|
-
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
-
import { createRuntimeFn as i } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
5
|
-
import { Input as a } from "@base-ui/react/input";
|
|
6
|
-
//#region ../../libraries/react-collection/dist/components/collectionInput/CollectionInput.cssm.js
|
|
7
|
-
var o = "_1ri7vba0", s = "_1ri7vba1", c = "_1ri7vba2", l = "_1oiks600";
|
|
8
|
-
//#endregion
|
|
9
|
-
//#region ../../libraries/levocn/dist/ui/input/Input.js
|
|
10
|
-
function u(r) {
|
|
11
|
-
let i = e(10), o, s, c;
|
|
12
|
-
i[0] === r ? (o = i[1], s = i[2], c = i[3]) : ({className: o, type: c, ...s} = r, i[0] = r, i[1] = o, i[2] = s, i[3] = c);
|
|
13
|
-
let u;
|
|
14
|
-
i[4] === o ? u = i[5] : (u = t(l, o), i[4] = o, i[5] = u);
|
|
15
|
-
let d;
|
|
16
|
-
return i[6] !== s || i[7] !== u || i[8] !== c ? (d = /* @__PURE__ */ n(a, {
|
|
17
|
-
type: c,
|
|
18
|
-
"data-slot": "input",
|
|
19
|
-
className: u,
|
|
20
|
-
...s
|
|
21
|
-
}), i[6] = s, i[7] = u, i[8] = c, i[9] = d) : d = i[9], d;
|
|
22
|
-
}
|
|
23
|
-
i({
|
|
24
|
-
defaultClassName: "_1tb8brf0",
|
|
25
|
-
variantClassNames: { size: {
|
|
26
|
-
xs: "_1tb8brf1",
|
|
27
|
-
sm: "_1tb8brf2",
|
|
28
|
-
"icon-xs": "_1tb8brf3",
|
|
29
|
-
"icon-sm": "_1tb8brf4"
|
|
30
|
-
} },
|
|
31
|
-
defaultVariants: { size: "xs" },
|
|
32
|
-
compoundVariants: []
|
|
33
|
-
});
|
|
34
|
-
//#endregion
|
|
35
|
-
//#region ../../libraries/levocn/dist/ui/inputGroup/InputGroup.cssm.js
|
|
36
|
-
var d = "_1tb8brf6", f = i({
|
|
37
|
-
defaultClassName: "_1tb8brf8",
|
|
38
|
-
variantClassNames: { align: {
|
|
39
|
-
"inline-start": "_1tb8brf9",
|
|
40
|
-
"inline-end": "_1tb8brfa",
|
|
41
|
-
"block-start": "_1tb8brfb",
|
|
42
|
-
"block-end": "_1tb8brfc"
|
|
43
|
-
} },
|
|
44
|
-
defaultVariants: { align: "inline-start" },
|
|
45
|
-
compoundVariants: []
|
|
46
|
-
}), p = "_1tb8brfd", m = "_1153z670";
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region ../../libraries/levocn/dist/ui/textarea/Textarea.js
|
|
49
|
-
function h(r) {
|
|
50
|
-
let i = e(8), a, o;
|
|
51
|
-
i[0] === r ? (a = i[1], o = i[2]) : ({className: a, ...o} = r, i[0] = r, i[1] = a, i[2] = o);
|
|
52
|
-
let s;
|
|
53
|
-
i[3] === a ? s = i[4] : (s = t(m, a), i[3] = a, i[4] = s);
|
|
54
|
-
let c;
|
|
55
|
-
return i[5] !== o || i[6] !== s ? (c = /* @__PURE__ */ n("textarea", {
|
|
56
|
-
"data-slot": "textarea",
|
|
57
|
-
className: s,
|
|
58
|
-
...o
|
|
59
|
-
}), i[5] = o, i[6] = s, i[7] = c) : c = i[7], c;
|
|
60
|
-
}
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region ../../libraries/levocn/dist/ui/inputGroup/InputGroup.js
|
|
63
|
-
function g(r) {
|
|
64
|
-
let i = e(8), a, o;
|
|
65
|
-
i[0] === r ? (a = i[1], o = i[2]) : ({className: a, ...o} = r, i[0] = r, i[1] = a, i[2] = o);
|
|
66
|
-
let s;
|
|
67
|
-
i[3] === a ? s = i[4] : (s = t(d, a), i[3] = a, i[4] = s);
|
|
68
|
-
let c;
|
|
69
|
-
return i[5] !== o || i[6] !== s ? (c = /* @__PURE__ */ n(u, {
|
|
70
|
-
"data-slot": "input-group-control",
|
|
71
|
-
className: s,
|
|
72
|
-
...o
|
|
73
|
-
}), i[5] = o, i[6] = s, i[7] = c) : c = i[7], c;
|
|
74
|
-
}
|
|
75
|
-
function _(r) {
|
|
76
|
-
let i = e(11), a, o, s;
|
|
77
|
-
i[0] === r ? (a = i[1], o = i[2], s = i[3]) : ({className: a, align: s, ...o} = r, i[0] = r, i[1] = a, i[2] = o, i[3] = s);
|
|
78
|
-
let c = s === void 0 ? "inline-start" : s, l;
|
|
79
|
-
i[4] !== c || i[5] !== a ? (l = t(f({ align: c }), a), i[4] = c, i[5] = a, i[6] = l) : l = i[6];
|
|
80
|
-
let u;
|
|
81
|
-
return i[7] !== c || i[8] !== o || i[9] !== l ? (u = /* @__PURE__ */ n("div", {
|
|
82
|
-
role: "group",
|
|
83
|
-
"data-slot": "input-group-addon",
|
|
84
|
-
"data-align": c,
|
|
85
|
-
className: l,
|
|
86
|
-
onClick: v,
|
|
87
|
-
...o
|
|
88
|
-
}), i[7] = c, i[8] = o, i[9] = l, i[10] = u) : u = i[10], u;
|
|
89
|
-
}
|
|
90
|
-
function v(e) {
|
|
91
|
-
e.target.closest("button") || e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
92
|
-
}
|
|
93
|
-
function y(r) {
|
|
94
|
-
let i = e(8), a, o;
|
|
95
|
-
i[0] === r ? (a = i[1], o = i[2]) : ({className: a, ...o} = r, i[0] = r, i[1] = a, i[2] = o);
|
|
96
|
-
let s;
|
|
97
|
-
i[3] === a ? s = i[4] : (s = t(p, a), i[3] = a, i[4] = s);
|
|
98
|
-
let c;
|
|
99
|
-
return i[5] !== o || i[6] !== s ? (c = /* @__PURE__ */ n("div", {
|
|
100
|
-
"data-slot": "input-group",
|
|
101
|
-
role: "group",
|
|
102
|
-
className: s,
|
|
103
|
-
...o
|
|
104
|
-
}), i[5] = o, i[6] = s, i[7] = c) : c = i[7], c;
|
|
105
|
-
}
|
|
106
|
-
//#endregion
|
|
107
|
-
//#region ../../libraries/react-collection/dist/components/collectionInput/CollectionInput.js
|
|
108
|
-
function b(i) {
|
|
109
|
-
let a = e(23), l, d, f, p;
|
|
110
|
-
if (a[0] === i ? (l = a[1], d = a[2], f = a[3], p = a[4]) : ({leftIcon: d, rightIcon: p, className: l, ...f} = i, a[0] = i, a[1] = l, a[2] = d, a[3] = f, a[4] = p), !d && !p) {
|
|
111
|
-
let e;
|
|
112
|
-
a[5] === l ? e = a[6] : (e = t(o, l), a[5] = l, a[6] = e);
|
|
113
|
-
let r;
|
|
114
|
-
return a[7] !== f || a[8] !== e ? (r = /* @__PURE__ */ n(u, {
|
|
115
|
-
className: e,
|
|
116
|
-
...f
|
|
117
|
-
}), a[7] = f, a[8] = e, a[9] = r) : r = a[9], r;
|
|
118
|
-
}
|
|
119
|
-
let m;
|
|
120
|
-
a[10] === l ? m = a[11] : (m = t(s, l), a[10] = l, a[11] = m);
|
|
121
|
-
let h;
|
|
122
|
-
a[12] === d ? h = a[13] : (h = d && /* @__PURE__ */ n(_, {
|
|
123
|
-
align: "inline-start",
|
|
124
|
-
children: d
|
|
125
|
-
}), a[12] = d, a[13] = h);
|
|
126
|
-
let v;
|
|
127
|
-
a[14] === f ? v = a[15] : (v = /* @__PURE__ */ n(g, {
|
|
128
|
-
className: c,
|
|
129
|
-
...f
|
|
130
|
-
}), a[14] = f, a[15] = v);
|
|
131
|
-
let b;
|
|
132
|
-
a[16] === p ? b = a[17] : (b = p && /* @__PURE__ */ n(_, {
|
|
133
|
-
align: "inline-end",
|
|
134
|
-
children: p
|
|
135
|
-
}), a[16] = p, a[17] = b);
|
|
136
|
-
let x;
|
|
137
|
-
return a[18] !== m || a[19] !== h || a[20] !== v || a[21] !== b ? (x = /* @__PURE__ */ r(y, {
|
|
138
|
-
className: m,
|
|
139
|
-
children: [
|
|
140
|
-
h,
|
|
141
|
-
v,
|
|
142
|
-
b
|
|
143
|
-
]
|
|
144
|
-
}), a[18] = m, a[19] = h, a[20] = v, a[21] = b, a[22] = x) : x = a[22], x;
|
|
145
|
-
}
|
|
146
|
-
//#endregion
|
|
147
|
-
export { o as i, h as n, l as r, b as t };
|