@levo-so/site-runtime 0.2.2 → 0.2.3
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-CzS-34zx.js +270 -0
- package/DateTimeWidget-C1jHOtz7.js +255 -0
- package/Dialog-CzVhHLEY.js +145 -0
- package/KBChatWidget-h3xW6Q4I.js +1067 -0
- package/{PhoneWidget-vtDO9CFq.js → PhoneWidget-_nw97rkI.js} +5 -5
- package/{Popover-B76-bN-a.js → Popover-q5dL7y0W.js} +1 -1
- package/PopupRenderer-Bncp54gB-DuCULkBK.js +3514 -0
- package/RichTextWidget-D-mGlES0.js +758 -0
- package/ThemeProvider-BQmIB5tr.js +116 -0
- package/Tooltip-BIgrpetu.js +67 -0
- package/VerifyButton-BkP98H17.js +191 -0
- package/dist-CJknSbJK.js +80 -0
- package/dist-DBbiX2ST.js +3556 -0
- package/index.d.ts +146 -13
- package/index.js +717 -4219
- package/inlineBaseTheme-DS-AfUHi.js +9 -0
- package/inlineCollectionTheme-D2w17LHX.js +86 -0
- package/kbChat-DHujgETt.js +163 -0
- package/nodeAlignment-Cn6xNtOP.js +166 -0
- package/package.json +15 -3
- package/pillChrome-DWHpfbDk.js +16 -0
- package/popups.d.ts +47 -0
- package/popups.js +5 -0
- package/rolldown-runtime-CAFD8bLK.js +11 -0
- package/styles.css +1 -1
- package/theme.cssm-2YTdd8Yh.js +15 -0
- package/DateTimeWidget-CARoq7bQ.js +0 -254
- package/RichTextWidget-CafZBEKI.js +0 -912
- package/ThemeProvider-Cm2jJC7a.js +0 -381
- package/Tooltip-Bx-BfR7T.js +0 -78
- package/VerifyButton-D1Mwk04d.js +0 -299
- /package/{CollectionInput-5QMoXahu.js → CollectionInput-B1qV4QEH.js} +0 -0
|
@@ -1,381 +0,0 @@
|
|
|
1
|
-
import { FieldInterfaces as e } from "@levo-so/core";
|
|
2
|
-
import { createContext as t, useContext as n, useEffect as r, useMemo as i, useRef as a } from "react";
|
|
3
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
4
|
-
import { isValidPhoneNumber as c } from "react-phone-number-input";
|
|
5
|
-
import * as l from "yup";
|
|
6
|
-
import { c as u } from "react/compiler-runtime";
|
|
7
|
-
import d, { clsx as f } from "clsx";
|
|
8
|
-
import { createRuntimeFn as p } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
9
|
-
import { Separator as m } from "@base-ui/react/separator";
|
|
10
|
-
//#region ../../libraries/levocn/dist/styles/reset.cssm.js
|
|
11
|
-
var h = "_1er5g5a0", g = "_1ompjs11", _ = "_1d7f2b80", v = (e) => {
|
|
12
|
-
let t = u(8), n, r;
|
|
13
|
-
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
14
|
-
let i;
|
|
15
|
-
t[3] === n ? i = t[4] : (i = d(_, n), t[3] = n, t[4] = i);
|
|
16
|
-
let a;
|
|
17
|
-
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ o("label", {
|
|
18
|
-
"data-slot": "label",
|
|
19
|
-
className: i,
|
|
20
|
-
...r
|
|
21
|
-
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
22
|
-
};
|
|
23
|
-
//#endregion
|
|
24
|
-
//#region ../../libraries/react-collection/dist/components/collectionLabel/CollectionLabel.js
|
|
25
|
-
function y(e) {
|
|
26
|
-
let t = u(6), { label: n, isRequired: r, htmlFor: i } = e;
|
|
27
|
-
if (!n) return null;
|
|
28
|
-
let a;
|
|
29
|
-
t[0] === r ? a = t[1] : (a = r && /* @__PURE__ */ o("span", {
|
|
30
|
-
className: "_1ompjs10",
|
|
31
|
-
children: "*"
|
|
32
|
-
}), t[0] = r, t[1] = a);
|
|
33
|
-
let c;
|
|
34
|
-
return t[2] !== i || t[3] !== n || t[4] !== a ? (c = /* @__PURE__ */ s(v, {
|
|
35
|
-
htmlFor: i,
|
|
36
|
-
className: g,
|
|
37
|
-
children: [n, a]
|
|
38
|
-
}), t[2] = i, t[3] = n, t[4] = a, t[5] = c) : c = t[5], c;
|
|
39
|
-
}
|
|
40
|
-
//#endregion
|
|
41
|
-
//#region ../../libraries/react-collection/dist/utils/getFieldValidations.js
|
|
42
|
-
var b = (t, n) => {
|
|
43
|
-
let r = (t?.label || t?.key || "")?.replace(/_/g, " ");
|
|
44
|
-
if (r?.endsWith("Id") && (r = r?.replace("Id", "")), r.includes(".")) {
|
|
45
|
-
let [e] = r.split(".");
|
|
46
|
-
e && (r = e);
|
|
47
|
-
}
|
|
48
|
-
let i = (e) => {
|
|
49
|
-
let n = e;
|
|
50
|
-
return t.max !== void 0 && t.max !== null && t.max !== "" && (n = n.max(Number(t.max), `The ${r} value is too large (max ${t.max})`)), t.min !== void 0 && t.min !== null && t.min !== "" && (n = n.min(Number(t.min), `The ${r} value is too small (min ${t.min})`)), n;
|
|
51
|
-
}, a;
|
|
52
|
-
switch (t.field_interface) {
|
|
53
|
-
case e.NumberWidget:
|
|
54
|
-
a = i(l.number());
|
|
55
|
-
break;
|
|
56
|
-
case e.ArrayWidget:
|
|
57
|
-
a = i(l.array().typeError("The field must be an array"));
|
|
58
|
-
break;
|
|
59
|
-
case e.RecordWidget:
|
|
60
|
-
a = l.object();
|
|
61
|
-
break;
|
|
62
|
-
case e.EmailWidget:
|
|
63
|
-
a = i(l.string().email("The email address is not valid"));
|
|
64
|
-
break;
|
|
65
|
-
case e.PhoneWidget:
|
|
66
|
-
a = i(l.string().test("phone", "The phone number has incorrect format", (e) => {
|
|
67
|
-
if (e) try {
|
|
68
|
-
return c(e);
|
|
69
|
-
} catch {
|
|
70
|
-
return !1;
|
|
71
|
-
}
|
|
72
|
-
return !0;
|
|
73
|
-
}));
|
|
74
|
-
break;
|
|
75
|
-
case e.URLWidget:
|
|
76
|
-
a = i(l.string().matches(/^(?:https?:\/\/)?(?:[a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+(?:\.[a-zA-Z]{2,})+(?:\/[^\s?#]*)?(?:\?[^\s]*)?$/, "The URL is not valid"));
|
|
77
|
-
break;
|
|
78
|
-
case e.ImageUploadWidget:
|
|
79
|
-
case e.FileUploadWidget:
|
|
80
|
-
case e.GeocoderWidget:
|
|
81
|
-
a = l.object();
|
|
82
|
-
break;
|
|
83
|
-
case e.MultiImageUploadWidget:
|
|
84
|
-
case e.MultiFileUploadWidget:
|
|
85
|
-
case e.MultiGeocoderWidget:
|
|
86
|
-
a = l.array().of(l.object());
|
|
87
|
-
break;
|
|
88
|
-
case e.JSONWidget:
|
|
89
|
-
case e.DropdownWidget:
|
|
90
|
-
a = l.string();
|
|
91
|
-
break;
|
|
92
|
-
case e.MultiTextWidget:
|
|
93
|
-
case e.MultiDropdownWidget:
|
|
94
|
-
case e.CheckboxWidget:
|
|
95
|
-
a = l.array().of(l.string());
|
|
96
|
-
break;
|
|
97
|
-
case e.ToggleCheckboxWidget:
|
|
98
|
-
a = l.boolean();
|
|
99
|
-
break;
|
|
100
|
-
case e.CollectionWidget:
|
|
101
|
-
a = t.options.current_have_many_connected ? l.array() : l.object();
|
|
102
|
-
break;
|
|
103
|
-
default:
|
|
104
|
-
a = i(l.string());
|
|
105
|
-
break;
|
|
106
|
-
}
|
|
107
|
-
if (t.options?.validationsPresets && Array.isArray(t.options.validationsPresets)) {
|
|
108
|
-
let n = t.options.validationsPresets;
|
|
109
|
-
(t.field_interface === e.TextWidget || t.field_interface === e.TextareaWidget) && (n.includes("exclude_special_chars") && (a = a.matches(/^[a-zA-Z0-9\s]*$/, "Special characters are not allowed")), n.includes("exclude_numbers") && (a = a.matches(/^[^0-9]*$/, "Numbers are not allowed")));
|
|
110
|
-
}
|
|
111
|
-
return {
|
|
112
|
-
required: {
|
|
113
|
-
value: !!t?.required,
|
|
114
|
-
message: `The ${r} field is required`
|
|
115
|
-
},
|
|
116
|
-
validate: (e) => {
|
|
117
|
-
if (t?.options?.disableValidation || e === "" || e == null) return !0;
|
|
118
|
-
try {
|
|
119
|
-
return a.validateSync(e), n ? n(e) : !0;
|
|
120
|
-
} catch (e) {
|
|
121
|
-
return e instanceof l.ValidationError ? e.message : !0;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
}, x = p({
|
|
126
|
-
defaultClassName: "_1a7d0ek1 _1a7d0ek0",
|
|
127
|
-
variantClassNames: {
|
|
128
|
-
variant: {
|
|
129
|
-
default: "_1a7d0ek2",
|
|
130
|
-
outline: "_1a7d0ek3",
|
|
131
|
-
secondary: "_1a7d0ek4",
|
|
132
|
-
ghost: "_1a7d0ek5",
|
|
133
|
-
destructive: "_1a7d0ek6",
|
|
134
|
-
link: "_1a7d0ek7"
|
|
135
|
-
},
|
|
136
|
-
size: {
|
|
137
|
-
default: "_1a7d0ek8",
|
|
138
|
-
xs: "_1a7d0ek9",
|
|
139
|
-
sm: "_1a7d0eka",
|
|
140
|
-
lg: "_1a7d0ekb",
|
|
141
|
-
icon: "_1a7d0ekc",
|
|
142
|
-
"icon-xs": "_1a7d0ekd",
|
|
143
|
-
"icon-sm": "_1a7d0eke",
|
|
144
|
-
"icon-lg": "_1a7d0ekf"
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
defaultVariants: {
|
|
148
|
-
variant: "default",
|
|
149
|
-
size: "default"
|
|
150
|
-
},
|
|
151
|
-
compoundVariants: []
|
|
152
|
-
}), S = (e) => {
|
|
153
|
-
let t = u(14), n, r, i, a, s;
|
|
154
|
-
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], s = t[5]) : ({className: n, variant: s, size: i, type: a, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = s);
|
|
155
|
-
let c = a === void 0 ? "button" : a, l;
|
|
156
|
-
t[6] !== n || t[7] !== i || t[8] !== s ? (l = d(x({
|
|
157
|
-
variant: s,
|
|
158
|
-
size: i
|
|
159
|
-
}), n), t[6] = n, t[7] = i, t[8] = s, t[9] = l) : l = t[9];
|
|
160
|
-
let f;
|
|
161
|
-
return t[10] !== r || t[11] !== l || t[12] !== c ? (f = /* @__PURE__ */ o("button", {
|
|
162
|
-
"data-slot": "button",
|
|
163
|
-
type: c,
|
|
164
|
-
className: l,
|
|
165
|
-
...r
|
|
166
|
-
}), t[10] = r, t[11] = l, t[12] = c, t[13] = f) : f = t[13], f;
|
|
167
|
-
}, C = p({
|
|
168
|
-
defaultClassName: "_11sljvf3",
|
|
169
|
-
variantClassNames: { orientation: {
|
|
170
|
-
vertical: "_11sljvf4",
|
|
171
|
-
horizontal: "_11sljvf5"
|
|
172
|
-
} },
|
|
173
|
-
defaultVariants: { orientation: "vertical" },
|
|
174
|
-
compoundVariants: []
|
|
175
|
-
}), w = "_11sljvf9", T = "_11sljvfc", E = "_11sljvfd", D = p({
|
|
176
|
-
defaultClassName: "d292um0",
|
|
177
|
-
variantClassNames: { orientation: {
|
|
178
|
-
horizontal: "d292um1",
|
|
179
|
-
vertical: "d292um2"
|
|
180
|
-
} },
|
|
181
|
-
defaultVariants: {},
|
|
182
|
-
compoundVariants: []
|
|
183
|
-
});
|
|
184
|
-
//#endregion
|
|
185
|
-
//#region ../../libraries/levocn/dist/ui/separator/Separator.js
|
|
186
|
-
function O(e) {
|
|
187
|
-
let t = u(11), n, r, i;
|
|
188
|
-
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({className: n, orientation: i, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
189
|
-
let a = i === void 0 ? "horizontal" : i, s;
|
|
190
|
-
t[4] !== n || t[5] !== a ? (s = d(D({ orientation: a }), n), t[4] = n, t[5] = a, t[6] = s) : s = t[6];
|
|
191
|
-
let c;
|
|
192
|
-
return t[7] !== a || t[8] !== r || t[9] !== s ? (c = /* @__PURE__ */ o(m, {
|
|
193
|
-
"data-slot": "separator",
|
|
194
|
-
orientation: a,
|
|
195
|
-
className: s,
|
|
196
|
-
...r
|
|
197
|
-
}), t[7] = a, t[8] = r, t[9] = s, t[10] = c) : c = t[10], c;
|
|
198
|
-
}
|
|
199
|
-
//#endregion
|
|
200
|
-
//#region ../../libraries/levocn/dist/ui/field/Field.js
|
|
201
|
-
function k(e) {
|
|
202
|
-
let t = u(11), n, r, i;
|
|
203
|
-
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({className: n, orientation: i, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
204
|
-
let a = i === void 0 ? "vertical" : i, s;
|
|
205
|
-
t[4] !== n || t[5] !== a ? (s = f(C({ orientation: a }), n), t[4] = n, t[5] = a, t[6] = s) : s = t[6];
|
|
206
|
-
let c;
|
|
207
|
-
return t[7] !== a || t[8] !== r || t[9] !== s ? (c = /* @__PURE__ */ o("div", {
|
|
208
|
-
role: "group",
|
|
209
|
-
"data-slot": "field",
|
|
210
|
-
"data-orientation": a,
|
|
211
|
-
className: s,
|
|
212
|
-
...r
|
|
213
|
-
}), t[7] = a, t[8] = r, t[9] = s, t[10] = c) : c = t[10], c;
|
|
214
|
-
}
|
|
215
|
-
function A(e) {
|
|
216
|
-
let t = u(8), n, r;
|
|
217
|
-
t[0] === e ? (n = t[1], r = t[2]) : ({className: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
218
|
-
let i;
|
|
219
|
-
t[3] === n ? i = t[4] : (i = f(w, n), t[3] = n, t[4] = i);
|
|
220
|
-
let a;
|
|
221
|
-
return t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ o("p", {
|
|
222
|
-
"data-slot": "field-description",
|
|
223
|
-
className: i,
|
|
224
|
-
...r
|
|
225
|
-
}), t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
226
|
-
}
|
|
227
|
-
function j(e) {
|
|
228
|
-
let t = u(15), n, r, i, a;
|
|
229
|
-
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4]) : ({className: r, children: n, errors: i, ...a} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a);
|
|
230
|
-
let s;
|
|
231
|
-
bb0: {
|
|
232
|
-
if (n) {
|
|
233
|
-
s = n;
|
|
234
|
-
break bb0;
|
|
235
|
-
}
|
|
236
|
-
if (!i?.length) {
|
|
237
|
-
s = null;
|
|
238
|
-
break bb0;
|
|
239
|
-
}
|
|
240
|
-
let e;
|
|
241
|
-
t[5] === i ? e = t[6] : (e = [...new Map(i.map(N)).values()], t[5] = i, t[6] = e);
|
|
242
|
-
let r = e;
|
|
243
|
-
if (r.length === 1) {
|
|
244
|
-
s = r[0]?.message;
|
|
245
|
-
break bb0;
|
|
246
|
-
}
|
|
247
|
-
let a;
|
|
248
|
-
t[7] === r ? a = t[8] : (a = /* @__PURE__ */ o("ul", {
|
|
249
|
-
className: E,
|
|
250
|
-
children: r.map(M)
|
|
251
|
-
}), t[7] = r, t[8] = a), s = a;
|
|
252
|
-
}
|
|
253
|
-
let c = s;
|
|
254
|
-
if (!c) return null;
|
|
255
|
-
let l;
|
|
256
|
-
t[9] === r ? l = t[10] : (l = f(T, r), t[9] = r, t[10] = l);
|
|
257
|
-
let d;
|
|
258
|
-
return t[11] !== c || t[12] !== a || t[13] !== l ? (d = /* @__PURE__ */ o("div", {
|
|
259
|
-
role: "alert",
|
|
260
|
-
"data-slot": "field-error",
|
|
261
|
-
className: l,
|
|
262
|
-
...a,
|
|
263
|
-
children: c
|
|
264
|
-
}), t[11] = c, t[12] = a, t[13] = l, t[14] = d) : d = t[14], d;
|
|
265
|
-
}
|
|
266
|
-
function M(e, t) {
|
|
267
|
-
return e?.message && /* @__PURE__ */ o("li", { children: e.message }, t);
|
|
268
|
-
}
|
|
269
|
-
function N(e) {
|
|
270
|
-
return [e?.message, e];
|
|
271
|
-
}
|
|
272
|
-
//#endregion
|
|
273
|
-
//#region ../../libraries/react-collection/dist/components/collectionField/CollectionField.js
|
|
274
|
-
function P(e) {
|
|
275
|
-
let t = u(21), { label: n, error: r, helperText: i, topHelperText: a, isRequired: c, readOnly: l, htmlFor: f, className: p, children: m, ref: h } = e, g = l && "_1ompjs14", _;
|
|
276
|
-
t[0] !== p || t[1] !== g ? (_ = d(g, p), t[0] = p, t[1] = g, t[2] = _) : _ = t[2];
|
|
277
|
-
let v;
|
|
278
|
-
t[3] !== f || t[4] !== c || t[5] !== n ? (v = /* @__PURE__ */ o(y, {
|
|
279
|
-
label: n,
|
|
280
|
-
isRequired: c,
|
|
281
|
-
htmlFor: f
|
|
282
|
-
}), t[3] = f, t[4] = c, t[5] = n, t[6] = v) : v = t[6];
|
|
283
|
-
let b;
|
|
284
|
-
t[7] === a ? b = t[8] : (b = !!a && /* @__PURE__ */ o(A, {
|
|
285
|
-
className: "_1ompjs12",
|
|
286
|
-
children: a
|
|
287
|
-
}), t[7] = a, t[8] = b);
|
|
288
|
-
let x;
|
|
289
|
-
t[9] === r ? x = t[10] : (x = !!r && /* @__PURE__ */ o(j, {
|
|
290
|
-
className: "_1ompjs13",
|
|
291
|
-
children: r
|
|
292
|
-
}), t[9] = r, t[10] = x);
|
|
293
|
-
let S;
|
|
294
|
-
t[11] === i ? S = t[12] : (S = !!i && /* @__PURE__ */ o(A, {
|
|
295
|
-
className: "_1ompjs12",
|
|
296
|
-
children: i
|
|
297
|
-
}), t[11] = i, t[12] = S);
|
|
298
|
-
let C;
|
|
299
|
-
return t[13] !== m || t[14] !== h || t[15] !== _ || t[16] !== v || t[17] !== b || t[18] !== x || t[19] !== S ? (C = /* @__PURE__ */ s(k, {
|
|
300
|
-
ref: h,
|
|
301
|
-
orientation: "vertical",
|
|
302
|
-
className: _,
|
|
303
|
-
children: [
|
|
304
|
-
v,
|
|
305
|
-
b,
|
|
306
|
-
m,
|
|
307
|
-
x,
|
|
308
|
-
S
|
|
309
|
-
]
|
|
310
|
-
}), t[13] = m, t[14] = h, t[15] = _, t[16] = v, t[17] = b, t[18] = x, t[19] = S, t[20] = C) : C = t[20], C;
|
|
311
|
-
}
|
|
312
|
-
//#endregion
|
|
313
|
-
//#region ../../libraries/levocn/dist/providers/ThemeProvider.js
|
|
314
|
-
var F = /* @__PURE__ */ new Set(), I = {}, L = t(null), R = () => {
|
|
315
|
-
let e = u(1), t = n(L);
|
|
316
|
-
if (!t) {
|
|
317
|
-
let t;
|
|
318
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = {
|
|
319
|
-
portalRef: { current: null },
|
|
320
|
-
classes: F,
|
|
321
|
-
overrides: I
|
|
322
|
-
}, e[0] = t) : t = e[0], t;
|
|
323
|
-
}
|
|
324
|
-
return t;
|
|
325
|
-
}, z = ({ children: e, cssReset: t, className: s, style: c, portalToThemeRoot: l, ...u }) => {
|
|
326
|
-
let f = n(L), p = a(null), m = !f && t !== !1 ? h : "", g = f?.classes ?? F, _ = f?.overrides ?? I, v = i(() => {
|
|
327
|
-
let e = s ? s.split(/\s+/).filter(Boolean) : [], t = new Set(g);
|
|
328
|
-
for (let n of e) t.add(n);
|
|
329
|
-
return {
|
|
330
|
-
portalRef: p,
|
|
331
|
-
classes: t,
|
|
332
|
-
overrides: {
|
|
333
|
-
..._,
|
|
334
|
-
...c
|
|
335
|
-
}
|
|
336
|
-
};
|
|
337
|
-
}, [
|
|
338
|
-
g,
|
|
339
|
-
s,
|
|
340
|
-
_,
|
|
341
|
-
c
|
|
342
|
-
]);
|
|
343
|
-
r(() => {
|
|
344
|
-
if (l) return;
|
|
345
|
-
let e = document.createElement("div");
|
|
346
|
-
return document.body.appendChild(e), p.current = e, () => {
|
|
347
|
-
document.body.removeChild(e), p.current = null;
|
|
348
|
-
};
|
|
349
|
-
}, [l]), r(() => {
|
|
350
|
-
if (l) return;
|
|
351
|
-
let e = p.current;
|
|
352
|
-
if (!e) return;
|
|
353
|
-
e.className = d(m, ...v.classes), e.style.cssText = "";
|
|
354
|
-
let t = {
|
|
355
|
-
display: "contents",
|
|
356
|
-
...v.overrides
|
|
357
|
-
};
|
|
358
|
-
for (let [n, r] of Object.entries(t)) r != null && e.style.setProperty(n, String(r));
|
|
359
|
-
}, [
|
|
360
|
-
v.classes,
|
|
361
|
-
v.overrides,
|
|
362
|
-
m,
|
|
363
|
-
l
|
|
364
|
-
]);
|
|
365
|
-
let y = d(m, ...s ? s.split(/\s+/).filter((e) => e && !g.has(e)) : []);
|
|
366
|
-
return /* @__PURE__ */ o(L.Provider, {
|
|
367
|
-
value: v,
|
|
368
|
-
children: /* @__PURE__ */ o("div", {
|
|
369
|
-
...l ? { ref: p } : {},
|
|
370
|
-
...y ? { className: y } : {},
|
|
371
|
-
style: {
|
|
372
|
-
display: "contents",
|
|
373
|
-
...c
|
|
374
|
-
},
|
|
375
|
-
...u,
|
|
376
|
-
children: e
|
|
377
|
-
})
|
|
378
|
-
});
|
|
379
|
-
};
|
|
380
|
-
//#endregion
|
|
381
|
-
export { S as a, y as c, O as i, v as l, z as n, x as o, P as r, b as s, R as t };
|
package/Tooltip-Bx-BfR7T.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { o as e, t } from "./ThemeProvider-Cm2jJC7a.js";
|
|
2
|
-
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
|
-
import { assignInlineVars as i } from "@vanilla-extract/dynamic";
|
|
4
|
-
import { c as a } from "react/compiler-runtime";
|
|
5
|
-
import o from "clsx";
|
|
6
|
-
import { Tooltip as s } from "@base-ui/react/tooltip";
|
|
7
|
-
//#region ../../libraries/levocn/dist/theme/utils/createThemeExtension.js
|
|
8
|
-
var c = (e, t) => {
|
|
9
|
-
let n = {};
|
|
10
|
-
for (let r of Object.keys(t)) {
|
|
11
|
-
let i = t[r], a = e[r];
|
|
12
|
-
if (!(i === void 0 || a === void 0)) if (typeof i == "object" && i && !Array.isArray(i)) {
|
|
13
|
-
let e = c(a, i);
|
|
14
|
-
Object.assign(n, e);
|
|
15
|
-
} else typeof a == "string" && (n[a] = String(i));
|
|
16
|
-
}
|
|
17
|
-
return n;
|
|
18
|
-
}, l = (e) => (t) => t ? i(c(e, t)) : {}, u = "_1bi3v3x0", d = "_3zwjqd0", f = "_3zwjqd1", p = "_3zwjqd2", m = (e) => {
|
|
19
|
-
let t = a(6), r, i;
|
|
20
|
-
t[0] === e ? (r = t[1], i = t[2]) : ({delay: i, ...r} = e, t[0] = e, t[1] = r, t[2] = i);
|
|
21
|
-
let o = i === void 0 ? 0 : i, c;
|
|
22
|
-
return t[3] !== o || t[4] !== r ? (c = /* @__PURE__ */ n(s.Provider, {
|
|
23
|
-
"data-slot": "tooltip-provider",
|
|
24
|
-
delay: o,
|
|
25
|
-
...r
|
|
26
|
-
}), t[3] = o, t[4] = r, t[5] = c) : c = t[5], c;
|
|
27
|
-
}, h = (e) => {
|
|
28
|
-
let t = a(4), r;
|
|
29
|
-
t[0] === e ? r = t[1] : ({...r} = e, t[0] = e, t[1] = r);
|
|
30
|
-
let i;
|
|
31
|
-
return t[2] === r ? i = t[3] : (i = /* @__PURE__ */ n(s.Root, {
|
|
32
|
-
"data-slot": "tooltip",
|
|
33
|
-
...r
|
|
34
|
-
}), t[2] = r, t[3] = i), i;
|
|
35
|
-
}, g = (t) => {
|
|
36
|
-
let r = a(12), i, c, l, u;
|
|
37
|
-
r[0] === t ? (i = r[1], c = r[2], l = r[3], u = r[4]) : ({className: i, variant: u, size: l, ...c} = t, r[0] = t, r[1] = i, r[2] = c, r[3] = l, r[4] = u);
|
|
38
|
-
let d;
|
|
39
|
-
r[5] !== i || r[6] !== l || r[7] !== u ? (d = o(e({
|
|
40
|
-
variant: u,
|
|
41
|
-
size: l
|
|
42
|
-
}), i), r[5] = i, r[6] = l, r[7] = u, r[8] = d) : d = r[8];
|
|
43
|
-
let f;
|
|
44
|
-
return r[9] !== c || r[10] !== d ? (f = /* @__PURE__ */ n(s.Trigger, {
|
|
45
|
-
className: d,
|
|
46
|
-
...c
|
|
47
|
-
}), r[9] = c, r[10] = d, r[11] = f) : f = r[11], f;
|
|
48
|
-
}, _ = (e) => {
|
|
49
|
-
let i = a(24), c, l, u, m, h, g, _;
|
|
50
|
-
i[0] === e ? (c = i[1], l = i[2], u = i[3], m = i[4], h = i[5], g = i[6], _ = i[7]) : ({className: l, side: m, sideOffset: h, align: g, alignOffset: _, children: c, ...u} = e, i[0] = e, i[1] = c, i[2] = l, i[3] = u, i[4] = m, i[5] = h, i[6] = g, i[7] = _);
|
|
51
|
-
let v = m === void 0 ? "top" : m, y = h === void 0 ? 8 : h, b = g === void 0 ? "center" : g, x = _ === void 0 ? 0 : _, { portalRef: S } = t(), C;
|
|
52
|
-
i[8] === l ? C = i[9] : (C = o(d, l), i[8] = l, i[9] = C);
|
|
53
|
-
let w;
|
|
54
|
-
i[10] === Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ n(s.Arrow, { className: f }), i[10] = w) : w = i[10];
|
|
55
|
-
let T;
|
|
56
|
-
i[11] !== c || i[12] !== u || i[13] !== C ? (T = /* @__PURE__ */ r(s.Popup, {
|
|
57
|
-
"data-slot": "tooltip-content",
|
|
58
|
-
className: C,
|
|
59
|
-
...u,
|
|
60
|
-
children: [c, w]
|
|
61
|
-
}), i[11] = c, i[12] = u, i[13] = C, i[14] = T) : T = i[14];
|
|
62
|
-
let E;
|
|
63
|
-
i[15] !== b || i[16] !== x || i[17] !== v || i[18] !== y || i[19] !== T ? (E = /* @__PURE__ */ n(s.Positioner, {
|
|
64
|
-
align: b,
|
|
65
|
-
alignOffset: x,
|
|
66
|
-
side: v,
|
|
67
|
-
sideOffset: y,
|
|
68
|
-
className: p,
|
|
69
|
-
children: T
|
|
70
|
-
}), i[15] = b, i[16] = x, i[17] = v, i[18] = y, i[19] = T, i[20] = E) : E = i[20];
|
|
71
|
-
let D;
|
|
72
|
-
return i[21] !== S || i[22] !== E ? (D = /* @__PURE__ */ n(s.Portal, {
|
|
73
|
-
container: S,
|
|
74
|
-
children: E
|
|
75
|
-
}), i[21] = S, i[22] = E, i[23] = D) : D = i[23], D;
|
|
76
|
-
};
|
|
77
|
-
//#endregion
|
|
78
|
-
export { u as a, m as i, g as n, l as o, _ as r, h as t };
|