@vasakgroup/vue-libvasak 0.14.1 → 0.15.0
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/dist/vue-libvasak.es.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as $, onMounted as J, onUnmounted as ve, watch as K, defineComponent as z, toRef as Be, computed as p, createElementBlock as s, unref as q, openBlock as i, normalizeStyle as se, createCommentVNode as h, createElementVNode as E, createVNode as O, toDisplayString as S, normalizeClass as x, renderSlot as A, createBlock as Q, onBeforeUnmount as ce, Fragment as Z, renderList as ne, withCtx as W, mergeModels as Ae, useAttrs as we, useId as ot, useModel as it, withDirectives as Ce, mergeProps as oe, isRef as st, vModelSelect as rt, inject as pe, getCurrentInstance as Fe, provide as de, createTextVNode as ze, toHandlers as qe, createSlots as ut, withModifiers as M, withKeys as F, Teleport as fe, Transition as ge, nextTick as Y, TransitionGroup as ct, vShow as Re, cloneVNode as dt, h as ft, Comment as mt, Text as bt } from "vue";
|
|
2
2
|
import { listen as vt } from "@tauri-apps/api/event";
|
|
3
3
|
import { getSymbolSource as pt, getIconSource as gt } from "@vasakgroup/plugin-vicons";
|
|
4
4
|
import { getCurrentWindow as yt } from "@tauri-apps/api/window";
|
|
5
5
|
import { useI18n as ht } from "@vasakgroup/tauri-plugin-i18n";
|
|
6
|
-
const xt = "vicons:theme-changed", be = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new Map(),
|
|
6
|
+
const xt = "vicons:theme-changed", be = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new Map(), re = $(0);
|
|
7
7
|
let le = 0, ue = null, te = null;
|
|
8
|
-
function
|
|
9
|
-
be.clear(), ae.clear(), le = 0, ue = null, te = null,
|
|
8
|
+
function zn() {
|
|
9
|
+
be.clear(), ae.clear(), le = 0, ue = null, te = null, re.value = 0;
|
|
10
10
|
}
|
|
11
11
|
function kt() {
|
|
12
|
-
be.clear(), ae.clear(),
|
|
12
|
+
be.clear(), ae.clear(), re.value++;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function $t() {
|
|
15
15
|
return le++, ue || te ? te ?? Promise.resolve() : (te = vt(xt, kt).then((e) => {
|
|
16
16
|
le <= 0 ? e() : ue = e, te = null;
|
|
17
17
|
}), te);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function wt() {
|
|
20
20
|
le--, !(le > 0) && (le = 0, ue?.(), ue = null);
|
|
21
21
|
}
|
|
22
22
|
function Ct(e, l) {
|
|
@@ -26,28 +26,28 @@ function Ct(e, l) {
|
|
|
26
26
|
const n = ae.get(t);
|
|
27
27
|
if (n)
|
|
28
28
|
return n;
|
|
29
|
-
const o =
|
|
29
|
+
const o = re.value, u = (l === "symbol" ? pt(e) : gt(e)).then((r) => (re.value === o && be.set(t, r), r)).finally(() => {
|
|
30
30
|
ae.get(t) === u && ae.delete(t);
|
|
31
31
|
});
|
|
32
32
|
return ae.set(t, u), u;
|
|
33
33
|
}
|
|
34
34
|
function zt(e, l) {
|
|
35
|
-
const t =
|
|
35
|
+
const t = $("");
|
|
36
36
|
let a = !1, n = 0;
|
|
37
37
|
async function o() {
|
|
38
|
-
const u = ++n,
|
|
39
|
-
if (!
|
|
38
|
+
const u = ++n, r = e.value;
|
|
39
|
+
if (!r) {
|
|
40
40
|
t.value = "";
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
|
-
const m = await Ct(
|
|
43
|
+
const m = await Ct(r, l.value);
|
|
44
44
|
u === n && !a && (t.value = m);
|
|
45
45
|
}
|
|
46
46
|
return J(async () => {
|
|
47
|
-
await
|
|
47
|
+
await $t(), a || await o();
|
|
48
48
|
}), ve(() => {
|
|
49
|
-
a = !0,
|
|
50
|
-
}), K([e, l], o), K(
|
|
49
|
+
a = !0, wt();
|
|
50
|
+
}), K([e, l], o), K(re, o), t;
|
|
51
51
|
}
|
|
52
52
|
const Et = ["src", "alt"], H = /* @__PURE__ */ z({
|
|
53
53
|
__name: "ThemeIcon",
|
|
@@ -59,15 +59,15 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
|
|
|
59
59
|
},
|
|
60
60
|
setup(e) {
|
|
61
61
|
const l = e, t = zt(Be(l, "name"), Be(l, "type")), a = p(() => `${l.size}px`);
|
|
62
|
-
return (n, o) => q(t) ? (i(),
|
|
62
|
+
return (n, o) => q(t) ? (i(), s("img", {
|
|
63
63
|
key: 0,
|
|
64
64
|
src: q(t),
|
|
65
65
|
alt: e.alt,
|
|
66
|
-
style:
|
|
66
|
+
style: se({ width: a.value, height: a.value }),
|
|
67
67
|
class: "shrink-0 object-contain"
|
|
68
|
-
}, null, 12, Et)) : (i(),
|
|
68
|
+
}, null, 12, Et)) : (i(), s("span", {
|
|
69
69
|
key: 1,
|
|
70
|
-
style:
|
|
70
|
+
style: se({ width: a.value, height: a.value }),
|
|
71
71
|
class: "shrink-0"
|
|
72
72
|
}, null, 4));
|
|
73
73
|
}
|
|
@@ -82,14 +82,14 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
|
|
|
82
82
|
defaultOpen: { type: Boolean, default: !0 }
|
|
83
83
|
},
|
|
84
84
|
setup(e) {
|
|
85
|
-
const l = e, t =
|
|
85
|
+
const l = e, t = $(l.defaultOpen);
|
|
86
86
|
return K(
|
|
87
87
|
() => l.collapsed,
|
|
88
88
|
(a) => {
|
|
89
89
|
a && (t.value = !0);
|
|
90
90
|
}
|
|
91
|
-
), (a, n) => (i(),
|
|
92
|
-
e.collapsed ? h("", !0) : (i(),
|
|
91
|
+
), (a, n) => (i(), s("section", Dt, [
|
|
92
|
+
e.collapsed ? h("", !0) : (i(), s("button", {
|
|
93
93
|
key: 0,
|
|
94
94
|
type: "button",
|
|
95
95
|
class: "group flex w-full items-center justify-between rounded-corner px-2 py-1 text-tx-muted text-xs uppercase tracking-[0.08em] hover:bg-ui-surface/60",
|
|
@@ -104,7 +104,7 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
|
|
|
104
104
|
class: x(["transition-transform duration-200", t.value ? "" : "-rotate-90"])
|
|
105
105
|
}, null, 8, ["class"])
|
|
106
106
|
], 8, Lt)),
|
|
107
|
-
t.value || e.collapsed ? (i(),
|
|
107
|
+
t.value || e.collapsed ? (i(), s("div", Tt, [
|
|
108
108
|
A(a.$slots, "default")
|
|
109
109
|
])) : h("", !0)
|
|
110
110
|
]));
|
|
@@ -127,7 +127,7 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
|
|
|
127
127
|
},
|
|
128
128
|
emits: ["click"],
|
|
129
129
|
setup(e) {
|
|
130
|
-
return (l, t) => (i(),
|
|
130
|
+
return (l, t) => (i(), s("button", {
|
|
131
131
|
type: "button",
|
|
132
132
|
title: e.collapsed ? e.label : void 0,
|
|
133
133
|
"aria-label": e.collapsed ? e.label : void 0,
|
|
@@ -148,10 +148,10 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
|
|
|
148
148
|
key: 0,
|
|
149
149
|
name: e.icon,
|
|
150
150
|
size: 20
|
|
151
|
-
}, null, 8, ["name"])) : (i(),
|
|
151
|
+
}, null, 8, ["name"])) : (i(), s("span", At, S(e.label.charAt(0).toUpperCase()), 1))
|
|
152
152
|
], 2),
|
|
153
|
-
e.collapsed ? h("", !0) : (i(),
|
|
154
|
-
!e.collapsed && e.badge !== "" ? (i(),
|
|
153
|
+
e.collapsed ? h("", !0) : (i(), s("span", St, S(e.label), 1)),
|
|
154
|
+
!e.collapsed && e.badge !== "" ? (i(), s("span", Vt, S(e.badge), 1)) : h("", !0)
|
|
155
155
|
], 10, Bt));
|
|
156
156
|
}
|
|
157
157
|
}), Mt = {
|
|
@@ -182,8 +182,8 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
|
|
|
182
182
|
},
|
|
183
183
|
emits: ["update:modelValue", "update:collapsed", "change"],
|
|
184
184
|
setup(e, { expose: l, emit: t }) {
|
|
185
|
-
const a = e, n = t, o =
|
|
186
|
-
let
|
|
185
|
+
const a = e, n = t, o = $(a.collapsed ?? !1), u = $(!1);
|
|
186
|
+
let r = null, m = null;
|
|
187
187
|
const b = p(() => u.value || o.value), f = p(() => !!(a.title || a.subtitle));
|
|
188
188
|
p(() => a.categories.length > 0);
|
|
189
189
|
function B() {
|
|
@@ -204,13 +204,13 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
|
|
|
204
204
|
d !== void 0 && (o.value = d);
|
|
205
205
|
}
|
|
206
206
|
), J(() => {
|
|
207
|
-
|
|
207
|
+
r = window.matchMedia(`(max-width: ${Ve}px)`), D(), r.addEventListener("change", D), window.addEventListener("resize", D), typeof ResizeObserver < "u" && document.documentElement && (m = new ResizeObserver(D), m.observe(document.documentElement));
|
|
208
208
|
}), ce(() => {
|
|
209
|
-
|
|
210
|
-
}), l({ collapsed: b }), (d, V) => (i(),
|
|
209
|
+
r?.removeEventListener("change", D), window.removeEventListener("resize", D), m?.disconnect(), m = null;
|
|
210
|
+
}), l({ collapsed: b }), (d, V) => (i(), s("aside", {
|
|
211
211
|
class: x(["relative z-30 flex h-full shrink-0 flex-col rounded-corner border border-ui-border bg-ui-surface/70 transition-all duration-300", ["w-[84px]", b.value ? "md:w-[84px]" : "md:w-72"]])
|
|
212
212
|
}, [
|
|
213
|
-
f.value || d.$slots.header ? (i(),
|
|
213
|
+
f.value || d.$slots.header ? (i(), s("header", Mt, [
|
|
214
214
|
E("div", It, [
|
|
215
215
|
E("button", {
|
|
216
216
|
type: "button",
|
|
@@ -225,15 +225,15 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
|
|
|
225
225
|
size: 16
|
|
226
226
|
}, null, 8, ["name"])
|
|
227
227
|
], 8, Ot),
|
|
228
|
-
f.value && !b.value ? (i(),
|
|
229
|
-
e.title ? (i(),
|
|
230
|
-
e.subtitle ? (i(),
|
|
228
|
+
f.value && !b.value ? (i(), s("div", jt, [
|
|
229
|
+
e.title ? (i(), s("p", Pt, S(e.title), 1)) : h("", !0),
|
|
230
|
+
e.subtitle ? (i(), s("p", Ft, S(e.subtitle), 1)) : h("", !0)
|
|
231
231
|
])) : h("", !0)
|
|
232
232
|
]),
|
|
233
|
-
d.$slots.header && !b.value ? (i(),
|
|
233
|
+
d.$slots.header && !b.value ? (i(), s("div", qt, [
|
|
234
234
|
A(d.$slots, "header", { collapsed: b.value })
|
|
235
235
|
])) : h("", !0)
|
|
236
|
-
])) : (i(),
|
|
236
|
+
])) : (i(), s("div", Rt, [
|
|
237
237
|
E("button", {
|
|
238
238
|
type: "button",
|
|
239
239
|
class: x(Se),
|
|
@@ -249,21 +249,21 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
|
|
|
249
249
|
], 8, Nt)
|
|
250
250
|
])),
|
|
251
251
|
E("div", Ht, [
|
|
252
|
-
(i(!0),
|
|
252
|
+
(i(!0), s(Z, null, ne(e.categories, (j) => (i(), Q(Ne, {
|
|
253
253
|
key: j.id,
|
|
254
254
|
title: j.title,
|
|
255
255
|
collapsed: b.value
|
|
256
256
|
}, {
|
|
257
257
|
default: W(() => [
|
|
258
|
-
(i(!0),
|
|
259
|
-
key:
|
|
260
|
-
label:
|
|
261
|
-
icon:
|
|
262
|
-
badge:
|
|
263
|
-
disabled:
|
|
258
|
+
(i(!0), s(Z, null, ne(j.items, (w) => (i(), Q(He, {
|
|
259
|
+
key: w.id,
|
|
260
|
+
label: w.label,
|
|
261
|
+
icon: w.icon,
|
|
262
|
+
badge: w.badge,
|
|
263
|
+
disabled: w.disabled,
|
|
264
264
|
collapsed: b.value,
|
|
265
|
-
active: e.modelValue ===
|
|
266
|
-
onClick: (c) => g(
|
|
265
|
+
active: e.modelValue === w.id,
|
|
266
|
+
onClick: (c) => g(w.id)
|
|
267
267
|
}, null, 8, ["label", "icon", "badge", "disabled", "collapsed", "active", "onClick"]))), 128))
|
|
268
268
|
]),
|
|
269
269
|
_: 2
|
|
@@ -285,13 +285,13 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
|
|
|
285
285
|
}),
|
|
286
286
|
emits: /* @__PURE__ */ Ae(["change"], ["update:modelValue"]),
|
|
287
287
|
setup(e, { emit: l }) {
|
|
288
|
-
const t = e, a =
|
|
288
|
+
const t = e, a = we(), n = ot(), o = p(() => a.id ?? n), u = l, [r, m] = it(e, "modelValue", {
|
|
289
289
|
set(b) {
|
|
290
290
|
return m.number ? Number(b) : b;
|
|
291
291
|
}
|
|
292
292
|
});
|
|
293
|
-
return (b, f) => (i(),
|
|
294
|
-
t.label ? (i(),
|
|
293
|
+
return (b, f) => (i(), s("div", Wt, [
|
|
294
|
+
t.label ? (i(), s("label", {
|
|
295
295
|
key: 0,
|
|
296
296
|
for: o.value,
|
|
297
297
|
class: "text-tx-muted text-xs"
|
|
@@ -299,14 +299,14 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
|
|
|
299
299
|
E("div", Gt, [
|
|
300
300
|
Ce(E("select", oe({
|
|
301
301
|
id: o.value,
|
|
302
|
-
"onUpdate:modelValue": f[0] || (f[0] = (B) =>
|
|
302
|
+
"onUpdate:modelValue": f[0] || (f[0] = (B) => st(r) ? r.value = B : null),
|
|
303
303
|
class: "min-w-0 flex-1 appearance-none truncate rounded-corner border border-ui-border bg-ui-surface/60 py-1.5 pr-8 pl-2 text-sm text-tx-main"
|
|
304
304
|
}, q(a), {
|
|
305
305
|
onChange: f[1] || (f[1] = (B) => u("change", B))
|
|
306
306
|
}), [
|
|
307
307
|
A(b.$slots, "default")
|
|
308
308
|
], 16, Qt), [
|
|
309
|
-
[
|
|
309
|
+
[rt, q(r)]
|
|
310
310
|
]),
|
|
311
311
|
O(H, {
|
|
312
312
|
name: "pan-down-symbolic",
|
|
@@ -318,7 +318,7 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
|
|
|
318
318
|
]));
|
|
319
319
|
}
|
|
320
320
|
}), Ee = /* @__PURE__ */ Symbol("barra de vasak");
|
|
321
|
-
function
|
|
321
|
+
function $e(e) {
|
|
322
322
|
return e === "left" || e === "right" ? "vertical" : "horizontal";
|
|
323
323
|
}
|
|
324
324
|
const Xt = ["top", "bottom", "left", "right"];
|
|
@@ -328,11 +328,11 @@ function Jt(e) {
|
|
|
328
328
|
function me() {
|
|
329
329
|
const e = pe(Ee, null);
|
|
330
330
|
if (e) return e;
|
|
331
|
-
const l =
|
|
331
|
+
const l = $("top");
|
|
332
332
|
return {
|
|
333
333
|
posicion: l,
|
|
334
|
-
orientacion: p(() =>
|
|
335
|
-
vertical: p(() =>
|
|
334
|
+
orientacion: p(() => $e(l.value)),
|
|
335
|
+
vertical: p(() => $e(l.value) === "vertical")
|
|
336
336
|
};
|
|
337
337
|
}
|
|
338
338
|
const De = ["minimize", "maximize", "close"], Zt = "window", _t = "barPosition";
|
|
@@ -341,7 +341,7 @@ function ea(e) {
|
|
|
341
341
|
return Jt(t) ? t : null;
|
|
342
342
|
}
|
|
343
343
|
function ta(e = "top") {
|
|
344
|
-
const l =
|
|
344
|
+
const l = $(e);
|
|
345
345
|
let t = null, a = !1;
|
|
346
346
|
async function n() {
|
|
347
347
|
try {
|
|
@@ -385,7 +385,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
385
385
|
},
|
|
386
386
|
emits: ["minimize", "maximize", "close"],
|
|
387
387
|
setup(e, { emit: l }) {
|
|
388
|
-
const t = e, { t: a } = ht(), n = p(() => t.minimizeLabel ?? a("ventana.minimizar")), o = p(() => t.maximizeLabel ?? a("ventana.maximizar")), u = p(() => t.closeLabel ?? a("ventana.cerrar")),
|
|
388
|
+
const t = e, { t: a } = ht(), n = p(() => t.minimizeLabel ?? a("ventana.minimizar")), o = p(() => t.maximizeLabel ?? a("ventana.maximizar")), u = p(() => t.closeLabel ?? a("ventana.cerrar")), r = l, { vertical: m } = me(), b = p(() => ({
|
|
389
389
|
minimize: t.controls.includes("minimize"),
|
|
390
390
|
maximize: t.controls.includes("maximize"),
|
|
391
391
|
close: t.controls.includes("close")
|
|
@@ -398,29 +398,29 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
398
398
|
return !!B?.vnode.props?.[`on${V}`];
|
|
399
399
|
}
|
|
400
400
|
function L() {
|
|
401
|
-
if (D("Minimize")) return
|
|
401
|
+
if (D("Minimize")) return r("minimize");
|
|
402
402
|
f().minimize();
|
|
403
403
|
}
|
|
404
404
|
function g() {
|
|
405
|
-
if (D("Maximize")) return
|
|
405
|
+
if (D("Maximize")) return r("maximize");
|
|
406
406
|
f().toggleMaximize();
|
|
407
407
|
}
|
|
408
408
|
function d() {
|
|
409
|
-
if (D("Close")) return
|
|
409
|
+
if (D("Close")) return r("close");
|
|
410
410
|
f().close();
|
|
411
411
|
}
|
|
412
|
-
return (V, j) => e.controls.length ? (i(),
|
|
412
|
+
return (V, j) => e.controls.length ? (i(), s("div", {
|
|
413
413
|
key: 0,
|
|
414
414
|
class: x(["flex shrink-0 gap-1", q(m) ? "flex-col" : ""]),
|
|
415
415
|
"data-tauri-drag-region": ""
|
|
416
416
|
}, [
|
|
417
|
-
b.value.minimize ? (i(),
|
|
417
|
+
b.value.minimize ? (i(), s("button", {
|
|
418
418
|
key: 0,
|
|
419
419
|
type: "button",
|
|
420
420
|
class: x([xe, "hover:bg-status-success"]),
|
|
421
421
|
title: n.value,
|
|
422
422
|
"aria-label": n.value,
|
|
423
|
-
onClick: j[0] || (j[0] = (
|
|
423
|
+
onClick: j[0] || (j[0] = (w) => L())
|
|
424
424
|
}, [
|
|
425
425
|
O(H, {
|
|
426
426
|
name: "window-minimize",
|
|
@@ -428,13 +428,13 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
428
428
|
size: 24
|
|
429
429
|
})
|
|
430
430
|
], 10, aa)) : h("", !0),
|
|
431
|
-
b.value.maximize ? (i(),
|
|
431
|
+
b.value.maximize ? (i(), s("button", {
|
|
432
432
|
key: 1,
|
|
433
433
|
type: "button",
|
|
434
434
|
class: x([xe, "hover:bg-status-warning"]),
|
|
435
435
|
title: o.value,
|
|
436
436
|
"aria-label": o.value,
|
|
437
|
-
onClick: j[1] || (j[1] = (
|
|
437
|
+
onClick: j[1] || (j[1] = (w) => g())
|
|
438
438
|
}, [
|
|
439
439
|
O(H, {
|
|
440
440
|
name: "window-maximize",
|
|
@@ -442,13 +442,13 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
442
442
|
size: 24
|
|
443
443
|
})
|
|
444
444
|
], 10, la)) : h("", !0),
|
|
445
|
-
b.value.close ? (i(),
|
|
445
|
+
b.value.close ? (i(), s("button", {
|
|
446
446
|
key: 2,
|
|
447
447
|
type: "button",
|
|
448
448
|
class: x([xe, "hover:bg-status-error"]),
|
|
449
449
|
title: u.value,
|
|
450
450
|
"aria-label": u.value,
|
|
451
|
-
onClick: j[2] || (j[2] = (
|
|
451
|
+
onClick: j[2] || (j[2] = (w) => d())
|
|
452
452
|
}, [
|
|
453
453
|
O(H, {
|
|
454
454
|
name: "window-close",
|
|
@@ -483,14 +483,14 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
483
483
|
posicion: a,
|
|
484
484
|
orientacion: p(() => n.value ? "vertical" : "horizontal"),
|
|
485
485
|
vertical: n
|
|
486
|
-
}), (o, u) => (i(),
|
|
486
|
+
}), (o, u) => (i(), s("div", {
|
|
487
487
|
class: x(["relative flex shrink-0 items-center gap-2 p-1 font-title", n.value ? "h-full flex-col" : "w-full"]),
|
|
488
488
|
"data-tauri-drag-region": ""
|
|
489
489
|
}, [
|
|
490
|
-
o.$slots.identidad ? (i(),
|
|
490
|
+
o.$slots.identidad ? (i(), s("div", oa, [
|
|
491
491
|
A(o.$slots, "identidad")
|
|
492
492
|
])) : h("", !0),
|
|
493
|
-
(o.$slots.titulo || e.title) && !n.value ? (i(),
|
|
493
|
+
(o.$slots.titulo || e.title) && !n.value ? (i(), s("p", ia, [
|
|
494
494
|
A(o.$slots, "titulo", {}, () => [
|
|
495
495
|
ze(S(e.title), 1)
|
|
496
496
|
])
|
|
@@ -501,7 +501,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
501
501
|
}, [
|
|
502
502
|
A(o.$slots, "default")
|
|
503
503
|
], 2),
|
|
504
|
-
o.$slots.acciones ? (i(),
|
|
504
|
+
o.$slots.acciones ? (i(), s("div", {
|
|
505
505
|
key: 2,
|
|
506
506
|
class: x(["flex shrink-0 items-center gap-1", n.value ? "flex-col" : ""])
|
|
507
507
|
}, [
|
|
@@ -513,7 +513,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
513
513
|
"maximize-label": e.maximizeLabel,
|
|
514
514
|
"close-label": e.closeLabel
|
|
515
515
|
}, qe(q(Ue)(["minimize", "maximize", "close"]))), null, 16, ["controls", "minimize-label", "maximize-label", "close-label"]),
|
|
516
|
-
o.$slots.centro ? (i(),
|
|
516
|
+
o.$slots.centro ? (i(), s("div", {
|
|
517
517
|
key: 3,
|
|
518
518
|
class: x(["pointer-events-none absolute flex items-center justify-center", n.value ? "inset-x-0 top-1/2 -translate-y-1/2 flex-col" : "inset-y-0 left-1/2 -translate-x-1/2"])
|
|
519
519
|
}, [
|
|
@@ -525,7 +525,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
525
525
|
], 2)) : h("", !0)
|
|
526
526
|
], 2));
|
|
527
527
|
}
|
|
528
|
-
}),
|
|
528
|
+
}), sa = { class: "flex min-h-0 min-w-0 flex-1" }, ra = /* @__PURE__ */ z({
|
|
529
529
|
__name: "WindowFrame",
|
|
530
530
|
props: {
|
|
531
531
|
position: { default: null },
|
|
@@ -538,7 +538,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
538
538
|
},
|
|
539
539
|
emits: ["minimize", "maximize", "close"],
|
|
540
540
|
setup(e) {
|
|
541
|
-
const l = e, t = ta(), a = p(() => l.position ?? t.value), n = p(() =>
|
|
541
|
+
const l = e, t = ta(), a = p(() => l.position ?? t.value), n = p(() => $e(a.value)), o = p(() => n.value === "vertical");
|
|
542
542
|
de(Ee, { posicion: a, orientacion: n, vertical: o });
|
|
543
543
|
const u = {
|
|
544
544
|
top: "flex-col",
|
|
@@ -546,7 +546,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
546
546
|
left: "flex-row",
|
|
547
547
|
right: "flex-row-reverse"
|
|
548
548
|
};
|
|
549
|
-
return (
|
|
549
|
+
return (r, m) => (i(), s("div", {
|
|
550
550
|
class: x(["flex h-screen w-screen overflow-hidden rounded-corner-window border border-ui-border bg-ui-bg/80", u[a.value]])
|
|
551
551
|
}, [
|
|
552
552
|
e.hideBar ? h("", !0) : (i(), Q(Ke, oe({
|
|
@@ -559,41 +559,41 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
559
559
|
controls: e.controls
|
|
560
560
|
}, qe(q(Ue)(["minimize", "maximize", "close"]))), ut({
|
|
561
561
|
default: W(() => [
|
|
562
|
-
A(
|
|
562
|
+
A(r.$slots, "barra")
|
|
563
563
|
]),
|
|
564
564
|
_: 2
|
|
565
565
|
}, [
|
|
566
|
-
|
|
566
|
+
r.$slots.identidad ? {
|
|
567
567
|
name: "identidad",
|
|
568
568
|
fn: W(() => [
|
|
569
|
-
A(
|
|
569
|
+
A(r.$slots, "identidad")
|
|
570
570
|
]),
|
|
571
571
|
key: "0"
|
|
572
572
|
} : void 0,
|
|
573
|
-
|
|
573
|
+
r.$slots.titulo ? {
|
|
574
574
|
name: "titulo",
|
|
575
575
|
fn: W(() => [
|
|
576
|
-
A(
|
|
576
|
+
A(r.$slots, "titulo")
|
|
577
577
|
]),
|
|
578
578
|
key: "1"
|
|
579
579
|
} : void 0,
|
|
580
|
-
|
|
580
|
+
r.$slots.centro ? {
|
|
581
581
|
name: "centro",
|
|
582
582
|
fn: W(() => [
|
|
583
|
-
A(
|
|
583
|
+
A(r.$slots, "centro")
|
|
584
584
|
]),
|
|
585
585
|
key: "2"
|
|
586
586
|
} : void 0,
|
|
587
|
-
|
|
587
|
+
r.$slots.acciones ? {
|
|
588
588
|
name: "acciones",
|
|
589
589
|
fn: W(() => [
|
|
590
|
-
A(
|
|
590
|
+
A(r.$slots, "acciones")
|
|
591
591
|
]),
|
|
592
592
|
key: "3"
|
|
593
593
|
} : void 0
|
|
594
594
|
]), 1040, ["position", "title", "minimize-label", "maximize-label", "close-label", "controls"])),
|
|
595
|
-
E("div",
|
|
596
|
-
A(
|
|
595
|
+
E("div", sa, [
|
|
596
|
+
A(r.$slots, "default")
|
|
597
597
|
])
|
|
598
598
|
], 2));
|
|
599
599
|
}
|
|
@@ -618,14 +618,14 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
618
618
|
},
|
|
619
619
|
emits: ["select", "close", "menu", "mover", "navegar"],
|
|
620
620
|
setup(e, { emit: l }) {
|
|
621
|
-
const t = e, a = l, { vertical: n, posicion: o } = me(), u =
|
|
621
|
+
const t = e, a = l, { vertical: n, posicion: o } = me(), u = $(null), r = $(null), m = $(!1), b = $(!1), f = $(!1), B = $({ top: 0, left: 0, right: 0 });
|
|
622
622
|
let D = null, L = null;
|
|
623
623
|
const g = p(() => t.tab.closable !== !1), d = p(() => t.tab.tooltip ?? t.tab.label), V = p(
|
|
624
624
|
() => t.tab.dirty ? `${t.tab.label} · ${t.dirtyLabel}` : t.tab.label
|
|
625
|
-
), j = p(() => t.tab.label.trim().charAt(0).toUpperCase()),
|
|
626
|
-
() => !!t.tab.dirty && !(
|
|
625
|
+
), j = p(() => t.tab.label.trim().charAt(0).toUpperCase()), w = p(() => m.value || f.value), c = p(
|
|
626
|
+
() => !!t.tab.dirty && !(w.value && g.value)
|
|
627
627
|
), v = p(
|
|
628
|
-
() => g.value && (
|
|
628
|
+
() => g.value && (w.value || t.active || !t.tab.dirty)
|
|
629
629
|
), y = p(
|
|
630
630
|
() => n.value && (m.value || b.value || f.value)
|
|
631
631
|
), P = p(() => {
|
|
@@ -644,7 +644,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
644
644
|
}
|
|
645
645
|
function U(R) {
|
|
646
646
|
const k = R.relatedTarget;
|
|
647
|
-
k &&
|
|
647
|
+
k && r.value?.contains(k) || (f.value = !1);
|
|
648
648
|
}
|
|
649
649
|
function ee() {
|
|
650
650
|
m.value = !0, _();
|
|
@@ -670,7 +670,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
670
670
|
function nt(R) {
|
|
671
671
|
R.preventDefault(), a("menu", { x: R.clientX, y: R.clientY });
|
|
672
672
|
}
|
|
673
|
-
return ce(T), (R, k) => (i(),
|
|
673
|
+
return ce(T), (R, k) => (i(), s("div", {
|
|
674
674
|
ref_key: "raiz",
|
|
675
675
|
ref: u,
|
|
676
676
|
class: x(["group relative flex shrink-0 cursor-pointer items-center gap-2 rounded-corner border border-ui-border transition-colors", [
|
|
@@ -714,13 +714,13 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
714
714
|
name: e.tab.icon,
|
|
715
715
|
size: 16,
|
|
716
716
|
class: "shrink-0"
|
|
717
|
-
}, null, 8, ["name"])) : q(n) ? (i(),
|
|
718
|
-
q(n) ? h("", !0) : (i(),
|
|
719
|
-
c.value ? (i(),
|
|
717
|
+
}, null, 8, ["name"])) : q(n) ? (i(), s("span", ca, S(j.value), 1)) : h("", !0),
|
|
718
|
+
q(n) ? h("", !0) : (i(), s("span", da, S(e.tab.label), 1)),
|
|
719
|
+
c.value ? (i(), s("span", {
|
|
720
720
|
key: 3,
|
|
721
721
|
class: x(["size-2 shrink-0 rounded-full bg-current", q(n) ? "absolute right-0.5 top-0.5" : ""]),
|
|
722
722
|
"aria-hidden": "true"
|
|
723
|
-
}, null, 2)) : v.value && !q(n) ? (i(),
|
|
723
|
+
}, null, 2)) : v.value && !q(n) ? (i(), s("button", {
|
|
724
724
|
key: 4,
|
|
725
725
|
type: "button",
|
|
726
726
|
class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
|
|
@@ -742,20 +742,20 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
742
742
|
"leave-to-class": "opacity-0 scale-95"
|
|
743
743
|
}, {
|
|
744
744
|
default: W(() => [
|
|
745
|
-
y.value ? (i(),
|
|
745
|
+
y.value ? (i(), s("div", {
|
|
746
746
|
key: 0,
|
|
747
747
|
class: x(["flex items-center gap-2 rounded-corner border border-ui-border bg-ui-surface/95 px-3 py-1 text-sm shadow-lg", e.active ? "font-bold" : ""]),
|
|
748
748
|
ref_key: "desplegadoRef",
|
|
749
|
-
ref:
|
|
750
|
-
style:
|
|
749
|
+
ref: r,
|
|
750
|
+
style: se(P.value),
|
|
751
751
|
onMouseenter: k[2] || (k[2] = (N) => f.value = !0),
|
|
752
752
|
onMouseleave: k[3] || (k[3] = (N) => f.value = !1),
|
|
753
753
|
onFocusin: k[4] || (k[4] = (N) => f.value = !0),
|
|
754
754
|
onFocusout: U
|
|
755
755
|
}, [
|
|
756
756
|
E("span", ma, S(e.tab.label), 1),
|
|
757
|
-
e.tab.dirty ? (i(),
|
|
758
|
-
g.value ? (i(),
|
|
757
|
+
e.tab.dirty ? (i(), s("span", ba)) : h("", !0),
|
|
758
|
+
g.value ? (i(), s("button", {
|
|
759
759
|
key: 1,
|
|
760
760
|
type: "button",
|
|
761
761
|
class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
|
|
@@ -788,48 +788,48 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
788
788
|
},
|
|
789
789
|
emits: ["update:modelValue", "select", "close", "new", "reorder", "menu"],
|
|
790
790
|
setup(e, { emit: l }) {
|
|
791
|
-
const t = e, a = l, { vertical: n } = me(), o =
|
|
792
|
-
function b(
|
|
793
|
-
a("update:modelValue",
|
|
791
|
+
const t = e, a = l, { vertical: n } = me(), o = $(null), u = $(0), r = $(null), m = $(null);
|
|
792
|
+
function b(w) {
|
|
793
|
+
a("update:modelValue", w), a("select", w);
|
|
794
794
|
}
|
|
795
|
-
async function f(
|
|
795
|
+
async function f(w, c) {
|
|
796
796
|
const v = t.tabs.length - 1;
|
|
797
797
|
if (v < 0) return;
|
|
798
|
-
const y = c === "primera" ? 0 : c === "ultima" ? v : c === "anterior" ? (
|
|
798
|
+
const y = c === "primera" ? 0 : c === "ultima" ? v : c === "anterior" ? (w - 1 + t.tabs.length) % t.tabs.length : (w + 1) % t.tabs.length;
|
|
799
799
|
u.value = y, await Y(), o.value?.querySelectorAll('[role="tab"]')?.[y]?.focus();
|
|
800
800
|
}
|
|
801
|
-
function B(
|
|
801
|
+
function B(w, c) {
|
|
802
802
|
if (t.fixedOrder) return;
|
|
803
|
-
const v =
|
|
803
|
+
const v = w + c;
|
|
804
804
|
if (v < 0 || v >= t.tabs.length) return;
|
|
805
|
-
const y = [...t.tabs], [P] = y.splice(
|
|
805
|
+
const y = [...t.tabs], [P] = y.splice(w, 1);
|
|
806
806
|
P && (y.splice(v, 0, P), u.value = v, a("reorder", y));
|
|
807
807
|
}
|
|
808
|
-
function D(
|
|
808
|
+
function D(w) {
|
|
809
809
|
const c = o.value;
|
|
810
810
|
if (!c) return;
|
|
811
|
-
const v =
|
|
812
|
-
n.value ? c.scrollTop += v : c.scrollLeft += v, (n.value ? c.scrollTop : c.scrollLeft) !== y &&
|
|
811
|
+
const v = w.deltaY || w.deltaX || 0, y = n.value ? c.scrollTop : c.scrollLeft;
|
|
812
|
+
n.value ? c.scrollTop += v : c.scrollLeft += v, (n.value ? c.scrollTop : c.scrollLeft) !== y && w.preventDefault();
|
|
813
813
|
}
|
|
814
|
-
function L(
|
|
815
|
-
t.fixedOrder || (
|
|
814
|
+
function L(w, c) {
|
|
815
|
+
t.fixedOrder || (r.value = w, c.dataTransfer?.setData("text/plain", String(w)), c.dataTransfer && (c.dataTransfer.effectAllowed = "move"));
|
|
816
816
|
}
|
|
817
|
-
function g(
|
|
818
|
-
t.fixedOrder ||
|
|
817
|
+
function g(w, c) {
|
|
818
|
+
t.fixedOrder || r.value === null || (c.preventDefault(), m.value = w, c.dataTransfer && (c.dataTransfer.dropEffect = "move"));
|
|
819
819
|
}
|
|
820
|
-
function d(
|
|
821
|
-
const c =
|
|
822
|
-
if (V(), t.fixedOrder || c === null || c ===
|
|
820
|
+
function d(w) {
|
|
821
|
+
const c = r.value;
|
|
822
|
+
if (V(), t.fixedOrder || c === null || c === w) return;
|
|
823
823
|
const v = [...t.tabs], [y] = v.splice(c, 1);
|
|
824
|
-
y && (v.splice(
|
|
824
|
+
y && (v.splice(w, 0, y), a("reorder", v));
|
|
825
825
|
}
|
|
826
826
|
function V() {
|
|
827
|
-
|
|
827
|
+
r.value = null, m.value = null;
|
|
828
828
|
}
|
|
829
829
|
const j = p(
|
|
830
830
|
() => n.value ? "flex h-full flex-col items-center gap-1 overflow-y-auto overflow-x-hidden" : "flex items-center gap-1 overflow-x-auto overflow-y-hidden"
|
|
831
831
|
);
|
|
832
|
-
return (
|
|
832
|
+
return (w, c) => (i(), s("div", {
|
|
833
833
|
class: x(["flex min-h-0 min-w-0 items-center gap-1", q(n) ? "w-full flex-col" : "h-full"]),
|
|
834
834
|
role: "tablist",
|
|
835
835
|
"aria-orientation": q(n) ? "vertical" : "horizontal"
|
|
@@ -840,11 +840,11 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
840
840
|
class: x(j.value),
|
|
841
841
|
onWheel: D
|
|
842
842
|
}, [
|
|
843
|
-
(i(!0),
|
|
843
|
+
(i(!0), s(Z, null, ne(e.tabs, (v, y) => (i(), s("div", {
|
|
844
844
|
key: v.id,
|
|
845
845
|
class: x(["transition-opacity", [
|
|
846
|
-
|
|
847
|
-
m.value === y &&
|
|
846
|
+
r.value === y ? "opacity-40" : "",
|
|
847
|
+
m.value === y && r.value !== y ? "ring-2 ring-secondary rounded-corner" : ""
|
|
848
848
|
]]),
|
|
849
849
|
draggable: !e.fixedOrder,
|
|
850
850
|
onDragstart: (P) => L(y, P),
|
|
@@ -866,7 +866,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
866
866
|
}, null, 8, ["tab", "active", "close-label", "dirty-label", "tabindex", "onSelect", "onClose", "onMenu", "onNavegar", "onMover"])
|
|
867
867
|
], 42, ya))), 128))
|
|
868
868
|
], 34),
|
|
869
|
-
e.newLabel ? (i(),
|
|
869
|
+
e.newLabel ? (i(), s("button", {
|
|
870
870
|
key: 0,
|
|
871
871
|
type: "button",
|
|
872
872
|
class: "flex size-7 shrink-0 items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 hover:bg-ui-surface/70",
|
|
@@ -902,11 +902,11 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
902
902
|
emits: ["update:modelValue"],
|
|
903
903
|
setup(e, { emit: l }) {
|
|
904
904
|
const t = e, a = l;
|
|
905
|
-
function n(
|
|
906
|
-
t.lazy || a("update:modelValue",
|
|
905
|
+
function n(r) {
|
|
906
|
+
t.lazy || a("update:modelValue", r.target.value);
|
|
907
907
|
}
|
|
908
|
-
function o(
|
|
909
|
-
t.lazy && a("update:modelValue",
|
|
908
|
+
function o(r) {
|
|
909
|
+
t.lazy && a("update:modelValue", r.target.value);
|
|
910
910
|
}
|
|
911
911
|
const u = p(() => [
|
|
912
912
|
"w-full rounded-corner border bg-ui-surface/70 px-3 py-1.5 text-sm text-tx-main",
|
|
@@ -915,7 +915,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
915
915
|
t.mono ? "font-mono" : "",
|
|
916
916
|
t.disabled ? "cursor-not-allowed opacity-60" : ""
|
|
917
917
|
]);
|
|
918
|
-
return (
|
|
918
|
+
return (r, m) => (i(), s("input", {
|
|
919
919
|
id: e.id,
|
|
920
920
|
"aria-label": e.ariaLabel,
|
|
921
921
|
type: e.type,
|
|
@@ -932,7 +932,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
932
932
|
onChange: o
|
|
933
933
|
}, null, 42, ka));
|
|
934
934
|
}
|
|
935
|
-
}),
|
|
935
|
+
}), $a = { class: "pointer-events-none absolute left-2 flex items-center" }, wa = ["aria-label"], Le = /* @__PURE__ */ z({
|
|
936
936
|
__name: "SearchField",
|
|
937
937
|
props: {
|
|
938
938
|
modelValue: { default: "" },
|
|
@@ -949,9 +949,9 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
949
949
|
},
|
|
950
950
|
emits: ["update:modelValue", "search", "clear"],
|
|
951
951
|
setup(e, { expose: l, emit: t }) {
|
|
952
|
-
const a = e, n = t, o =
|
|
952
|
+
const a = e, n = t, o = $(null);
|
|
953
953
|
let u;
|
|
954
|
-
const
|
|
954
|
+
const r = p(() => a.modelValue.length > 0), m = p(
|
|
955
955
|
() => a.listboxId ? {
|
|
956
956
|
role: "combobox",
|
|
957
957
|
"aria-autocomplete": "list",
|
|
@@ -959,7 +959,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
959
959
|
"aria-expanded": String(a.expanded),
|
|
960
960
|
"aria-activedescendant": a.activeOptionId || void 0
|
|
961
961
|
} : {}
|
|
962
|
-
), b = p(() => a.clearable &&
|
|
962
|
+
), b = p(() => a.clearable && r.value && !a.disabled);
|
|
963
963
|
function f() {
|
|
964
964
|
clearTimeout(u), u = void 0;
|
|
965
965
|
}
|
|
@@ -982,11 +982,11 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
982
982
|
(d) => {
|
|
983
983
|
d && f();
|
|
984
984
|
}
|
|
985
|
-
), (d, V) => (i(),
|
|
985
|
+
), (d, V) => (i(), s("div", {
|
|
986
986
|
class: "relative flex items-center",
|
|
987
987
|
onKeydown: F(D, ["enter"])
|
|
988
988
|
}, [
|
|
989
|
-
E("span",
|
|
989
|
+
E("span", $a, [
|
|
990
990
|
O(H, {
|
|
991
991
|
name: e.busy ? "content-loading" : "system-search",
|
|
992
992
|
type: "symbol",
|
|
@@ -1006,7 +1006,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
1006
1006
|
class: ["pl-7 [&::-webkit-search-cancel-button]:appearance-none", b.value ? "pr-8" : ""],
|
|
1007
1007
|
"onUpdate:modelValue": B
|
|
1008
1008
|
}), null, 16, ["model-value", "placeholder", "ariaLabel", "disabled", "class"]),
|
|
1009
|
-
b.value ? (i(),
|
|
1009
|
+
b.value ? (i(), s("button", {
|
|
1010
1010
|
key: 0,
|
|
1011
1011
|
type: "button",
|
|
1012
1012
|
class: "absolute right-1 flex size-6 items-center justify-center rounded-corner text-tx-muted hover:bg-ui-surface",
|
|
@@ -1021,7 +1021,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
1021
1021
|
size: 12,
|
|
1022
1022
|
alt: ""
|
|
1023
1023
|
})
|
|
1024
|
-
], 40,
|
|
1024
|
+
], 40, wa)) : h("", !0)
|
|
1025
1025
|
], 32));
|
|
1026
1026
|
}
|
|
1027
1027
|
}), Ca = ["title", "aria-label", "aria-expanded"], za = /* @__PURE__ */ z({
|
|
@@ -1036,13 +1036,13 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
1036
1036
|
},
|
|
1037
1037
|
emits: ["update:modelValue", "search", "open", "close"],
|
|
1038
1038
|
setup(e, { emit: l }) {
|
|
1039
|
-
const t = e, a = l, { vertical: n, posicion: o } = me(), u =
|
|
1039
|
+
const t = e, a = l, { vertical: n, posicion: o } = me(), u = $(!1), r = $(null), m = p(() => n.value || t.collapsed), b = p(() => !m.value || u.value), f = p(() => {
|
|
1040
1040
|
if (!m.value) return "";
|
|
1041
1041
|
const g = "absolute z-40 w-64 rounded-corner border border-ui-border bg-ui-surface/95 p-1 shadow-lg";
|
|
1042
1042
|
return o.value === "left" ? `${g} left-full top-0 ml-1` : o.value === "right" ? `${g} right-full top-0 mr-1` : o.value === "bottom" ? `${g} bottom-full right-0 mb-1` : `${g} top-full right-0 mt-1`;
|
|
1043
1043
|
});
|
|
1044
1044
|
async function B() {
|
|
1045
|
-
u.value = !0, a("open"), await Y(),
|
|
1045
|
+
u.value = !0, a("open"), await Y(), r.value?.enfocar();
|
|
1046
1046
|
}
|
|
1047
1047
|
function D() {
|
|
1048
1048
|
u.value && (u.value = !1, a("close"));
|
|
@@ -1051,11 +1051,11 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
1051
1051
|
const d = g.relatedTarget;
|
|
1052
1052
|
d && g.currentTarget.contains(d) || D();
|
|
1053
1053
|
}
|
|
1054
|
-
return (g, d) => (i(),
|
|
1054
|
+
return (g, d) => (i(), s("div", {
|
|
1055
1055
|
class: "relative flex shrink-0 items-center",
|
|
1056
1056
|
onFocusout: L
|
|
1057
1057
|
}, [
|
|
1058
|
-
m.value ? (i(),
|
|
1058
|
+
m.value ? (i(), s("button", {
|
|
1059
1059
|
key: 0,
|
|
1060
1060
|
type: "button",
|
|
1061
1061
|
class: "flex size-7 items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 hover:bg-ui-surface/70",
|
|
@@ -1072,14 +1072,14 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
1072
1072
|
size: 14
|
|
1073
1073
|
})
|
|
1074
1074
|
], 40, Ca)) : h("", !0),
|
|
1075
|
-
b.value ? (i(),
|
|
1075
|
+
b.value ? (i(), s("div", {
|
|
1076
1076
|
key: 1,
|
|
1077
1077
|
class: x(f.value),
|
|
1078
1078
|
onKeydown: F(D, ["esc"])
|
|
1079
1079
|
}, [
|
|
1080
1080
|
O(Le, {
|
|
1081
1081
|
ref_key: "campo",
|
|
1082
|
-
ref:
|
|
1082
|
+
ref: r,
|
|
1083
1083
|
"model-value": e.modelValue,
|
|
1084
1084
|
placeholder: e.placeholder,
|
|
1085
1085
|
label: e.label,
|
|
@@ -1122,10 +1122,10 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
1122
1122
|
sm: "px-2 py-1 text-xs",
|
|
1123
1123
|
md: "px-3 py-1 text-sm",
|
|
1124
1124
|
lg: "px-4 py-2 text-base"
|
|
1125
|
-
}, u = (
|
|
1126
|
-
t.stopPropagation &&
|
|
1125
|
+
}, u = (r) => {
|
|
1126
|
+
t.stopPropagation && r.stopPropagation(), t.preventDefault && r.preventDefault(), !t.disabled && !t.loading && a("click");
|
|
1127
1127
|
};
|
|
1128
|
-
return (
|
|
1128
|
+
return (r, m) => (i(), s("button", {
|
|
1129
1129
|
type: t.type,
|
|
1130
1130
|
onClick: u,
|
|
1131
1131
|
class: x(["rounded-corner transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2", [
|
|
@@ -1137,15 +1137,15 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
|
|
|
1137
1137
|
]]),
|
|
1138
1138
|
disabled: t.disabled || t.loading
|
|
1139
1139
|
}, [
|
|
1140
|
-
e.loading ? (i(),
|
|
1141
|
-
t.iconSrc && !t.iconRight ? (i(),
|
|
1140
|
+
e.loading ? (i(), s("span", Da)) : h("", !0),
|
|
1141
|
+
t.iconSrc && !t.iconRight ? (i(), s("img", {
|
|
1142
1142
|
key: 1,
|
|
1143
1143
|
src: t.iconSrc,
|
|
1144
1144
|
alt: t.iconAlt || t.label,
|
|
1145
1145
|
class: "w-4 h-4"
|
|
1146
1146
|
}, null, 8, La)) : h("", !0),
|
|
1147
|
-
t.label ? (i(),
|
|
1148
|
-
t.iconSrc && t.iconRight ? (i(),
|
|
1147
|
+
t.label ? (i(), s("span", Ta, S(t.label), 1)) : h("", !0),
|
|
1148
|
+
t.iconSrc && t.iconRight ? (i(), s("img", {
|
|
1149
1149
|
key: 3,
|
|
1150
1150
|
src: t.iconSrc,
|
|
1151
1151
|
alt: t.iconAlt || t.label,
|
|
@@ -1183,12 +1183,12 @@ const Va = ["role"], Ma = {
|
|
|
1183
1183
|
},
|
|
1184
1184
|
setup(e) {
|
|
1185
1185
|
const l = e, t = p(() => Ye[l.tone]), a = p(() => Xe(l.tone));
|
|
1186
|
-
return (n, o) => (i(),
|
|
1186
|
+
return (n, o) => (i(), s("div", {
|
|
1187
1187
|
role: a.value,
|
|
1188
1188
|
"aria-atomic": "true",
|
|
1189
1189
|
class: x(["flex gap-3 rounded-corner border px-4 py-2 text-sm", t.value])
|
|
1190
1190
|
}, [
|
|
1191
|
-
e.icon ? (i(),
|
|
1191
|
+
e.icon ? (i(), s("span", Ma, [
|
|
1192
1192
|
O(H, {
|
|
1193
1193
|
name: e.icon,
|
|
1194
1194
|
type: e.iconType,
|
|
@@ -1197,7 +1197,7 @@ const Va = ["role"], Ma = {
|
|
|
1197
1197
|
}, null, 8, ["name", "type"])
|
|
1198
1198
|
])) : h("", !0),
|
|
1199
1199
|
E("div", Ia, [
|
|
1200
|
-
e.title ? (i(),
|
|
1200
|
+
e.title ? (i(), s("p", Oa, S(e.title), 1)) : h("", !0),
|
|
1201
1201
|
E("div", {
|
|
1202
1202
|
class: x(e.title ? "mt-1" : "")
|
|
1203
1203
|
}, [
|
|
@@ -1218,7 +1218,7 @@ const Va = ["role"], Ma = {
|
|
|
1218
1218
|
bordered: { type: Boolean, default: !1 }
|
|
1219
1219
|
},
|
|
1220
1220
|
setup(e) {
|
|
1221
|
-
return (l, t) => (i(),
|
|
1221
|
+
return (l, t) => (i(), s("div", {
|
|
1222
1222
|
class: x(["flex flex-col items-center justify-center gap-3 px-8 py-12 text-center", e.bordered ? "rounded-corner border border-ui-border border-dashed bg-ui-surface/20" : ""])
|
|
1223
1223
|
}, [
|
|
1224
1224
|
O(H, {
|
|
@@ -1227,7 +1227,7 @@ const Va = ["role"], Ma = {
|
|
|
1227
1227
|
class: "opacity-60"
|
|
1228
1228
|
}, null, 8, ["name"]),
|
|
1229
1229
|
E("p", Pa, S(e.title), 1),
|
|
1230
|
-
e.note ? (i(),
|
|
1230
|
+
e.note ? (i(), s("p", Fa, S(e.note), 1)) : h("", !0),
|
|
1231
1231
|
A(l.$slots, "default")
|
|
1232
1232
|
], 2));
|
|
1233
1233
|
}
|
|
@@ -1253,7 +1253,7 @@ const Va = ["role"], Ma = {
|
|
|
1253
1253
|
"move-class": "transition-transform duration-300"
|
|
1254
1254
|
}, {
|
|
1255
1255
|
default: W(() => [
|
|
1256
|
-
(i(!0),
|
|
1256
|
+
(i(!0), s(Z, null, ne(e.toasts, (o) => (i(), s("div", {
|
|
1257
1257
|
key: o.id,
|
|
1258
1258
|
role: q(Xe)(o.tone ?? "info"),
|
|
1259
1259
|
"aria-atomic": "true",
|
|
@@ -1282,7 +1282,7 @@ const Va = ["role"], Ma = {
|
|
|
1282
1282
|
const l = e, t = p(
|
|
1283
1283
|
() => l.value === null ? null : Math.max(0, Math.min(100, l.value))
|
|
1284
1284
|
);
|
|
1285
|
-
return (a, n) => (i(),
|
|
1285
|
+
return (a, n) => (i(), s("div", {
|
|
1286
1286
|
role: "progressbar",
|
|
1287
1287
|
"aria-label": e.label,
|
|
1288
1288
|
"aria-valuenow": t.value ?? void 0,
|
|
@@ -1290,11 +1290,11 @@ const Va = ["role"], Ma = {
|
|
|
1290
1290
|
"aria-valuemax": "100",
|
|
1291
1291
|
class: "h-2 w-full overflow-hidden rounded-corner bg-ui-surface/70"
|
|
1292
1292
|
}, [
|
|
1293
|
-
t.value !== null ? (i(),
|
|
1293
|
+
t.value !== null ? (i(), s("div", {
|
|
1294
1294
|
key: 0,
|
|
1295
1295
|
class: "h-full rounded-corner bg-primary transition-[width] duration-300 ease-out",
|
|
1296
|
-
style:
|
|
1297
|
-
}, null, 4)) : (i(),
|
|
1296
|
+
style: se({ width: `${t.value}%` })
|
|
1297
|
+
}, null, 4)) : (i(), s("div", Ua))
|
|
1298
1298
|
], 8, Ha));
|
|
1299
1299
|
}
|
|
1300
1300
|
}), Ka = /[/\-_.]/;
|
|
@@ -1308,7 +1308,7 @@ function Ga(e, l) {
|
|
|
1308
1308
|
if (!t) return e;
|
|
1309
1309
|
const a = [];
|
|
1310
1310
|
for (let n = 0; n < e.length; n++) {
|
|
1311
|
-
const o = e[n], u = ke(t, o.valor),
|
|
1311
|
+
const o = e[n], u = ke(t, o.valor), r = ke(t, o.etiqueta), m = r === 10 ? 20 : r, f = ke(t, o.detalle) === 100 ? 100 : 40, B = Math.min(u, m, f);
|
|
1312
1312
|
B !== 100 && a.push({ opcion: o, rango: B, orden: n });
|
|
1313
1313
|
}
|
|
1314
1314
|
return a.sort((n, o) => n.rango - o.rango || n.orden - o.orden), a.map((n) => n.opcion);
|
|
@@ -1344,20 +1344,20 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1344
1344
|
},
|
|
1345
1345
|
emits: ["update:modelValue"],
|
|
1346
1346
|
setup(e, { emit: l }) {
|
|
1347
|
-
const t = e, a = l, n =
|
|
1347
|
+
const t = e, a = l, n = $(""), o = $(!1), u = $(0), r = $(null), m = $(null), b = $(null), f = Qa(), B = p(
|
|
1348
1348
|
() => t.options.find((T) => T.valor === t.modelValue) ?? null
|
|
1349
1349
|
), D = p(() => Ga(t.options, n.value)), L = p(() => D.value.slice(0, t.limit)), g = p(() => Math.max(0, D.value.length - t.limit)), d = p(
|
|
1350
1350
|
() => L.value.length > 0 ? `${f}-${u.value}` : void 0
|
|
1351
1351
|
);
|
|
1352
1352
|
function V(T) {
|
|
1353
|
-
a("update:modelValue", T),
|
|
1353
|
+
a("update:modelValue", T), w();
|
|
1354
1354
|
}
|
|
1355
1355
|
async function j() {
|
|
1356
1356
|
o.value = !0;
|
|
1357
1357
|
const T = L.value.findIndex((C) => C.valor === t.modelValue);
|
|
1358
1358
|
u.value = T >= 0 ? T : 0, await Y(), b.value?.enfocar(), U();
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1360
|
+
function w(T = !0) {
|
|
1361
1361
|
o.value && (o.value = !1, n.value = "", T && Y(() => m.value?.focus()));
|
|
1362
1362
|
}
|
|
1363
1363
|
function c(T) {
|
|
@@ -1383,7 +1383,7 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1383
1383
|
}
|
|
1384
1384
|
function U() {
|
|
1385
1385
|
Y(() => {
|
|
1386
|
-
|
|
1386
|
+
r.value?.querySelector(`[data-indice="${u.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
1387
1387
|
});
|
|
1388
1388
|
}
|
|
1389
1389
|
function ee() {
|
|
@@ -1393,16 +1393,16 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1393
1393
|
K(
|
|
1394
1394
|
() => t.disabled,
|
|
1395
1395
|
(T) => {
|
|
1396
|
-
T &&
|
|
1396
|
+
T && w(!1);
|
|
1397
1397
|
}
|
|
1398
1398
|
), K(n, () => {
|
|
1399
1399
|
u.value = 0, U();
|
|
1400
1400
|
});
|
|
1401
1401
|
function G(T) {
|
|
1402
1402
|
const C = T.relatedTarget;
|
|
1403
|
-
C && T.currentTarget.contains(C) ||
|
|
1403
|
+
C && T.currentTarget.contains(C) || w(!1);
|
|
1404
1404
|
}
|
|
1405
|
-
return (T, C) => (i(),
|
|
1405
|
+
return (T, C) => (i(), s("div", {
|
|
1406
1406
|
class: "relative",
|
|
1407
1407
|
onFocusout: G
|
|
1408
1408
|
}, [
|
|
@@ -1415,7 +1415,7 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1415
1415
|
"aria-label": e.label || void 0,
|
|
1416
1416
|
"aria-expanded": o.value,
|
|
1417
1417
|
"aria-haspopup": "listbox",
|
|
1418
|
-
onClick: C[0] || (C[0] = (I) => o.value ?
|
|
1418
|
+
onClick: C[0] || (C[0] = (I) => o.value ? w() : j()),
|
|
1419
1419
|
onKeydown: [
|
|
1420
1420
|
C[1] || (C[1] = F(M((I) => o.value ? c(1) : j(), ["prevent"]), ["down"])),
|
|
1421
1421
|
C[2] || (C[2] = F(M((I) => o.value ? c(-1) : j(), ["prevent"]), ["up"]))
|
|
@@ -1423,7 +1423,7 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1423
1423
|
}, [
|
|
1424
1424
|
E("span", Xa, [
|
|
1425
1425
|
ze(S(B.value?.etiqueta ?? e.placeholder) + " ", 1),
|
|
1426
|
-
B.value?.detalle ? (i(),
|
|
1426
|
+
B.value?.detalle ? (i(), s("span", Ja, S(B.value.detalle), 1)) : h("", !0)
|
|
1427
1427
|
]),
|
|
1428
1428
|
O(H, {
|
|
1429
1429
|
name: "go-down",
|
|
@@ -1432,17 +1432,17 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1432
1432
|
class: "shrink-0 opacity-60"
|
|
1433
1433
|
})
|
|
1434
1434
|
], 40, Ya),
|
|
1435
|
-
o.value ? (i(),
|
|
1435
|
+
o.value ? (i(), s("div", {
|
|
1436
1436
|
key: 0,
|
|
1437
1437
|
class: x(["absolute z-20 w-full min-w-64 rounded-corner border border-ui-border-strong bg-ui-bg shadow-lg", e.up ? "bottom-full mb-1" : "mt-1"]),
|
|
1438
1438
|
onKeydown: [
|
|
1439
|
-
C[4] || (C[4] = F(M((I) =>
|
|
1439
|
+
C[4] || (C[4] = F(M((I) => w(), ["prevent"]), ["escape"])),
|
|
1440
1440
|
C[5] || (C[5] = F(M((I) => c(1), ["prevent"]), ["down"])),
|
|
1441
1441
|
C[6] || (C[6] = F(M((I) => c(-1), ["prevent"]), ["up"])),
|
|
1442
1442
|
C[7] || (C[7] = F(M((I) => v(0), ["prevent"]), ["home"])),
|
|
1443
1443
|
C[8] || (C[8] = F(M((I) => v(L.value.length - 1), ["prevent"]), ["end"])),
|
|
1444
1444
|
C[9] || (C[9] = F(M((I) => ee(), ["prevent"]), ["enter"])),
|
|
1445
|
-
C[10] || (C[10] = F((I) =>
|
|
1445
|
+
C[10] || (C[10] = F((I) => w(!1), ["tab"]))
|
|
1446
1446
|
],
|
|
1447
1447
|
onClick: P,
|
|
1448
1448
|
onMousemove: _
|
|
@@ -1463,12 +1463,12 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1463
1463
|
E("ul", {
|
|
1464
1464
|
id: q(f),
|
|
1465
1465
|
ref_key: "lista",
|
|
1466
|
-
ref:
|
|
1466
|
+
ref: r,
|
|
1467
1467
|
role: "listbox",
|
|
1468
1468
|
class: "max-h-56 overflow-y-auto p-1"
|
|
1469
1469
|
}, [
|
|
1470
|
-
L.value.length === 0 ? (i(),
|
|
1471
|
-
(i(!0),
|
|
1470
|
+
L.value.length === 0 ? (i(), s("li", el, S(e.emptyText), 1)) : h("", !0),
|
|
1471
|
+
(i(!0), s(Z, null, ne(L.value, (I, ie) => (i(), s("li", {
|
|
1472
1472
|
id: `${q(f)}-${ie}`,
|
|
1473
1473
|
key: I.valor,
|
|
1474
1474
|
"data-indice": ie,
|
|
@@ -1480,14 +1480,14 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1480
1480
|
]])
|
|
1481
1481
|
}, [
|
|
1482
1482
|
E("span", al, S(I.etiqueta), 1),
|
|
1483
|
-
I.detalle ? (i(),
|
|
1483
|
+
I.detalle ? (i(), s("span", ll, S(I.detalle), 1)) : h("", !0)
|
|
1484
1484
|
], 10, tl))), 128)),
|
|
1485
|
-
g.value > 0 ? (i(),
|
|
1485
|
+
g.value > 0 ? (i(), s("li", nl, "+" + S(g.value), 1)) : h("", !0)
|
|
1486
1486
|
], 8, _a)
|
|
1487
1487
|
], 34)) : h("", !0)
|
|
1488
1488
|
], 32));
|
|
1489
1489
|
}
|
|
1490
|
-
}), il = { class: "text-base font-semibold m-0 text-primary dark:text-primary-dark" },
|
|
1490
|
+
}), il = { class: "text-base font-semibold m-0 text-primary dark:text-primary-dark" }, sl = /* @__PURE__ */ z({
|
|
1491
1491
|
__name: "ConfigSection",
|
|
1492
1492
|
props: {
|
|
1493
1493
|
title: {},
|
|
@@ -1495,14 +1495,14 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1495
1495
|
customClass: { default: () => ({}) }
|
|
1496
1496
|
},
|
|
1497
1497
|
setup(e) {
|
|
1498
|
-
return (l, t) => (i(),
|
|
1498
|
+
return (l, t) => (i(), s("div", {
|
|
1499
1499
|
class: x(["flex flex-col gap-4 p-4 background rounded-corner", e.customClass])
|
|
1500
1500
|
}, [
|
|
1501
1501
|
E("h3", il, S(e.icon ? `${e.icon} ${e.title}` : e.title), 1),
|
|
1502
1502
|
A(l.$slots, "default", {}, void 0, !0)
|
|
1503
1503
|
], 2));
|
|
1504
1504
|
}
|
|
1505
|
-
}),
|
|
1505
|
+
}), rl = /* @__PURE__ */ ye(sl, [["__scopeId", "data-v-45bd4eab"]]), ul = { class: "flex items-center gap-3 flex-1 min-w-0" }, cl = ["src", "alt"], dl = { class: "min-w-0" }, fl = { class: "font-semibold truncate" }, ml = {
|
|
1506
1506
|
key: 0,
|
|
1507
1507
|
class: "text-xs text-gray-400 truncate"
|
|
1508
1508
|
}, bl = {
|
|
@@ -1536,7 +1536,7 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1536
1536
|
}, n = () => {
|
|
1537
1537
|
t("click");
|
|
1538
1538
|
};
|
|
1539
|
-
return (o, u) => (i(),
|
|
1539
|
+
return (o, u) => (i(), s("div", {
|
|
1540
1540
|
class: x(["flex items-center justify-between background rounded-vsk px-6 py-3 mb-4", [{ "border-l-4 border-green-500": e.isConnected }, e.customClass]]),
|
|
1541
1541
|
onClick: n
|
|
1542
1542
|
}, [
|
|
@@ -1548,32 +1548,32 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1548
1548
|
}, null, 8, cl),
|
|
1549
1549
|
E("div", dl, [
|
|
1550
1550
|
E("div", fl, S(e.title), 1),
|
|
1551
|
-
e.subtitle ? (i(),
|
|
1552
|
-
e.metadata ? (i(),
|
|
1553
|
-
e.extraInfo && e.extraInfo.length > 0 ? (i(),
|
|
1554
|
-
(i(!0),
|
|
1551
|
+
e.subtitle ? (i(), s("div", ml, S(e.subtitle), 1)) : h("", !0),
|
|
1552
|
+
e.metadata ? (i(), s("div", bl, S(e.metadata), 1)) : h("", !0),
|
|
1553
|
+
e.extraInfo && e.extraInfo.length > 0 ? (i(), s("div", vl, [
|
|
1554
|
+
(i(!0), s(Z, null, ne(e.extraInfo, (r, m) => (i(), s("span", { key: m }, S(r), 1))), 128))
|
|
1555
1555
|
])) : h("", !0)
|
|
1556
1556
|
])
|
|
1557
1557
|
]),
|
|
1558
|
-
e.showActionButton ? (i(),
|
|
1558
|
+
e.showActionButton ? (i(), s("button", {
|
|
1559
1559
|
key: 0,
|
|
1560
1560
|
class: "bg-vsk-primary rounded-vsk px-4 py-2 text-sm font-semibold cursor-pointer hover:opacity-70",
|
|
1561
1561
|
onClick: M(a, ["stop"])
|
|
1562
1562
|
}, S(e.actionLabel), 1)) : h("", !0),
|
|
1563
|
-
e.showStatusIndicator && e.isConnected ? (i(),
|
|
1563
|
+
e.showStatusIndicator && e.isConnected ? (i(), s("div", pl)) : h("", !0)
|
|
1564
1564
|
], 2));
|
|
1565
1565
|
}
|
|
1566
1566
|
}), Je = /* @__PURE__ */ Symbol("diálogo de vasak");
|
|
1567
1567
|
function Ze() {
|
|
1568
1568
|
const e = pe(Je, null);
|
|
1569
1569
|
if (e) return e;
|
|
1570
|
-
const l =
|
|
1570
|
+
const l = $(!1);
|
|
1571
1571
|
return {
|
|
1572
1572
|
abierto: p(() => l.value),
|
|
1573
1573
|
cerrar: () => {
|
|
1574
1574
|
l.value = !1;
|
|
1575
1575
|
},
|
|
1576
|
-
idDelTitulo:
|
|
1576
|
+
idDelTitulo: $(null),
|
|
1577
1577
|
ponerElTitulo: () => {
|
|
1578
1578
|
}
|
|
1579
1579
|
};
|
|
@@ -1589,7 +1589,7 @@ const hl = /* @__PURE__ */ z({
|
|
|
1589
1589
|
},
|
|
1590
1590
|
emits: ["update:open"],
|
|
1591
1591
|
setup(e, { emit: l }) {
|
|
1592
|
-
const t = e, a = l, n =
|
|
1592
|
+
const t = e, a = l, n = $(null);
|
|
1593
1593
|
return de(Je, {
|
|
1594
1594
|
abierto: p(() => t.open),
|
|
1595
1595
|
cerrar: () => a("update:open", !1),
|
|
@@ -1603,13 +1603,13 @@ const hl = /* @__PURE__ */ z({
|
|
|
1603
1603
|
inheritAttrs: !1,
|
|
1604
1604
|
__name: "DialogContent",
|
|
1605
1605
|
setup(e) {
|
|
1606
|
-
const l =
|
|
1606
|
+
const l = we(), t = p(() => l.class ?? ""), a = p(() => {
|
|
1607
1607
|
const { class: d, ...V } = l;
|
|
1608
1608
|
return V;
|
|
1609
|
-
}), n = Ze(), o = p(() => n.abierto.value), u =
|
|
1609
|
+
}), n = Ze(), o = p(() => n.abierto.value), u = $(null), r = $(null);
|
|
1610
1610
|
let m = null;
|
|
1611
1611
|
function b() {
|
|
1612
|
-
return
|
|
1612
|
+
return r.value ? [...r.value.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')] : [];
|
|
1613
1613
|
}
|
|
1614
1614
|
function f(d) {
|
|
1615
1615
|
if (d.key === "Escape") {
|
|
@@ -1619,11 +1619,11 @@ const hl = /* @__PURE__ */ z({
|
|
|
1619
1619
|
if (d.key !== "Tab") return;
|
|
1620
1620
|
const V = b();
|
|
1621
1621
|
if (V.length === 0) {
|
|
1622
|
-
d.preventDefault(),
|
|
1622
|
+
d.preventDefault(), r.value?.focus();
|
|
1623
1623
|
return;
|
|
1624
1624
|
}
|
|
1625
|
-
const j = V[0],
|
|
1626
|
-
d.shiftKey && (c === j || c ===
|
|
1625
|
+
const j = V[0], w = V[V.length - 1], c = document.activeElement;
|
|
1626
|
+
d.shiftKey && (c === j || c === r.value) ? (d.preventDefault(), w.focus()) : !d.shiftKey && c === w && (d.preventDefault(), j.focus());
|
|
1627
1627
|
}
|
|
1628
1628
|
function B(d) {
|
|
1629
1629
|
d.target === d.currentTarget && n.cerrar();
|
|
@@ -1642,7 +1642,7 @@ const hl = /* @__PURE__ */ z({
|
|
|
1642
1642
|
o,
|
|
1643
1643
|
async (d) => {
|
|
1644
1644
|
if (d) {
|
|
1645
|
-
m = document.activeElement, document.addEventListener("keydown", D), await Y(),
|
|
1645
|
+
m = document.activeElement, document.addEventListener("keydown", D), await Y(), r.value?.focus();
|
|
1646
1646
|
return;
|
|
1647
1647
|
}
|
|
1648
1648
|
L(), g();
|
|
@@ -1661,7 +1661,7 @@ const hl = /* @__PURE__ */ z({
|
|
|
1661
1661
|
"leave-to-class": "opacity-0"
|
|
1662
1662
|
}, {
|
|
1663
1663
|
default: W(() => [
|
|
1664
|
-
o.value ? (i(),
|
|
1664
|
+
o.value ? (i(), s("div", {
|
|
1665
1665
|
key: 0,
|
|
1666
1666
|
ref_key: "velo",
|
|
1667
1667
|
ref: u,
|
|
@@ -1672,7 +1672,7 @@ const hl = /* @__PURE__ */ z({
|
|
|
1672
1672
|
V[0] || (V[0] = E("div", { class: "absolute inset-0 bg-ui-border-dark/40" }, null, -1)),
|
|
1673
1673
|
E("div", oe({
|
|
1674
1674
|
ref_key: "panel",
|
|
1675
|
-
ref:
|
|
1675
|
+
ref: r,
|
|
1676
1676
|
tabindex: "-1",
|
|
1677
1677
|
role: "dialog",
|
|
1678
1678
|
"aria-modal": "true",
|
|
@@ -1691,24 +1691,24 @@ const hl = /* @__PURE__ */ z({
|
|
|
1691
1691
|
})
|
|
1692
1692
|
]));
|
|
1693
1693
|
}
|
|
1694
|
-
}),
|
|
1694
|
+
}), $l = { class: "text-sm text-tx-muted" }, wl = /* @__PURE__ */ z({
|
|
1695
1695
|
__name: "DialogDescription",
|
|
1696
1696
|
setup(e) {
|
|
1697
|
-
return (l, t) => (i(),
|
|
1697
|
+
return (l, t) => (i(), s("p", $l, [
|
|
1698
1698
|
A(l.$slots, "default")
|
|
1699
1699
|
]));
|
|
1700
1700
|
}
|
|
1701
1701
|
}), Cl = { class: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end" }, zl = /* @__PURE__ */ z({
|
|
1702
1702
|
__name: "DialogFooter",
|
|
1703
1703
|
setup(e) {
|
|
1704
|
-
return (l, t) => (i(),
|
|
1704
|
+
return (l, t) => (i(), s("div", Cl, [
|
|
1705
1705
|
A(l.$slots, "default")
|
|
1706
1706
|
]));
|
|
1707
1707
|
}
|
|
1708
1708
|
}), El = { class: "flex flex-col gap-1.5 text-center sm:text-left" }, Dl = /* @__PURE__ */ z({
|
|
1709
1709
|
__name: "DialogHeader",
|
|
1710
1710
|
setup(e) {
|
|
1711
|
-
return (l, t) => (i(),
|
|
1711
|
+
return (l, t) => (i(), s("div", El, [
|
|
1712
1712
|
A(l.$slots, "default")
|
|
1713
1713
|
]));
|
|
1714
1714
|
}
|
|
@@ -1716,7 +1716,7 @@ const hl = /* @__PURE__ */ z({
|
|
|
1716
1716
|
__name: "DialogTitle",
|
|
1717
1717
|
setup(e) {
|
|
1718
1718
|
const l = Ze(), t = yl();
|
|
1719
|
-
return J(() => l.ponerElTitulo(t)), ve(() => l.ponerElTitulo(null)), (a, n) => (i(),
|
|
1719
|
+
return J(() => l.ponerElTitulo(t)), ve(() => l.ponerElTitulo(null)), (a, n) => (i(), s("h2", {
|
|
1720
1720
|
id: q(t),
|
|
1721
1721
|
class: "font-semibold text-lg leading-none tracking-tight"
|
|
1722
1722
|
}, [
|
|
@@ -1727,17 +1727,17 @@ const hl = /* @__PURE__ */ z({
|
|
|
1727
1727
|
function he() {
|
|
1728
1728
|
const e = pe(_e, null);
|
|
1729
1729
|
if (e) return e;
|
|
1730
|
-
const l =
|
|
1730
|
+
const l = $(!1);
|
|
1731
1731
|
return {
|
|
1732
1732
|
abierto: l,
|
|
1733
1733
|
idDelMenu: "vsk-menu-suelto",
|
|
1734
|
-
idDeLaEtiqueta:
|
|
1734
|
+
idDeLaEtiqueta: $(null),
|
|
1735
1735
|
ponerLaEtiqueta: () => {
|
|
1736
1736
|
},
|
|
1737
|
-
disparador:
|
|
1737
|
+
disparador: $(null),
|
|
1738
1738
|
ponerElDisparador: () => {
|
|
1739
1739
|
},
|
|
1740
|
-
focoAlAbrir:
|
|
1740
|
+
focoAlAbrir: $("ninguno"),
|
|
1741
1741
|
abrir: () => {
|
|
1742
1742
|
l.value = !0;
|
|
1743
1743
|
},
|
|
@@ -1760,7 +1760,7 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
1760
1760
|
},
|
|
1761
1761
|
emits: ["update:open"],
|
|
1762
1762
|
setup(e, { emit: l }) {
|
|
1763
|
-
const t = e, a = l, n =
|
|
1763
|
+
const t = e, a = l, n = $(!1), o = $(null), u = $(null), r = $("ninguno"), m = et();
|
|
1764
1764
|
let b = null;
|
|
1765
1765
|
const f = p({
|
|
1766
1766
|
get: () => t.open ?? n.value,
|
|
@@ -1773,10 +1773,10 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
1773
1773
|
const d = document.activeElement;
|
|
1774
1774
|
b = d instanceof HTMLElement ? d : null;
|
|
1775
1775
|
} else
|
|
1776
|
-
|
|
1776
|
+
r.value = "ninguno";
|
|
1777
1777
|
});
|
|
1778
1778
|
function B(g = "ninguno") {
|
|
1779
|
-
|
|
1779
|
+
r.value = g, f.value = !0;
|
|
1780
1780
|
}
|
|
1781
1781
|
function D(g = {}) {
|
|
1782
1782
|
if (f.value = !1, !g.devolverElFoco) return;
|
|
@@ -1801,11 +1801,11 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
1801
1801
|
ponerElDisparador: (g) => {
|
|
1802
1802
|
o.value = g;
|
|
1803
1803
|
},
|
|
1804
|
-
focoAlAbrir:
|
|
1804
|
+
focoAlAbrir: r,
|
|
1805
1805
|
abrir: B,
|
|
1806
1806
|
cerrar: D,
|
|
1807
1807
|
alternar: L
|
|
1808
|
-
}), (g, d) => (i(),
|
|
1808
|
+
}), (g, d) => (i(), s("div", Bl, [
|
|
1809
1809
|
A(g.$slots, "default")
|
|
1810
1810
|
]));
|
|
1811
1811
|
}
|
|
@@ -1821,7 +1821,7 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
1821
1821
|
sideOffset: { default: 4 }
|
|
1822
1822
|
},
|
|
1823
1823
|
setup(e) {
|
|
1824
|
-
const l = e, t = he(), { idDelMenu: a, idDeLaEtiqueta: n } = t, o = p(() => t.disparador.value), u = p(() => t.abierto.value),
|
|
1824
|
+
const l = e, t = he(), { idDelMenu: a, idDeLaEtiqueta: n } = t, o = p(() => t.disparador.value), u = p(() => t.abierto.value), r = $(null), m = $({
|
|
1825
1825
|
top: 0,
|
|
1826
1826
|
left: 0,
|
|
1827
1827
|
techo: null
|
|
@@ -1848,8 +1848,8 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
1848
1848
|
return y < v ? v : Math.min(Math.max(c, v), y);
|
|
1849
1849
|
}
|
|
1850
1850
|
function D() {
|
|
1851
|
-
if (!o.value || !
|
|
1852
|
-
const c = o.value.getBoundingClientRect(), v =
|
|
1851
|
+
if (!o.value || !r.value) return;
|
|
1852
|
+
const c = o.value.getBoundingClientRect(), v = r.value.scrollHeight, y = r.value.offsetWidth, P = l.side === "top" || l.side === "bottom", _ = P ? v : y;
|
|
1853
1853
|
let U = l.side;
|
|
1854
1854
|
const ee = f(U, c);
|
|
1855
1855
|
ee < _ && f(b[U], c) > ee && (U = b[U]);
|
|
@@ -1886,7 +1886,7 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
1886
1886
|
T = B(T, X, window.innerWidth - y - X), m.value = { top: G, left: T, techo: C };
|
|
1887
1887
|
}
|
|
1888
1888
|
function L() {
|
|
1889
|
-
return
|
|
1889
|
+
return r.value ? Array.from(r.value.querySelectorAll('[role="menuitem"]')) : [];
|
|
1890
1890
|
}
|
|
1891
1891
|
function g(c) {
|
|
1892
1892
|
const v = L();
|
|
@@ -1936,20 +1936,20 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
1936
1936
|
// ninguno elegido todavía—, que es lo que deja andar las flechas y el
|
|
1937
1937
|
// Escape sin haber tocado nada.
|
|
1938
1938
|
default:
|
|
1939
|
-
|
|
1939
|
+
r.value?.focus();
|
|
1940
1940
|
}
|
|
1941
1941
|
});
|
|
1942
1942
|
function j(c) {
|
|
1943
|
-
u.value && (c &&
|
|
1943
|
+
u.value && (c && r.value?.contains(c.target) || D());
|
|
1944
1944
|
}
|
|
1945
|
-
function
|
|
1945
|
+
function w(c) {
|
|
1946
1946
|
const v = c.target, y = !!v.closest("[data-dropdown-content]"), P = !!o.value?.contains(v);
|
|
1947
1947
|
!y && !P && t.cerrar();
|
|
1948
1948
|
}
|
|
1949
1949
|
return J(() => {
|
|
1950
|
-
document.addEventListener("click",
|
|
1950
|
+
document.addEventListener("click", w), window.addEventListener("resize", j), window.addEventListener("scroll", j, !0);
|
|
1951
1951
|
}), ce(() => {
|
|
1952
|
-
document.removeEventListener("click",
|
|
1952
|
+
document.removeEventListener("click", w), window.removeEventListener("resize", j), window.removeEventListener("scroll", j, !0);
|
|
1953
1953
|
}), (c, v) => (i(), Q(fe, { to: "body" }, [
|
|
1954
1954
|
O(ge, {
|
|
1955
1955
|
"enter-active-class": "transition-all duration-150 ease-in-out",
|
|
@@ -1962,7 +1962,7 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
1962
1962
|
default: W(() => [
|
|
1963
1963
|
Ce(E("div", oe({
|
|
1964
1964
|
ref_key: "contenido",
|
|
1965
|
-
ref:
|
|
1965
|
+
ref: r
|
|
1966
1966
|
}, c.$attrs, {
|
|
1967
1967
|
id: q(a),
|
|
1968
1968
|
role: "menu",
|
|
@@ -2006,7 +2006,7 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
2006
2006
|
function o(u) {
|
|
2007
2007
|
t.disabled || (a("select"), a("click", u), n.cerrar({ devolverElFoco: !0 }));
|
|
2008
2008
|
}
|
|
2009
|
-
return (u,
|
|
2009
|
+
return (u, r) => (i(), s("div", {
|
|
2010
2010
|
role: "menuitem",
|
|
2011
2011
|
tabindex: "0",
|
|
2012
2012
|
"aria-disabled": e.disabled || void 0,
|
|
@@ -2034,7 +2034,7 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
2034
2034
|
l.ponerLaEtiqueta(t);
|
|
2035
2035
|
}), ce(() => {
|
|
2036
2036
|
l.ponerLaEtiqueta(null);
|
|
2037
|
-
}), (a, n) => (i(),
|
|
2037
|
+
}), (a, n) => (i(), s("div", {
|
|
2038
2038
|
id: t,
|
|
2039
2039
|
role: "presentation",
|
|
2040
2040
|
class: "px-3 py-2 text-sm font-semibold text-tx-main"
|
|
@@ -2049,7 +2049,7 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
2049
2049
|
}, Fl = /* @__PURE__ */ z({
|
|
2050
2050
|
__name: "DropdownMenuSeparator",
|
|
2051
2051
|
setup(e) {
|
|
2052
|
-
return (l, t) => (i(),
|
|
2052
|
+
return (l, t) => (i(), s("div", Pl));
|
|
2053
2053
|
}
|
|
2054
2054
|
});
|
|
2055
2055
|
function tt(e) {
|
|
@@ -2075,14 +2075,14 @@ const Rl = z({
|
|
|
2075
2075
|
disabled: { type: Boolean, default: !1 }
|
|
2076
2076
|
},
|
|
2077
2077
|
setup(e, { slots: l, attrs: t }) {
|
|
2078
|
-
const a = he(), n =
|
|
2078
|
+
const a = he(), n = $(null);
|
|
2079
2079
|
function o() {
|
|
2080
2080
|
a.ponerElDisparador(ql(n.value));
|
|
2081
2081
|
}
|
|
2082
2082
|
function u() {
|
|
2083
2083
|
e.disabled || (o(), a.alternar());
|
|
2084
2084
|
}
|
|
2085
|
-
function
|
|
2085
|
+
function r(m) {
|
|
2086
2086
|
if (!e.disabled)
|
|
2087
2087
|
switch (m.key) {
|
|
2088
2088
|
case "Enter":
|
|
@@ -2112,7 +2112,7 @@ const Rl = z({
|
|
|
2112
2112
|
// `inert`— es una referencia rota.
|
|
2113
2113
|
"aria-controls": a.abierto.value ? a.idDelMenu : void 0,
|
|
2114
2114
|
onClick: u,
|
|
2115
|
-
onKeydown:
|
|
2115
|
+
onKeydown: r
|
|
2116
2116
|
}, b = l.default?.() ?? [];
|
|
2117
2117
|
if (e.asChild) {
|
|
2118
2118
|
const f = tt(b);
|
|
@@ -2134,10 +2134,10 @@ const Rl = z({
|
|
|
2134
2134
|
labelClass: { default: () => ({}) }
|
|
2135
2135
|
},
|
|
2136
2136
|
setup(e) {
|
|
2137
|
-
return (l, t) => (i(),
|
|
2137
|
+
return (l, t) => (i(), s("div", {
|
|
2138
2138
|
class: x(["flex flex-col gap-2", e.customClass])
|
|
2139
2139
|
}, [
|
|
2140
|
-
e.label ? (i(),
|
|
2140
|
+
e.label ? (i(), s("label", {
|
|
2141
2141
|
key: 0,
|
|
2142
2142
|
for: e.htmlFor,
|
|
2143
2143
|
class: x(["text-sm font-medium text-primary dark:text-primary-dark", e.labelClass])
|
|
@@ -2156,7 +2156,7 @@ const Rl = z({
|
|
|
2156
2156
|
const t = e, a = l, n = () => {
|
|
2157
2157
|
t.clickable && a("click");
|
|
2158
2158
|
};
|
|
2159
|
-
return (o, u) => (i(),
|
|
2159
|
+
return (o, u) => (i(), s("div", {
|
|
2160
2160
|
class: x([
|
|
2161
2161
|
"flex items-center justify-between background p-3 rounded-vsk border border-vsk-primary/70 transition-colors duration-200",
|
|
2162
2162
|
{
|
|
@@ -2169,15 +2169,15 @@ const Rl = z({
|
|
|
2169
2169
|
A(o.$slots, "default", {}, void 0, !0)
|
|
2170
2170
|
], 2));
|
|
2171
2171
|
}
|
|
2172
|
-
}), Kl = /* @__PURE__ */ ye(Wl, [["__scopeId", "data-v-f86d47da"]]), Gl = { class: "background rounded-corner flex flex-row items-center gap-2 justify-between w-full h-auto p-4 transition-all duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80" }, Ql = ["
|
|
2172
|
+
}), Kl = /* @__PURE__ */ ye(Wl, [["__scopeId", "data-v-f86d47da"]]), Gl = { class: "background rounded-corner flex flex-row items-center gap-2 justify-between w-full h-auto p-4 transition-all duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80" }, Ql = ["title", "aria-label"], Yl = ["src"], Xl = {
|
|
2173
2173
|
key: 1,
|
|
2174
2174
|
class: "w-8 h-8 flex items-center justify-center"
|
|
2175
|
-
},
|
|
2175
|
+
}, Jl = ["src"], Zl = ["min", "max", "value", "aria-label", "aria-valuetext"], _l = /* @__PURE__ */ z({
|
|
2176
2176
|
__name: "SliderControl",
|
|
2177
2177
|
props: {
|
|
2178
2178
|
icon: {},
|
|
2179
|
-
|
|
2180
|
-
|
|
2179
|
+
label: {},
|
|
2180
|
+
buttonLabel: {},
|
|
2181
2181
|
modelValue: {},
|
|
2182
2182
|
min: { default: 0 },
|
|
2183
2183
|
max: { default: 100 },
|
|
@@ -2194,27 +2194,29 @@ const Rl = z({
|
|
|
2194
2194
|
}), o = p(() => t.getPercentageClass ? t.getPercentageClass(n.value) : ""), u = (m) => {
|
|
2195
2195
|
const b = m.target;
|
|
2196
2196
|
a("update:modelValue", Number(b.value));
|
|
2197
|
-
},
|
|
2197
|
+
}, r = () => {
|
|
2198
2198
|
a("buttonClick");
|
|
2199
2199
|
};
|
|
2200
|
-
return (m, b) => (i(),
|
|
2201
|
-
e.showButton ? (i(),
|
|
2200
|
+
return (m, b) => (i(), s("div", Gl, [
|
|
2201
|
+
e.showButton ? (i(), s("button", {
|
|
2202
2202
|
key: 0,
|
|
2203
|
-
onClick:
|
|
2203
|
+
onClick: r,
|
|
2204
|
+
type: "button",
|
|
2205
|
+
title: e.buttonLabel ?? e.label,
|
|
2206
|
+
"aria-label": e.buttonLabel ?? e.label,
|
|
2204
2207
|
class: "w-8 h-8 flex items-center justify-center rounded-corner transition-all duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80 hover:scale-110 active:scale-95"
|
|
2205
2208
|
}, [
|
|
2206
2209
|
E("img", {
|
|
2207
2210
|
src: e.icon,
|
|
2208
|
-
alt:
|
|
2209
|
-
title: e.tooltip,
|
|
2211
|
+
alt: "",
|
|
2210
2212
|
class: x(["w-6 h-6 transition-all duration-200", e.iconClass])
|
|
2211
|
-
}, null, 10,
|
|
2212
|
-
])) : (i(),
|
|
2213
|
+
}, null, 10, Yl)
|
|
2214
|
+
], 8, Ql)) : (i(), s("div", Xl, [
|
|
2213
2215
|
E("img", {
|
|
2214
2216
|
src: e.icon,
|
|
2215
|
-
alt:
|
|
2217
|
+
alt: "",
|
|
2216
2218
|
class: "w-6 h-6 transition-all duration-200"
|
|
2217
|
-
}, null, 8,
|
|
2219
|
+
}, null, 8, Jl)
|
|
2218
2220
|
])),
|
|
2219
2221
|
E("input", {
|
|
2220
2222
|
type: "range",
|
|
@@ -2222,8 +2224,10 @@ const Rl = z({
|
|
|
2222
2224
|
max: e.max,
|
|
2223
2225
|
value: e.modelValue,
|
|
2224
2226
|
onInput: u,
|
|
2227
|
+
"aria-label": e.label,
|
|
2228
|
+
"aria-valuetext": `${n.value}%`,
|
|
2225
2229
|
class: "flex-1 transition-all duration-200 hover:scale-105"
|
|
2226
|
-
}, null, 40,
|
|
2230
|
+
}, null, 40, Zl),
|
|
2227
2231
|
E("span", {
|
|
2228
2232
|
class: x(["w-12 text-right transition-all duration-200 font-medium", o.value])
|
|
2229
2233
|
}, S(n.value) + "% ", 3)
|
|
@@ -2237,7 +2241,7 @@ const Rl = z({
|
|
|
2237
2241
|
},
|
|
2238
2242
|
setup(e) {
|
|
2239
2243
|
const l = e, t = p(() => l.size === "small");
|
|
2240
|
-
return (a, n) => (i(),
|
|
2244
|
+
return (a, n) => (i(), s("span", {
|
|
2241
2245
|
"aria-hidden": "true",
|
|
2242
2246
|
class: x(["inline-flex shrink-0 items-center rounded-full border transition-colors", [
|
|
2243
2247
|
t.value ? "h-6 w-11" : "h-7 w-12",
|
|
@@ -2253,10 +2257,10 @@ const Rl = z({
|
|
|
2253
2257
|
}, null, 2)
|
|
2254
2258
|
], 2));
|
|
2255
2259
|
}
|
|
2256
|
-
}),
|
|
2260
|
+
}), en = ["aria-checked", "disabled"], tn = { class: "min-w-0 flex-1" }, an = { class: "block font-medium text-sm text-tx-main" }, ln = {
|
|
2257
2261
|
key: 0,
|
|
2258
2262
|
class: "mt-0.5 block text-tx-muted text-xs"
|
|
2259
|
-
},
|
|
2263
|
+
}, nn = /* @__PURE__ */ z({
|
|
2260
2264
|
__name: "SwitchRow",
|
|
2261
2265
|
props: {
|
|
2262
2266
|
modelValue: { type: Boolean },
|
|
@@ -2269,19 +2273,19 @@ const Rl = z({
|
|
|
2269
2273
|
emits: ["update:modelValue"],
|
|
2270
2274
|
setup(e, { emit: l }) {
|
|
2271
2275
|
const t = e, a = l;
|
|
2272
|
-
return (n, o) => (i(),
|
|
2276
|
+
return (n, o) => (i(), s("button", {
|
|
2273
2277
|
type: "button",
|
|
2274
2278
|
role: "switch",
|
|
2275
2279
|
"aria-checked": e.modelValue,
|
|
2276
2280
|
disabled: e.disabled,
|
|
2277
|
-
class: "flex w-full items-start gap-3 rounded-corner p-2 text-left transition-colors hover:bg-ui-surface/60 disabled:cursor-not-allowed disabled:opacity-60",
|
|
2281
|
+
class: "flex w-full items-start gap-3 rounded-corner p-2 text-left transition-colors hover:bg-ui-surface/60 disabled:cursor-not-allowed disabled:opacity-60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
|
|
2278
2282
|
onClick: o[0] || (o[0] = (u) => a("update:modelValue", !t.modelValue))
|
|
2279
2283
|
}, [
|
|
2280
2284
|
O(Te, {
|
|
2281
2285
|
on: e.modelValue,
|
|
2282
2286
|
class: "mt-0.5"
|
|
2283
2287
|
}, null, 8, ["on"]),
|
|
2284
|
-
e.icon ? (i(),
|
|
2288
|
+
e.icon ? (i(), s("span", {
|
|
2285
2289
|
key: 0,
|
|
2286
2290
|
class: x(["flex size-10 shrink-0 items-center justify-center rounded-corner border", e.modelValue ? "border-secondary bg-primary/20" : "border-ui-border bg-ui-surface/40"]),
|
|
2287
2291
|
"aria-hidden": "true"
|
|
@@ -2293,14 +2297,14 @@ const Rl = z({
|
|
|
2293
2297
|
alt: ""
|
|
2294
2298
|
}, null, 8, ["name", "type"])
|
|
2295
2299
|
], 2)) : h("", !0),
|
|
2296
|
-
E("span",
|
|
2297
|
-
E("span",
|
|
2298
|
-
e.description ? (i(),
|
|
2300
|
+
E("span", tn, [
|
|
2301
|
+
E("span", an, S(e.label), 1),
|
|
2302
|
+
e.description ? (i(), s("span", ln, S(e.description), 1)) : h("", !0),
|
|
2299
2303
|
A(n.$slots, "pie")
|
|
2300
2304
|
])
|
|
2301
|
-
], 8,
|
|
2305
|
+
], 8, en));
|
|
2302
2306
|
}
|
|
2303
|
-
}),
|
|
2307
|
+
}), on = ["aria-checked", "aria-label", "disabled"], sn = /* @__PURE__ */ z({
|
|
2304
2308
|
__name: "SwitchToggle",
|
|
2305
2309
|
props: {
|
|
2306
2310
|
modelValue: { type: Boolean },
|
|
@@ -2314,27 +2318,27 @@ const Rl = z({
|
|
|
2314
2318
|
function n() {
|
|
2315
2319
|
a("update:modelValue", !t.modelValue);
|
|
2316
2320
|
}
|
|
2317
|
-
return (o, u) => (i(),
|
|
2321
|
+
return (o, u) => (i(), s("button", {
|
|
2318
2322
|
type: "button",
|
|
2319
2323
|
role: "switch",
|
|
2320
2324
|
"aria-checked": e.modelValue,
|
|
2321
2325
|
"aria-label": e.label,
|
|
2322
2326
|
disabled: e.disabled,
|
|
2323
|
-
class: "rounded-full transition-opacity disabled:cursor-not-allowed disabled:opacity-50",
|
|
2327
|
+
class: "rounded-full transition-opacity disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
|
|
2324
2328
|
onClick: n
|
|
2325
2329
|
}, [
|
|
2326
2330
|
O(Te, {
|
|
2327
2331
|
on: e.modelValue,
|
|
2328
2332
|
size: e.size
|
|
2329
2333
|
}, null, 8, ["on", "size"])
|
|
2330
|
-
], 8,
|
|
2334
|
+
], 8, on));
|
|
2331
2335
|
}
|
|
2332
|
-
}), rn = ["disabled"
|
|
2336
|
+
}), rn = ["disabled", "title", "aria-label", "aria-pressed", "aria-busy"], un = ["src"], cn = /* @__PURE__ */ z({
|
|
2333
2337
|
__name: "ToggleControl",
|
|
2334
2338
|
props: {
|
|
2335
2339
|
icon: {},
|
|
2336
|
-
|
|
2337
|
-
|
|
2340
|
+
label: {},
|
|
2341
|
+
pressed: { type: [Boolean, null], default: null },
|
|
2338
2342
|
isActive: { type: Boolean, default: !1 },
|
|
2339
2343
|
isLoading: { type: Boolean, default: !1 },
|
|
2340
2344
|
iconClass: { default: () => ({}) },
|
|
@@ -2342,40 +2346,45 @@ const Rl = z({
|
|
|
2342
2346
|
},
|
|
2343
2347
|
emits: ["click"],
|
|
2344
2348
|
setup(e, { emit: l }) {
|
|
2345
|
-
const t = l
|
|
2349
|
+
const t = l;
|
|
2350
|
+
function a() {
|
|
2346
2351
|
t("click");
|
|
2347
|
-
}
|
|
2348
|
-
return (n, o) => (i(),
|
|
2349
|
-
|
|
2350
|
-
class: x(["p-2 rounded-corner
|
|
2352
|
+
}
|
|
2353
|
+
return (n, o) => (i(), s("button", {
|
|
2354
|
+
type: "button",
|
|
2355
|
+
class: x(["p-2 rounded-corner bg-ui-bg/80 hover:opacity-50 transition-all duration-300 h-17.5 w-17.5 group relative overflow-hidden hover:scale-105 hover:shadow-lg active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2", {
|
|
2351
2356
|
"animate-pulse": e.isLoading,
|
|
2352
|
-
"ring-2 ring-primary
|
|
2357
|
+
"ring-2 ring-primary": e.isActive,
|
|
2353
2358
|
"opacity-60": !e.isActive,
|
|
2354
2359
|
...e.customClass
|
|
2355
2360
|
}]),
|
|
2356
|
-
disabled: e.isLoading
|
|
2361
|
+
disabled: e.isLoading,
|
|
2362
|
+
title: e.label,
|
|
2363
|
+
"aria-label": e.label,
|
|
2364
|
+
"aria-pressed": e.pressed ?? void 0,
|
|
2365
|
+
"aria-busy": e.isLoading || void 0,
|
|
2366
|
+
onClick: a
|
|
2357
2367
|
}, [
|
|
2358
2368
|
E("img", {
|
|
2359
2369
|
src: e.icon,
|
|
2360
|
-
alt:
|
|
2361
|
-
title: e.tooltip,
|
|
2370
|
+
alt: "",
|
|
2362
2371
|
class: x(["m-auto w-12.5 h-12.5 transition-all duration-300 group-hover:scale-110 relative z-10", {
|
|
2363
2372
|
"animate-spin": e.isLoading,
|
|
2364
2373
|
"filter brightness-75": !e.isActive,
|
|
2365
2374
|
"drop-shadow-lg": e.isActive,
|
|
2366
2375
|
...e.iconClass
|
|
2367
2376
|
}])
|
|
2368
|
-
}, null, 10,
|
|
2377
|
+
}, null, 10, un)
|
|
2369
2378
|
], 10, rn));
|
|
2370
2379
|
}
|
|
2371
2380
|
}), at = /* @__PURE__ */ Symbol("tooltip de vasak");
|
|
2372
2381
|
function lt() {
|
|
2373
2382
|
const e = pe(at, null);
|
|
2374
2383
|
if (e) return e;
|
|
2375
|
-
const l =
|
|
2384
|
+
const l = $(!1);
|
|
2376
2385
|
return {
|
|
2377
2386
|
abierto: p(() => l.value),
|
|
2378
|
-
disparador:
|
|
2387
|
+
disparador: $(null),
|
|
2379
2388
|
ponerElDisparador: () => {
|
|
2380
2389
|
},
|
|
2381
2390
|
abrir: () => {
|
|
@@ -2386,14 +2395,14 @@ function lt() {
|
|
|
2386
2395
|
}
|
|
2387
2396
|
};
|
|
2388
2397
|
}
|
|
2389
|
-
const
|
|
2398
|
+
const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
|
|
2390
2399
|
__name: "Tooltip",
|
|
2391
2400
|
props: {
|
|
2392
2401
|
disabled: { type: Boolean, default: !1 },
|
|
2393
2402
|
delayDuration: { default: 200 }
|
|
2394
2403
|
},
|
|
2395
2404
|
setup(e) {
|
|
2396
|
-
const l = e, t =
|
|
2405
|
+
const l = e, t = $(!1), a = $(null);
|
|
2397
2406
|
let n = null;
|
|
2398
2407
|
function o() {
|
|
2399
2408
|
l.disabled || (n = setTimeout(() => {
|
|
@@ -2406,16 +2415,16 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2406
2415
|
return de(at, {
|
|
2407
2416
|
abierto: p(() => t.value && !l.disabled),
|
|
2408
2417
|
disparador: a,
|
|
2409
|
-
ponerElDisparador: (
|
|
2410
|
-
a.value =
|
|
2418
|
+
ponerElDisparador: (r) => {
|
|
2419
|
+
a.value = r;
|
|
2411
2420
|
},
|
|
2412
2421
|
abrir: o,
|
|
2413
2422
|
cerrar: u
|
|
2414
|
-
}), (
|
|
2415
|
-
A(
|
|
2423
|
+
}), (r, m) => (i(), s("div", dn, [
|
|
2424
|
+
A(r.$slots, "default")
|
|
2416
2425
|
]));
|
|
2417
2426
|
}
|
|
2418
|
-
}),
|
|
2427
|
+
}), mn = /* @__PURE__ */ z({
|
|
2419
2428
|
inheritAttrs: !1,
|
|
2420
2429
|
__name: "TooltipContent",
|
|
2421
2430
|
props: {
|
|
@@ -2424,7 +2433,7 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2424
2433
|
sideOffset: { default: 4 }
|
|
2425
2434
|
},
|
|
2426
2435
|
setup(e) {
|
|
2427
|
-
const l =
|
|
2436
|
+
const l = we(), t = p(() => l.class ?? ""), a = e, n = lt(), o = p(() => n.abierto.value), u = $(null), r = $({ top: 0, left: 0 });
|
|
2428
2437
|
function m() {
|
|
2429
2438
|
const b = n.disparador.value;
|
|
2430
2439
|
if (!b || !u.value) return;
|
|
@@ -2444,7 +2453,7 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2444
2453
|
L = f.right + a.sideOffset, D = f.top + f.height / 2 - B.height / 2;
|
|
2445
2454
|
break;
|
|
2446
2455
|
}
|
|
2447
|
-
|
|
2456
|
+
r.value = { top: D, left: L };
|
|
2448
2457
|
}
|
|
2449
2458
|
return K(o, async (b) => {
|
|
2450
2459
|
b && (await Y(), requestAnimationFrame(m));
|
|
@@ -2459,7 +2468,7 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2459
2468
|
Ce(E("div", {
|
|
2460
2469
|
ref_key: "globo",
|
|
2461
2470
|
ref: u,
|
|
2462
|
-
style:
|
|
2471
|
+
style: se({ position: "fixed", top: `${r.value.top}px`, left: `${r.value.left}px`, zIndex: 50 }),
|
|
2463
2472
|
class: x([
|
|
2464
2473
|
t.value,
|
|
2465
2474
|
"pointer-events-none rounded-corner border border-secondary bg-ui-bg/80 px-2 py-1 text-sm shadow-md"
|
|
@@ -2474,10 +2483,10 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2474
2483
|
})
|
|
2475
2484
|
]));
|
|
2476
2485
|
}
|
|
2477
|
-
}),
|
|
2486
|
+
}), bn = /* @__PURE__ */ z({
|
|
2478
2487
|
__name: "TooltipTrigger",
|
|
2479
2488
|
setup(e) {
|
|
2480
|
-
const l = lt(), t =
|
|
2489
|
+
const l = lt(), t = $(null);
|
|
2481
2490
|
function a() {
|
|
2482
2491
|
return t.value ? t.value.firstElementChild ?? t.value : null;
|
|
2483
2492
|
}
|
|
@@ -2486,22 +2495,22 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2486
2495
|
}
|
|
2487
2496
|
return J(() => {
|
|
2488
2497
|
l.ponerElDisparador(a());
|
|
2489
|
-
}), (o, u) => (i(),
|
|
2498
|
+
}), (o, u) => (i(), s("div", {
|
|
2490
2499
|
ref_key: "envoltorio",
|
|
2491
2500
|
ref: t,
|
|
2492
2501
|
class: "inline-block",
|
|
2493
2502
|
onMouseenter: n,
|
|
2494
|
-
onMouseleave: u[0] || (u[0] = (
|
|
2503
|
+
onMouseleave: u[0] || (u[0] = (r) => q(l).cerrar()),
|
|
2495
2504
|
onFocus: n,
|
|
2496
|
-
onBlur: u[1] || (u[1] = (
|
|
2505
|
+
onBlur: u[1] || (u[1] = (r) => q(l).cerrar())
|
|
2497
2506
|
}, [
|
|
2498
2507
|
A(o.$slots, "default")
|
|
2499
2508
|
], 544));
|
|
2500
2509
|
}
|
|
2501
|
-
}),
|
|
2510
|
+
}), vn = ["title"], pn = ["src", "alt"], gn = {
|
|
2502
2511
|
key: 0,
|
|
2503
2512
|
class: "absolute bottom-1 right-1 bg-primary dark:bg-primary-dark text-white text-xs rounded-full w-4 h-4 flex items-center justify-center font-bold animate-bounce"
|
|
2504
|
-
},
|
|
2513
|
+
}, yn = /* @__PURE__ */ z({
|
|
2505
2514
|
__name: "TrayIconButton",
|
|
2506
2515
|
props: {
|
|
2507
2516
|
icon: {},
|
|
@@ -2516,23 +2525,23 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2516
2525
|
},
|
|
2517
2526
|
emits: ["click"],
|
|
2518
2527
|
setup(e, { emit: l }) {
|
|
2519
|
-
const t = l, a =
|
|
2528
|
+
const t = l, a = $(!1), n = () => {
|
|
2520
2529
|
t("click");
|
|
2521
2530
|
};
|
|
2522
|
-
return (o, u) => (i(),
|
|
2531
|
+
return (o, u) => (i(), s("div", {
|
|
2523
2532
|
class: x(["p-1 rounded-corner relative hover:bg-primary dark:hover:bg-primary-dark group transition-all duration-300", e.customClass]),
|
|
2524
2533
|
title: e.tooltip,
|
|
2525
2534
|
onClick: n,
|
|
2526
|
-
onMouseenter: u[0] || (u[0] = (
|
|
2527
|
-
onMouseleave: u[1] || (u[1] = (
|
|
2535
|
+
onMouseenter: u[0] || (u[0] = (r) => a.value = !0),
|
|
2536
|
+
onMouseleave: u[1] || (u[1] = (r) => a.value = !1)
|
|
2528
2537
|
}, [
|
|
2529
2538
|
E("img", {
|
|
2530
2539
|
src: e.icon,
|
|
2531
2540
|
alt: e.alt,
|
|
2532
2541
|
class: x(["m-auto h-5.5 w-auto transition-all duration-300", e.iconClass])
|
|
2533
|
-
}, null, 10,
|
|
2534
|
-
e.badge !== null && e.badge > 0 ? (i(),
|
|
2535
|
-
e.showCustomTooltip && e.customTooltipText ? (i(),
|
|
2542
|
+
}, null, 10, pn),
|
|
2543
|
+
e.badge !== null && e.badge > 0 ? (i(), s("div", gn, S(e.badge), 1)) : h("", !0),
|
|
2544
|
+
e.showCustomTooltip && e.customTooltipText ? (i(), s("div", {
|
|
2536
2545
|
key: 1,
|
|
2537
2546
|
class: x(["absolute top-1 left-1/2 transform -translate-x-1/2 text-xs font-semibold p-1 rounded-corner transition-all duration-300 pointer-events-none background", [
|
|
2538
2547
|
e.tooltipClass,
|
|
@@ -2543,15 +2552,15 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2543
2552
|
]])
|
|
2544
2553
|
}, S(e.customTooltipText), 3)) : h("", !0),
|
|
2545
2554
|
A(o.$slots, "default")
|
|
2546
|
-
], 42,
|
|
2555
|
+
], 42, vn));
|
|
2547
2556
|
}
|
|
2548
|
-
}),
|
|
2557
|
+
}), hn = [
|
|
2549
2558
|
Ut,
|
|
2550
2559
|
He,
|
|
2551
2560
|
Ne,
|
|
2552
2561
|
Yt,
|
|
2553
2562
|
H,
|
|
2554
|
-
|
|
2563
|
+
ra,
|
|
2555
2564
|
Ke,
|
|
2556
2565
|
We,
|
|
2557
2566
|
xa,
|
|
@@ -2565,11 +2574,11 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2565
2574
|
ol,
|
|
2566
2575
|
Qe,
|
|
2567
2576
|
Na,
|
|
2568
|
-
|
|
2577
|
+
rl,
|
|
2569
2578
|
gl,
|
|
2570
2579
|
hl,
|
|
2571
2580
|
kl,
|
|
2572
|
-
|
|
2581
|
+
wl,
|
|
2573
2582
|
zl,
|
|
2574
2583
|
Dl,
|
|
2575
2584
|
Tl,
|
|
@@ -2581,18 +2590,18 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2581
2590
|
Rl,
|
|
2582
2591
|
Ul,
|
|
2583
2592
|
Kl,
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2593
|
+
_l,
|
|
2594
|
+
nn,
|
|
2595
|
+
sn,
|
|
2587
2596
|
Te,
|
|
2588
|
-
|
|
2589
|
-
dn,
|
|
2597
|
+
cn,
|
|
2590
2598
|
fn,
|
|
2591
2599
|
mn,
|
|
2592
|
-
|
|
2593
|
-
|
|
2600
|
+
bn,
|
|
2601
|
+
yn
|
|
2602
|
+
], En = {
|
|
2594
2603
|
install(e) {
|
|
2595
|
-
|
|
2604
|
+
hn.forEach((l) => {
|
|
2596
2605
|
e.component(l.name, l);
|
|
2597
2606
|
});
|
|
2598
2607
|
}
|
|
@@ -2607,11 +2616,11 @@ export {
|
|
|
2607
2616
|
_e as CLAVE_DEL_MENU,
|
|
2608
2617
|
at as CLAVE_DEL_TOOLTIP,
|
|
2609
2618
|
Ee as CLAVE_DE_LA_BARRA,
|
|
2610
|
-
|
|
2619
|
+
rl as ConfigSection,
|
|
2611
2620
|
gl as DeviceCard,
|
|
2612
2621
|
hl as Dialog,
|
|
2613
2622
|
kl as DialogContent,
|
|
2614
|
-
|
|
2623
|
+
wl as DialogDescription,
|
|
2615
2624
|
zl as DialogFooter,
|
|
2616
2625
|
Dl as DialogHeader,
|
|
2617
2626
|
Tl as DialogTitle,
|
|
@@ -2633,27 +2642,27 @@ export {
|
|
|
2633
2642
|
Ut as SideBar,
|
|
2634
2643
|
He as SideButton,
|
|
2635
2644
|
Ne as SideGroup,
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2645
|
+
_l as SliderControl,
|
|
2646
|
+
nn as SwitchRow,
|
|
2647
|
+
sn as SwitchToggle,
|
|
2639
2648
|
Te as SwitchTrack,
|
|
2640
2649
|
xa as TabBar,
|
|
2641
2650
|
Ge as TabItem,
|
|
2642
2651
|
Qe as TextInput,
|
|
2643
2652
|
H as ThemeIcon,
|
|
2644
2653
|
Na as ToastArea,
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2654
|
+
cn as ToggleControl,
|
|
2655
|
+
fn as Tooltip,
|
|
2656
|
+
mn as TooltipContent,
|
|
2657
|
+
bn as TooltipTrigger,
|
|
2658
|
+
yn as TrayIconButton,
|
|
2650
2659
|
We as WindowControls,
|
|
2651
|
-
|
|
2660
|
+
ra as WindowFrame,
|
|
2652
2661
|
Ga as buscarOpciones,
|
|
2653
|
-
|
|
2662
|
+
En as default,
|
|
2654
2663
|
Jt as esPosicion,
|
|
2655
|
-
|
|
2656
|
-
|
|
2664
|
+
zn as olvidarLosIconosDelTema,
|
|
2665
|
+
$e as orientacionDe,
|
|
2657
2666
|
ea as posicionDe,
|
|
2658
2667
|
Xe as rolDelTono,
|
|
2659
2668
|
Ze as usarElDialogo,
|