@vasakgroup/vue-libvasak 0.14.1 → 0.15.1
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/types/controls/ToggleControl.vue.d.ts +45 -8
- package/dist/types/feedback/EmptyState.vue.d.ts +10 -0
- package/dist/types/forms/SliderControl.vue.d.ts +7 -4
- package/dist/types/tray/TrayIconButton.vue.d.ts +1 -1
- package/dist/vue-libvasak.es.js +343 -332
- package/dist/vue-libvasak.umd.js +1 -1
- package/package.json +1 -1
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
|
}, [
|
|
@@ -1215,19 +1215,21 @@ const Va = ["role"], Ma = {
|
|
|
1215
1215
|
title: {},
|
|
1216
1216
|
note: {},
|
|
1217
1217
|
icon: { default: "dialog-information" },
|
|
1218
|
+
iconType: { default: "icon" },
|
|
1218
1219
|
bordered: { type: Boolean, default: !1 }
|
|
1219
1220
|
},
|
|
1220
1221
|
setup(e) {
|
|
1221
|
-
return (l, t) => (i(),
|
|
1222
|
+
return (l, t) => (i(), s("div", {
|
|
1222
1223
|
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
1224
|
}, [
|
|
1224
1225
|
O(H, {
|
|
1225
1226
|
name: e.icon,
|
|
1227
|
+
type: e.iconType,
|
|
1226
1228
|
size: 48,
|
|
1227
1229
|
class: "opacity-60"
|
|
1228
|
-
}, null, 8, ["name"]),
|
|
1230
|
+
}, null, 8, ["name", "type"]),
|
|
1229
1231
|
E("p", Pa, S(e.title), 1),
|
|
1230
|
-
e.note ? (i(),
|
|
1232
|
+
e.note ? (i(), s("p", Fa, S(e.note), 1)) : h("", !0),
|
|
1231
1233
|
A(l.$slots, "default")
|
|
1232
1234
|
], 2));
|
|
1233
1235
|
}
|
|
@@ -1253,7 +1255,7 @@ const Va = ["role"], Ma = {
|
|
|
1253
1255
|
"move-class": "transition-transform duration-300"
|
|
1254
1256
|
}, {
|
|
1255
1257
|
default: W(() => [
|
|
1256
|
-
(i(!0),
|
|
1258
|
+
(i(!0), s(Z, null, ne(e.toasts, (o) => (i(), s("div", {
|
|
1257
1259
|
key: o.id,
|
|
1258
1260
|
role: q(Xe)(o.tone ?? "info"),
|
|
1259
1261
|
"aria-atomic": "true",
|
|
@@ -1282,7 +1284,7 @@ const Va = ["role"], Ma = {
|
|
|
1282
1284
|
const l = e, t = p(
|
|
1283
1285
|
() => l.value === null ? null : Math.max(0, Math.min(100, l.value))
|
|
1284
1286
|
);
|
|
1285
|
-
return (a, n) => (i(),
|
|
1287
|
+
return (a, n) => (i(), s("div", {
|
|
1286
1288
|
role: "progressbar",
|
|
1287
1289
|
"aria-label": e.label,
|
|
1288
1290
|
"aria-valuenow": t.value ?? void 0,
|
|
@@ -1290,11 +1292,11 @@ const Va = ["role"], Ma = {
|
|
|
1290
1292
|
"aria-valuemax": "100",
|
|
1291
1293
|
class: "h-2 w-full overflow-hidden rounded-corner bg-ui-surface/70"
|
|
1292
1294
|
}, [
|
|
1293
|
-
t.value !== null ? (i(),
|
|
1295
|
+
t.value !== null ? (i(), s("div", {
|
|
1294
1296
|
key: 0,
|
|
1295
1297
|
class: "h-full rounded-corner bg-primary transition-[width] duration-300 ease-out",
|
|
1296
|
-
style:
|
|
1297
|
-
}, null, 4)) : (i(),
|
|
1298
|
+
style: se({ width: `${t.value}%` })
|
|
1299
|
+
}, null, 4)) : (i(), s("div", Ua))
|
|
1298
1300
|
], 8, Ha));
|
|
1299
1301
|
}
|
|
1300
1302
|
}), Ka = /[/\-_.]/;
|
|
@@ -1308,7 +1310,7 @@ function Ga(e, l) {
|
|
|
1308
1310
|
if (!t) return e;
|
|
1309
1311
|
const a = [];
|
|
1310
1312
|
for (let n = 0; n < e.length; n++) {
|
|
1311
|
-
const o = e[n], u = ke(t, o.valor),
|
|
1313
|
+
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
1314
|
B !== 100 && a.push({ opcion: o, rango: B, orden: n });
|
|
1313
1315
|
}
|
|
1314
1316
|
return a.sort((n, o) => n.rango - o.rango || n.orden - o.orden), a.map((n) => n.opcion);
|
|
@@ -1344,20 +1346,20 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1344
1346
|
},
|
|
1345
1347
|
emits: ["update:modelValue"],
|
|
1346
1348
|
setup(e, { emit: l }) {
|
|
1347
|
-
const t = e, a = l, n =
|
|
1349
|
+
const t = e, a = l, n = $(""), o = $(!1), u = $(0), r = $(null), m = $(null), b = $(null), f = Qa(), B = p(
|
|
1348
1350
|
() => t.options.find((T) => T.valor === t.modelValue) ?? null
|
|
1349
1351
|
), 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
1352
|
() => L.value.length > 0 ? `${f}-${u.value}` : void 0
|
|
1351
1353
|
);
|
|
1352
1354
|
function V(T) {
|
|
1353
|
-
a("update:modelValue", T),
|
|
1355
|
+
a("update:modelValue", T), w();
|
|
1354
1356
|
}
|
|
1355
1357
|
async function j() {
|
|
1356
1358
|
o.value = !0;
|
|
1357
1359
|
const T = L.value.findIndex((C) => C.valor === t.modelValue);
|
|
1358
1360
|
u.value = T >= 0 ? T : 0, await Y(), b.value?.enfocar(), U();
|
|
1359
1361
|
}
|
|
1360
|
-
function
|
|
1362
|
+
function w(T = !0) {
|
|
1361
1363
|
o.value && (o.value = !1, n.value = "", T && Y(() => m.value?.focus()));
|
|
1362
1364
|
}
|
|
1363
1365
|
function c(T) {
|
|
@@ -1383,7 +1385,7 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1383
1385
|
}
|
|
1384
1386
|
function U() {
|
|
1385
1387
|
Y(() => {
|
|
1386
|
-
|
|
1388
|
+
r.value?.querySelector(`[data-indice="${u.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
1387
1389
|
});
|
|
1388
1390
|
}
|
|
1389
1391
|
function ee() {
|
|
@@ -1393,16 +1395,16 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1393
1395
|
K(
|
|
1394
1396
|
() => t.disabled,
|
|
1395
1397
|
(T) => {
|
|
1396
|
-
T &&
|
|
1398
|
+
T && w(!1);
|
|
1397
1399
|
}
|
|
1398
1400
|
), K(n, () => {
|
|
1399
1401
|
u.value = 0, U();
|
|
1400
1402
|
});
|
|
1401
1403
|
function G(T) {
|
|
1402
1404
|
const C = T.relatedTarget;
|
|
1403
|
-
C && T.currentTarget.contains(C) ||
|
|
1405
|
+
C && T.currentTarget.contains(C) || w(!1);
|
|
1404
1406
|
}
|
|
1405
|
-
return (T, C) => (i(),
|
|
1407
|
+
return (T, C) => (i(), s("div", {
|
|
1406
1408
|
class: "relative",
|
|
1407
1409
|
onFocusout: G
|
|
1408
1410
|
}, [
|
|
@@ -1415,7 +1417,7 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1415
1417
|
"aria-label": e.label || void 0,
|
|
1416
1418
|
"aria-expanded": o.value,
|
|
1417
1419
|
"aria-haspopup": "listbox",
|
|
1418
|
-
onClick: C[0] || (C[0] = (I) => o.value ?
|
|
1420
|
+
onClick: C[0] || (C[0] = (I) => o.value ? w() : j()),
|
|
1419
1421
|
onKeydown: [
|
|
1420
1422
|
C[1] || (C[1] = F(M((I) => o.value ? c(1) : j(), ["prevent"]), ["down"])),
|
|
1421
1423
|
C[2] || (C[2] = F(M((I) => o.value ? c(-1) : j(), ["prevent"]), ["up"]))
|
|
@@ -1423,7 +1425,7 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1423
1425
|
}, [
|
|
1424
1426
|
E("span", Xa, [
|
|
1425
1427
|
ze(S(B.value?.etiqueta ?? e.placeholder) + " ", 1),
|
|
1426
|
-
B.value?.detalle ? (i(),
|
|
1428
|
+
B.value?.detalle ? (i(), s("span", Ja, S(B.value.detalle), 1)) : h("", !0)
|
|
1427
1429
|
]),
|
|
1428
1430
|
O(H, {
|
|
1429
1431
|
name: "go-down",
|
|
@@ -1432,17 +1434,17 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1432
1434
|
class: "shrink-0 opacity-60"
|
|
1433
1435
|
})
|
|
1434
1436
|
], 40, Ya),
|
|
1435
|
-
o.value ? (i(),
|
|
1437
|
+
o.value ? (i(), s("div", {
|
|
1436
1438
|
key: 0,
|
|
1437
1439
|
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
1440
|
onKeydown: [
|
|
1439
|
-
C[4] || (C[4] = F(M((I) =>
|
|
1441
|
+
C[4] || (C[4] = F(M((I) => w(), ["prevent"]), ["escape"])),
|
|
1440
1442
|
C[5] || (C[5] = F(M((I) => c(1), ["prevent"]), ["down"])),
|
|
1441
1443
|
C[6] || (C[6] = F(M((I) => c(-1), ["prevent"]), ["up"])),
|
|
1442
1444
|
C[7] || (C[7] = F(M((I) => v(0), ["prevent"]), ["home"])),
|
|
1443
1445
|
C[8] || (C[8] = F(M((I) => v(L.value.length - 1), ["prevent"]), ["end"])),
|
|
1444
1446
|
C[9] || (C[9] = F(M((I) => ee(), ["prevent"]), ["enter"])),
|
|
1445
|
-
C[10] || (C[10] = F((I) =>
|
|
1447
|
+
C[10] || (C[10] = F((I) => w(!1), ["tab"]))
|
|
1446
1448
|
],
|
|
1447
1449
|
onClick: P,
|
|
1448
1450
|
onMousemove: _
|
|
@@ -1463,12 +1465,12 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1463
1465
|
E("ul", {
|
|
1464
1466
|
id: q(f),
|
|
1465
1467
|
ref_key: "lista",
|
|
1466
|
-
ref:
|
|
1468
|
+
ref: r,
|
|
1467
1469
|
role: "listbox",
|
|
1468
1470
|
class: "max-h-56 overflow-y-auto p-1"
|
|
1469
1471
|
}, [
|
|
1470
|
-
L.value.length === 0 ? (i(),
|
|
1471
|
-
(i(!0),
|
|
1472
|
+
L.value.length === 0 ? (i(), s("li", el, S(e.emptyText), 1)) : h("", !0),
|
|
1473
|
+
(i(!0), s(Z, null, ne(L.value, (I, ie) => (i(), s("li", {
|
|
1472
1474
|
id: `${q(f)}-${ie}`,
|
|
1473
1475
|
key: I.valor,
|
|
1474
1476
|
"data-indice": ie,
|
|
@@ -1480,14 +1482,14 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1480
1482
|
]])
|
|
1481
1483
|
}, [
|
|
1482
1484
|
E("span", al, S(I.etiqueta), 1),
|
|
1483
|
-
I.detalle ? (i(),
|
|
1485
|
+
I.detalle ? (i(), s("span", ll, S(I.detalle), 1)) : h("", !0)
|
|
1484
1486
|
], 10, tl))), 128)),
|
|
1485
|
-
g.value > 0 ? (i(),
|
|
1487
|
+
g.value > 0 ? (i(), s("li", nl, "+" + S(g.value), 1)) : h("", !0)
|
|
1486
1488
|
], 8, _a)
|
|
1487
1489
|
], 34)) : h("", !0)
|
|
1488
1490
|
], 32));
|
|
1489
1491
|
}
|
|
1490
|
-
}), il = { class: "text-base font-semibold m-0 text-primary dark:text-primary-dark" },
|
|
1492
|
+
}), il = { class: "text-base font-semibold m-0 text-primary dark:text-primary-dark" }, sl = /* @__PURE__ */ z({
|
|
1491
1493
|
__name: "ConfigSection",
|
|
1492
1494
|
props: {
|
|
1493
1495
|
title: {},
|
|
@@ -1495,14 +1497,14 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1495
1497
|
customClass: { default: () => ({}) }
|
|
1496
1498
|
},
|
|
1497
1499
|
setup(e) {
|
|
1498
|
-
return (l, t) => (i(),
|
|
1500
|
+
return (l, t) => (i(), s("div", {
|
|
1499
1501
|
class: x(["flex flex-col gap-4 p-4 background rounded-corner", e.customClass])
|
|
1500
1502
|
}, [
|
|
1501
1503
|
E("h3", il, S(e.icon ? `${e.icon} ${e.title}` : e.title), 1),
|
|
1502
1504
|
A(l.$slots, "default", {}, void 0, !0)
|
|
1503
1505
|
], 2));
|
|
1504
1506
|
}
|
|
1505
|
-
}),
|
|
1507
|
+
}), 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
1508
|
key: 0,
|
|
1507
1509
|
class: "text-xs text-gray-400 truncate"
|
|
1508
1510
|
}, bl = {
|
|
@@ -1536,7 +1538,7 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1536
1538
|
}, n = () => {
|
|
1537
1539
|
t("click");
|
|
1538
1540
|
};
|
|
1539
|
-
return (o, u) => (i(),
|
|
1541
|
+
return (o, u) => (i(), s("div", {
|
|
1540
1542
|
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
1543
|
onClick: n
|
|
1542
1544
|
}, [
|
|
@@ -1548,32 +1550,32 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
|
|
|
1548
1550
|
}, null, 8, cl),
|
|
1549
1551
|
E("div", dl, [
|
|
1550
1552
|
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),
|
|
1553
|
+
e.subtitle ? (i(), s("div", ml, S(e.subtitle), 1)) : h("", !0),
|
|
1554
|
+
e.metadata ? (i(), s("div", bl, S(e.metadata), 1)) : h("", !0),
|
|
1555
|
+
e.extraInfo && e.extraInfo.length > 0 ? (i(), s("div", vl, [
|
|
1556
|
+
(i(!0), s(Z, null, ne(e.extraInfo, (r, m) => (i(), s("span", { key: m }, S(r), 1))), 128))
|
|
1555
1557
|
])) : h("", !0)
|
|
1556
1558
|
])
|
|
1557
1559
|
]),
|
|
1558
|
-
e.showActionButton ? (i(),
|
|
1560
|
+
e.showActionButton ? (i(), s("button", {
|
|
1559
1561
|
key: 0,
|
|
1560
1562
|
class: "bg-vsk-primary rounded-vsk px-4 py-2 text-sm font-semibold cursor-pointer hover:opacity-70",
|
|
1561
1563
|
onClick: M(a, ["stop"])
|
|
1562
1564
|
}, S(e.actionLabel), 1)) : h("", !0),
|
|
1563
|
-
e.showStatusIndicator && e.isConnected ? (i(),
|
|
1565
|
+
e.showStatusIndicator && e.isConnected ? (i(), s("div", pl)) : h("", !0)
|
|
1564
1566
|
], 2));
|
|
1565
1567
|
}
|
|
1566
1568
|
}), Je = /* @__PURE__ */ Symbol("diálogo de vasak");
|
|
1567
1569
|
function Ze() {
|
|
1568
1570
|
const e = pe(Je, null);
|
|
1569
1571
|
if (e) return e;
|
|
1570
|
-
const l =
|
|
1572
|
+
const l = $(!1);
|
|
1571
1573
|
return {
|
|
1572
1574
|
abierto: p(() => l.value),
|
|
1573
1575
|
cerrar: () => {
|
|
1574
1576
|
l.value = !1;
|
|
1575
1577
|
},
|
|
1576
|
-
idDelTitulo:
|
|
1578
|
+
idDelTitulo: $(null),
|
|
1577
1579
|
ponerElTitulo: () => {
|
|
1578
1580
|
}
|
|
1579
1581
|
};
|
|
@@ -1589,7 +1591,7 @@ const hl = /* @__PURE__ */ z({
|
|
|
1589
1591
|
},
|
|
1590
1592
|
emits: ["update:open"],
|
|
1591
1593
|
setup(e, { emit: l }) {
|
|
1592
|
-
const t = e, a = l, n =
|
|
1594
|
+
const t = e, a = l, n = $(null);
|
|
1593
1595
|
return de(Je, {
|
|
1594
1596
|
abierto: p(() => t.open),
|
|
1595
1597
|
cerrar: () => a("update:open", !1),
|
|
@@ -1603,13 +1605,13 @@ const hl = /* @__PURE__ */ z({
|
|
|
1603
1605
|
inheritAttrs: !1,
|
|
1604
1606
|
__name: "DialogContent",
|
|
1605
1607
|
setup(e) {
|
|
1606
|
-
const l =
|
|
1608
|
+
const l = we(), t = p(() => l.class ?? ""), a = p(() => {
|
|
1607
1609
|
const { class: d, ...V } = l;
|
|
1608
1610
|
return V;
|
|
1609
|
-
}), n = Ze(), o = p(() => n.abierto.value), u =
|
|
1611
|
+
}), n = Ze(), o = p(() => n.abierto.value), u = $(null), r = $(null);
|
|
1610
1612
|
let m = null;
|
|
1611
1613
|
function b() {
|
|
1612
|
-
return
|
|
1614
|
+
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
1615
|
}
|
|
1614
1616
|
function f(d) {
|
|
1615
1617
|
if (d.key === "Escape") {
|
|
@@ -1619,11 +1621,11 @@ const hl = /* @__PURE__ */ z({
|
|
|
1619
1621
|
if (d.key !== "Tab") return;
|
|
1620
1622
|
const V = b();
|
|
1621
1623
|
if (V.length === 0) {
|
|
1622
|
-
d.preventDefault(),
|
|
1624
|
+
d.preventDefault(), r.value?.focus();
|
|
1623
1625
|
return;
|
|
1624
1626
|
}
|
|
1625
|
-
const j = V[0],
|
|
1626
|
-
d.shiftKey && (c === j || c ===
|
|
1627
|
+
const j = V[0], w = V[V.length - 1], c = document.activeElement;
|
|
1628
|
+
d.shiftKey && (c === j || c === r.value) ? (d.preventDefault(), w.focus()) : !d.shiftKey && c === w && (d.preventDefault(), j.focus());
|
|
1627
1629
|
}
|
|
1628
1630
|
function B(d) {
|
|
1629
1631
|
d.target === d.currentTarget && n.cerrar();
|
|
@@ -1642,7 +1644,7 @@ const hl = /* @__PURE__ */ z({
|
|
|
1642
1644
|
o,
|
|
1643
1645
|
async (d) => {
|
|
1644
1646
|
if (d) {
|
|
1645
|
-
m = document.activeElement, document.addEventListener("keydown", D), await Y(),
|
|
1647
|
+
m = document.activeElement, document.addEventListener("keydown", D), await Y(), r.value?.focus();
|
|
1646
1648
|
return;
|
|
1647
1649
|
}
|
|
1648
1650
|
L(), g();
|
|
@@ -1661,7 +1663,7 @@ const hl = /* @__PURE__ */ z({
|
|
|
1661
1663
|
"leave-to-class": "opacity-0"
|
|
1662
1664
|
}, {
|
|
1663
1665
|
default: W(() => [
|
|
1664
|
-
o.value ? (i(),
|
|
1666
|
+
o.value ? (i(), s("div", {
|
|
1665
1667
|
key: 0,
|
|
1666
1668
|
ref_key: "velo",
|
|
1667
1669
|
ref: u,
|
|
@@ -1672,7 +1674,7 @@ const hl = /* @__PURE__ */ z({
|
|
|
1672
1674
|
V[0] || (V[0] = E("div", { class: "absolute inset-0 bg-ui-border-dark/40" }, null, -1)),
|
|
1673
1675
|
E("div", oe({
|
|
1674
1676
|
ref_key: "panel",
|
|
1675
|
-
ref:
|
|
1677
|
+
ref: r,
|
|
1676
1678
|
tabindex: "-1",
|
|
1677
1679
|
role: "dialog",
|
|
1678
1680
|
"aria-modal": "true",
|
|
@@ -1691,24 +1693,24 @@ const hl = /* @__PURE__ */ z({
|
|
|
1691
1693
|
})
|
|
1692
1694
|
]));
|
|
1693
1695
|
}
|
|
1694
|
-
}),
|
|
1696
|
+
}), $l = { class: "text-sm text-tx-muted" }, wl = /* @__PURE__ */ z({
|
|
1695
1697
|
__name: "DialogDescription",
|
|
1696
1698
|
setup(e) {
|
|
1697
|
-
return (l, t) => (i(),
|
|
1699
|
+
return (l, t) => (i(), s("p", $l, [
|
|
1698
1700
|
A(l.$slots, "default")
|
|
1699
1701
|
]));
|
|
1700
1702
|
}
|
|
1701
1703
|
}), Cl = { class: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end" }, zl = /* @__PURE__ */ z({
|
|
1702
1704
|
__name: "DialogFooter",
|
|
1703
1705
|
setup(e) {
|
|
1704
|
-
return (l, t) => (i(),
|
|
1706
|
+
return (l, t) => (i(), s("div", Cl, [
|
|
1705
1707
|
A(l.$slots, "default")
|
|
1706
1708
|
]));
|
|
1707
1709
|
}
|
|
1708
1710
|
}), El = { class: "flex flex-col gap-1.5 text-center sm:text-left" }, Dl = /* @__PURE__ */ z({
|
|
1709
1711
|
__name: "DialogHeader",
|
|
1710
1712
|
setup(e) {
|
|
1711
|
-
return (l, t) => (i(),
|
|
1713
|
+
return (l, t) => (i(), s("div", El, [
|
|
1712
1714
|
A(l.$slots, "default")
|
|
1713
1715
|
]));
|
|
1714
1716
|
}
|
|
@@ -1716,7 +1718,7 @@ const hl = /* @__PURE__ */ z({
|
|
|
1716
1718
|
__name: "DialogTitle",
|
|
1717
1719
|
setup(e) {
|
|
1718
1720
|
const l = Ze(), t = yl();
|
|
1719
|
-
return J(() => l.ponerElTitulo(t)), ve(() => l.ponerElTitulo(null)), (a, n) => (i(),
|
|
1721
|
+
return J(() => l.ponerElTitulo(t)), ve(() => l.ponerElTitulo(null)), (a, n) => (i(), s("h2", {
|
|
1720
1722
|
id: q(t),
|
|
1721
1723
|
class: "font-semibold text-lg leading-none tracking-tight"
|
|
1722
1724
|
}, [
|
|
@@ -1727,17 +1729,17 @@ const hl = /* @__PURE__ */ z({
|
|
|
1727
1729
|
function he() {
|
|
1728
1730
|
const e = pe(_e, null);
|
|
1729
1731
|
if (e) return e;
|
|
1730
|
-
const l =
|
|
1732
|
+
const l = $(!1);
|
|
1731
1733
|
return {
|
|
1732
1734
|
abierto: l,
|
|
1733
1735
|
idDelMenu: "vsk-menu-suelto",
|
|
1734
|
-
idDeLaEtiqueta:
|
|
1736
|
+
idDeLaEtiqueta: $(null),
|
|
1735
1737
|
ponerLaEtiqueta: () => {
|
|
1736
1738
|
},
|
|
1737
|
-
disparador:
|
|
1739
|
+
disparador: $(null),
|
|
1738
1740
|
ponerElDisparador: () => {
|
|
1739
1741
|
},
|
|
1740
|
-
focoAlAbrir:
|
|
1742
|
+
focoAlAbrir: $("ninguno"),
|
|
1741
1743
|
abrir: () => {
|
|
1742
1744
|
l.value = !0;
|
|
1743
1745
|
},
|
|
@@ -1760,7 +1762,7 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
1760
1762
|
},
|
|
1761
1763
|
emits: ["update:open"],
|
|
1762
1764
|
setup(e, { emit: l }) {
|
|
1763
|
-
const t = e, a = l, n =
|
|
1765
|
+
const t = e, a = l, n = $(!1), o = $(null), u = $(null), r = $("ninguno"), m = et();
|
|
1764
1766
|
let b = null;
|
|
1765
1767
|
const f = p({
|
|
1766
1768
|
get: () => t.open ?? n.value,
|
|
@@ -1773,10 +1775,10 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
1773
1775
|
const d = document.activeElement;
|
|
1774
1776
|
b = d instanceof HTMLElement ? d : null;
|
|
1775
1777
|
} else
|
|
1776
|
-
|
|
1778
|
+
r.value = "ninguno";
|
|
1777
1779
|
});
|
|
1778
1780
|
function B(g = "ninguno") {
|
|
1779
|
-
|
|
1781
|
+
r.value = g, f.value = !0;
|
|
1780
1782
|
}
|
|
1781
1783
|
function D(g = {}) {
|
|
1782
1784
|
if (f.value = !1, !g.devolverElFoco) return;
|
|
@@ -1801,11 +1803,11 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
1801
1803
|
ponerElDisparador: (g) => {
|
|
1802
1804
|
o.value = g;
|
|
1803
1805
|
},
|
|
1804
|
-
focoAlAbrir:
|
|
1806
|
+
focoAlAbrir: r,
|
|
1805
1807
|
abrir: B,
|
|
1806
1808
|
cerrar: D,
|
|
1807
1809
|
alternar: L
|
|
1808
|
-
}), (g, d) => (i(),
|
|
1810
|
+
}), (g, d) => (i(), s("div", Bl, [
|
|
1809
1811
|
A(g.$slots, "default")
|
|
1810
1812
|
]));
|
|
1811
1813
|
}
|
|
@@ -1821,7 +1823,7 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
1821
1823
|
sideOffset: { default: 4 }
|
|
1822
1824
|
},
|
|
1823
1825
|
setup(e) {
|
|
1824
|
-
const l = e, t = he(), { idDelMenu: a, idDeLaEtiqueta: n } = t, o = p(() => t.disparador.value), u = p(() => t.abierto.value),
|
|
1826
|
+
const l = e, t = he(), { idDelMenu: a, idDeLaEtiqueta: n } = t, o = p(() => t.disparador.value), u = p(() => t.abierto.value), r = $(null), m = $({
|
|
1825
1827
|
top: 0,
|
|
1826
1828
|
left: 0,
|
|
1827
1829
|
techo: null
|
|
@@ -1848,8 +1850,8 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
1848
1850
|
return y < v ? v : Math.min(Math.max(c, v), y);
|
|
1849
1851
|
}
|
|
1850
1852
|
function D() {
|
|
1851
|
-
if (!o.value || !
|
|
1852
|
-
const c = o.value.getBoundingClientRect(), v =
|
|
1853
|
+
if (!o.value || !r.value) return;
|
|
1854
|
+
const c = o.value.getBoundingClientRect(), v = r.value.scrollHeight, y = r.value.offsetWidth, P = l.side === "top" || l.side === "bottom", _ = P ? v : y;
|
|
1853
1855
|
let U = l.side;
|
|
1854
1856
|
const ee = f(U, c);
|
|
1855
1857
|
ee < _ && f(b[U], c) > ee && (U = b[U]);
|
|
@@ -1886,7 +1888,7 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
1886
1888
|
T = B(T, X, window.innerWidth - y - X), m.value = { top: G, left: T, techo: C };
|
|
1887
1889
|
}
|
|
1888
1890
|
function L() {
|
|
1889
|
-
return
|
|
1891
|
+
return r.value ? Array.from(r.value.querySelectorAll('[role="menuitem"]')) : [];
|
|
1890
1892
|
}
|
|
1891
1893
|
function g(c) {
|
|
1892
1894
|
const v = L();
|
|
@@ -1936,20 +1938,20 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
1936
1938
|
// ninguno elegido todavía—, que es lo que deja andar las flechas y el
|
|
1937
1939
|
// Escape sin haber tocado nada.
|
|
1938
1940
|
default:
|
|
1939
|
-
|
|
1941
|
+
r.value?.focus();
|
|
1940
1942
|
}
|
|
1941
1943
|
});
|
|
1942
1944
|
function j(c) {
|
|
1943
|
-
u.value && (c &&
|
|
1945
|
+
u.value && (c && r.value?.contains(c.target) || D());
|
|
1944
1946
|
}
|
|
1945
|
-
function
|
|
1947
|
+
function w(c) {
|
|
1946
1948
|
const v = c.target, y = !!v.closest("[data-dropdown-content]"), P = !!o.value?.contains(v);
|
|
1947
1949
|
!y && !P && t.cerrar();
|
|
1948
1950
|
}
|
|
1949
1951
|
return J(() => {
|
|
1950
|
-
document.addEventListener("click",
|
|
1952
|
+
document.addEventListener("click", w), window.addEventListener("resize", j), window.addEventListener("scroll", j, !0);
|
|
1951
1953
|
}), ce(() => {
|
|
1952
|
-
document.removeEventListener("click",
|
|
1954
|
+
document.removeEventListener("click", w), window.removeEventListener("resize", j), window.removeEventListener("scroll", j, !0);
|
|
1953
1955
|
}), (c, v) => (i(), Q(fe, { to: "body" }, [
|
|
1954
1956
|
O(ge, {
|
|
1955
1957
|
"enter-active-class": "transition-all duration-150 ease-in-out",
|
|
@@ -1962,7 +1964,7 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
1962
1964
|
default: W(() => [
|
|
1963
1965
|
Ce(E("div", oe({
|
|
1964
1966
|
ref_key: "contenido",
|
|
1965
|
-
ref:
|
|
1967
|
+
ref: r
|
|
1966
1968
|
}, c.$attrs, {
|
|
1967
1969
|
id: q(a),
|
|
1968
1970
|
role: "menu",
|
|
@@ -2006,7 +2008,7 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
2006
2008
|
function o(u) {
|
|
2007
2009
|
t.disabled || (a("select"), a("click", u), n.cerrar({ devolverElFoco: !0 }));
|
|
2008
2010
|
}
|
|
2009
|
-
return (u,
|
|
2011
|
+
return (u, r) => (i(), s("div", {
|
|
2010
2012
|
role: "menuitem",
|
|
2011
2013
|
tabindex: "0",
|
|
2012
2014
|
"aria-disabled": e.disabled || void 0,
|
|
@@ -2034,7 +2036,7 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
2034
2036
|
l.ponerLaEtiqueta(t);
|
|
2035
2037
|
}), ce(() => {
|
|
2036
2038
|
l.ponerLaEtiqueta(null);
|
|
2037
|
-
}), (a, n) => (i(),
|
|
2039
|
+
}), (a, n) => (i(), s("div", {
|
|
2038
2040
|
id: t,
|
|
2039
2041
|
role: "presentation",
|
|
2040
2042
|
class: "px-3 py-2 text-sm font-semibold text-tx-main"
|
|
@@ -2049,7 +2051,7 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
|
|
|
2049
2051
|
}, Fl = /* @__PURE__ */ z({
|
|
2050
2052
|
__name: "DropdownMenuSeparator",
|
|
2051
2053
|
setup(e) {
|
|
2052
|
-
return (l, t) => (i(),
|
|
2054
|
+
return (l, t) => (i(), s("div", Pl));
|
|
2053
2055
|
}
|
|
2054
2056
|
});
|
|
2055
2057
|
function tt(e) {
|
|
@@ -2075,14 +2077,14 @@ const Rl = z({
|
|
|
2075
2077
|
disabled: { type: Boolean, default: !1 }
|
|
2076
2078
|
},
|
|
2077
2079
|
setup(e, { slots: l, attrs: t }) {
|
|
2078
|
-
const a = he(), n =
|
|
2080
|
+
const a = he(), n = $(null);
|
|
2079
2081
|
function o() {
|
|
2080
2082
|
a.ponerElDisparador(ql(n.value));
|
|
2081
2083
|
}
|
|
2082
2084
|
function u() {
|
|
2083
2085
|
e.disabled || (o(), a.alternar());
|
|
2084
2086
|
}
|
|
2085
|
-
function
|
|
2087
|
+
function r(m) {
|
|
2086
2088
|
if (!e.disabled)
|
|
2087
2089
|
switch (m.key) {
|
|
2088
2090
|
case "Enter":
|
|
@@ -2112,7 +2114,7 @@ const Rl = z({
|
|
|
2112
2114
|
// `inert`— es una referencia rota.
|
|
2113
2115
|
"aria-controls": a.abierto.value ? a.idDelMenu : void 0,
|
|
2114
2116
|
onClick: u,
|
|
2115
|
-
onKeydown:
|
|
2117
|
+
onKeydown: r
|
|
2116
2118
|
}, b = l.default?.() ?? [];
|
|
2117
2119
|
if (e.asChild) {
|
|
2118
2120
|
const f = tt(b);
|
|
@@ -2134,10 +2136,10 @@ const Rl = z({
|
|
|
2134
2136
|
labelClass: { default: () => ({}) }
|
|
2135
2137
|
},
|
|
2136
2138
|
setup(e) {
|
|
2137
|
-
return (l, t) => (i(),
|
|
2139
|
+
return (l, t) => (i(), s("div", {
|
|
2138
2140
|
class: x(["flex flex-col gap-2", e.customClass])
|
|
2139
2141
|
}, [
|
|
2140
|
-
e.label ? (i(),
|
|
2142
|
+
e.label ? (i(), s("label", {
|
|
2141
2143
|
key: 0,
|
|
2142
2144
|
for: e.htmlFor,
|
|
2143
2145
|
class: x(["text-sm font-medium text-primary dark:text-primary-dark", e.labelClass])
|
|
@@ -2156,7 +2158,7 @@ const Rl = z({
|
|
|
2156
2158
|
const t = e, a = l, n = () => {
|
|
2157
2159
|
t.clickable && a("click");
|
|
2158
2160
|
};
|
|
2159
|
-
return (o, u) => (i(),
|
|
2161
|
+
return (o, u) => (i(), s("div", {
|
|
2160
2162
|
class: x([
|
|
2161
2163
|
"flex items-center justify-between background p-3 rounded-vsk border border-vsk-primary/70 transition-colors duration-200",
|
|
2162
2164
|
{
|
|
@@ -2169,15 +2171,15 @@ const Rl = z({
|
|
|
2169
2171
|
A(o.$slots, "default", {}, void 0, !0)
|
|
2170
2172
|
], 2));
|
|
2171
2173
|
}
|
|
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 = ["
|
|
2174
|
+
}), 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
2175
|
key: 1,
|
|
2174
2176
|
class: "w-8 h-8 flex items-center justify-center"
|
|
2175
|
-
},
|
|
2177
|
+
}, Jl = ["src"], Zl = ["min", "max", "value", "aria-label", "aria-valuetext"], _l = /* @__PURE__ */ z({
|
|
2176
2178
|
__name: "SliderControl",
|
|
2177
2179
|
props: {
|
|
2178
2180
|
icon: {},
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
+
label: {},
|
|
2182
|
+
buttonLabel: {},
|
|
2181
2183
|
modelValue: {},
|
|
2182
2184
|
min: { default: 0 },
|
|
2183
2185
|
max: { default: 100 },
|
|
@@ -2194,27 +2196,29 @@ const Rl = z({
|
|
|
2194
2196
|
}), o = p(() => t.getPercentageClass ? t.getPercentageClass(n.value) : ""), u = (m) => {
|
|
2195
2197
|
const b = m.target;
|
|
2196
2198
|
a("update:modelValue", Number(b.value));
|
|
2197
|
-
},
|
|
2199
|
+
}, r = () => {
|
|
2198
2200
|
a("buttonClick");
|
|
2199
2201
|
};
|
|
2200
|
-
return (m, b) => (i(),
|
|
2201
|
-
e.showButton ? (i(),
|
|
2202
|
+
return (m, b) => (i(), s("div", Gl, [
|
|
2203
|
+
e.showButton ? (i(), s("button", {
|
|
2202
2204
|
key: 0,
|
|
2203
|
-
onClick:
|
|
2205
|
+
onClick: r,
|
|
2206
|
+
type: "button",
|
|
2207
|
+
title: e.buttonLabel ?? e.label,
|
|
2208
|
+
"aria-label": e.buttonLabel ?? e.label,
|
|
2204
2209
|
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
2210
|
}, [
|
|
2206
2211
|
E("img", {
|
|
2207
2212
|
src: e.icon,
|
|
2208
|
-
alt:
|
|
2209
|
-
title: e.tooltip,
|
|
2213
|
+
alt: "",
|
|
2210
2214
|
class: x(["w-6 h-6 transition-all duration-200", e.iconClass])
|
|
2211
|
-
}, null, 10,
|
|
2212
|
-
])) : (i(),
|
|
2215
|
+
}, null, 10, Yl)
|
|
2216
|
+
], 8, Ql)) : (i(), s("div", Xl, [
|
|
2213
2217
|
E("img", {
|
|
2214
2218
|
src: e.icon,
|
|
2215
|
-
alt:
|
|
2219
|
+
alt: "",
|
|
2216
2220
|
class: "w-6 h-6 transition-all duration-200"
|
|
2217
|
-
}, null, 8,
|
|
2221
|
+
}, null, 8, Jl)
|
|
2218
2222
|
])),
|
|
2219
2223
|
E("input", {
|
|
2220
2224
|
type: "range",
|
|
@@ -2222,8 +2226,10 @@ const Rl = z({
|
|
|
2222
2226
|
max: e.max,
|
|
2223
2227
|
value: e.modelValue,
|
|
2224
2228
|
onInput: u,
|
|
2229
|
+
"aria-label": e.label,
|
|
2230
|
+
"aria-valuetext": `${n.value}%`,
|
|
2225
2231
|
class: "flex-1 transition-all duration-200 hover:scale-105"
|
|
2226
|
-
}, null, 40,
|
|
2232
|
+
}, null, 40, Zl),
|
|
2227
2233
|
E("span", {
|
|
2228
2234
|
class: x(["w-12 text-right transition-all duration-200 font-medium", o.value])
|
|
2229
2235
|
}, S(n.value) + "% ", 3)
|
|
@@ -2237,7 +2243,7 @@ const Rl = z({
|
|
|
2237
2243
|
},
|
|
2238
2244
|
setup(e) {
|
|
2239
2245
|
const l = e, t = p(() => l.size === "small");
|
|
2240
|
-
return (a, n) => (i(),
|
|
2246
|
+
return (a, n) => (i(), s("span", {
|
|
2241
2247
|
"aria-hidden": "true",
|
|
2242
2248
|
class: x(["inline-flex shrink-0 items-center rounded-full border transition-colors", [
|
|
2243
2249
|
t.value ? "h-6 w-11" : "h-7 w-12",
|
|
@@ -2253,10 +2259,10 @@ const Rl = z({
|
|
|
2253
2259
|
}, null, 2)
|
|
2254
2260
|
], 2));
|
|
2255
2261
|
}
|
|
2256
|
-
}),
|
|
2262
|
+
}), en = ["aria-checked", "disabled"], tn = { class: "min-w-0 flex-1" }, an = { class: "block font-medium text-sm text-tx-main" }, ln = {
|
|
2257
2263
|
key: 0,
|
|
2258
2264
|
class: "mt-0.5 block text-tx-muted text-xs"
|
|
2259
|
-
},
|
|
2265
|
+
}, nn = /* @__PURE__ */ z({
|
|
2260
2266
|
__name: "SwitchRow",
|
|
2261
2267
|
props: {
|
|
2262
2268
|
modelValue: { type: Boolean },
|
|
@@ -2269,19 +2275,19 @@ const Rl = z({
|
|
|
2269
2275
|
emits: ["update:modelValue"],
|
|
2270
2276
|
setup(e, { emit: l }) {
|
|
2271
2277
|
const t = e, a = l;
|
|
2272
|
-
return (n, o) => (i(),
|
|
2278
|
+
return (n, o) => (i(), s("button", {
|
|
2273
2279
|
type: "button",
|
|
2274
2280
|
role: "switch",
|
|
2275
2281
|
"aria-checked": e.modelValue,
|
|
2276
2282
|
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",
|
|
2283
|
+
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
2284
|
onClick: o[0] || (o[0] = (u) => a("update:modelValue", !t.modelValue))
|
|
2279
2285
|
}, [
|
|
2280
2286
|
O(Te, {
|
|
2281
2287
|
on: e.modelValue,
|
|
2282
2288
|
class: "mt-0.5"
|
|
2283
2289
|
}, null, 8, ["on"]),
|
|
2284
|
-
e.icon ? (i(),
|
|
2290
|
+
e.icon ? (i(), s("span", {
|
|
2285
2291
|
key: 0,
|
|
2286
2292
|
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
2293
|
"aria-hidden": "true"
|
|
@@ -2293,14 +2299,14 @@ const Rl = z({
|
|
|
2293
2299
|
alt: ""
|
|
2294
2300
|
}, null, 8, ["name", "type"])
|
|
2295
2301
|
], 2)) : h("", !0),
|
|
2296
|
-
E("span",
|
|
2297
|
-
E("span",
|
|
2298
|
-
e.description ? (i(),
|
|
2302
|
+
E("span", tn, [
|
|
2303
|
+
E("span", an, S(e.label), 1),
|
|
2304
|
+
e.description ? (i(), s("span", ln, S(e.description), 1)) : h("", !0),
|
|
2299
2305
|
A(n.$slots, "pie")
|
|
2300
2306
|
])
|
|
2301
|
-
], 8,
|
|
2307
|
+
], 8, en));
|
|
2302
2308
|
}
|
|
2303
|
-
}),
|
|
2309
|
+
}), on = ["aria-checked", "aria-label", "disabled"], sn = /* @__PURE__ */ z({
|
|
2304
2310
|
__name: "SwitchToggle",
|
|
2305
2311
|
props: {
|
|
2306
2312
|
modelValue: { type: Boolean },
|
|
@@ -2314,27 +2320,27 @@ const Rl = z({
|
|
|
2314
2320
|
function n() {
|
|
2315
2321
|
a("update:modelValue", !t.modelValue);
|
|
2316
2322
|
}
|
|
2317
|
-
return (o, u) => (i(),
|
|
2323
|
+
return (o, u) => (i(), s("button", {
|
|
2318
2324
|
type: "button",
|
|
2319
2325
|
role: "switch",
|
|
2320
2326
|
"aria-checked": e.modelValue,
|
|
2321
2327
|
"aria-label": e.label,
|
|
2322
2328
|
disabled: e.disabled,
|
|
2323
|
-
class: "rounded-full transition-opacity disabled:cursor-not-allowed disabled:opacity-50",
|
|
2329
|
+
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
2330
|
onClick: n
|
|
2325
2331
|
}, [
|
|
2326
2332
|
O(Te, {
|
|
2327
2333
|
on: e.modelValue,
|
|
2328
2334
|
size: e.size
|
|
2329
2335
|
}, null, 8, ["on", "size"])
|
|
2330
|
-
], 8,
|
|
2336
|
+
], 8, on));
|
|
2331
2337
|
}
|
|
2332
|
-
}), rn = ["disabled"
|
|
2338
|
+
}), rn = ["disabled", "title", "aria-label", "aria-pressed", "aria-busy"], un = ["src"], cn = /* @__PURE__ */ z({
|
|
2333
2339
|
__name: "ToggleControl",
|
|
2334
2340
|
props: {
|
|
2335
2341
|
icon: {},
|
|
2336
|
-
|
|
2337
|
-
|
|
2342
|
+
label: {},
|
|
2343
|
+
pressed: { type: [Boolean, null], default: null },
|
|
2338
2344
|
isActive: { type: Boolean, default: !1 },
|
|
2339
2345
|
isLoading: { type: Boolean, default: !1 },
|
|
2340
2346
|
iconClass: { default: () => ({}) },
|
|
@@ -2342,40 +2348,45 @@ const Rl = z({
|
|
|
2342
2348
|
},
|
|
2343
2349
|
emits: ["click"],
|
|
2344
2350
|
setup(e, { emit: l }) {
|
|
2345
|
-
const t = l
|
|
2351
|
+
const t = l;
|
|
2352
|
+
function a() {
|
|
2346
2353
|
t("click");
|
|
2347
|
-
}
|
|
2348
|
-
return (n, o) => (i(),
|
|
2349
|
-
|
|
2350
|
-
class: x(["p-2 rounded-corner
|
|
2354
|
+
}
|
|
2355
|
+
return (n, o) => (i(), s("button", {
|
|
2356
|
+
type: "button",
|
|
2357
|
+
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
2358
|
"animate-pulse": e.isLoading,
|
|
2352
|
-
"ring-2 ring-primary
|
|
2359
|
+
"ring-2 ring-primary": e.isActive,
|
|
2353
2360
|
"opacity-60": !e.isActive,
|
|
2354
2361
|
...e.customClass
|
|
2355
2362
|
}]),
|
|
2356
|
-
disabled: e.isLoading
|
|
2363
|
+
disabled: e.isLoading,
|
|
2364
|
+
title: e.label,
|
|
2365
|
+
"aria-label": e.label,
|
|
2366
|
+
"aria-pressed": e.pressed ?? void 0,
|
|
2367
|
+
"aria-busy": e.isLoading || void 0,
|
|
2368
|
+
onClick: a
|
|
2357
2369
|
}, [
|
|
2358
2370
|
E("img", {
|
|
2359
2371
|
src: e.icon,
|
|
2360
|
-
alt:
|
|
2361
|
-
title: e.tooltip,
|
|
2372
|
+
alt: "",
|
|
2362
2373
|
class: x(["m-auto w-12.5 h-12.5 transition-all duration-300 group-hover:scale-110 relative z-10", {
|
|
2363
2374
|
"animate-spin": e.isLoading,
|
|
2364
2375
|
"filter brightness-75": !e.isActive,
|
|
2365
2376
|
"drop-shadow-lg": e.isActive,
|
|
2366
2377
|
...e.iconClass
|
|
2367
2378
|
}])
|
|
2368
|
-
}, null, 10,
|
|
2379
|
+
}, null, 10, un)
|
|
2369
2380
|
], 10, rn));
|
|
2370
2381
|
}
|
|
2371
2382
|
}), at = /* @__PURE__ */ Symbol("tooltip de vasak");
|
|
2372
2383
|
function lt() {
|
|
2373
2384
|
const e = pe(at, null);
|
|
2374
2385
|
if (e) return e;
|
|
2375
|
-
const l =
|
|
2386
|
+
const l = $(!1);
|
|
2376
2387
|
return {
|
|
2377
2388
|
abierto: p(() => l.value),
|
|
2378
|
-
disparador:
|
|
2389
|
+
disparador: $(null),
|
|
2379
2390
|
ponerElDisparador: () => {
|
|
2380
2391
|
},
|
|
2381
2392
|
abrir: () => {
|
|
@@ -2386,14 +2397,14 @@ function lt() {
|
|
|
2386
2397
|
}
|
|
2387
2398
|
};
|
|
2388
2399
|
}
|
|
2389
|
-
const
|
|
2400
|
+
const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
|
|
2390
2401
|
__name: "Tooltip",
|
|
2391
2402
|
props: {
|
|
2392
2403
|
disabled: { type: Boolean, default: !1 },
|
|
2393
2404
|
delayDuration: { default: 200 }
|
|
2394
2405
|
},
|
|
2395
2406
|
setup(e) {
|
|
2396
|
-
const l = e, t =
|
|
2407
|
+
const l = e, t = $(!1), a = $(null);
|
|
2397
2408
|
let n = null;
|
|
2398
2409
|
function o() {
|
|
2399
2410
|
l.disabled || (n = setTimeout(() => {
|
|
@@ -2406,16 +2417,16 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2406
2417
|
return de(at, {
|
|
2407
2418
|
abierto: p(() => t.value && !l.disabled),
|
|
2408
2419
|
disparador: a,
|
|
2409
|
-
ponerElDisparador: (
|
|
2410
|
-
a.value =
|
|
2420
|
+
ponerElDisparador: (r) => {
|
|
2421
|
+
a.value = r;
|
|
2411
2422
|
},
|
|
2412
2423
|
abrir: o,
|
|
2413
2424
|
cerrar: u
|
|
2414
|
-
}), (
|
|
2415
|
-
A(
|
|
2425
|
+
}), (r, m) => (i(), s("div", dn, [
|
|
2426
|
+
A(r.$slots, "default")
|
|
2416
2427
|
]));
|
|
2417
2428
|
}
|
|
2418
|
-
}),
|
|
2429
|
+
}), mn = /* @__PURE__ */ z({
|
|
2419
2430
|
inheritAttrs: !1,
|
|
2420
2431
|
__name: "TooltipContent",
|
|
2421
2432
|
props: {
|
|
@@ -2424,7 +2435,7 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2424
2435
|
sideOffset: { default: 4 }
|
|
2425
2436
|
},
|
|
2426
2437
|
setup(e) {
|
|
2427
|
-
const l =
|
|
2438
|
+
const l = we(), t = p(() => l.class ?? ""), a = e, n = lt(), o = p(() => n.abierto.value), u = $(null), r = $({ top: 0, left: 0 });
|
|
2428
2439
|
function m() {
|
|
2429
2440
|
const b = n.disparador.value;
|
|
2430
2441
|
if (!b || !u.value) return;
|
|
@@ -2444,7 +2455,7 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2444
2455
|
L = f.right + a.sideOffset, D = f.top + f.height / 2 - B.height / 2;
|
|
2445
2456
|
break;
|
|
2446
2457
|
}
|
|
2447
|
-
|
|
2458
|
+
r.value = { top: D, left: L };
|
|
2448
2459
|
}
|
|
2449
2460
|
return K(o, async (b) => {
|
|
2450
2461
|
b && (await Y(), requestAnimationFrame(m));
|
|
@@ -2459,7 +2470,7 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2459
2470
|
Ce(E("div", {
|
|
2460
2471
|
ref_key: "globo",
|
|
2461
2472
|
ref: u,
|
|
2462
|
-
style:
|
|
2473
|
+
style: se({ position: "fixed", top: `${r.value.top}px`, left: `${r.value.left}px`, zIndex: 50 }),
|
|
2463
2474
|
class: x([
|
|
2464
2475
|
t.value,
|
|
2465
2476
|
"pointer-events-none rounded-corner border border-secondary bg-ui-bg/80 px-2 py-1 text-sm shadow-md"
|
|
@@ -2474,10 +2485,10 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2474
2485
|
})
|
|
2475
2486
|
]));
|
|
2476
2487
|
}
|
|
2477
|
-
}),
|
|
2488
|
+
}), bn = /* @__PURE__ */ z({
|
|
2478
2489
|
__name: "TooltipTrigger",
|
|
2479
2490
|
setup(e) {
|
|
2480
|
-
const l = lt(), t =
|
|
2491
|
+
const l = lt(), t = $(null);
|
|
2481
2492
|
function a() {
|
|
2482
2493
|
return t.value ? t.value.firstElementChild ?? t.value : null;
|
|
2483
2494
|
}
|
|
@@ -2486,22 +2497,22 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2486
2497
|
}
|
|
2487
2498
|
return J(() => {
|
|
2488
2499
|
l.ponerElDisparador(a());
|
|
2489
|
-
}), (o, u) => (i(),
|
|
2500
|
+
}), (o, u) => (i(), s("div", {
|
|
2490
2501
|
ref_key: "envoltorio",
|
|
2491
2502
|
ref: t,
|
|
2492
2503
|
class: "inline-block",
|
|
2493
2504
|
onMouseenter: n,
|
|
2494
|
-
onMouseleave: u[0] || (u[0] = (
|
|
2505
|
+
onMouseleave: u[0] || (u[0] = (r) => q(l).cerrar()),
|
|
2495
2506
|
onFocus: n,
|
|
2496
|
-
onBlur: u[1] || (u[1] = (
|
|
2507
|
+
onBlur: u[1] || (u[1] = (r) => q(l).cerrar())
|
|
2497
2508
|
}, [
|
|
2498
2509
|
A(o.$slots, "default")
|
|
2499
2510
|
], 544));
|
|
2500
2511
|
}
|
|
2501
|
-
}),
|
|
2512
|
+
}), vn = ["title"], pn = ["src", "alt"], gn = {
|
|
2502
2513
|
key: 0,
|
|
2503
2514
|
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
|
-
},
|
|
2515
|
+
}, yn = /* @__PURE__ */ z({
|
|
2505
2516
|
__name: "TrayIconButton",
|
|
2506
2517
|
props: {
|
|
2507
2518
|
icon: {},
|
|
@@ -2516,23 +2527,23 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2516
2527
|
},
|
|
2517
2528
|
emits: ["click"],
|
|
2518
2529
|
setup(e, { emit: l }) {
|
|
2519
|
-
const t = l, a =
|
|
2530
|
+
const t = l, a = $(!1), n = () => {
|
|
2520
2531
|
t("click");
|
|
2521
2532
|
};
|
|
2522
|
-
return (o, u) => (i(),
|
|
2533
|
+
return (o, u) => (i(), s("div", {
|
|
2523
2534
|
class: x(["p-1 rounded-corner relative hover:bg-primary dark:hover:bg-primary-dark group transition-all duration-300", e.customClass]),
|
|
2524
2535
|
title: e.tooltip,
|
|
2525
2536
|
onClick: n,
|
|
2526
|
-
onMouseenter: u[0] || (u[0] = (
|
|
2527
|
-
onMouseleave: u[1] || (u[1] = (
|
|
2537
|
+
onMouseenter: u[0] || (u[0] = (r) => a.value = !0),
|
|
2538
|
+
onMouseleave: u[1] || (u[1] = (r) => a.value = !1)
|
|
2528
2539
|
}, [
|
|
2529
2540
|
E("img", {
|
|
2530
2541
|
src: e.icon,
|
|
2531
2542
|
alt: e.alt,
|
|
2532
2543
|
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(),
|
|
2544
|
+
}, null, 10, pn),
|
|
2545
|
+
e.badge !== null && e.badge > 0 ? (i(), s("div", gn, S(e.badge), 1)) : h("", !0),
|
|
2546
|
+
e.showCustomTooltip && e.customTooltipText ? (i(), s("div", {
|
|
2536
2547
|
key: 1,
|
|
2537
2548
|
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
2549
|
e.tooltipClass,
|
|
@@ -2543,15 +2554,15 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2543
2554
|
]])
|
|
2544
2555
|
}, S(e.customTooltipText), 3)) : h("", !0),
|
|
2545
2556
|
A(o.$slots, "default")
|
|
2546
|
-
], 42,
|
|
2557
|
+
], 42, vn));
|
|
2547
2558
|
}
|
|
2548
|
-
}),
|
|
2559
|
+
}), hn = [
|
|
2549
2560
|
Ut,
|
|
2550
2561
|
He,
|
|
2551
2562
|
Ne,
|
|
2552
2563
|
Yt,
|
|
2553
2564
|
H,
|
|
2554
|
-
|
|
2565
|
+
ra,
|
|
2555
2566
|
Ke,
|
|
2556
2567
|
We,
|
|
2557
2568
|
xa,
|
|
@@ -2565,11 +2576,11 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2565
2576
|
ol,
|
|
2566
2577
|
Qe,
|
|
2567
2578
|
Na,
|
|
2568
|
-
|
|
2579
|
+
rl,
|
|
2569
2580
|
gl,
|
|
2570
2581
|
hl,
|
|
2571
2582
|
kl,
|
|
2572
|
-
|
|
2583
|
+
wl,
|
|
2573
2584
|
zl,
|
|
2574
2585
|
Dl,
|
|
2575
2586
|
Tl,
|
|
@@ -2581,18 +2592,18 @@ const cn = { class: "inline-block" }, dn = /* @__PURE__ */ z({
|
|
|
2581
2592
|
Rl,
|
|
2582
2593
|
Ul,
|
|
2583
2594
|
Kl,
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2595
|
+
_l,
|
|
2596
|
+
nn,
|
|
2597
|
+
sn,
|
|
2587
2598
|
Te,
|
|
2588
|
-
|
|
2589
|
-
dn,
|
|
2599
|
+
cn,
|
|
2590
2600
|
fn,
|
|
2591
2601
|
mn,
|
|
2592
|
-
|
|
2593
|
-
|
|
2602
|
+
bn,
|
|
2603
|
+
yn
|
|
2604
|
+
], En = {
|
|
2594
2605
|
install(e) {
|
|
2595
|
-
|
|
2606
|
+
hn.forEach((l) => {
|
|
2596
2607
|
e.component(l.name, l);
|
|
2597
2608
|
});
|
|
2598
2609
|
}
|
|
@@ -2607,11 +2618,11 @@ export {
|
|
|
2607
2618
|
_e as CLAVE_DEL_MENU,
|
|
2608
2619
|
at as CLAVE_DEL_TOOLTIP,
|
|
2609
2620
|
Ee as CLAVE_DE_LA_BARRA,
|
|
2610
|
-
|
|
2621
|
+
rl as ConfigSection,
|
|
2611
2622
|
gl as DeviceCard,
|
|
2612
2623
|
hl as Dialog,
|
|
2613
2624
|
kl as DialogContent,
|
|
2614
|
-
|
|
2625
|
+
wl as DialogDescription,
|
|
2615
2626
|
zl as DialogFooter,
|
|
2616
2627
|
Dl as DialogHeader,
|
|
2617
2628
|
Tl as DialogTitle,
|
|
@@ -2633,27 +2644,27 @@ export {
|
|
|
2633
2644
|
Ut as SideBar,
|
|
2634
2645
|
He as SideButton,
|
|
2635
2646
|
Ne as SideGroup,
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2647
|
+
_l as SliderControl,
|
|
2648
|
+
nn as SwitchRow,
|
|
2649
|
+
sn as SwitchToggle,
|
|
2639
2650
|
Te as SwitchTrack,
|
|
2640
2651
|
xa as TabBar,
|
|
2641
2652
|
Ge as TabItem,
|
|
2642
2653
|
Qe as TextInput,
|
|
2643
2654
|
H as ThemeIcon,
|
|
2644
2655
|
Na as ToastArea,
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2656
|
+
cn as ToggleControl,
|
|
2657
|
+
fn as Tooltip,
|
|
2658
|
+
mn as TooltipContent,
|
|
2659
|
+
bn as TooltipTrigger,
|
|
2660
|
+
yn as TrayIconButton,
|
|
2650
2661
|
We as WindowControls,
|
|
2651
|
-
|
|
2662
|
+
ra as WindowFrame,
|
|
2652
2663
|
Ga as buscarOpciones,
|
|
2653
|
-
|
|
2664
|
+
En as default,
|
|
2654
2665
|
Jt as esPosicion,
|
|
2655
|
-
|
|
2656
|
-
|
|
2666
|
+
zn as olvidarLosIconosDelTema,
|
|
2667
|
+
$e as orientacionDe,
|
|
2657
2668
|
ea as posicionDe,
|
|
2658
2669
|
Xe as rolDelTono,
|
|
2659
2670
|
Ze as usarElDialogo,
|