@vasakgroup/vue-libvasak 1.7.1 → 1.9.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,16 +1,16 @@
|
|
|
1
|
-
import { ref as w, onMounted as W, onUnmounted as ve, readonly as vt, watch as Q, defineComponent as D, toRef as Pe, useTemplateRef as pt, computed as v, createElementBlock as s, unref as F, openBlock as i, normalizeStyle as fe, createCommentVNode as x, createElementVNode as B, createVNode as j, toDisplayString as V, normalizeClass as y, renderSlot as S, createBlock as
|
|
2
|
-
import { listen as
|
|
3
|
-
import { getSymbolSource as
|
|
4
|
-
import { getCurrentWindow as
|
|
5
|
-
import { useI18n as
|
|
6
|
-
const
|
|
7
|
-
let
|
|
1
|
+
import { ref as w, onMounted as W, onUnmounted as ve, readonly as vt, watch as Q, defineComponent as D, toRef as Pe, useTemplateRef as pt, computed as v, createElementBlock as s, unref as F, openBlock as i, normalizeStyle as fe, createCommentVNode as x, createElementVNode as B, createVNode as j, toDisplayString as V, normalizeClass as y, renderSlot as S, createBlock as K, onBeforeUnmount as pe, Fragment as te, renderList as ce, withCtx as G, mergeModels as Re, useAttrs as Be, useId as yt, useModel as gt, withDirectives as Se, mergeProps as le, isRef as ht, vModelSelect as xt, inject as we, getCurrentInstance as Ge, provide as ye, createTextVNode as $e, toHandlers as Qe, createSlots as wt, withModifiers as M, withKeys as I, Teleport as ge, Transition as ke, nextTick as J, TransitionGroup as $t, vShow as Ye, cloneVNode as kt, h as Ct, Comment as zt, Text as Et, resolveDynamicComponent as Lt } from "vue";
|
|
2
|
+
import { listen as Dt } from "@tauri-apps/api/event";
|
|
3
|
+
import { getSymbolSource as Tt, getIconSource as At } from "@vasakgroup/plugin-vicons";
|
|
4
|
+
import { getCurrentWindow as Bt } from "@tauri-apps/api/window";
|
|
5
|
+
import { useI18n as St } from "@vasakgroup/tauri-plugin-i18n";
|
|
6
|
+
const Mt = "vicons:theme-changed", xe = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ new Map(), me = w(0);
|
|
7
|
+
let ue = 0, be = null, se = null;
|
|
8
8
|
function Xl() {
|
|
9
|
-
xe.clear(),
|
|
9
|
+
xe.clear(), re.clear(), ue = 0, be = null, se = null, me.value = 0, ae.clear(), ne.clear(), Xe = 0, ee?.disconnect(), ee = null, De = !1, X !== null && (clearTimeout(X), X = null), _ && (_.cancelado = !0), _ = null;
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const Vt = 100, ze = 10, It = 16, ae = /* @__PURE__ */ new Map(), ne = /* @__PURE__ */ new Set();
|
|
12
12
|
let Xe = 0, ee = null, De = !1;
|
|
13
|
-
function
|
|
13
|
+
function Ot() {
|
|
14
14
|
return De ? ee : (De = !0, typeof IntersectionObserver > "u" ? null : (ee = new IntersectionObserver(
|
|
15
15
|
(e) => {
|
|
16
16
|
for (const n of e) {
|
|
@@ -23,25 +23,25 @@ function It() {
|
|
|
23
23
|
{ threshold: 0 }
|
|
24
24
|
), ee));
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function jt(e) {
|
|
27
27
|
const n = Xe++;
|
|
28
28
|
return ae.set(n, { recargar: e, elemento: null }), ne.add(n), n;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function Pt(e, n) {
|
|
31
31
|
const t = ae.get(e);
|
|
32
32
|
if (!t || t.elemento === n || (t.elemento && (ee?.unobserve(t.elemento), delete t.elemento.dataset.iconoId, t.elemento = null), !n)) return;
|
|
33
|
-
const a =
|
|
33
|
+
const a = Ot();
|
|
34
34
|
a && (t.elemento = n, n.dataset.iconoId = String(e), a.observe(n));
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function Rt(e) {
|
|
37
37
|
const n = ae.get(e);
|
|
38
38
|
n?.elemento && (ee?.unobserve(n.elemento), delete n.elemento.dataset.iconoId), ne.delete(e), ae.delete(e);
|
|
39
39
|
}
|
|
40
40
|
let X = null, _ = null;
|
|
41
|
-
function
|
|
41
|
+
function Ft(e) {
|
|
42
42
|
return new Promise((n) => setTimeout(n, e));
|
|
43
43
|
}
|
|
44
|
-
async function
|
|
44
|
+
async function Nt(e) {
|
|
45
45
|
const n = [...ae.keys()], t = n.filter((l) => ne.has(l)), a = n.filter((l) => !ne.has(l));
|
|
46
46
|
for (const l of [t, a])
|
|
47
47
|
for (let o = 0; o < l.length; o += ze) {
|
|
@@ -50,39 +50,39 @@ async function Ft(e) {
|
|
|
50
50
|
if (await Promise.allSettled(
|
|
51
51
|
r.map((u) => ae.get(u)?.recargar() ?? Promise.resolve())
|
|
52
52
|
), e.cancelado) return;
|
|
53
|
-
(o + ze < l.length || l === t) && await
|
|
53
|
+
(o + ze < l.length || l === t) && await Ft(It);
|
|
54
54
|
}
|
|
55
55
|
_ === e && (_ = null);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function qt() {
|
|
58
58
|
X !== null && (clearTimeout(X), X = null), _ && (_.cancelado = !0);
|
|
59
59
|
const e = { cancelado: !1 };
|
|
60
|
-
_ = e,
|
|
60
|
+
_ = e, Nt(e);
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
xe.clear(),
|
|
64
|
-
X = null,
|
|
65
|
-
},
|
|
62
|
+
function Ht() {
|
|
63
|
+
xe.clear(), re.clear(), me.value++, X !== null && clearTimeout(X), X = setTimeout(() => {
|
|
64
|
+
X = null, qt();
|
|
65
|
+
}, Vt);
|
|
66
66
|
}
|
|
67
67
|
function Je() {
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
}),
|
|
68
|
+
return ue++, be || se ? se ?? Promise.resolve() : (se = Dt(Mt, Ht).then((e) => {
|
|
69
|
+
ue <= 0 ? e() : be = e, se = null;
|
|
70
|
+
}), se);
|
|
71
71
|
}
|
|
72
72
|
function Te() {
|
|
73
|
-
|
|
73
|
+
ue--, !(ue > 0) && (ue = 0, be?.(), be = null);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function Kt(e, n) {
|
|
76
76
|
const t = `${n}:${e}`, a = xe.get(t);
|
|
77
77
|
if (a !== void 0)
|
|
78
78
|
return Promise.resolve(a);
|
|
79
|
-
const l =
|
|
79
|
+
const l = re.get(t);
|
|
80
80
|
if (l)
|
|
81
81
|
return l;
|
|
82
|
-
const o = me.value, r = (n === "symbol" ?
|
|
83
|
-
|
|
82
|
+
const o = me.value, r = (n === "symbol" ? Tt(e) : At(e)).then((u) => (me.value === o && xe.set(t, u), u)).finally(() => {
|
|
83
|
+
re.get(t) === r && re.delete(t);
|
|
84
84
|
});
|
|
85
|
-
return
|
|
85
|
+
return re.set(t, r), r;
|
|
86
86
|
}
|
|
87
87
|
function Jl() {
|
|
88
88
|
let e = !1;
|
|
@@ -95,25 +95,25 @@ function Jl() {
|
|
|
95
95
|
function Ut(e, n) {
|
|
96
96
|
const t = w("");
|
|
97
97
|
let a = !1, l = 0;
|
|
98
|
-
const o =
|
|
98
|
+
const o = jt(async () => {
|
|
99
99
|
await r();
|
|
100
100
|
});
|
|
101
101
|
async function r() {
|
|
102
|
-
const u = ++l,
|
|
103
|
-
if (!
|
|
102
|
+
const u = ++l, m = e.value;
|
|
103
|
+
if (!m) {
|
|
104
104
|
t.value = "";
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
|
-
const
|
|
108
|
-
u === l && !a && (t.value =
|
|
107
|
+
const c = await Kt(m, n.value);
|
|
108
|
+
u === l && !a && (t.value = c);
|
|
109
109
|
}
|
|
110
110
|
return W(async () => {
|
|
111
111
|
await Je(), a || await r();
|
|
112
112
|
}), ve(() => {
|
|
113
|
-
a = !0,
|
|
114
|
-
}), Q([e, n], r), { fuente: t, mirarElemento: (u) =>
|
|
113
|
+
a = !0, Rt(o), Te();
|
|
114
|
+
}), Q([e, n], r), { fuente: t, mirarElemento: (u) => Pt(o, u) };
|
|
115
115
|
}
|
|
116
|
-
const
|
|
116
|
+
const Wt = ["src", "alt"], N = /* @__PURE__ */ D({
|
|
117
117
|
__name: "ThemeIcon",
|
|
118
118
|
props: {
|
|
119
119
|
name: {},
|
|
@@ -135,7 +135,7 @@ const Kt = ["src", "alt"], N = /* @__PURE__ */ D({
|
|
|
135
135
|
alt: e.alt,
|
|
136
136
|
style: fe(o.value),
|
|
137
137
|
class: "shrink-0 object-contain"
|
|
138
|
-
}, null, 12,
|
|
138
|
+
}, null, 12, Wt)) : (i(), s("span", {
|
|
139
139
|
key: 1,
|
|
140
140
|
ref_key: "dibujo",
|
|
141
141
|
ref: l,
|
|
@@ -143,7 +143,7 @@ const Kt = ["src", "alt"], N = /* @__PURE__ */ D({
|
|
|
143
143
|
class: "inline-block shrink-0"
|
|
144
144
|
}, null, 4));
|
|
145
145
|
}
|
|
146
|
-
}),
|
|
146
|
+
}), Gt = { class: "flex flex-col gap-2" }, Qt = ["aria-expanded"], Yt = {
|
|
147
147
|
key: 1,
|
|
148
148
|
class: "flex flex-col gap-1"
|
|
149
149
|
}, Ze = /* @__PURE__ */ D({
|
|
@@ -160,7 +160,7 @@ const Kt = ["src", "alt"], N = /* @__PURE__ */ D({
|
|
|
160
160
|
(a) => {
|
|
161
161
|
a && (t.value = !0);
|
|
162
162
|
}
|
|
163
|
-
), (a, l) => (i(), s("section",
|
|
163
|
+
), (a, l) => (i(), s("section", Gt, [
|
|
164
164
|
e.collapsed ? x("", !0) : (i(), s("button", {
|
|
165
165
|
key: 0,
|
|
166
166
|
type: "button",
|
|
@@ -175,16 +175,16 @@ const Kt = ["src", "alt"], N = /* @__PURE__ */ D({
|
|
|
175
175
|
size: 12,
|
|
176
176
|
class: y(["transition-transform duration-200", t.value ? "" : "-rotate-90"])
|
|
177
177
|
}, null, 8, ["class"])
|
|
178
|
-
], 8,
|
|
179
|
-
t.value || e.collapsed ? (i(), s("div",
|
|
178
|
+
], 8, Qt)),
|
|
179
|
+
t.value || e.collapsed ? (i(), s("div", Yt, [
|
|
180
180
|
S(a.$slots, "default")
|
|
181
181
|
])) : x("", !0)
|
|
182
182
|
]));
|
|
183
183
|
}
|
|
184
|
-
}),
|
|
184
|
+
}), Xt = ["title", "aria-label", "disabled", "aria-current"], Jt = { key: 1 }, Zt = {
|
|
185
185
|
key: 0,
|
|
186
186
|
class: "min-w-0 flex-1 truncate font-medium"
|
|
187
|
-
},
|
|
187
|
+
}, _t = {
|
|
188
188
|
key: 1,
|
|
189
189
|
class: "rounded-corner bg-ui-surface px-2 py-0.5 font-semibold text-tx-muted text-xs"
|
|
190
190
|
}, _e = /* @__PURE__ */ D({
|
|
@@ -216,32 +216,32 @@ const Kt = ["src", "alt"], N = /* @__PURE__ */ D({
|
|
|
216
216
|
class: y(["flex h-8 w-8 shrink-0 items-center justify-center rounded-corner font-semibold text-xs uppercase tracking-wide", e.active ? "border-secondary bg-primary/20" : ""]),
|
|
217
217
|
"aria-hidden": "true"
|
|
218
218
|
}, [
|
|
219
|
-
e.icon ? (i(),
|
|
219
|
+
e.icon ? (i(), K(N, {
|
|
220
220
|
key: 0,
|
|
221
221
|
name: e.icon,
|
|
222
222
|
size: 20
|
|
223
|
-
}, null, 8, ["name"])) : (i(), s("span",
|
|
223
|
+
}, null, 8, ["name"])) : (i(), s("span", Jt, V(e.label.charAt(0).toUpperCase()), 1))
|
|
224
224
|
], 2),
|
|
225
|
-
e.collapsed ? x("", !0) : (i(), s("span",
|
|
226
|
-
!e.collapsed && e.badge !== "" ? (i(), s("span",
|
|
227
|
-
], 10,
|
|
225
|
+
e.collapsed ? x("", !0) : (i(), s("span", Zt, V(e.label), 1)),
|
|
226
|
+
!e.collapsed && e.badge !== "" ? (i(), s("span", _t, V(e.badge), 1)) : x("", !0)
|
|
227
|
+
], 10, Xt));
|
|
228
228
|
}
|
|
229
|
-
}),
|
|
229
|
+
}), ea = {
|
|
230
230
|
key: 0,
|
|
231
231
|
class: "flex flex-col gap-2 border-ui-border border-b p-2"
|
|
232
|
-
},
|
|
232
|
+
}, ta = { class: "flex items-center gap-2" }, aa = ["aria-label", "aria-expanded"], na = {
|
|
233
233
|
key: 0,
|
|
234
234
|
class: "min-w-0 flex-1"
|
|
235
|
-
},
|
|
235
|
+
}, la = {
|
|
236
236
|
key: 0,
|
|
237
237
|
class: "truncate font-semibold text-sm"
|
|
238
|
-
},
|
|
238
|
+
}, oa = {
|
|
239
239
|
key: 1,
|
|
240
240
|
class: "truncate text-tx-muted text-xs"
|
|
241
|
-
},
|
|
241
|
+
}, ia = { key: 0 }, sa = {
|
|
242
242
|
key: 1,
|
|
243
243
|
class: "flex border-ui-border border-b p-2"
|
|
244
|
-
},
|
|
244
|
+
}, ra = ["aria-label", "aria-expanded"], ua = { class: "flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-2" }, Fe = "hidden h-8 w-8 shrink-0 items-center justify-center rounded-corner border border-ui-border bg-ui-surface/70 transition-colors hover:bg-ui-surface md:inline-flex", Ne = 767, ca = /* @__PURE__ */ D({
|
|
245
245
|
__name: "SideBar",
|
|
246
246
|
props: {
|
|
247
247
|
title: { default: "" },
|
|
@@ -255,96 +255,96 @@ const Kt = ["src", "alt"], N = /* @__PURE__ */ D({
|
|
|
255
255
|
emits: ["update:modelValue", "update:collapsed", "change"],
|
|
256
256
|
setup(e, { expose: n, emit: t }) {
|
|
257
257
|
const a = e, l = t, o = w(a.collapsed ?? !1), r = w(!1);
|
|
258
|
-
let u = null,
|
|
259
|
-
const
|
|
258
|
+
let u = null, m = null;
|
|
259
|
+
const c = v(() => r.value || o.value), f = v(() => !!(a.title || a.subtitle));
|
|
260
260
|
v(() => a.categories.length > 0);
|
|
261
|
-
function
|
|
261
|
+
function k() {
|
|
262
262
|
return document.documentElement?.clientWidth || window.innerWidth;
|
|
263
263
|
}
|
|
264
264
|
function L() {
|
|
265
|
-
r.value =
|
|
265
|
+
r.value = k() <= Ne;
|
|
266
266
|
}
|
|
267
267
|
function A() {
|
|
268
268
|
o.value = !o.value, l("update:collapsed", o.value);
|
|
269
269
|
}
|
|
270
|
-
function g(
|
|
271
|
-
l("update:modelValue",
|
|
270
|
+
function g(C) {
|
|
271
|
+
l("update:modelValue", C), l("change", C);
|
|
272
272
|
}
|
|
273
273
|
return Q(
|
|
274
274
|
() => a.collapsed,
|
|
275
|
-
(
|
|
276
|
-
|
|
275
|
+
(C) => {
|
|
276
|
+
C !== void 0 && (o.value = C);
|
|
277
277
|
}
|
|
278
278
|
), W(() => {
|
|
279
|
-
u = window.matchMedia(`(max-width: ${Ne}px)`), L(), u.addEventListener("change", L), window.addEventListener("resize", L), typeof ResizeObserver < "u" && document.documentElement && (
|
|
279
|
+
u = window.matchMedia(`(max-width: ${Ne}px)`), L(), u.addEventListener("change", L), window.addEventListener("resize", L), typeof ResizeObserver < "u" && document.documentElement && (m = new ResizeObserver(L), m.observe(document.documentElement));
|
|
280
280
|
}), pe(() => {
|
|
281
|
-
u?.removeEventListener("change", L), window.removeEventListener("resize", L),
|
|
282
|
-
}), n({ collapsed:
|
|
283
|
-
class: y(["relative z-30 flex h-full shrink-0 flex-col rounded-corner border border-ui-border bg-ui-surface/70 transition-[width] duration-300", ["w-[84px]",
|
|
281
|
+
u?.removeEventListener("change", L), window.removeEventListener("resize", L), m?.disconnect(), m = null;
|
|
282
|
+
}), n({ collapsed: c }), (C, P) => (i(), s("aside", {
|
|
283
|
+
class: y(["relative z-30 flex h-full shrink-0 flex-col rounded-corner border border-ui-border bg-ui-surface/70 transition-[width] duration-300", ["w-[84px]", c.value ? "md:w-[84px]" : "md:w-72"]])
|
|
284
284
|
}, [
|
|
285
|
-
|
|
286
|
-
B("div",
|
|
285
|
+
f.value || C.$slots.header ? (i(), s("header", ea, [
|
|
286
|
+
B("div", ta, [
|
|
287
287
|
B("button", {
|
|
288
288
|
type: "button",
|
|
289
289
|
class: y(Fe),
|
|
290
|
-
"aria-label":
|
|
291
|
-
"aria-expanded": !
|
|
290
|
+
"aria-label": c.value ? e.expandLabel : e.collapseLabel,
|
|
291
|
+
"aria-expanded": !c.value,
|
|
292
292
|
onClick: A
|
|
293
293
|
}, [
|
|
294
294
|
j(N, {
|
|
295
|
-
name:
|
|
295
|
+
name: c.value ? "pan-end-symbolic" : "pan-start-symbolic",
|
|
296
296
|
type: "symbol",
|
|
297
297
|
size: 16
|
|
298
298
|
}, null, 8, ["name"])
|
|
299
|
-
], 8,
|
|
300
|
-
|
|
301
|
-
e.title ? (i(), s("p",
|
|
302
|
-
e.subtitle ? (i(), s("p",
|
|
299
|
+
], 8, aa),
|
|
300
|
+
f.value && !c.value ? (i(), s("div", na, [
|
|
301
|
+
e.title ? (i(), s("p", la, V(e.title), 1)) : x("", !0),
|
|
302
|
+
e.subtitle ? (i(), s("p", oa, V(e.subtitle), 1)) : x("", !0)
|
|
303
303
|
])) : x("", !0)
|
|
304
304
|
]),
|
|
305
|
-
|
|
306
|
-
S(
|
|
305
|
+
C.$slots.header && !c.value ? (i(), s("div", ia, [
|
|
306
|
+
S(C.$slots, "header", { collapsed: c.value })
|
|
307
307
|
])) : x("", !0)
|
|
308
|
-
])) : (i(), s("div",
|
|
308
|
+
])) : (i(), s("div", sa, [
|
|
309
309
|
B("button", {
|
|
310
310
|
type: "button",
|
|
311
311
|
class: y(Fe),
|
|
312
|
-
"aria-label":
|
|
313
|
-
"aria-expanded": !
|
|
312
|
+
"aria-label": c.value ? e.expandLabel : e.collapseLabel,
|
|
313
|
+
"aria-expanded": !c.value,
|
|
314
314
|
onClick: A
|
|
315
315
|
}, [
|
|
316
316
|
j(N, {
|
|
317
|
-
name:
|
|
317
|
+
name: c.value ? "pan-end-symbolic" : "pan-start-symbolic",
|
|
318
318
|
type: "symbol",
|
|
319
319
|
size: 16
|
|
320
320
|
}, null, 8, ["name"])
|
|
321
|
-
], 8,
|
|
321
|
+
], 8, ra)
|
|
322
322
|
])),
|
|
323
|
-
B("div",
|
|
324
|
-
(i(!0), s(te, null,
|
|
325
|
-
key:
|
|
326
|
-
title:
|
|
327
|
-
collapsed:
|
|
323
|
+
B("div", ua, [
|
|
324
|
+
(i(!0), s(te, null, ce(e.categories, (z) => (i(), K(Ze, {
|
|
325
|
+
key: z.id,
|
|
326
|
+
title: z.title,
|
|
327
|
+
collapsed: c.value
|
|
328
328
|
}, {
|
|
329
329
|
default: G(() => [
|
|
330
|
-
(i(!0), s(te, null,
|
|
330
|
+
(i(!0), s(te, null, ce(z.items, (h) => (i(), K(_e, {
|
|
331
331
|
key: h.id,
|
|
332
332
|
label: h.label,
|
|
333
333
|
icon: h.icon,
|
|
334
334
|
badge: h.badge,
|
|
335
335
|
disabled: h.disabled,
|
|
336
|
-
collapsed:
|
|
336
|
+
collapsed: c.value,
|
|
337
337
|
active: e.modelValue === h.id,
|
|
338
|
-
onClick: (
|
|
338
|
+
onClick: (d) => g(h.id)
|
|
339
339
|
}, null, 8, ["label", "icon", "badge", "disabled", "collapsed", "active", "onClick"]))), 128))
|
|
340
340
|
]),
|
|
341
341
|
_: 2
|
|
342
342
|
}, 1032, ["title", "collapsed"]))), 128)),
|
|
343
|
-
S(
|
|
343
|
+
S(C.$slots, "default", { collapsed: c.value })
|
|
344
344
|
])
|
|
345
345
|
], 2));
|
|
346
346
|
}
|
|
347
|
-
}),
|
|
347
|
+
}), da = { class: "flex min-w-0 flex-col gap-1" }, fa = ["for"], ma = { class: "relative flex min-w-0 items-center" }, ba = ["id"], va = /* @__PURE__ */ D({
|
|
348
348
|
inheritAttrs: !1,
|
|
349
349
|
__name: "SelectField",
|
|
350
350
|
props: /* @__PURE__ */ Re({
|
|
@@ -357,27 +357,27 @@ const Kt = ["src", "alt"], N = /* @__PURE__ */ D({
|
|
|
357
357
|
}),
|
|
358
358
|
emits: /* @__PURE__ */ Re(["change"], ["update:modelValue"]),
|
|
359
359
|
setup(e, { emit: n }) {
|
|
360
|
-
const t = e, a = Be(), l = yt(), o = v(() => a.id ?? l), r = n, [u,
|
|
361
|
-
set(
|
|
362
|
-
return
|
|
360
|
+
const t = e, a = Be(), l = yt(), o = v(() => a.id ?? l), r = n, [u, m] = gt(e, "modelValue", {
|
|
361
|
+
set(c) {
|
|
362
|
+
return m.number ? Number(c) : c;
|
|
363
363
|
}
|
|
364
364
|
});
|
|
365
|
-
return (
|
|
365
|
+
return (c, f) => (i(), s("div", da, [
|
|
366
366
|
t.label ? (i(), s("label", {
|
|
367
367
|
key: 0,
|
|
368
368
|
for: o.value,
|
|
369
369
|
class: "text-tx-muted text-xs"
|
|
370
|
-
}, V(t.label), 9,
|
|
371
|
-
B("div",
|
|
372
|
-
Se(B("select",
|
|
370
|
+
}, V(t.label), 9, fa)) : x("", !0),
|
|
371
|
+
B("div", ma, [
|
|
372
|
+
Se(B("select", le({
|
|
373
373
|
id: o.value,
|
|
374
|
-
"onUpdate:modelValue":
|
|
374
|
+
"onUpdate:modelValue": f[0] || (f[0] = (k) => ht(u) ? u.value = k : null),
|
|
375
375
|
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"
|
|
376
376
|
}, F(a), {
|
|
377
|
-
onChange:
|
|
377
|
+
onChange: f[1] || (f[1] = (k) => r("change", k))
|
|
378
378
|
}), [
|
|
379
|
-
S(
|
|
380
|
-
], 16,
|
|
379
|
+
S(c.$slots, "default")
|
|
380
|
+
], 16, ba), [
|
|
381
381
|
[xt, F(u)]
|
|
382
382
|
]),
|
|
383
383
|
j(N, {
|
|
@@ -393,9 +393,9 @@ const Kt = ["src", "alt"], N = /* @__PURE__ */ D({
|
|
|
393
393
|
function Ae(e) {
|
|
394
394
|
return e === "left" || e === "right" ? "vertical" : "horizontal";
|
|
395
395
|
}
|
|
396
|
-
const
|
|
397
|
-
function
|
|
398
|
-
return typeof e == "string" &&
|
|
396
|
+
const pa = ["top", "bottom", "left", "right"];
|
|
397
|
+
function ya(e) {
|
|
398
|
+
return typeof e == "string" && pa.includes(e);
|
|
399
399
|
}
|
|
400
400
|
function he() {
|
|
401
401
|
const e = we(Me, null);
|
|
@@ -407,18 +407,18 @@ function he() {
|
|
|
407
407
|
vertical: v(() => Ae(n.value) === "vertical")
|
|
408
408
|
};
|
|
409
409
|
}
|
|
410
|
-
const Ve = ["minimize", "maximize", "close"],
|
|
411
|
-
function
|
|
412
|
-
const t = e?.[
|
|
413
|
-
return
|
|
410
|
+
const Ve = ["minimize", "maximize", "close"], ga = "window", ha = "barPosition";
|
|
411
|
+
function xa(e) {
|
|
412
|
+
const t = e?.[ga]?.[ha];
|
|
413
|
+
return ya(t) ? t : null;
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function wa(e = "top") {
|
|
416
416
|
const n = w(e);
|
|
417
417
|
let t = null, a = !1;
|
|
418
418
|
async function l() {
|
|
419
419
|
try {
|
|
420
420
|
const { readConfig: o } = await import("@vasakgroup/plugin-config-manager"), r = await o();
|
|
421
|
-
n.value =
|
|
421
|
+
n.value = xa(r) ?? e;
|
|
422
422
|
} catch {
|
|
423
423
|
}
|
|
424
424
|
}
|
|
@@ -447,7 +447,7 @@ function et(e) {
|
|
|
447
447
|
}
|
|
448
448
|
return t;
|
|
449
449
|
}
|
|
450
|
-
const
|
|
450
|
+
const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title", "aria-label"], Ee = "flex items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 p-1 transition-colors", tt = /* @__PURE__ */ D({
|
|
451
451
|
__name: "WindowControls",
|
|
452
452
|
props: {
|
|
453
453
|
controls: { default: () => Ve },
|
|
@@ -457,84 +457,84 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
457
457
|
},
|
|
458
458
|
emits: ["minimize", "maximize", "close"],
|
|
459
459
|
setup(e, { emit: n }) {
|
|
460
|
-
const t = e, { t: a } =
|
|
460
|
+
const t = e, { t: a } = St(), l = v(() => t.minimizeLabel ?? a("ventana.minimizar")), o = v(() => t.maximizeLabel ?? a("ventana.maximizar")), r = v(() => t.closeLabel ?? a("ventana.cerrar")), u = n, { vertical: m } = he(), c = v(() => ({
|
|
461
461
|
minimize: t.controls.includes("minimize"),
|
|
462
462
|
maximize: t.controls.includes("maximize"),
|
|
463
463
|
close: t.controls.includes("close")
|
|
464
464
|
}));
|
|
465
|
-
function
|
|
466
|
-
return
|
|
465
|
+
function f() {
|
|
466
|
+
return Bt();
|
|
467
467
|
}
|
|
468
|
-
const
|
|
468
|
+
const k = Ge();
|
|
469
469
|
function L(P) {
|
|
470
|
-
return !!
|
|
470
|
+
return !!k?.vnode.props?.[`on${P}`];
|
|
471
471
|
}
|
|
472
472
|
function A() {
|
|
473
473
|
if (L("Minimize")) return u("minimize");
|
|
474
|
-
|
|
474
|
+
f().minimize();
|
|
475
475
|
}
|
|
476
476
|
function g() {
|
|
477
477
|
if (L("Maximize")) return u("maximize");
|
|
478
|
-
|
|
478
|
+
f().toggleMaximize();
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function C() {
|
|
481
481
|
if (L("Close")) return u("close");
|
|
482
|
-
|
|
482
|
+
f().close();
|
|
483
483
|
}
|
|
484
|
-
return (P,
|
|
484
|
+
return (P, z) => e.controls.length ? (i(), s("div", {
|
|
485
485
|
key: 0,
|
|
486
|
-
class: y(["flex shrink-0 gap-1", F(
|
|
486
|
+
class: y(["flex shrink-0 gap-1", F(m) ? "flex-col" : ""]),
|
|
487
487
|
"data-tauri-drag-region": ""
|
|
488
488
|
}, [
|
|
489
|
-
|
|
489
|
+
c.value.minimize ? (i(), s("button", {
|
|
490
490
|
key: 0,
|
|
491
491
|
type: "button",
|
|
492
492
|
class: y([Ee, "hover:bg-status-success"]),
|
|
493
493
|
title: l.value,
|
|
494
494
|
"aria-label": l.value,
|
|
495
|
-
onClick:
|
|
495
|
+
onClick: z[0] || (z[0] = (h) => A())
|
|
496
496
|
}, [
|
|
497
497
|
j(N, {
|
|
498
498
|
name: "window-minimize",
|
|
499
499
|
type: "symbol",
|
|
500
500
|
size: 24
|
|
501
501
|
})
|
|
502
|
-
], 10,
|
|
503
|
-
|
|
502
|
+
], 10, $a)) : x("", !0),
|
|
503
|
+
c.value.maximize ? (i(), s("button", {
|
|
504
504
|
key: 1,
|
|
505
505
|
type: "button",
|
|
506
506
|
class: y([Ee, "hover:bg-status-warning"]),
|
|
507
507
|
title: o.value,
|
|
508
508
|
"aria-label": o.value,
|
|
509
|
-
onClick:
|
|
509
|
+
onClick: z[1] || (z[1] = (h) => g())
|
|
510
510
|
}, [
|
|
511
511
|
j(N, {
|
|
512
512
|
name: "window-maximize",
|
|
513
513
|
type: "symbol",
|
|
514
514
|
size: 24
|
|
515
515
|
})
|
|
516
|
-
], 10,
|
|
517
|
-
|
|
516
|
+
], 10, ka)) : x("", !0),
|
|
517
|
+
c.value.close ? (i(), s("button", {
|
|
518
518
|
key: 2,
|
|
519
519
|
type: "button",
|
|
520
520
|
class: y([Ee, "hover:bg-status-error"]),
|
|
521
521
|
title: r.value,
|
|
522
522
|
"aria-label": r.value,
|
|
523
|
-
onClick:
|
|
523
|
+
onClick: z[2] || (z[2] = (h) => C())
|
|
524
524
|
}, [
|
|
525
525
|
j(N, {
|
|
526
526
|
name: "window-close",
|
|
527
527
|
type: "symbol",
|
|
528
528
|
size: 24
|
|
529
529
|
})
|
|
530
|
-
], 10,
|
|
530
|
+
], 10, Ca)) : x("", !0)
|
|
531
531
|
], 2)) : x("", !0);
|
|
532
532
|
}
|
|
533
|
-
}),
|
|
533
|
+
}), za = {
|
|
534
534
|
key: 0,
|
|
535
535
|
class: "flex shrink-0 items-center",
|
|
536
536
|
"data-tauri-drag-region": ""
|
|
537
|
-
},
|
|
537
|
+
}, Ea = {
|
|
538
538
|
key: 1,
|
|
539
539
|
class: "min-w-0 shrink truncate text-sm",
|
|
540
540
|
"data-tauri-drag-region": ""
|
|
@@ -559,10 +559,10 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
559
559
|
class: y(["relative flex shrink-0 items-center gap-2 p-1 font-title", l.value ? "h-full flex-col" : "w-full"]),
|
|
560
560
|
"data-tauri-drag-region": ""
|
|
561
561
|
}, [
|
|
562
|
-
o.$slots.identidad ? (i(), s("div",
|
|
562
|
+
o.$slots.identidad ? (i(), s("div", za, [
|
|
563
563
|
S(o.$slots, "identidad")
|
|
564
564
|
])) : x("", !0),
|
|
565
|
-
(o.$slots.titulo || e.title) && !l.value ? (i(), s("p",
|
|
565
|
+
(o.$slots.titulo || e.title) && !l.value ? (i(), s("p", Ea, [
|
|
566
566
|
S(o.$slots, "titulo", {}, () => [
|
|
567
567
|
$e(V(e.title), 1)
|
|
568
568
|
])
|
|
@@ -579,7 +579,7 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
579
579
|
}, [
|
|
580
580
|
S(o.$slots, "acciones")
|
|
581
581
|
], 2)) : x("", !0),
|
|
582
|
-
j(tt,
|
|
582
|
+
j(tt, le({
|
|
583
583
|
controls: e.controls,
|
|
584
584
|
"minimize-label": e.minimizeLabel,
|
|
585
585
|
"maximize-label": e.maximizeLabel,
|
|
@@ -597,7 +597,7 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
597
597
|
], 2)) : x("", !0)
|
|
598
598
|
], 2));
|
|
599
599
|
}
|
|
600
|
-
}),
|
|
600
|
+
}), La = { class: "flex min-h-0 min-w-0 flex-1" }, Da = /* @__PURE__ */ D({
|
|
601
601
|
__name: "WindowFrame",
|
|
602
602
|
props: {
|
|
603
603
|
position: { default: null },
|
|
@@ -610,7 +610,7 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
610
610
|
},
|
|
611
611
|
emits: ["minimize", "maximize", "close"],
|
|
612
612
|
setup(e) {
|
|
613
|
-
const n = e, t =
|
|
613
|
+
const n = e, t = wa(), a = v(() => n.position ?? t.value), l = v(() => Ae(a.value)), o = v(() => l.value === "vertical");
|
|
614
614
|
ye(Me, { posicion: a, orientacion: l, vertical: o });
|
|
615
615
|
const r = {
|
|
616
616
|
top: "flex-col",
|
|
@@ -618,10 +618,10 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
618
618
|
left: "flex-row",
|
|
619
619
|
right: "flex-row-reverse"
|
|
620
620
|
};
|
|
621
|
-
return (u,
|
|
621
|
+
return (u, m) => (i(), s("div", {
|
|
622
622
|
class: y(["flex h-screen w-screen overflow-hidden rounded-corner-window border border-ui-border bg-ui-bg/80", r[a.value]])
|
|
623
623
|
}, [
|
|
624
|
-
e.hideBar ? x("", !0) : (i(),
|
|
624
|
+
e.hideBar ? x("", !0) : (i(), K(at, le({
|
|
625
625
|
key: 0,
|
|
626
626
|
position: a.value,
|
|
627
627
|
title: e.title,
|
|
@@ -664,22 +664,22 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
664
664
|
key: "3"
|
|
665
665
|
} : void 0
|
|
666
666
|
]), 1040, ["position", "title", "minimize-label", "maximize-label", "close-label", "controls"])),
|
|
667
|
-
B("div",
|
|
667
|
+
B("div", La, [
|
|
668
668
|
S(u.$slots, "default")
|
|
669
669
|
])
|
|
670
670
|
], 2));
|
|
671
671
|
}
|
|
672
|
-
}),
|
|
672
|
+
}), Ta = ["aria-selected", "title", "aria-label", "tabindex"], Aa = {
|
|
673
673
|
key: 1,
|
|
674
674
|
"aria-hidden": "true"
|
|
675
|
-
},
|
|
675
|
+
}, Ba = {
|
|
676
676
|
key: 2,
|
|
677
677
|
class: "min-w-0 flex-1 truncate"
|
|
678
|
-
},
|
|
678
|
+
}, Sa = ["title", "aria-label"], Ma = { class: "whitespace-nowrap" }, Va = {
|
|
679
679
|
key: 0,
|
|
680
680
|
class: "size-2 shrink-0 rounded-full bg-current",
|
|
681
681
|
"aria-hidden": "true"
|
|
682
|
-
},
|
|
682
|
+
}, Ia = ["title", "aria-label"], Oa = 500, qe = 8, He = 6, nt = /* @__PURE__ */ D({
|
|
683
683
|
__name: "TabItem",
|
|
684
684
|
props: {
|
|
685
685
|
tab: {},
|
|
@@ -690,47 +690,47 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
690
690
|
},
|
|
691
691
|
emits: ["select", "close", "menu", "mover", "navegar"],
|
|
692
692
|
setup(e, { emit: n }) {
|
|
693
|
-
const t = e, a = n, { vertical: l, posicion: o } = he(), r = w(null), u = w(null),
|
|
693
|
+
const t = e, a = n, { vertical: l, posicion: o } = he(), r = w(null), u = w(null), m = w(!1), c = w(!1), f = w(!1), k = w({ top: 0, left: 0, right: 0 });
|
|
694
694
|
let L = null, A = null;
|
|
695
|
-
const g = v(() => t.tab.closable !== !1),
|
|
695
|
+
const g = v(() => t.tab.closable !== !1), C = v(() => t.tab.tooltip ?? t.tab.label), P = v(
|
|
696
696
|
() => t.tab.dirty ? `${t.tab.label} · ${t.dirtyLabel}` : t.tab.label
|
|
697
|
-
),
|
|
697
|
+
), z = v(() => t.tab.label.trim().charAt(0).toUpperCase()), h = v(() => m.value || f.value), d = v(
|
|
698
698
|
() => !!t.tab.dirty && !(h.value && g.value)
|
|
699
699
|
), b = v(
|
|
700
700
|
() => g.value && (h.value || t.active || !t.tab.dirty)
|
|
701
701
|
), p = v(
|
|
702
|
-
() => l.value && (
|
|
702
|
+
() => l.value && (m.value || c.value || f.value)
|
|
703
703
|
), R = v(() => {
|
|
704
|
-
const q = { position: "fixed", top: `${
|
|
705
|
-
return o.value === "right" ? { ...q, right: `${
|
|
704
|
+
const q = { position: "fixed", top: `${k.value.top}px`, zIndex: 50 };
|
|
705
|
+
return o.value === "right" ? { ...q, right: `${k.value.right + He}px` } : { ...q, left: `${k.value.left + He}px` };
|
|
706
706
|
});
|
|
707
|
-
function
|
|
707
|
+
function oe() {
|
|
708
708
|
const q = r.value;
|
|
709
709
|
if (!q) return;
|
|
710
710
|
const $ = q.getBoundingClientRect();
|
|
711
|
-
|
|
711
|
+
k.value = {
|
|
712
712
|
top: $.top,
|
|
713
713
|
left: $.right,
|
|
714
714
|
right: window.innerWidth - $.left
|
|
715
715
|
};
|
|
716
716
|
}
|
|
717
|
-
function
|
|
717
|
+
function U(q) {
|
|
718
718
|
const $ = q.relatedTarget;
|
|
719
|
-
$ && u.value?.contains($) || (
|
|
719
|
+
$ && u.value?.contains($) || (f.value = !1);
|
|
720
720
|
}
|
|
721
|
-
function
|
|
722
|
-
|
|
721
|
+
function ie() {
|
|
722
|
+
m.value = !0, oe();
|
|
723
723
|
}
|
|
724
724
|
function Y() {
|
|
725
|
-
|
|
725
|
+
c.value = !0, oe();
|
|
726
726
|
}
|
|
727
727
|
function T() {
|
|
728
728
|
L !== null && clearTimeout(L), L = null, A = null;
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function E(q) {
|
|
731
731
|
q.button === 0 && (A = { x: q.clientX, y: q.clientY }, L = setTimeout(() => {
|
|
732
732
|
A && a("menu", A), T();
|
|
733
|
-
},
|
|
733
|
+
}, Oa));
|
|
734
734
|
}
|
|
735
735
|
function O(q) {
|
|
736
736
|
if (!A) return;
|
|
@@ -751,7 +751,7 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
751
751
|
]]),
|
|
752
752
|
role: "tab",
|
|
753
753
|
"aria-selected": e.active,
|
|
754
|
-
title:
|
|
754
|
+
title: C.value,
|
|
755
755
|
"aria-label": P.value,
|
|
756
756
|
tabindex: e.tabindex,
|
|
757
757
|
onClick: $[5] || ($[5] = M((H) => a("select"), ["stop"])),
|
|
@@ -772,23 +772,23 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
772
772
|
],
|
|
773
773
|
onAuxclick: M(de, ["stop"]),
|
|
774
774
|
onContextmenu: bt,
|
|
775
|
-
onPointerdown:
|
|
775
|
+
onPointerdown: E,
|
|
776
776
|
onPointermove: O,
|
|
777
777
|
onPointerup: T,
|
|
778
778
|
onPointerleave: T,
|
|
779
|
-
onMouseenter:
|
|
780
|
-
onMouseleave: $[19] || ($[19] = (H) =>
|
|
779
|
+
onMouseenter: ie,
|
|
780
|
+
onMouseleave: $[19] || ($[19] = (H) => m.value = !1),
|
|
781
781
|
onFocus: Y,
|
|
782
|
-
onBlur: $[20] || ($[20] = (H) =>
|
|
782
|
+
onBlur: $[20] || ($[20] = (H) => c.value = !1)
|
|
783
783
|
}, [
|
|
784
|
-
e.tab.icon ? (i(),
|
|
784
|
+
e.tab.icon ? (i(), K(N, {
|
|
785
785
|
key: 0,
|
|
786
786
|
name: e.tab.icon,
|
|
787
787
|
size: 16,
|
|
788
788
|
class: "shrink-0"
|
|
789
|
-
}, null, 8, ["name"])) : F(l) ? (i(), s("span",
|
|
790
|
-
F(l) ? x("", !0) : (i(), s("span",
|
|
791
|
-
|
|
789
|
+
}, null, 8, ["name"])) : F(l) ? (i(), s("span", Aa, V(z.value), 1)) : x("", !0),
|
|
790
|
+
F(l) ? x("", !0) : (i(), s("span", Ba, V(e.tab.label), 1)),
|
|
791
|
+
d.value ? (i(), s("span", {
|
|
792
792
|
key: 3,
|
|
793
793
|
class: y(["size-2 shrink-0 rounded-full bg-current", F(l) ? "absolute right-0.5 top-0.5" : ""]),
|
|
794
794
|
"aria-hidden": "true"
|
|
@@ -805,8 +805,8 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
805
805
|
type: "symbol",
|
|
806
806
|
size: 12
|
|
807
807
|
})
|
|
808
|
-
], 8,
|
|
809
|
-
(i(),
|
|
808
|
+
], 8, Sa)) : x("", !0),
|
|
809
|
+
(i(), K(ge, { to: "body" }, [
|
|
810
810
|
j(ke, {
|
|
811
811
|
"enter-active-class": "transition duration-150 ease-out",
|
|
812
812
|
"enter-from-class": "opacity-0 scale-95",
|
|
@@ -820,13 +820,13 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
820
820
|
ref_key: "desplegadoRef",
|
|
821
821
|
ref: u,
|
|
822
822
|
style: fe(R.value),
|
|
823
|
-
onMouseenter: $[2] || ($[2] = (H) =>
|
|
824
|
-
onMouseleave: $[3] || ($[3] = (H) =>
|
|
825
|
-
onFocusin: $[4] || ($[4] = (H) =>
|
|
826
|
-
onFocusout:
|
|
823
|
+
onMouseenter: $[2] || ($[2] = (H) => f.value = !0),
|
|
824
|
+
onMouseleave: $[3] || ($[3] = (H) => f.value = !1),
|
|
825
|
+
onFocusin: $[4] || ($[4] = (H) => f.value = !0),
|
|
826
|
+
onFocusout: U
|
|
827
827
|
}, [
|
|
828
|
-
B("span",
|
|
829
|
-
e.tab.dirty ? (i(), s("span",
|
|
828
|
+
B("span", Ma, V(e.tab.label), 1),
|
|
829
|
+
e.tab.dirty ? (i(), s("span", Va)) : x("", !0),
|
|
830
830
|
g.value ? (i(), s("button", {
|
|
831
831
|
key: 1,
|
|
832
832
|
type: "button",
|
|
@@ -840,15 +840,15 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
840
840
|
type: "symbol",
|
|
841
841
|
size: 12
|
|
842
842
|
})
|
|
843
|
-
], 8,
|
|
843
|
+
], 8, Ia)) : x("", !0)
|
|
844
844
|
], 38)) : x("", !0)
|
|
845
845
|
]),
|
|
846
846
|
_: 1
|
|
847
847
|
})
|
|
848
848
|
]))
|
|
849
|
-
], 42,
|
|
849
|
+
], 42, Ta));
|
|
850
850
|
}
|
|
851
|
-
}),
|
|
851
|
+
}), ja = ["aria-orientation"], Pa = ["draggable", "onDragstart", "onDragover", "onDrop"], Ra = ["title", "aria-label"], Fa = /* @__PURE__ */ D({
|
|
852
852
|
__name: "TabBar",
|
|
853
853
|
props: {
|
|
854
854
|
tabs: {},
|
|
@@ -860,48 +860,48 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
860
860
|
},
|
|
861
861
|
emits: ["update:modelValue", "select", "close", "new", "reorder", "menu"],
|
|
862
862
|
setup(e, { emit: n }) {
|
|
863
|
-
const t = e, a = n, { vertical: l } = he(), o = w(null), r = w(0), u = w(null),
|
|
864
|
-
function
|
|
863
|
+
const t = e, a = n, { vertical: l } = he(), o = w(null), r = w(0), u = w(null), m = w(null);
|
|
864
|
+
function c(h) {
|
|
865
865
|
a("update:modelValue", h), a("select", h);
|
|
866
866
|
}
|
|
867
|
-
async function
|
|
867
|
+
async function f(h, d) {
|
|
868
868
|
const b = t.tabs.length - 1;
|
|
869
869
|
if (b < 0) return;
|
|
870
|
-
const p =
|
|
870
|
+
const p = d === "primera" ? 0 : d === "ultima" ? b : d === "anterior" ? (h - 1 + t.tabs.length) % t.tabs.length : (h + 1) % t.tabs.length;
|
|
871
871
|
r.value = p, await J(), o.value?.querySelectorAll('[role="tab"]')?.[p]?.focus();
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function k(h, d) {
|
|
874
874
|
if (t.fixedOrder) return;
|
|
875
|
-
const b = h +
|
|
875
|
+
const b = h + d;
|
|
876
876
|
if (b < 0 || b >= t.tabs.length) return;
|
|
877
877
|
const p = [...t.tabs], [R] = p.splice(h, 1);
|
|
878
878
|
R && (p.splice(b, 0, R), r.value = b, a("reorder", p));
|
|
879
879
|
}
|
|
880
880
|
function L(h) {
|
|
881
|
-
const
|
|
882
|
-
if (!
|
|
883
|
-
const b = h.deltaY || h.deltaX || 0, p = l.value ?
|
|
884
|
-
l.value ?
|
|
881
|
+
const d = o.value;
|
|
882
|
+
if (!d) return;
|
|
883
|
+
const b = h.deltaY || h.deltaX || 0, p = l.value ? d.scrollTop : d.scrollLeft;
|
|
884
|
+
l.value ? d.scrollTop += b : d.scrollLeft += b, (l.value ? d.scrollTop : d.scrollLeft) !== p && h.preventDefault();
|
|
885
885
|
}
|
|
886
|
-
function A(h,
|
|
887
|
-
t.fixedOrder || (u.value = h,
|
|
886
|
+
function A(h, d) {
|
|
887
|
+
t.fixedOrder || (u.value = h, d.dataTransfer?.setData("text/plain", String(h)), d.dataTransfer && (d.dataTransfer.effectAllowed = "move"));
|
|
888
888
|
}
|
|
889
|
-
function g(h,
|
|
890
|
-
t.fixedOrder || u.value === null || (
|
|
889
|
+
function g(h, d) {
|
|
890
|
+
t.fixedOrder || u.value === null || (d.preventDefault(), m.value = h, d.dataTransfer && (d.dataTransfer.dropEffect = "move"));
|
|
891
891
|
}
|
|
892
|
-
function
|
|
893
|
-
const
|
|
894
|
-
if (P(), t.fixedOrder ||
|
|
895
|
-
const b = [...t.tabs], [p] = b.splice(
|
|
892
|
+
function C(h) {
|
|
893
|
+
const d = u.value;
|
|
894
|
+
if (P(), t.fixedOrder || d === null || d === h) return;
|
|
895
|
+
const b = [...t.tabs], [p] = b.splice(d, 1);
|
|
896
896
|
p && (b.splice(h, 0, p), a("reorder", b));
|
|
897
897
|
}
|
|
898
898
|
function P() {
|
|
899
|
-
u.value = null,
|
|
899
|
+
u.value = null, m.value = null;
|
|
900
900
|
}
|
|
901
|
-
const
|
|
901
|
+
const z = v(
|
|
902
902
|
() => l.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"
|
|
903
903
|
);
|
|
904
|
-
return (h,
|
|
904
|
+
return (h, d) => (i(), s("div", {
|
|
905
905
|
class: y(["flex min-h-0 min-w-0 items-center gap-1", F(l) ? "w-full flex-col" : "h-full"]),
|
|
906
906
|
role: "tablist",
|
|
907
907
|
"aria-orientation": F(l) ? "vertical" : "horizontal"
|
|
@@ -909,19 +909,19 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
909
909
|
B("div", {
|
|
910
910
|
ref_key: "carril",
|
|
911
911
|
ref: o,
|
|
912
|
-
class: y(
|
|
912
|
+
class: y(z.value),
|
|
913
913
|
onWheel: L
|
|
914
914
|
}, [
|
|
915
|
-
(i(!0), s(te, null,
|
|
915
|
+
(i(!0), s(te, null, ce(e.tabs, (b, p) => (i(), s("div", {
|
|
916
916
|
key: b.id,
|
|
917
917
|
class: y(["transition-opacity", [
|
|
918
918
|
u.value === p ? "opacity-40" : "",
|
|
919
|
-
|
|
919
|
+
m.value === p && u.value !== p ? "ring-2 ring-secondary rounded-corner" : ""
|
|
920
920
|
]]),
|
|
921
921
|
draggable: !e.fixedOrder,
|
|
922
922
|
onDragstart: (R) => A(p, R),
|
|
923
923
|
onDragover: (R) => g(p, R),
|
|
924
|
-
onDrop: M((R) =>
|
|
924
|
+
onDrop: M((R) => C(p), ["prevent"]),
|
|
925
925
|
onDragend: P
|
|
926
926
|
}, [
|
|
927
927
|
j(nt, {
|
|
@@ -930,13 +930,13 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
930
930
|
"close-label": e.closeLabel,
|
|
931
931
|
"dirty-label": e.dirtyLabel,
|
|
932
932
|
tabindex: p === r.value ? 0 : -1,
|
|
933
|
-
onSelect: (R) =>
|
|
933
|
+
onSelect: (R) => c(b.id),
|
|
934
934
|
onClose: (R) => a("close", b.id),
|
|
935
935
|
onMenu: (R) => a("menu", { id: b.id, ...R }),
|
|
936
|
-
onNavegar: (R) =>
|
|
937
|
-
onMover: (R) =>
|
|
936
|
+
onNavegar: (R) => f(p, R),
|
|
937
|
+
onMover: (R) => k(p, R)
|
|
938
938
|
}, null, 8, ["tab", "active", "close-label", "dirty-label", "tabindex", "onSelect", "onClose", "onMenu", "onNavegar", "onMover"])
|
|
939
|
-
], 42,
|
|
939
|
+
], 42, Pa))), 128))
|
|
940
940
|
], 34),
|
|
941
941
|
e.newLabel ? (i(), s("button", {
|
|
942
942
|
key: 0,
|
|
@@ -944,17 +944,17 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
944
944
|
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",
|
|
945
945
|
title: e.newLabel,
|
|
946
946
|
"aria-label": e.newLabel,
|
|
947
|
-
onClick:
|
|
947
|
+
onClick: d[0] || (d[0] = (b) => a("new"))
|
|
948
948
|
}, [
|
|
949
949
|
j(N, {
|
|
950
950
|
name: "gtk-add",
|
|
951
951
|
type: "symbol",
|
|
952
952
|
size: 14
|
|
953
953
|
})
|
|
954
|
-
], 8,
|
|
955
|
-
], 10,
|
|
954
|
+
], 8, Ra)) : x("", !0)
|
|
955
|
+
], 10, ja));
|
|
956
956
|
}
|
|
957
|
-
}),
|
|
957
|
+
}), Na = ["id", "aria-label", "type", "value", "placeholder", "disabled", "readonly", "required", "aria-describedby", "autocomplete", "aria-invalid"], lt = /* @__PURE__ */ D({
|
|
958
958
|
__name: "TextInput",
|
|
959
959
|
props: {
|
|
960
960
|
modelValue: {},
|
|
@@ -974,25 +974,25 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
974
974
|
emits: ["update:modelValue", "keyup", "keydown"],
|
|
975
975
|
setup(e, { expose: n, emit: t }) {
|
|
976
976
|
const a = e, l = t;
|
|
977
|
-
function o(
|
|
978
|
-
a.lazy || l("update:modelValue",
|
|
977
|
+
function o(f) {
|
|
978
|
+
a.lazy || l("update:modelValue", f.target.value);
|
|
979
979
|
}
|
|
980
|
-
function r(
|
|
981
|
-
a.lazy && l("update:modelValue",
|
|
980
|
+
function r(f) {
|
|
981
|
+
a.lazy && l("update:modelValue", f.target.value);
|
|
982
982
|
}
|
|
983
983
|
const u = w(null);
|
|
984
|
-
function
|
|
984
|
+
function m() {
|
|
985
985
|
return u.value?.focus(), u.value !== null && document.activeElement === u.value;
|
|
986
986
|
}
|
|
987
|
-
n({ enfocar:
|
|
988
|
-
const
|
|
987
|
+
n({ enfocar: m });
|
|
988
|
+
const c = v(() => [
|
|
989
989
|
"w-full rounded-corner border bg-ui-surface/70 px-3 py-1.5 text-sm text-tx-main",
|
|
990
990
|
"placeholder:text-tx-muted focus:outline-none focus:ring-1 focus:ring-primary",
|
|
991
991
|
a.invalid ? "border-status-error" : "border-ui-border",
|
|
992
992
|
a.mono ? "font-mono" : "",
|
|
993
993
|
a.disabled ? "cursor-not-allowed opacity-60" : ""
|
|
994
994
|
]);
|
|
995
|
-
return (
|
|
995
|
+
return (f, k) => (i(), s("input", {
|
|
996
996
|
ref_key: "campo",
|
|
997
997
|
ref: u,
|
|
998
998
|
id: e.id,
|
|
@@ -1006,14 +1006,14 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
1006
1006
|
"aria-describedby": e.describedBy,
|
|
1007
1007
|
autocomplete: e.autocomplete,
|
|
1008
1008
|
"aria-invalid": e.invalid || void 0,
|
|
1009
|
-
class: y(
|
|
1009
|
+
class: y(c.value),
|
|
1010
1010
|
onInput: o,
|
|
1011
1011
|
onChange: r,
|
|
1012
|
-
onKeyup:
|
|
1013
|
-
onKeydown:
|
|
1014
|
-
}, null, 42,
|
|
1012
|
+
onKeyup: k[0] || (k[0] = (L) => l("keyup", L)),
|
|
1013
|
+
onKeydown: k[1] || (k[1] = (L) => l("keydown", L))
|
|
1014
|
+
}, null, 42, Na));
|
|
1015
1015
|
}
|
|
1016
|
-
}),
|
|
1016
|
+
}), qa = { class: "pointer-events-none absolute left-2 flex items-center" }, Ha = ["aria-label"], Ie = /* @__PURE__ */ D({
|
|
1017
1017
|
__name: "SearchField",
|
|
1018
1018
|
props: {
|
|
1019
1019
|
modelValue: { default: "" },
|
|
@@ -1032,7 +1032,7 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
1032
1032
|
setup(e, { expose: n, emit: t }) {
|
|
1033
1033
|
const a = e, l = t, o = w(null);
|
|
1034
1034
|
let r;
|
|
1035
|
-
const u = v(() => a.modelValue.length > 0),
|
|
1035
|
+
const u = v(() => a.modelValue.length > 0), m = v(
|
|
1036
1036
|
() => a.listboxId ? {
|
|
1037
1037
|
role: "combobox",
|
|
1038
1038
|
"aria-autocomplete": "list",
|
|
@@ -1040,34 +1040,34 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
1040
1040
|
"aria-expanded": String(a.expanded),
|
|
1041
1041
|
"aria-activedescendant": a.activeOptionId || void 0
|
|
1042
1042
|
} : {}
|
|
1043
|
-
),
|
|
1044
|
-
function
|
|
1043
|
+
), c = v(() => a.clearable && u.value && !a.disabled);
|
|
1044
|
+
function f() {
|
|
1045
1045
|
clearTimeout(r), r = void 0;
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1048
|
-
l("update:modelValue",
|
|
1047
|
+
function k(C) {
|
|
1048
|
+
l("update:modelValue", C), !(a.debounce <= 0) && (f(), r = setTimeout(() => l("search", C), a.debounce));
|
|
1049
1049
|
}
|
|
1050
1050
|
function L() {
|
|
1051
|
-
|
|
1051
|
+
f(), l("search", a.modelValue);
|
|
1052
1052
|
}
|
|
1053
1053
|
function A() {
|
|
1054
|
-
|
|
1054
|
+
f(), l("update:modelValue", ""), l("clear"), g();
|
|
1055
1055
|
}
|
|
1056
1056
|
function g() {
|
|
1057
1057
|
return o.value?.enfocar() ?? !1;
|
|
1058
1058
|
}
|
|
1059
1059
|
return n({ enfocar: g }), W(async () => {
|
|
1060
1060
|
a.autofocus && (await J(), g());
|
|
1061
|
-
}), ve(
|
|
1061
|
+
}), ve(f), Q(
|
|
1062
1062
|
() => a.disabled,
|
|
1063
|
-
(
|
|
1064
|
-
|
|
1063
|
+
(C) => {
|
|
1064
|
+
C && f();
|
|
1065
1065
|
}
|
|
1066
|
-
), (
|
|
1066
|
+
), (C, P) => (i(), s("div", {
|
|
1067
1067
|
class: "relative flex items-center",
|
|
1068
1068
|
onKeydown: I(L, ["enter"])
|
|
1069
1069
|
}, [
|
|
1070
|
-
B("span",
|
|
1070
|
+
B("span", qa, [
|
|
1071
1071
|
j(N, {
|
|
1072
1072
|
name: e.busy ? "content-loading" : "system-search",
|
|
1073
1073
|
type: "symbol",
|
|
@@ -1075,20 +1075,20 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
1075
1075
|
class: y(e.busy ? "animate-spin opacity-70" : "opacity-60")
|
|
1076
1076
|
}, null, 8, ["name", "class"])
|
|
1077
1077
|
]),
|
|
1078
|
-
j(lt,
|
|
1078
|
+
j(lt, le({
|
|
1079
1079
|
ref_key: "campo",
|
|
1080
1080
|
ref: o,
|
|
1081
1081
|
type: "search",
|
|
1082
1082
|
"model-value": e.modelValue,
|
|
1083
1083
|
placeholder: e.placeholder || e.label,
|
|
1084
1084
|
ariaLabel: e.label || void 0
|
|
1085
|
-
},
|
|
1085
|
+
}, m.value, {
|
|
1086
1086
|
disabled: e.disabled,
|
|
1087
|
-
class: ["pl-7 [&::-webkit-search-cancel-button]:appearance-none",
|
|
1088
|
-
"onUpdate:modelValue":
|
|
1089
|
-
onKeydown: P[0] || (P[0] = (
|
|
1087
|
+
class: ["pl-7 [&::-webkit-search-cancel-button]:appearance-none", c.value ? "pr-8" : ""],
|
|
1088
|
+
"onUpdate:modelValue": k,
|
|
1089
|
+
onKeydown: P[0] || (P[0] = (z) => l("keydown", z))
|
|
1090
1090
|
}), null, 16, ["model-value", "placeholder", "ariaLabel", "disabled", "class"]),
|
|
1091
|
-
|
|
1091
|
+
c.value ? (i(), s("button", {
|
|
1092
1092
|
key: 0,
|
|
1093
1093
|
type: "button",
|
|
1094
1094
|
class: "absolute right-1 flex size-6 items-center justify-center rounded-corner text-tx-muted hover:bg-ui-surface",
|
|
@@ -1103,10 +1103,10 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
1103
1103
|
size: 12,
|
|
1104
1104
|
alt: ""
|
|
1105
1105
|
})
|
|
1106
|
-
], 40,
|
|
1106
|
+
], 40, Ha)) : x("", !0)
|
|
1107
1107
|
], 32));
|
|
1108
1108
|
}
|
|
1109
|
-
}),
|
|
1109
|
+
}), Ka = ["title", "aria-label", "aria-expanded"], Ua = /* @__PURE__ */ D({
|
|
1110
1110
|
__name: "BarSearch",
|
|
1111
1111
|
props: {
|
|
1112
1112
|
modelValue: { default: "" },
|
|
@@ -1118,45 +1118,45 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
1118
1118
|
},
|
|
1119
1119
|
emits: ["update:modelValue", "search", "open", "close"],
|
|
1120
1120
|
setup(e, { emit: n }) {
|
|
1121
|
-
const t = e, a = n, { vertical: l, posicion: o } = he(), r = w(!1), u = w(null),
|
|
1122
|
-
if (!
|
|
1121
|
+
const t = e, a = n, { vertical: l, posicion: o } = he(), r = w(!1), u = w(null), m = v(() => l.value || t.collapsed), c = v(() => !m.value || r.value), f = v(() => {
|
|
1122
|
+
if (!m.value) return "";
|
|
1123
1123
|
const g = "absolute z-40 w-64 rounded-corner border border-ui-border bg-ui-surface/95 p-1 shadow-lg";
|
|
1124
1124
|
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`;
|
|
1125
1125
|
});
|
|
1126
|
-
async function
|
|
1126
|
+
async function k() {
|
|
1127
1127
|
r.value = !0, a("open"), await J(), u.value?.enfocar();
|
|
1128
1128
|
}
|
|
1129
1129
|
function L() {
|
|
1130
1130
|
r.value && (r.value = !1, a("close"));
|
|
1131
1131
|
}
|
|
1132
1132
|
function A(g) {
|
|
1133
|
-
const
|
|
1134
|
-
|
|
1133
|
+
const C = g.relatedTarget;
|
|
1134
|
+
C && g.currentTarget.contains(C) || L();
|
|
1135
1135
|
}
|
|
1136
|
-
return (g,
|
|
1136
|
+
return (g, C) => (i(), s("div", {
|
|
1137
1137
|
class: "relative flex shrink-0 items-center",
|
|
1138
1138
|
onFocusout: A
|
|
1139
1139
|
}, [
|
|
1140
|
-
|
|
1140
|
+
m.value ? (i(), s("button", {
|
|
1141
1141
|
key: 0,
|
|
1142
1142
|
type: "button",
|
|
1143
1143
|
class: "flex size-7 items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 hover:bg-ui-surface/70",
|
|
1144
1144
|
title: e.label,
|
|
1145
1145
|
"aria-label": e.label,
|
|
1146
1146
|
"aria-expanded": r.value,
|
|
1147
|
-
onMousedown:
|
|
1147
|
+
onMousedown: C[0] || (C[0] = M(() => {
|
|
1148
1148
|
}, ["prevent"])),
|
|
1149
|
-
onClick:
|
|
1149
|
+
onClick: C[1] || (C[1] = (P) => r.value ? L() : k())
|
|
1150
1150
|
}, [
|
|
1151
1151
|
j(N, {
|
|
1152
1152
|
name: "system-search",
|
|
1153
1153
|
type: "symbol",
|
|
1154
1154
|
size: 14
|
|
1155
1155
|
})
|
|
1156
|
-
], 40,
|
|
1157
|
-
|
|
1156
|
+
], 40, Ka)) : x("", !0),
|
|
1157
|
+
c.value ? (i(), s("div", {
|
|
1158
1158
|
key: 1,
|
|
1159
|
-
class: y(
|
|
1159
|
+
class: y(f.value),
|
|
1160
1160
|
onKeydown: I(L, ["esc"])
|
|
1161
1161
|
}, [
|
|
1162
1162
|
j(Ie, {
|
|
@@ -1167,17 +1167,17 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
1167
1167
|
label: e.label,
|
|
1168
1168
|
disabled: e.disabled,
|
|
1169
1169
|
debounce: e.debounce,
|
|
1170
|
-
class: y(
|
|
1171
|
-
"onUpdate:modelValue":
|
|
1172
|
-
onSearch:
|
|
1170
|
+
class: y(m.value ? "" : "w-48"),
|
|
1171
|
+
"onUpdate:modelValue": C[2] || (C[2] = (P) => a("update:modelValue", P)),
|
|
1172
|
+
onSearch: C[3] || (C[3] = (P) => a("search", P))
|
|
1173
1173
|
}, null, 8, ["model-value", "placeholder", "label", "disabled", "debounce", "class"])
|
|
1174
1174
|
], 34)) : x("", !0)
|
|
1175
1175
|
], 32));
|
|
1176
1176
|
}
|
|
1177
|
-
}),
|
|
1177
|
+
}), Wa = ["type", "disabled"], Ga = {
|
|
1178
1178
|
key: 0,
|
|
1179
1179
|
class: "w-4 h-4 animate-spin rounded-full border-2 border-current border-t-transparent"
|
|
1180
|
-
},
|
|
1180
|
+
}, Qa = ["src", "alt"], Ya = { key: 2 }, Xa = ["src", "alt"], Ja = /* @__PURE__ */ D({
|
|
1181
1181
|
__name: "ActionButton",
|
|
1182
1182
|
props: {
|
|
1183
1183
|
label: {},
|
|
@@ -1207,7 +1207,7 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
1207
1207
|
}, r = (u) => {
|
|
1208
1208
|
t.stopPropagation && u.stopPropagation(), t.preventDefault && u.preventDefault(), !t.disabled && !t.loading && a("click");
|
|
1209
1209
|
};
|
|
1210
|
-
return (u,
|
|
1210
|
+
return (u, m) => (i(), s("button", {
|
|
1211
1211
|
type: t.type,
|
|
1212
1212
|
onClick: r,
|
|
1213
1213
|
class: y(["rounded-corner transition-[background-color,opacity] duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2", [
|
|
@@ -1219,28 +1219,28 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
1219
1219
|
]]),
|
|
1220
1220
|
disabled: t.disabled || t.loading
|
|
1221
1221
|
}, [
|
|
1222
|
-
e.loading ? (i(), s("span",
|
|
1222
|
+
e.loading ? (i(), s("span", Ga)) : x("", !0),
|
|
1223
1223
|
t.iconSrc && !t.iconRight ? (i(), s("img", {
|
|
1224
1224
|
key: 1,
|
|
1225
1225
|
src: t.iconSrc,
|
|
1226
1226
|
alt: t.iconAlt || t.label,
|
|
1227
1227
|
class: "w-4 h-4"
|
|
1228
|
-
}, null, 8,
|
|
1229
|
-
t.label ? (i(), s("span",
|
|
1228
|
+
}, null, 8, Qa)) : x("", !0),
|
|
1229
|
+
t.label ? (i(), s("span", Ya, V(t.label), 1)) : x("", !0),
|
|
1230
1230
|
t.iconSrc && t.iconRight ? (i(), s("img", {
|
|
1231
1231
|
key: 3,
|
|
1232
1232
|
src: t.iconSrc,
|
|
1233
1233
|
alt: t.iconAlt || t.label,
|
|
1234
1234
|
class: "w-4 h-4"
|
|
1235
|
-
}, null, 8,
|
|
1236
|
-
], 10,
|
|
1235
|
+
}, null, 8, Xa)) : x("", !0)
|
|
1236
|
+
], 10, Wa));
|
|
1237
1237
|
}
|
|
1238
1238
|
}), Oe = (e, n) => {
|
|
1239
1239
|
const t = e.__vccOpts || e;
|
|
1240
1240
|
for (const [a, l] of n)
|
|
1241
1241
|
t[a] = l;
|
|
1242
1242
|
return t;
|
|
1243
|
-
},
|
|
1243
|
+
}, Za = /* @__PURE__ */ Oe(Ja, [["__scopeId", "data-v-69cf4563"]]), ot = {
|
|
1244
1244
|
info: "border-ui-border bg-ui-surface/70 text-tx-main",
|
|
1245
1245
|
success: "border-status-success/40 bg-status-success/10 text-tx-main",
|
|
1246
1246
|
warning: "border-status-warning/40 bg-status-warning/10 text-tx-main",
|
|
@@ -1249,13 +1249,13 @@ const wa = ["title", "aria-label"], $a = ["title", "aria-label"], ka = ["title",
|
|
|
1249
1249
|
function it(e) {
|
|
1250
1250
|
return e === "error" ? "alert" : "status";
|
|
1251
1251
|
}
|
|
1252
|
-
const
|
|
1252
|
+
const _a = ["role"], en = {
|
|
1253
1253
|
key: 0,
|
|
1254
1254
|
class: "mt-0.5"
|
|
1255
|
-
},
|
|
1255
|
+
}, tn = { class: "min-w-0 flex-1" }, an = {
|
|
1256
1256
|
key: 0,
|
|
1257
1257
|
class: "font-semibold"
|
|
1258
|
-
},
|
|
1258
|
+
}, nn = /* @__PURE__ */ D({
|
|
1259
1259
|
__name: "AlertMessage",
|
|
1260
1260
|
props: {
|
|
1261
1261
|
tone: { default: "info" },
|
|
@@ -1270,7 +1270,7 @@ const Za = ["role"], _a = {
|
|
|
1270
1270
|
"aria-atomic": "true",
|
|
1271
1271
|
class: y(["flex gap-3 rounded-corner border px-4 py-2 text-sm", t.value])
|
|
1272
1272
|
}, [
|
|
1273
|
-
e.icon ? (i(), s("span",
|
|
1273
|
+
e.icon ? (i(), s("span", en, [
|
|
1274
1274
|
j(N, {
|
|
1275
1275
|
name: e.icon,
|
|
1276
1276
|
type: e.iconType,
|
|
@@ -1278,20 +1278,20 @@ const Za = ["role"], _a = {
|
|
|
1278
1278
|
alt: ""
|
|
1279
1279
|
}, null, 8, ["name", "type"])
|
|
1280
1280
|
])) : x("", !0),
|
|
1281
|
-
B("div",
|
|
1282
|
-
e.title ? (i(), s("p",
|
|
1281
|
+
B("div", tn, [
|
|
1282
|
+
e.title ? (i(), s("p", an, V(e.title), 1)) : x("", !0),
|
|
1283
1283
|
B("div", {
|
|
1284
1284
|
class: y(e.title ? "mt-1" : "")
|
|
1285
1285
|
}, [
|
|
1286
1286
|
S(l.$slots, "default")
|
|
1287
1287
|
], 2)
|
|
1288
1288
|
])
|
|
1289
|
-
], 10,
|
|
1289
|
+
], 10, _a));
|
|
1290
1290
|
}
|
|
1291
|
-
}),
|
|
1291
|
+
}), ln = { class: "font-medium text-sm text-tx-main" }, on = {
|
|
1292
1292
|
key: 0,
|
|
1293
1293
|
class: "text-sm text-tx-muted"
|
|
1294
|
-
},
|
|
1294
|
+
}, sn = /* @__PURE__ */ D({
|
|
1295
1295
|
__name: "EmptyState",
|
|
1296
1296
|
props: {
|
|
1297
1297
|
title: {},
|
|
@@ -1310,12 +1310,12 @@ const Za = ["role"], _a = {
|
|
|
1310
1310
|
size: 48,
|
|
1311
1311
|
class: "opacity-60"
|
|
1312
1312
|
}, null, 8, ["name", "type"]),
|
|
1313
|
-
B("p",
|
|
1314
|
-
e.note ? (i(), s("p",
|
|
1313
|
+
B("p", ln, V(e.title), 1),
|
|
1314
|
+
e.note ? (i(), s("p", on, V(e.note), 1)) : x("", !0),
|
|
1315
1315
|
S(n.$slots, "default")
|
|
1316
1316
|
], 2));
|
|
1317
1317
|
}
|
|
1318
|
-
}),
|
|
1318
|
+
}), rn = { class: "text-sm text-tx-muted" }, un = /* @__PURE__ */ D({
|
|
1319
1319
|
__name: "LoadingState",
|
|
1320
1320
|
props: {
|
|
1321
1321
|
label: {},
|
|
@@ -1328,10 +1328,10 @@ const Za = ["role"], _a = {
|
|
|
1328
1328
|
class: y(["flex flex-col items-center justify-center gap-4 px-8 py-12 text-center", e.bordered ? "rounded-corner border border-ui-border border-dashed bg-ui-surface/20" : ""])
|
|
1329
1329
|
}, [
|
|
1330
1330
|
t[0] || (t[0] = B("span", { class: "h-10 w-10 animate-spin rounded-full border-4 border-ui-border border-t-primary motion-reduce:animate-none" }, null, -1)),
|
|
1331
|
-
B("p",
|
|
1331
|
+
B("p", rn, V(e.label), 1)
|
|
1332
1332
|
], 2));
|
|
1333
1333
|
}
|
|
1334
|
-
}),
|
|
1334
|
+
}), cn = ["role"], dn = /* @__PURE__ */ D({
|
|
1335
1335
|
__name: "ToastArea",
|
|
1336
1336
|
props: {
|
|
1337
1337
|
toasts: {},
|
|
@@ -1341,7 +1341,7 @@ const Za = ["role"], _a = {
|
|
|
1341
1341
|
const n = e, t = v(
|
|
1342
1342
|
() => n.position === "bottom-center" ? "bottom-4 left-1/2 -translate-x-1/2" : "right-4 bottom-4"
|
|
1343
1343
|
);
|
|
1344
|
-
return (a, l) => (i(),
|
|
1344
|
+
return (a, l) => (i(), K(ge, { to: "body" }, [
|
|
1345
1345
|
B("div", {
|
|
1346
1346
|
class: y(["pointer-events-none fixed z-60 flex flex-col gap-2", t.value])
|
|
1347
1347
|
}, [
|
|
@@ -1353,7 +1353,7 @@ const Za = ["role"], _a = {
|
|
|
1353
1353
|
"move-class": "transition-transform duration-300"
|
|
1354
1354
|
}, {
|
|
1355
1355
|
default: G(() => [
|
|
1356
|
-
(i(!0), s(te, null,
|
|
1356
|
+
(i(!0), s(te, null, ce(e.toasts, (o) => (i(), s("div", {
|
|
1357
1357
|
key: o.id,
|
|
1358
1358
|
role: F(it)(o.tone ?? "info"),
|
|
1359
1359
|
"aria-atomic": "true",
|
|
@@ -1362,17 +1362,17 @@ const Za = ["role"], _a = {
|
|
|
1362
1362
|
S(a.$slots, "default", { aviso: o }, () => [
|
|
1363
1363
|
$e(V(o.message), 1)
|
|
1364
1364
|
])
|
|
1365
|
-
], 10,
|
|
1365
|
+
], 10, cn))), 128))
|
|
1366
1366
|
]),
|
|
1367
1367
|
_: 3
|
|
1368
1368
|
})
|
|
1369
1369
|
], 2)
|
|
1370
1370
|
]));
|
|
1371
1371
|
}
|
|
1372
|
-
}),
|
|
1372
|
+
}), fn = ["aria-label", "aria-valuenow"], mn = {
|
|
1373
1373
|
key: 1,
|
|
1374
1374
|
class: "h-full w-full animate-pulse rounded-corner bg-primary motion-reduce:animate-none motion-reduce:bg-primary/40"
|
|
1375
|
-
},
|
|
1375
|
+
}, bn = /* @__PURE__ */ D({
|
|
1376
1376
|
__name: "ProgressBar",
|
|
1377
1377
|
props: {
|
|
1378
1378
|
value: {},
|
|
@@ -1399,42 +1399,42 @@ const Za = ["role"], _a = {
|
|
|
1399
1399
|
key: 0,
|
|
1400
1400
|
class: y(["h-full rounded-corner transition-[width] duration-300 ease-out", t[e.tone]]),
|
|
1401
1401
|
style: fe({ width: `${a.value}%` })
|
|
1402
|
-
}, null, 6)) : (i(), s("div",
|
|
1403
|
-
], 8,
|
|
1402
|
+
}, null, 6)) : (i(), s("div", mn))
|
|
1403
|
+
], 8, fn));
|
|
1404
1404
|
}
|
|
1405
|
-
}),
|
|
1405
|
+
}), vn = /[/\-_.]/;
|
|
1406
1406
|
function Le(e, n) {
|
|
1407
1407
|
if (!n) return 100;
|
|
1408
1408
|
const t = n.toLowerCase();
|
|
1409
|
-
return t === e ? 0 : t.startsWith(e) ? 10 : t.split(
|
|
1409
|
+
return t === e ? 0 : t.startsWith(e) ? 10 : t.split(vn).some((a) => a.startsWith(e)) ? 30 : t.includes(e) ? 40 : 100;
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1411
|
+
function pn(e, n) {
|
|
1412
1412
|
const t = n.trim().toLowerCase();
|
|
1413
1413
|
if (!t) return e;
|
|
1414
1414
|
const a = [];
|
|
1415
1415
|
for (let l = 0; l < e.length; l++) {
|
|
1416
|
-
const o = e[l], r = Le(t, o.valor), u = Le(t, o.etiqueta),
|
|
1417
|
-
|
|
1416
|
+
const o = e[l], r = Le(t, o.valor), u = Le(t, o.etiqueta), m = u === 10 ? 20 : u, f = Le(t, o.detalle) === 100 ? 100 : 40, k = Math.min(r, m, f);
|
|
1417
|
+
k !== 100 && a.push({ opcion: o, rango: k, orden: l });
|
|
1418
1418
|
}
|
|
1419
1419
|
return a.sort((l, o) => l.rango - o.rango || l.orden - o.orden), a.map((l) => l.opcion);
|
|
1420
1420
|
}
|
|
1421
|
-
let
|
|
1422
|
-
function
|
|
1423
|
-
return
|
|
1421
|
+
let Ke = 0;
|
|
1422
|
+
function yn() {
|
|
1423
|
+
return Ke += 1, `vsk-lista-${Ke}`;
|
|
1424
1424
|
}
|
|
1425
|
-
const
|
|
1425
|
+
const gn = ["disabled", "aria-label", "aria-expanded"], hn = { class: "min-w-0 flex-1 truncate" }, xn = {
|
|
1426
1426
|
key: 0,
|
|
1427
1427
|
class: "ml-2 text-tx-muted text-xs"
|
|
1428
|
-
},
|
|
1428
|
+
}, wn = { class: "border-ui-border border-b p-2" }, $n = ["id"], kn = {
|
|
1429
1429
|
key: 0,
|
|
1430
1430
|
class: "p-3 text-center text-tx-muted text-xs"
|
|
1431
|
-
},
|
|
1431
|
+
}, Cn = ["id", "data-indice", "aria-selected"], zn = { class: "min-w-0 flex-1 truncate" }, En = {
|
|
1432
1432
|
key: 0,
|
|
1433
1433
|
class: "shrink-0 text-tx-muted text-xs"
|
|
1434
|
-
},
|
|
1434
|
+
}, Ln = {
|
|
1435
1435
|
key: 1,
|
|
1436
1436
|
class: "px-2 py-1 text-tx-muted text-xs"
|
|
1437
|
-
},
|
|
1437
|
+
}, Dn = /* @__PURE__ */ D({
|
|
1438
1438
|
__name: "SearchSelect",
|
|
1439
1439
|
props: {
|
|
1440
1440
|
modelValue: {},
|
|
@@ -1449,49 +1449,49 @@ const yn = ["disabled", "aria-label", "aria-expanded"], gn = { class: "min-w-0 f
|
|
|
1449
1449
|
},
|
|
1450
1450
|
emits: ["update:modelValue"],
|
|
1451
1451
|
setup(e, { emit: n }) {
|
|
1452
|
-
const t = e, a = n, l = w(""), o = w(!1), r = w(0), u = w(null),
|
|
1452
|
+
const t = e, a = n, l = w(""), o = w(!1), r = w(0), u = w(null), m = w(null), c = w(null), f = yn(), k = v(
|
|
1453
1453
|
() => t.options.find((T) => T.valor === t.modelValue) ?? null
|
|
1454
|
-
), L = v(() =>
|
|
1455
|
-
() => A.value.length > 0 ? `${
|
|
1454
|
+
), L = v(() => pn(t.options, l.value)), A = v(() => L.value.slice(0, t.limit)), g = v(() => Math.max(0, L.value.length - t.limit)), C = v(
|
|
1455
|
+
() => A.value.length > 0 ? `${f}-${r.value}` : void 0
|
|
1456
1456
|
);
|
|
1457
1457
|
function P(T) {
|
|
1458
1458
|
a("update:modelValue", T), h();
|
|
1459
1459
|
}
|
|
1460
|
-
async function
|
|
1460
|
+
async function z() {
|
|
1461
1461
|
o.value = !0;
|
|
1462
|
-
const T = A.value.findIndex((
|
|
1463
|
-
r.value = T >= 0 ? T : 0, await J(),
|
|
1462
|
+
const T = A.value.findIndex((E) => E.valor === t.modelValue);
|
|
1463
|
+
r.value = T >= 0 ? T : 0, await J(), c.value?.enfocar(), U();
|
|
1464
1464
|
}
|
|
1465
1465
|
function h(T = !0) {
|
|
1466
|
-
o.value && (o.value = !1, l.value = "", T && J(() =>
|
|
1466
|
+
o.value && (o.value = !1, l.value = "", T && J(() => m.value?.focus()));
|
|
1467
1467
|
}
|
|
1468
|
-
function
|
|
1469
|
-
const
|
|
1470
|
-
|
|
1468
|
+
function d(T) {
|
|
1469
|
+
const E = A.value.length;
|
|
1470
|
+
E !== 0 && (r.value = (r.value + T + E) % E, U());
|
|
1471
1471
|
}
|
|
1472
1472
|
function b(T) {
|
|
1473
|
-
r.value = T,
|
|
1473
|
+
r.value = T, U();
|
|
1474
1474
|
}
|
|
1475
1475
|
function p(T) {
|
|
1476
|
-
const
|
|
1477
|
-
if (!
|
|
1478
|
-
const O = Number(
|
|
1476
|
+
const E = T.target?.closest?.("[data-indice]");
|
|
1477
|
+
if (!E) return null;
|
|
1478
|
+
const O = Number(E.getAttribute("data-indice"));
|
|
1479
1479
|
return Number.isInteger(O) ? O : null;
|
|
1480
1480
|
}
|
|
1481
1481
|
function R(T) {
|
|
1482
|
-
const
|
|
1482
|
+
const E = p(T), O = E === null ? void 0 : A.value[E];
|
|
1483
1483
|
O && P(O.valor);
|
|
1484
1484
|
}
|
|
1485
|
-
function
|
|
1486
|
-
const
|
|
1487
|
-
|
|
1485
|
+
function oe(T) {
|
|
1486
|
+
const E = p(T);
|
|
1487
|
+
E !== null && (r.value = E);
|
|
1488
1488
|
}
|
|
1489
|
-
function
|
|
1489
|
+
function U() {
|
|
1490
1490
|
J(() => {
|
|
1491
1491
|
u.value?.querySelector(`[data-indice="${r.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
1492
1492
|
});
|
|
1493
1493
|
}
|
|
1494
|
-
function
|
|
1494
|
+
function ie() {
|
|
1495
1495
|
const T = A.value[r.value];
|
|
1496
1496
|
T && P(T.valor);
|
|
1497
1497
|
}
|
|
@@ -1501,34 +1501,34 @@ const yn = ["disabled", "aria-label", "aria-expanded"], gn = { class: "min-w-0 f
|
|
|
1501
1501
|
T && h(!1);
|
|
1502
1502
|
}
|
|
1503
1503
|
), Q(l, () => {
|
|
1504
|
-
r.value = 0,
|
|
1504
|
+
r.value = 0, U();
|
|
1505
1505
|
});
|
|
1506
1506
|
function Y(T) {
|
|
1507
|
-
const
|
|
1508
|
-
|
|
1507
|
+
const E = T.relatedTarget;
|
|
1508
|
+
E && T.currentTarget.contains(E) || h(!1);
|
|
1509
1509
|
}
|
|
1510
|
-
return (T,
|
|
1510
|
+
return (T, E) => (i(), s("div", {
|
|
1511
1511
|
class: "relative",
|
|
1512
1512
|
onFocusout: Y
|
|
1513
1513
|
}, [
|
|
1514
1514
|
B("button", {
|
|
1515
1515
|
ref_key: "boton",
|
|
1516
|
-
ref:
|
|
1516
|
+
ref: m,
|
|
1517
1517
|
type: "button",
|
|
1518
1518
|
disabled: e.disabled,
|
|
1519
1519
|
class: "flex w-full items-center justify-between gap-2 rounded-corner border border-ui-border-strong bg-ui-surface px-2 py-1 text-left text-sm text-tx-main transition-colors hover:bg-ui-bg/60 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1520
1520
|
"aria-label": e.label || void 0,
|
|
1521
1521
|
"aria-expanded": o.value,
|
|
1522
1522
|
"aria-haspopup": "listbox",
|
|
1523
|
-
onClick:
|
|
1523
|
+
onClick: E[0] || (E[0] = (O) => o.value ? h() : z()),
|
|
1524
1524
|
onKeydown: [
|
|
1525
|
-
|
|
1526
|
-
|
|
1525
|
+
E[1] || (E[1] = I(M((O) => o.value ? d(1) : z(), ["prevent"]), ["down"])),
|
|
1526
|
+
E[2] || (E[2] = I(M((O) => o.value ? d(-1) : z(), ["prevent"]), ["up"]))
|
|
1527
1527
|
]
|
|
1528
1528
|
}, [
|
|
1529
|
-
B("span",
|
|
1530
|
-
$e(V(
|
|
1531
|
-
|
|
1529
|
+
B("span", hn, [
|
|
1530
|
+
$e(V(k.value?.etiqueta ?? e.placeholder) + " ", 1),
|
|
1531
|
+
k.value?.detalle ? (i(), s("span", xn, V(k.value.detalle), 1)) : x("", !0)
|
|
1532
1532
|
]),
|
|
1533
1533
|
j(N, {
|
|
1534
1534
|
name: "go-down",
|
|
@@ -1536,45 +1536,45 @@ const yn = ["disabled", "aria-label", "aria-expanded"], gn = { class: "min-w-0 f
|
|
|
1536
1536
|
size: 12,
|
|
1537
1537
|
class: "shrink-0 opacity-60"
|
|
1538
1538
|
})
|
|
1539
|
-
], 40,
|
|
1539
|
+
], 40, gn),
|
|
1540
1540
|
o.value ? (i(), s("div", {
|
|
1541
1541
|
key: 0,
|
|
1542
1542
|
class: y(["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"]),
|
|
1543
1543
|
onKeydown: [
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1544
|
+
E[4] || (E[4] = I(M((O) => h(), ["prevent"]), ["escape"])),
|
|
1545
|
+
E[5] || (E[5] = I(M((O) => d(1), ["prevent"]), ["down"])),
|
|
1546
|
+
E[6] || (E[6] = I(M((O) => d(-1), ["prevent"]), ["up"])),
|
|
1547
|
+
E[7] || (E[7] = I(M((O) => b(0), ["prevent"]), ["home"])),
|
|
1548
|
+
E[8] || (E[8] = I(M((O) => b(A.value.length - 1), ["prevent"]), ["end"])),
|
|
1549
|
+
E[9] || (E[9] = I(M((O) => ie(), ["prevent"]), ["enter"])),
|
|
1550
|
+
E[10] || (E[10] = I((O) => h(!1), ["tab"]))
|
|
1551
1551
|
],
|
|
1552
1552
|
onClick: R,
|
|
1553
|
-
onMousemove:
|
|
1553
|
+
onMousemove: oe
|
|
1554
1554
|
}, [
|
|
1555
|
-
B("div",
|
|
1555
|
+
B("div", wn, [
|
|
1556
1556
|
j(Ie, {
|
|
1557
1557
|
ref_key: "campo",
|
|
1558
|
-
ref:
|
|
1558
|
+
ref: c,
|
|
1559
1559
|
modelValue: l.value,
|
|
1560
|
-
"onUpdate:modelValue":
|
|
1560
|
+
"onUpdate:modelValue": E[3] || (E[3] = (O) => l.value = O),
|
|
1561
1561
|
label: e.label,
|
|
1562
1562
|
placeholder: e.searchPlaceholder,
|
|
1563
|
-
"listbox-id": F(
|
|
1564
|
-
"active-option-id":
|
|
1563
|
+
"listbox-id": F(f),
|
|
1564
|
+
"active-option-id": C.value,
|
|
1565
1565
|
expanded: o.value
|
|
1566
1566
|
}, null, 8, ["modelValue", "label", "placeholder", "listbox-id", "active-option-id", "expanded"])
|
|
1567
1567
|
]),
|
|
1568
1568
|
B("ul", {
|
|
1569
|
-
id: F(
|
|
1569
|
+
id: F(f),
|
|
1570
1570
|
ref_key: "lista",
|
|
1571
1571
|
ref: u,
|
|
1572
1572
|
role: "listbox",
|
|
1573
1573
|
class: "max-h-56 overflow-y-auto p-1"
|
|
1574
1574
|
}, [
|
|
1575
|
-
A.value.length === 0 ? (i(), s("li",
|
|
1576
|
-
(i(!0), s(te, null,
|
|
1577
|
-
id: `${F(
|
|
1575
|
+
A.value.length === 0 ? (i(), s("li", kn, V(e.emptyText), 1)) : x("", !0),
|
|
1576
|
+
(i(!0), s(te, null, ce(A.value, (O, de) => (i(), s("li", {
|
|
1577
|
+
id: `${F(f)}-${de}`,
|
|
1578
1578
|
key: O.valor,
|
|
1579
1579
|
"data-indice": de,
|
|
1580
1580
|
role: "option",
|
|
@@ -1584,15 +1584,15 @@ const yn = ["disabled", "aria-label", "aria-expanded"], gn = { class: "min-w-0 f
|
|
|
1584
1584
|
O.valor === e.modelValue ? "font-medium text-primary" : "text-tx-main"
|
|
1585
1585
|
]])
|
|
1586
1586
|
}, [
|
|
1587
|
-
B("span",
|
|
1588
|
-
O.detalle ? (i(), s("span",
|
|
1589
|
-
], 10,
|
|
1590
|
-
g.value > 0 ? (i(), s("li",
|
|
1591
|
-
], 8,
|
|
1587
|
+
B("span", zn, V(O.etiqueta), 1),
|
|
1588
|
+
O.detalle ? (i(), s("span", En, V(O.detalle), 1)) : x("", !0)
|
|
1589
|
+
], 10, Cn))), 128)),
|
|
1590
|
+
g.value > 0 ? (i(), s("li", Ln, "+" + V(g.value), 1)) : x("", !0)
|
|
1591
|
+
], 8, $n)
|
|
1592
1592
|
], 34)) : x("", !0)
|
|
1593
1593
|
], 32));
|
|
1594
1594
|
}
|
|
1595
|
-
}),
|
|
1595
|
+
}), Tn = { class: "text-base font-semibold m-0 text-primary" }, An = /* @__PURE__ */ D({
|
|
1596
1596
|
__name: "ConfigSection",
|
|
1597
1597
|
props: {
|
|
1598
1598
|
title: {},
|
|
@@ -1603,23 +1603,23 @@ const yn = ["disabled", "aria-label", "aria-expanded"], gn = { class: "min-w-0 f
|
|
|
1603
1603
|
return (n, t) => (i(), s("div", {
|
|
1604
1604
|
class: y(["flex flex-col gap-4 p-4 background rounded-corner", e.customClass])
|
|
1605
1605
|
}, [
|
|
1606
|
-
B("h3",
|
|
1606
|
+
B("h3", Tn, V(e.icon ? `${e.icon} ${e.title}` : e.title), 1),
|
|
1607
1607
|
S(n.$slots, "default", {}, void 0, !0)
|
|
1608
1608
|
], 2));
|
|
1609
1609
|
}
|
|
1610
|
-
}),
|
|
1610
|
+
}), Bn = /* @__PURE__ */ Oe(An, [["__scopeId", "data-v-47cb38fb"]]), Sn = ["role", "tabindex", "aria-label", "onKeydown"], Mn = { class: "flex items-center gap-3 flex-1 min-w-0" }, Vn = ["src", "alt"], In = { class: "min-w-0" }, On = { class: "font-semibold truncate" }, jn = {
|
|
1611
1611
|
key: 0,
|
|
1612
1612
|
class: "text-xs text-tx-muted truncate"
|
|
1613
|
-
},
|
|
1613
|
+
}, Pn = {
|
|
1614
1614
|
key: 1,
|
|
1615
1615
|
class: "text-xs text-tx-muted truncate"
|
|
1616
|
-
},
|
|
1616
|
+
}, Rn = {
|
|
1617
1617
|
key: 2,
|
|
1618
1618
|
class: "text-xs text-tx-muted flex gap-3 mt-1 flex-wrap"
|
|
1619
|
-
},
|
|
1619
|
+
}, Fn = ["disabled"], Nn = {
|
|
1620
1620
|
key: 1,
|
|
1621
1621
|
class: "w-2 h-2 rounded-full bg-status-success"
|
|
1622
|
-
},
|
|
1622
|
+
}, qn = /* @__PURE__ */ D({
|
|
1623
1623
|
__name: "DeviceCard",
|
|
1624
1624
|
props: {
|
|
1625
1625
|
name: { default: "" },
|
|
@@ -1633,6 +1633,7 @@ const yn = ["disabled", "aria-label", "aria-expanded"], gn = { class: "min-w-0 f
|
|
|
1633
1633
|
showActionButton: { type: Boolean, default: !0 },
|
|
1634
1634
|
actionLabel: { default: "" },
|
|
1635
1635
|
connectingLabel: { default: "" },
|
|
1636
|
+
actionKind: { default: "primary" },
|
|
1636
1637
|
isConnecting: { type: Boolean, default: !1 },
|
|
1637
1638
|
showStatusIndicator: { type: Boolean, default: !1 },
|
|
1638
1639
|
customClass: { default: "" },
|
|
@@ -1640,16 +1641,18 @@ const yn = ["disabled", "aria-label", "aria-expanded"], gn = { class: "min-w-0 f
|
|
|
1640
1641
|
},
|
|
1641
1642
|
emits: ["action", "click"],
|
|
1642
1643
|
setup(e, { emit: n }) {
|
|
1643
|
-
const t = e, a = (
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1644
|
+
const t = e, a = v(
|
|
1645
|
+
() => t.actionKind === "destructive" ? "border border-status-error/20 bg-status-error/10 text-status-error hover:bg-status-error/20" : "bg-primary text-tx-on-primary"
|
|
1646
|
+
), l = (c) => typeof c == "string" ? "" : c.icon ?? "", o = (c) => typeof c == "string" ? c : c.text, r = n, u = () => {
|
|
1647
|
+
r("action");
|
|
1648
|
+
}, m = () => {
|
|
1649
|
+
t.clickable && r("click");
|
|
1647
1650
|
};
|
|
1648
1651
|
return W(() => {
|
|
1649
1652
|
t.icon && !t.name && console.warn(
|
|
1650
1653
|
"[DeviceCard] «icon» está obsoleto y se va en la próxima mayor: recibe una ruta ya resuelta. Usá «name» con el nombre del icono del tema, y «type» si hace falta el símbolo."
|
|
1651
1654
|
);
|
|
1652
|
-
}), (
|
|
1655
|
+
}), (c, f) => (i(), s("div", {
|
|
1653
1656
|
class: y(["flex items-center justify-between background rounded-corner border border-ui-border px-6 py-3 mb-4", [
|
|
1654
1657
|
{ "border-l-4 border-status-success": e.isConnected, "cursor-pointer": e.clickable },
|
|
1655
1658
|
e.customClass
|
|
@@ -1657,14 +1660,14 @@ const yn = ["disabled", "aria-label", "aria-expanded"], gn = { class: "min-w-0 f
|
|
|
1657
1660
|
role: e.clickable ? "button" : void 0,
|
|
1658
1661
|
tabindex: e.clickable ? 0 : void 0,
|
|
1659
1662
|
"aria-label": e.clickable ? e.title : void 0,
|
|
1660
|
-
onClick:
|
|
1663
|
+
onClick: m,
|
|
1661
1664
|
onKeydown: [
|
|
1662
|
-
I(M(
|
|
1663
|
-
I(M(
|
|
1665
|
+
I(M(m, ["self", "prevent"]), ["enter"]),
|
|
1666
|
+
I(M(m, ["self", "prevent"]), ["space"])
|
|
1664
1667
|
]
|
|
1665
1668
|
}, [
|
|
1666
|
-
B("div",
|
|
1667
|
-
e.name ? (i(),
|
|
1669
|
+
B("div", Mn, [
|
|
1670
|
+
e.name ? (i(), K(N, {
|
|
1668
1671
|
key: 0,
|
|
1669
1672
|
name: e.name,
|
|
1670
1673
|
type: e.type,
|
|
@@ -1675,23 +1678,23 @@ const yn = ["disabled", "aria-label", "aria-expanded"], gn = { class: "min-w-0 f
|
|
|
1675
1678
|
src: e.icon,
|
|
1676
1679
|
alt: e.title,
|
|
1677
1680
|
class: "h-7 w-7 shrink-0"
|
|
1678
|
-
}, null, 8,
|
|
1679
|
-
B("div",
|
|
1680
|
-
B("div",
|
|
1681
|
-
e.subtitle ? (i(), s("div",
|
|
1682
|
-
e.metadata ? (i(), s("div",
|
|
1683
|
-
e.extraInfo.length > 0 ? (i(), s("div",
|
|
1684
|
-
(i(!0), s(te, null,
|
|
1685
|
-
key:
|
|
1681
|
+
}, null, 8, Vn)),
|
|
1682
|
+
B("div", In, [
|
|
1683
|
+
B("div", On, V(e.title), 1),
|
|
1684
|
+
e.subtitle ? (i(), s("div", jn, V(e.subtitle), 1)) : x("", !0),
|
|
1685
|
+
e.metadata ? (i(), s("div", Pn, V(e.metadata), 1)) : x("", !0),
|
|
1686
|
+
e.extraInfo.length > 0 ? (i(), s("div", Rn, [
|
|
1687
|
+
(i(!0), s(te, null, ce(e.extraInfo, (k, L) => (i(), s("span", {
|
|
1688
|
+
key: L,
|
|
1686
1689
|
class: "inline-flex items-center gap-1"
|
|
1687
1690
|
}, [
|
|
1688
|
-
|
|
1691
|
+
l(k) ? (i(), K(N, {
|
|
1689
1692
|
key: 0,
|
|
1690
|
-
name:
|
|
1693
|
+
name: l(k),
|
|
1691
1694
|
type: "symbol",
|
|
1692
1695
|
size: 14
|
|
1693
1696
|
}, null, 8, ["name"])) : x("", !0),
|
|
1694
|
-
$e(" " + V(
|
|
1697
|
+
$e(" " + V(o(k)), 1)
|
|
1695
1698
|
]))), 128))
|
|
1696
1699
|
])) : x("", !0)
|
|
1697
1700
|
])
|
|
@@ -1699,12 +1702,12 @@ const yn = ["disabled", "aria-label", "aria-expanded"], gn = { class: "min-w-0 f
|
|
|
1699
1702
|
e.showActionButton ? (i(), s("button", {
|
|
1700
1703
|
key: 0,
|
|
1701
1704
|
type: "button",
|
|
1702
|
-
class: "
|
|
1705
|
+
class: y(["rounded-corner px-4 py-2 text-sm font-semibold cursor-pointer hover:opacity-70 disabled:opacity-50 disabled:cursor-not-allowed", a.value]),
|
|
1703
1706
|
disabled: e.isConnecting,
|
|
1704
|
-
onClick: M(
|
|
1705
|
-
}, V(e.isConnecting ? e.connectingLabel : e.actionLabel),
|
|
1706
|
-
e.showStatusIndicator && e.isConnected ? (i(), s("div",
|
|
1707
|
-
], 42,
|
|
1707
|
+
onClick: M(u, ["stop"])
|
|
1708
|
+
}, V(e.isConnecting ? e.connectingLabel : e.actionLabel), 11, Fn)) : x("", !0),
|
|
1709
|
+
e.showStatusIndicator && e.isConnected ? (i(), s("div", Nn)) : x("", !0)
|
|
1710
|
+
], 42, Sn));
|
|
1708
1711
|
}
|
|
1709
1712
|
}), st = /* @__PURE__ */ Symbol("diálogo de vasak");
|
|
1710
1713
|
function rt() {
|
|
@@ -1721,11 +1724,11 @@ function rt() {
|
|
|
1721
1724
|
}
|
|
1722
1725
|
};
|
|
1723
1726
|
}
|
|
1724
|
-
let
|
|
1725
|
-
function
|
|
1726
|
-
return
|
|
1727
|
+
let Ue = 0;
|
|
1728
|
+
function Hn() {
|
|
1729
|
+
return Ue += 1, `vsk-dialogo-titulo-${Ue}`;
|
|
1727
1730
|
}
|
|
1728
|
-
const
|
|
1731
|
+
const Kn = /* @__PURE__ */ D({
|
|
1729
1732
|
__name: "Dialog",
|
|
1730
1733
|
props: {
|
|
1731
1734
|
open: { type: Boolean, default: !1 }
|
|
@@ -1745,7 +1748,7 @@ const Hn = /* @__PURE__ */ D({
|
|
|
1745
1748
|
}), Un = {
|
|
1746
1749
|
key: 0,
|
|
1747
1750
|
class: "absolute inset-0 rounded-corner-window bg-ui-border/40"
|
|
1748
|
-
},
|
|
1751
|
+
}, Wn = ["aria-labelledby", "aria-label"], Gn = "relative z-10 w-full rounded-corner border border-ui-border bg-ui-bg/80 p-6 text-tx-main shadow-lg", Qn = /* @__PURE__ */ D({
|
|
1749
1752
|
inheritAttrs: !1,
|
|
1750
1753
|
__name: "DialogContent",
|
|
1751
1754
|
props: {
|
|
@@ -1754,56 +1757,56 @@ const Hn = /* @__PURE__ */ D({
|
|
|
1754
1757
|
},
|
|
1755
1758
|
setup(e) {
|
|
1756
1759
|
const n = e, t = Be(), a = v(() => t.class ?? ""), l = v(() => {
|
|
1757
|
-
const { class:
|
|
1760
|
+
const { class: z, ...h } = t;
|
|
1758
1761
|
return h;
|
|
1759
|
-
}), o = v(() => n.size === "full" ? "relative z-10 h-full w-full overflow-hidden rounded-corner-window text-tx-main" : `${
|
|
1760
|
-
let
|
|
1761
|
-
function
|
|
1762
|
-
return
|
|
1762
|
+
}), o = v(() => n.size === "full" ? "relative z-10 h-full w-full overflow-hidden rounded-corner-window text-tx-main" : `${Gn} ${n.size === "lg" ? "max-w-2xl" : "max-w-lg"}`), r = rt(), u = v(() => r.abierto.value), m = w(null), c = w(null);
|
|
1763
|
+
let f = null;
|
|
1764
|
+
function k() {
|
|
1765
|
+
return c.value ? [...c.value.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')] : [];
|
|
1763
1766
|
}
|
|
1764
|
-
function L(
|
|
1765
|
-
if (
|
|
1767
|
+
function L(z) {
|
|
1768
|
+
if (z.key === "Escape") {
|
|
1766
1769
|
r.cerrar();
|
|
1767
1770
|
return;
|
|
1768
1771
|
}
|
|
1769
|
-
if (
|
|
1770
|
-
const h =
|
|
1772
|
+
if (z.key !== "Tab") return;
|
|
1773
|
+
const h = k();
|
|
1771
1774
|
if (h.length === 0) {
|
|
1772
|
-
|
|
1775
|
+
z.preventDefault(), c.value?.focus();
|
|
1773
1776
|
return;
|
|
1774
1777
|
}
|
|
1775
|
-
const
|
|
1776
|
-
|
|
1778
|
+
const d = h[0], b = h[h.length - 1], p = document.activeElement;
|
|
1779
|
+
z.shiftKey && (p === d || p === c.value) ? (z.preventDefault(), b.focus()) : !z.shiftKey && p === b && (z.preventDefault(), d.focus());
|
|
1777
1780
|
}
|
|
1778
|
-
function A(
|
|
1779
|
-
|
|
1781
|
+
function A(z) {
|
|
1782
|
+
z.target === z.currentTarget && r.cerrar();
|
|
1780
1783
|
}
|
|
1781
|
-
function g(
|
|
1782
|
-
|
|
1784
|
+
function g(z) {
|
|
1785
|
+
m.value?.contains(z.target) || L(z);
|
|
1783
1786
|
}
|
|
1784
|
-
function
|
|
1787
|
+
function C() {
|
|
1785
1788
|
document.removeEventListener("keydown", g);
|
|
1786
1789
|
}
|
|
1787
1790
|
function P() {
|
|
1788
|
-
const
|
|
1789
|
-
|
|
1791
|
+
const z = f;
|
|
1792
|
+
f = null, z?.isConnected && z.focus();
|
|
1790
1793
|
}
|
|
1791
1794
|
return Q(
|
|
1792
1795
|
u,
|
|
1793
|
-
async (
|
|
1794
|
-
if (
|
|
1795
|
-
|
|
1796
|
+
async (z) => {
|
|
1797
|
+
if (z) {
|
|
1798
|
+
f = document.activeElement, document.addEventListener("keydown", g), await J(), c.value?.focus();
|
|
1796
1799
|
return;
|
|
1797
1800
|
}
|
|
1798
|
-
|
|
1801
|
+
C(), P();
|
|
1799
1802
|
},
|
|
1800
1803
|
// `watch` no corre para el valor inicial, y un diálogo se puede montar ya
|
|
1801
1804
|
// abierto —una vista que arranca preguntando algo—. Sin esto, ése no recibe
|
|
1802
1805
|
// el foco y ni Escape ni el Tab hacen nada: el `aria-modal` queda en promesa.
|
|
1803
1806
|
{ immediate: !0 }
|
|
1804
1807
|
), ve(() => {
|
|
1805
|
-
|
|
1806
|
-
}), (
|
|
1808
|
+
C(), P();
|
|
1809
|
+
}), (z, h) => (i(), K(ge, { to: "body" }, [
|
|
1807
1810
|
j(ke, {
|
|
1808
1811
|
"enter-active-class": "transition-opacity duration-200 ease-out",
|
|
1809
1812
|
"leave-active-class": "transition-opacity duration-150 ease-in",
|
|
@@ -1814,15 +1817,15 @@ const Hn = /* @__PURE__ */ D({
|
|
|
1814
1817
|
u.value ? (i(), s("div", {
|
|
1815
1818
|
key: 0,
|
|
1816
1819
|
ref_key: "velo",
|
|
1817
|
-
ref:
|
|
1820
|
+
ref: m,
|
|
1818
1821
|
class: "fixed inset-0 z-50 flex items-center justify-center",
|
|
1819
1822
|
onClick: A,
|
|
1820
1823
|
onKeydown: L
|
|
1821
1824
|
}, [
|
|
1822
1825
|
n.size === "md" ? (i(), s("div", Un)) : x("", !0),
|
|
1823
|
-
B("div",
|
|
1826
|
+
B("div", le({
|
|
1824
1827
|
ref_key: "panel",
|
|
1825
|
-
ref:
|
|
1828
|
+
ref: c,
|
|
1826
1829
|
tabindex: "-1",
|
|
1827
1830
|
role: "dialog",
|
|
1828
1831
|
"aria-modal": "true",
|
|
@@ -1831,45 +1834,45 @@ const Hn = /* @__PURE__ */ D({
|
|
|
1831
1834
|
}, l.value, {
|
|
1832
1835
|
class: [a.value, o.value]
|
|
1833
1836
|
}), [
|
|
1834
|
-
S(
|
|
1835
|
-
], 16,
|
|
1837
|
+
S(z.$slots, "default")
|
|
1838
|
+
], 16, Wn)
|
|
1836
1839
|
], 544)) : x("", !0)
|
|
1837
1840
|
]),
|
|
1838
1841
|
_: 3
|
|
1839
1842
|
})
|
|
1840
1843
|
]));
|
|
1841
1844
|
}
|
|
1842
|
-
}),
|
|
1845
|
+
}), Yn = { class: "text-sm text-tx-muted" }, Xn = /* @__PURE__ */ D({
|
|
1843
1846
|
__name: "DialogDescription",
|
|
1844
1847
|
setup(e) {
|
|
1845
|
-
return (n, t) => (i(), s("p",
|
|
1848
|
+
return (n, t) => (i(), s("p", Yn, [
|
|
1846
1849
|
S(n.$slots, "default")
|
|
1847
1850
|
]));
|
|
1848
1851
|
}
|
|
1849
|
-
}),
|
|
1852
|
+
}), Jn = { class: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end" }, Zn = /* @__PURE__ */ D({
|
|
1850
1853
|
__name: "DialogFooter",
|
|
1851
1854
|
setup(e) {
|
|
1852
|
-
return (n, t) => (i(), s("div",
|
|
1855
|
+
return (n, t) => (i(), s("div", Jn, [
|
|
1853
1856
|
S(n.$slots, "default")
|
|
1854
1857
|
]));
|
|
1855
1858
|
}
|
|
1856
|
-
}),
|
|
1859
|
+
}), _n = { class: "flex flex-col gap-1.5 text-center sm:text-left" }, el = /* @__PURE__ */ D({
|
|
1857
1860
|
__name: "DialogHeader",
|
|
1858
1861
|
setup(e) {
|
|
1859
|
-
return (n, t) => (i(), s("div",
|
|
1862
|
+
return (n, t) => (i(), s("div", _n, [
|
|
1860
1863
|
S(n.$slots, "default")
|
|
1861
1864
|
]));
|
|
1862
1865
|
}
|
|
1863
|
-
}),
|
|
1866
|
+
}), tl = ["id"], al = /* @__PURE__ */ D({
|
|
1864
1867
|
__name: "DialogTitle",
|
|
1865
1868
|
setup(e) {
|
|
1866
|
-
const n = rt(), t =
|
|
1869
|
+
const n = rt(), t = Hn();
|
|
1867
1870
|
return W(() => n.ponerElTitulo(t)), ve(() => n.ponerElTitulo(null)), (a, l) => (i(), s("h2", {
|
|
1868
1871
|
id: F(t),
|
|
1869
1872
|
class: "font-semibold text-lg leading-none tracking-tight"
|
|
1870
1873
|
}, [
|
|
1871
1874
|
S(a.$slots, "default")
|
|
1872
|
-
], 8,
|
|
1875
|
+
], 8, tl));
|
|
1873
1876
|
}
|
|
1874
1877
|
}), ut = /* @__PURE__ */ Symbol("menú de vasak");
|
|
1875
1878
|
function Ce() {
|
|
@@ -1901,46 +1904,46 @@ let We = 0;
|
|
|
1901
1904
|
function ct() {
|
|
1902
1905
|
return We += 1, `vsk-menu-${We}`;
|
|
1903
1906
|
}
|
|
1904
|
-
const
|
|
1907
|
+
const nl = { class: "relative inline-block" }, ll = /* @__PURE__ */ D({
|
|
1905
1908
|
__name: "DropdownMenu",
|
|
1906
1909
|
props: {
|
|
1907
1910
|
open: { type: Boolean, default: void 0 }
|
|
1908
1911
|
},
|
|
1909
1912
|
emits: ["update:open"],
|
|
1910
1913
|
setup(e, { emit: n }) {
|
|
1911
|
-
const t = e, a = n, l = w(!1), o = w(null), r = w(null), u = w("ninguno"),
|
|
1912
|
-
let
|
|
1913
|
-
const
|
|
1914
|
+
const t = e, a = n, l = w(!1), o = w(null), r = w(null), u = w("ninguno"), m = ct();
|
|
1915
|
+
let c = null;
|
|
1916
|
+
const f = v({
|
|
1914
1917
|
get: () => t.open ?? l.value,
|
|
1915
1918
|
set: (g) => {
|
|
1916
1919
|
t.open === void 0 && (l.value = g), a("update:open", g);
|
|
1917
1920
|
}
|
|
1918
1921
|
});
|
|
1919
|
-
Q(
|
|
1922
|
+
Q(f, (g) => {
|
|
1920
1923
|
if (g) {
|
|
1921
|
-
const
|
|
1922
|
-
|
|
1924
|
+
const C = document.activeElement;
|
|
1925
|
+
c = C instanceof HTMLElement ? C : null;
|
|
1923
1926
|
} else
|
|
1924
1927
|
u.value = "ninguno";
|
|
1925
1928
|
});
|
|
1926
|
-
function
|
|
1927
|
-
u.value = g,
|
|
1929
|
+
function k(g = "ninguno") {
|
|
1930
|
+
u.value = g, f.value = !0;
|
|
1928
1931
|
}
|
|
1929
1932
|
function L(g = {}) {
|
|
1930
|
-
if (
|
|
1931
|
-
const
|
|
1932
|
-
|
|
1933
|
+
if (f.value = !1, !g.devolverElFoco) return;
|
|
1934
|
+
const C = c ?? o.value;
|
|
1935
|
+
C?.isConnected && C.focus();
|
|
1933
1936
|
}
|
|
1934
1937
|
function A(g = "ninguno") {
|
|
1935
|
-
if (
|
|
1938
|
+
if (f.value) {
|
|
1936
1939
|
L({ devolverElFoco: !0 });
|
|
1937
1940
|
return;
|
|
1938
1941
|
}
|
|
1939
|
-
|
|
1942
|
+
k(g);
|
|
1940
1943
|
}
|
|
1941
1944
|
return ye(ut, {
|
|
1942
|
-
abierto:
|
|
1943
|
-
idDelMenu:
|
|
1945
|
+
abierto: f,
|
|
1946
|
+
idDelMenu: m,
|
|
1944
1947
|
idDeLaEtiqueta: r,
|
|
1945
1948
|
ponerLaEtiqueta: (g) => {
|
|
1946
1949
|
r.value = g;
|
|
@@ -1950,17 +1953,17 @@ const al = { class: "relative inline-block" }, nl = /* @__PURE__ */ D({
|
|
|
1950
1953
|
o.value = g;
|
|
1951
1954
|
},
|
|
1952
1955
|
focoAlAbrir: u,
|
|
1953
|
-
abrir:
|
|
1956
|
+
abrir: k,
|
|
1954
1957
|
cerrar: L,
|
|
1955
1958
|
alternar: A
|
|
1956
|
-
}), (g,
|
|
1959
|
+
}), (g, C) => (i(), s("div", nl, [
|
|
1957
1960
|
S(g.$slots, "default")
|
|
1958
1961
|
]));
|
|
1959
1962
|
}
|
|
1960
|
-
}),
|
|
1963
|
+
}), ol = ["id", "aria-labelledby", "inert"], il = {
|
|
1961
1964
|
role: "none",
|
|
1962
1965
|
class: "py-1"
|
|
1963
|
-
}, Z = 8,
|
|
1966
|
+
}, Z = 8, sl = /* @__PURE__ */ D({
|
|
1964
1967
|
inheritAttrs: !1,
|
|
1965
1968
|
__name: "DropdownMenuContent",
|
|
1966
1969
|
props: {
|
|
@@ -1969,19 +1972,19 @@ const al = { class: "relative inline-block" }, nl = /* @__PURE__ */ D({
|
|
|
1969
1972
|
sideOffset: { default: 4 }
|
|
1970
1973
|
},
|
|
1971
1974
|
setup(e) {
|
|
1972
|
-
const n = e, t = Ce(), { idDelMenu: a, idDeLaEtiqueta: l } = t, o = v(() => t.disparador.value), r = v(() => t.abierto.value), u = w(null),
|
|
1975
|
+
const n = e, t = Ce(), { idDelMenu: a, idDeLaEtiqueta: l } = t, o = v(() => t.disparador.value), r = v(() => t.abierto.value), u = w(null), m = w({
|
|
1973
1976
|
top: 0,
|
|
1974
1977
|
left: 0,
|
|
1975
1978
|
techo: null
|
|
1976
|
-
}),
|
|
1979
|
+
}), c = {
|
|
1977
1980
|
top: "bottom",
|
|
1978
1981
|
bottom: "top",
|
|
1979
1982
|
left: "right",
|
|
1980
1983
|
right: "left"
|
|
1981
1984
|
};
|
|
1982
|
-
function d
|
|
1985
|
+
function f(d, b) {
|
|
1983
1986
|
const p = n.sideOffset + Z;
|
|
1984
|
-
switch (
|
|
1987
|
+
switch (d) {
|
|
1985
1988
|
case "bottom":
|
|
1986
1989
|
return window.innerHeight - b.bottom - p;
|
|
1987
1990
|
case "top":
|
|
@@ -1992,85 +1995,85 @@ const al = { class: "relative inline-block" }, nl = /* @__PURE__ */ D({
|
|
|
1992
1995
|
return b.left - p;
|
|
1993
1996
|
}
|
|
1994
1997
|
}
|
|
1995
|
-
function
|
|
1996
|
-
return p < b ? b : Math.min(Math.max(
|
|
1998
|
+
function k(d, b, p) {
|
|
1999
|
+
return p < b ? b : Math.min(Math.max(d, b), p);
|
|
1997
2000
|
}
|
|
1998
2001
|
function L() {
|
|
1999
2002
|
if (!o.value || !u.value) return;
|
|
2000
|
-
const
|
|
2001
|
-
let
|
|
2002
|
-
const
|
|
2003
|
-
|
|
2004
|
-
let Y = 0, T = 0,
|
|
2005
|
-
switch (
|
|
2003
|
+
const d = o.value.getBoundingClientRect(), b = u.value.scrollHeight, p = u.value.offsetWidth, R = n.side === "top" || n.side === "bottom", oe = R ? b : p;
|
|
2004
|
+
let U = n.side;
|
|
2005
|
+
const ie = f(U, d);
|
|
2006
|
+
ie < oe && f(c[U], d) > ie && (U = c[U]);
|
|
2007
|
+
let Y = 0, T = 0, E = null;
|
|
2008
|
+
switch (U) {
|
|
2006
2009
|
case "bottom": {
|
|
2007
|
-
Y =
|
|
2010
|
+
Y = d.bottom + n.sideOffset, E = Math.max(window.innerHeight - Y - Z, 0);
|
|
2008
2011
|
break;
|
|
2009
2012
|
}
|
|
2010
2013
|
case "top": {
|
|
2011
|
-
|
|
2014
|
+
E = Math.max(f("top", d), 0), Y = d.top - n.sideOffset - Math.min(b, E);
|
|
2012
2015
|
break;
|
|
2013
2016
|
}
|
|
2014
2017
|
case "left":
|
|
2015
2018
|
case "right": {
|
|
2016
|
-
T =
|
|
2019
|
+
T = U === "right" ? d.right + n.sideOffset : d.left - p - n.sideOffset;
|
|
2017
2020
|
const O = window.innerHeight - 2 * Z;
|
|
2018
|
-
Y =
|
|
2021
|
+
Y = k(d.top, Z, window.innerHeight - Math.min(b, O) - Z), E = Math.max(window.innerHeight - Y - Z, 0);
|
|
2019
2022
|
break;
|
|
2020
2023
|
}
|
|
2021
2024
|
}
|
|
2022
2025
|
if (R)
|
|
2023
2026
|
switch (n.align) {
|
|
2024
2027
|
case "start":
|
|
2025
|
-
T =
|
|
2028
|
+
T = d.left;
|
|
2026
2029
|
break;
|
|
2027
2030
|
case "center":
|
|
2028
|
-
T =
|
|
2031
|
+
T = d.left + d.width / 2 - p / 2;
|
|
2029
2032
|
break;
|
|
2030
2033
|
case "end":
|
|
2031
|
-
T =
|
|
2034
|
+
T = d.right - p;
|
|
2032
2035
|
break;
|
|
2033
2036
|
}
|
|
2034
|
-
T =
|
|
2037
|
+
T = k(T, Z, window.innerWidth - p - Z), m.value = { top: Y, left: T, techo: E };
|
|
2035
2038
|
}
|
|
2036
2039
|
function A() {
|
|
2037
2040
|
return u.value ? Array.from(u.value.querySelectorAll('[role="menuitem"]')) : [];
|
|
2038
2041
|
}
|
|
2039
|
-
function g(
|
|
2042
|
+
function g(d) {
|
|
2040
2043
|
const b = A();
|
|
2041
2044
|
if (!b.length) return;
|
|
2042
2045
|
const p = b.length;
|
|
2043
|
-
b[(
|
|
2046
|
+
b[(d % p + p) % p]?.focus();
|
|
2044
2047
|
}
|
|
2045
|
-
function
|
|
2046
|
-
const
|
|
2047
|
-
return
|
|
2048
|
+
function C() {
|
|
2049
|
+
const d = document.activeElement;
|
|
2050
|
+
return d instanceof HTMLElement ? A().indexOf(d) : -1;
|
|
2048
2051
|
}
|
|
2049
|
-
function P(
|
|
2050
|
-
const b =
|
|
2051
|
-
switch (
|
|
2052
|
+
function P(d) {
|
|
2053
|
+
const b = C();
|
|
2054
|
+
switch (d.key) {
|
|
2052
2055
|
case "ArrowDown":
|
|
2053
|
-
|
|
2056
|
+
d.preventDefault(), g(b + 1);
|
|
2054
2057
|
break;
|
|
2055
2058
|
case "ArrowUp":
|
|
2056
|
-
|
|
2059
|
+
d.preventDefault(), g(b <= 0 ? -1 : b - 1);
|
|
2057
2060
|
break;
|
|
2058
2061
|
case "Home":
|
|
2059
|
-
|
|
2062
|
+
d.preventDefault(), g(0);
|
|
2060
2063
|
break;
|
|
2061
2064
|
case "End":
|
|
2062
|
-
|
|
2065
|
+
d.preventDefault(), g(-1);
|
|
2063
2066
|
break;
|
|
2064
2067
|
case "Escape":
|
|
2065
|
-
|
|
2068
|
+
d.preventDefault(), d.stopPropagation(), t.cerrar({ devolverElFoco: !0 });
|
|
2066
2069
|
break;
|
|
2067
2070
|
case "Tab":
|
|
2068
|
-
|
|
2071
|
+
d.preventDefault(), t.cerrar({ devolverElFoco: !0 });
|
|
2069
2072
|
break;
|
|
2070
2073
|
}
|
|
2071
2074
|
}
|
|
2072
|
-
Q(r, async (
|
|
2073
|
-
if (
|
|
2075
|
+
Q(r, async (d) => {
|
|
2076
|
+
if (d)
|
|
2074
2077
|
switch (await J(), requestAnimationFrame(() => {
|
|
2075
2078
|
L();
|
|
2076
2079
|
}), t.focoAlAbrir.value) {
|
|
@@ -2087,18 +2090,18 @@ const al = { class: "relative inline-block" }, nl = /* @__PURE__ */ D({
|
|
|
2087
2090
|
u.value?.focus();
|
|
2088
2091
|
}
|
|
2089
2092
|
});
|
|
2090
|
-
function
|
|
2091
|
-
r.value && (
|
|
2093
|
+
function z(d) {
|
|
2094
|
+
r.value && (d && u.value?.contains(d.target) || L());
|
|
2092
2095
|
}
|
|
2093
|
-
function h(
|
|
2094
|
-
const b =
|
|
2096
|
+
function h(d) {
|
|
2097
|
+
const b = d.target, p = !!b.closest("[data-dropdown-content]"), R = !!o.value?.contains(b);
|
|
2095
2098
|
!p && !R && t.cerrar();
|
|
2096
2099
|
}
|
|
2097
2100
|
return W(() => {
|
|
2098
|
-
document.addEventListener("click", h), window.addEventListener("resize",
|
|
2101
|
+
document.addEventListener("click", h), window.addEventListener("resize", z), window.addEventListener("scroll", z, !0);
|
|
2099
2102
|
}), pe(() => {
|
|
2100
|
-
document.removeEventListener("click", h), window.removeEventListener("resize",
|
|
2101
|
-
}), (
|
|
2103
|
+
document.removeEventListener("click", h), window.removeEventListener("resize", z), window.removeEventListener("scroll", z, !0);
|
|
2104
|
+
}), (d, b) => (i(), K(ge, { to: "body" }, [
|
|
2102
2105
|
j(ke, {
|
|
2103
2106
|
"enter-active-class": "transition-all duration-150 ease-in-out",
|
|
2104
2107
|
"leave-active-class": "transition-all duration-150 ease-in-out",
|
|
@@ -2108,10 +2111,10 @@ const al = { class: "relative inline-block" }, nl = /* @__PURE__ */ D({
|
|
|
2108
2111
|
onLeave: b[2] || (b[2] = (p) => p.offsetHeight)
|
|
2109
2112
|
}, {
|
|
2110
2113
|
default: G(() => [
|
|
2111
|
-
Se(B("div",
|
|
2114
|
+
Se(B("div", le({
|
|
2112
2115
|
ref_key: "contenido",
|
|
2113
2116
|
ref: u
|
|
2114
|
-
},
|
|
2117
|
+
}, d.$attrs, {
|
|
2115
2118
|
id: F(a),
|
|
2116
2119
|
role: "menu",
|
|
2117
2120
|
tabindex: "-1",
|
|
@@ -2120,9 +2123,9 @@ const al = { class: "relative inline-block" }, nl = /* @__PURE__ */ D({
|
|
|
2120
2123
|
inert: !r.value,
|
|
2121
2124
|
style: {
|
|
2122
2125
|
position: "fixed",
|
|
2123
|
-
top: `${
|
|
2124
|
-
left: `${
|
|
2125
|
-
maxHeight:
|
|
2126
|
+
top: `${m.value.top}px`,
|
|
2127
|
+
left: `${m.value.left}px`,
|
|
2128
|
+
maxHeight: m.value.techo === null ? void 0 : `${m.value.techo}px`,
|
|
2126
2129
|
overflowY: "auto",
|
|
2127
2130
|
overscrollBehavior: "contain",
|
|
2128
2131
|
zIndex: 50
|
|
@@ -2132,10 +2135,10 @@ const al = { class: "relative inline-block" }, nl = /* @__PURE__ */ D({
|
|
|
2132
2135
|
onClick: b[0] || (b[0] = (p) => p.stopPropagation()),
|
|
2133
2136
|
onKeydown: P
|
|
2134
2137
|
}), [
|
|
2135
|
-
B("div",
|
|
2136
|
-
S(
|
|
2138
|
+
B("div", il, [
|
|
2139
|
+
S(d.$slots, "default")
|
|
2137
2140
|
])
|
|
2138
|
-
], 16,
|
|
2141
|
+
], 16, ol), [
|
|
2139
2142
|
[Ye, r.value]
|
|
2140
2143
|
])
|
|
2141
2144
|
]),
|
|
@@ -2143,7 +2146,7 @@ const al = { class: "relative inline-block" }, nl = /* @__PURE__ */ D({
|
|
|
2143
2146
|
})
|
|
2144
2147
|
]));
|
|
2145
2148
|
}
|
|
2146
|
-
}),
|
|
2149
|
+
}), rl = ["aria-disabled", "onKeydown"], ul = /* @__PURE__ */ D({
|
|
2147
2150
|
__name: "DropdownMenuItem",
|
|
2148
2151
|
props: {
|
|
2149
2152
|
disabled: { type: Boolean, default: !1 }
|
|
@@ -2172,9 +2175,9 @@ const al = { class: "relative inline-block" }, nl = /* @__PURE__ */ D({
|
|
|
2172
2175
|
]
|
|
2173
2176
|
}, [
|
|
2174
2177
|
S(r.$slots, "default")
|
|
2175
|
-
], 42,
|
|
2178
|
+
], 42, rl));
|
|
2176
2179
|
}
|
|
2177
|
-
}),
|
|
2180
|
+
}), cl = /* @__PURE__ */ D({
|
|
2178
2181
|
__name: "DropdownMenuLabel",
|
|
2179
2182
|
setup(e) {
|
|
2180
2183
|
const n = Ce(), t = `${ct()}-titulo`;
|
|
@@ -2190,14 +2193,14 @@ const al = { class: "relative inline-block" }, nl = /* @__PURE__ */ D({
|
|
|
2190
2193
|
S(a.$slots, "default")
|
|
2191
2194
|
]));
|
|
2192
2195
|
}
|
|
2193
|
-
}),
|
|
2196
|
+
}), dl = {
|
|
2194
2197
|
role: "separator",
|
|
2195
2198
|
"aria-orientation": "horizontal",
|
|
2196
2199
|
class: "bg-ui-bg/80 my-4 h-0.5"
|
|
2197
|
-
},
|
|
2200
|
+
}, fl = /* @__PURE__ */ D({
|
|
2198
2201
|
__name: "DropdownMenuSeparator",
|
|
2199
2202
|
setup(e) {
|
|
2200
|
-
return (n, t) => (i(), s("div",
|
|
2203
|
+
return (n, t) => (i(), s("div", dl));
|
|
2201
2204
|
}
|
|
2202
2205
|
});
|
|
2203
2206
|
function dt(e) {
|
|
@@ -2208,12 +2211,12 @@ function dt(e) {
|
|
|
2208
2211
|
const t = n[0];
|
|
2209
2212
|
return t.type === te && Array.isArray(t.children) ? dt(t.children) : t;
|
|
2210
2213
|
}
|
|
2211
|
-
function
|
|
2214
|
+
function ml(e) {
|
|
2212
2215
|
if (e instanceof HTMLElement) return e;
|
|
2213
2216
|
const n = e?.$el;
|
|
2214
2217
|
return n instanceof HTMLElement ? n : null;
|
|
2215
2218
|
}
|
|
2216
|
-
const
|
|
2219
|
+
const bl = D({
|
|
2217
2220
|
name: "DropdownMenuTrigger",
|
|
2218
2221
|
inheritAttrs: !1,
|
|
2219
2222
|
props: {
|
|
@@ -2225,33 +2228,33 @@ const ml = D({
|
|
|
2225
2228
|
setup(e, { slots: n, attrs: t }) {
|
|
2226
2229
|
const a = Ce(), l = w(null);
|
|
2227
2230
|
function o() {
|
|
2228
|
-
a.ponerElDisparador(
|
|
2231
|
+
a.ponerElDisparador(ml(l.value));
|
|
2229
2232
|
}
|
|
2230
2233
|
function r() {
|
|
2231
2234
|
e.disabled || (o(), a.alternar());
|
|
2232
2235
|
}
|
|
2233
|
-
function u(
|
|
2236
|
+
function u(m) {
|
|
2234
2237
|
if (!e.disabled)
|
|
2235
|
-
switch (
|
|
2238
|
+
switch (m.key) {
|
|
2236
2239
|
case "Enter":
|
|
2237
2240
|
case " ":
|
|
2238
|
-
|
|
2241
|
+
m.preventDefault(), o(), a.alternar("primero");
|
|
2239
2242
|
break;
|
|
2240
2243
|
case "ArrowDown":
|
|
2241
|
-
|
|
2244
|
+
m.preventDefault(), o(), a.abrir("primero");
|
|
2242
2245
|
break;
|
|
2243
2246
|
case "ArrowUp":
|
|
2244
|
-
|
|
2247
|
+
m.preventDefault(), o(), a.abrir("ultimo");
|
|
2245
2248
|
break;
|
|
2246
2249
|
case "Escape":
|
|
2247
|
-
a.abierto.value && (
|
|
2250
|
+
a.abierto.value && (m.preventDefault(), a.cerrar({ devolverElFoco: !0 }));
|
|
2248
2251
|
break;
|
|
2249
2252
|
}
|
|
2250
2253
|
}
|
|
2251
2254
|
return () => {
|
|
2252
|
-
const
|
|
2253
|
-
ref: (
|
|
2254
|
-
l.value =
|
|
2255
|
+
const m = {
|
|
2256
|
+
ref: (f) => {
|
|
2257
|
+
l.value = f, o();
|
|
2255
2258
|
},
|
|
2256
2259
|
"aria-haspopup": "menu",
|
|
2257
2260
|
"aria-expanded": a.abierto.value ? "true" : "false",
|
|
@@ -2261,19 +2264,19 @@ const ml = D({
|
|
|
2261
2264
|
"aria-controls": a.abierto.value ? a.idDelMenu : void 0,
|
|
2262
2265
|
onClick: r,
|
|
2263
2266
|
onKeydown: u
|
|
2264
|
-
},
|
|
2267
|
+
}, c = n.default?.() ?? [];
|
|
2265
2268
|
if (e.asChild) {
|
|
2266
|
-
const
|
|
2267
|
-
if (
|
|
2269
|
+
const f = dt(c);
|
|
2270
|
+
if (f) return kt(f, { ...t, ...m });
|
|
2268
2271
|
}
|
|
2269
2272
|
return Ct(
|
|
2270
2273
|
"div",
|
|
2271
|
-
{ ...t, class: ["dropdown-menu-trigger inline-block", t.class], ...
|
|
2272
|
-
|
|
2274
|
+
{ ...t, class: ["dropdown-menu-trigger inline-block", t.class], ...m },
|
|
2275
|
+
c
|
|
2273
2276
|
);
|
|
2274
2277
|
};
|
|
2275
2278
|
}
|
|
2276
|
-
}),
|
|
2279
|
+
}), vl = ["for"], pl = /* @__PURE__ */ D({
|
|
2277
2280
|
__name: "FormGroup",
|
|
2278
2281
|
props: {
|
|
2279
2282
|
label: {},
|
|
@@ -2289,11 +2292,11 @@ const ml = D({
|
|
|
2289
2292
|
key: 0,
|
|
2290
2293
|
for: e.htmlFor,
|
|
2291
2294
|
class: y(["text-sm font-medium text-primary", e.labelClass])
|
|
2292
|
-
}, V(e.label), 11,
|
|
2295
|
+
}, V(e.label), 11, vl)) : x("", !0),
|
|
2293
2296
|
S(n.$slots, "default", {}, void 0, !0)
|
|
2294
2297
|
], 2));
|
|
2295
2298
|
}
|
|
2296
|
-
}),
|
|
2299
|
+
}), yl = /* @__PURE__ */ Oe(pl, [["__scopeId", "data-v-3d9a65ce"]]), gl = ["role", "tabindex", "onKeydown"], hl = /* @__PURE__ */ D({
|
|
2297
2300
|
__name: "ListCard",
|
|
2298
2301
|
props: {
|
|
2299
2302
|
clickable: { type: Boolean, default: !1 },
|
|
@@ -2321,12 +2324,12 @@ const ml = D({
|
|
|
2321
2324
|
]
|
|
2322
2325
|
}, [
|
|
2323
2326
|
S(o.$slots, "default")
|
|
2324
|
-
], 42,
|
|
2327
|
+
], 42, gl));
|
|
2325
2328
|
}
|
|
2326
|
-
}),
|
|
2329
|
+
}), xl = { class: "background rounded-corner flex flex-row items-center gap-2 justify-between w-full h-auto p-4 transition-[background-color] duration-200 hover:bg-ui-surface/80" }, wl = ["title", "aria-label"], $l = ["src"], kl = {
|
|
2327
2330
|
key: 1,
|
|
2328
2331
|
class: "w-8 h-8 flex items-center justify-center"
|
|
2329
|
-
},
|
|
2332
|
+
}, Cl = ["src"], zl = ["min", "max", "value", "aria-label", "aria-valuetext"], El = /* @__PURE__ */ D({
|
|
2330
2333
|
__name: "SliderControl",
|
|
2331
2334
|
props: {
|
|
2332
2335
|
name: { default: "" },
|
|
@@ -2351,15 +2354,15 @@ const ml = D({
|
|
|
2351
2354
|
});
|
|
2352
2355
|
const a = n, l = v(() => {
|
|
2353
2356
|
if (t.max <= t.min) return 0;
|
|
2354
|
-
const
|
|
2355
|
-
return Math.round(
|
|
2356
|
-
}), o = v(() => t.getPercentageClass ? t.getPercentageClass(l.value) : ""), r = (
|
|
2357
|
-
const
|
|
2358
|
-
a("update:modelValue", Number(
|
|
2357
|
+
const m = t.max - t.min, c = t.modelValue - t.min;
|
|
2358
|
+
return Math.round(c / m * 100);
|
|
2359
|
+
}), o = v(() => t.getPercentageClass ? t.getPercentageClass(l.value) : ""), r = (m) => {
|
|
2360
|
+
const c = m.target;
|
|
2361
|
+
a("update:modelValue", Number(c.value));
|
|
2359
2362
|
}, u = () => {
|
|
2360
2363
|
a("buttonClick");
|
|
2361
2364
|
};
|
|
2362
|
-
return (
|
|
2365
|
+
return (m, c) => (i(), s("div", xl, [
|
|
2363
2366
|
e.showButton ? (i(), s("button", {
|
|
2364
2367
|
key: 0,
|
|
2365
2368
|
onClick: u,
|
|
@@ -2368,7 +2371,7 @@ const ml = D({
|
|
|
2368
2371
|
"aria-label": e.buttonLabel ?? e.label,
|
|
2369
2372
|
class: "w-8 h-8 flex items-center justify-center rounded-corner transition-[background-color,scale] duration-200 hover:bg-ui-surface/80 hover:scale-110 active:scale-95"
|
|
2370
2373
|
}, [
|
|
2371
|
-
e.name ? (i(),
|
|
2374
|
+
e.name ? (i(), K(N, {
|
|
2372
2375
|
key: 0,
|
|
2373
2376
|
name: e.name,
|
|
2374
2377
|
type: e.type,
|
|
@@ -2379,9 +2382,9 @@ const ml = D({
|
|
|
2379
2382
|
src: e.icon,
|
|
2380
2383
|
alt: "",
|
|
2381
2384
|
class: y(["w-6 h-6", e.iconClass])
|
|
2382
|
-
}, null, 10,
|
|
2383
|
-
], 8,
|
|
2384
|
-
e.name ? (i(),
|
|
2385
|
+
}, null, 10, $l))
|
|
2386
|
+
], 8, wl)) : (i(), s("div", kl, [
|
|
2387
|
+
e.name ? (i(), K(N, {
|
|
2385
2388
|
key: 0,
|
|
2386
2389
|
name: e.name,
|
|
2387
2390
|
type: e.type,
|
|
@@ -2391,7 +2394,7 @@ const ml = D({
|
|
|
2391
2394
|
src: e.icon,
|
|
2392
2395
|
alt: "",
|
|
2393
2396
|
class: "w-6 h-6"
|
|
2394
|
-
}, null, 8,
|
|
2397
|
+
}, null, 8, Cl))
|
|
2395
2398
|
])),
|
|
2396
2399
|
B("input", {
|
|
2397
2400
|
type: "range",
|
|
@@ -2402,7 +2405,7 @@ const ml = D({
|
|
|
2402
2405
|
"aria-label": e.label,
|
|
2403
2406
|
"aria-valuetext": `${l.value}%`,
|
|
2404
2407
|
class: "flex-1 transition-[scale] duration-200 hover:scale-105"
|
|
2405
|
-
}, null, 40,
|
|
2408
|
+
}, null, 40, zl),
|
|
2406
2409
|
B("span", {
|
|
2407
2410
|
class: y(["w-12 text-right transition-[color] duration-200 font-medium", o.value])
|
|
2408
2411
|
}, V(l.value) + "% ", 3)
|
|
@@ -2432,10 +2435,10 @@ const ml = D({
|
|
|
2432
2435
|
}, null, 2)
|
|
2433
2436
|
], 2));
|
|
2434
2437
|
}
|
|
2435
|
-
}),
|
|
2438
|
+
}), Ll = ["aria-checked", "disabled"], Dl = { class: "min-w-0 flex-1" }, Tl = { class: "block font-medium text-sm text-tx-main" }, Al = {
|
|
2436
2439
|
key: 0,
|
|
2437
2440
|
class: "mt-0.5 block text-tx-muted text-xs"
|
|
2438
|
-
},
|
|
2441
|
+
}, Bl = /* @__PURE__ */ D({
|
|
2439
2442
|
__name: "SwitchRow",
|
|
2440
2443
|
props: {
|
|
2441
2444
|
modelValue: { type: Boolean },
|
|
@@ -2472,14 +2475,14 @@ const ml = D({
|
|
|
2472
2475
|
alt: ""
|
|
2473
2476
|
}, null, 8, ["name", "type"])
|
|
2474
2477
|
], 2)) : x("", !0),
|
|
2475
|
-
B("span",
|
|
2476
|
-
B("span",
|
|
2477
|
-
e.description ? (i(), s("span",
|
|
2478
|
+
B("span", Dl, [
|
|
2479
|
+
B("span", Tl, V(e.label), 1),
|
|
2480
|
+
e.description ? (i(), s("span", Al, V(e.description), 1)) : x("", !0),
|
|
2478
2481
|
S(l.$slots, "pie")
|
|
2479
2482
|
])
|
|
2480
|
-
], 8,
|
|
2483
|
+
], 8, Ll));
|
|
2481
2484
|
}
|
|
2482
|
-
}),
|
|
2485
|
+
}), Sl = ["aria-checked", "aria-label", "disabled"], Ml = /* @__PURE__ */ D({
|
|
2483
2486
|
__name: "SwitchToggle",
|
|
2484
2487
|
props: {
|
|
2485
2488
|
modelValue: { type: Boolean },
|
|
@@ -2506,9 +2509,9 @@ const ml = D({
|
|
|
2506
2509
|
on: e.modelValue,
|
|
2507
2510
|
size: e.size
|
|
2508
2511
|
}, null, 8, ["on", "size"])
|
|
2509
|
-
], 8,
|
|
2512
|
+
], 8, Sl));
|
|
2510
2513
|
}
|
|
2511
|
-
}),
|
|
2514
|
+
}), Vl = ["disabled", "title", "aria-label", "aria-pressed", "aria-busy"], Il = ["src"], Ol = /* @__PURE__ */ D({
|
|
2512
2515
|
__name: "ToggleControl",
|
|
2513
2516
|
props: {
|
|
2514
2517
|
name: { default: "" },
|
|
@@ -2548,7 +2551,7 @@ const ml = D({
|
|
|
2548
2551
|
"aria-busy": e.isLoading || void 0,
|
|
2549
2552
|
onClick: l
|
|
2550
2553
|
}, [
|
|
2551
|
-
e.name ? (i(),
|
|
2554
|
+
e.name ? (i(), K(N, {
|
|
2552
2555
|
key: 0,
|
|
2553
2556
|
name: e.name,
|
|
2554
2557
|
type: e.type,
|
|
@@ -2569,8 +2572,8 @@ const ml = D({
|
|
|
2569
2572
|
"drop-shadow-lg": e.isActive,
|
|
2570
2573
|
...e.iconClass
|
|
2571
2574
|
}])
|
|
2572
|
-
}, null, 10,
|
|
2573
|
-
], 10,
|
|
2575
|
+
}, null, 10, Il))
|
|
2576
|
+
], 10, Vl));
|
|
2574
2577
|
}
|
|
2575
2578
|
}), ft = /* @__PURE__ */ Symbol("tooltip de vasak");
|
|
2576
2579
|
function mt() {
|
|
@@ -2590,7 +2593,7 @@ function mt() {
|
|
|
2590
2593
|
}
|
|
2591
2594
|
};
|
|
2592
2595
|
}
|
|
2593
|
-
const
|
|
2596
|
+
const jl = { class: "inline-block" }, Pl = /* @__PURE__ */ D({
|
|
2594
2597
|
__name: "Tooltip",
|
|
2595
2598
|
props: {
|
|
2596
2599
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -2615,11 +2618,11 @@ const Ol = { class: "inline-block" }, jl = /* @__PURE__ */ D({
|
|
|
2615
2618
|
},
|
|
2616
2619
|
abrir: o,
|
|
2617
2620
|
cerrar: r
|
|
2618
|
-
}), (u,
|
|
2621
|
+
}), (u, m) => (i(), s("div", jl, [
|
|
2619
2622
|
S(u.$slots, "default")
|
|
2620
2623
|
]));
|
|
2621
2624
|
}
|
|
2622
|
-
}),
|
|
2625
|
+
}), Rl = /* @__PURE__ */ D({
|
|
2623
2626
|
inheritAttrs: !1,
|
|
2624
2627
|
__name: "TooltipContent",
|
|
2625
2628
|
props: {
|
|
@@ -2629,30 +2632,30 @@ const Ol = { class: "inline-block" }, jl = /* @__PURE__ */ D({
|
|
|
2629
2632
|
},
|
|
2630
2633
|
setup(e) {
|
|
2631
2634
|
const n = Be(), t = v(() => n.class ?? ""), a = e, l = mt(), o = v(() => l.abierto.value), r = w(null), u = w({ top: 0, left: 0 });
|
|
2632
|
-
function
|
|
2633
|
-
const
|
|
2634
|
-
if (!
|
|
2635
|
-
const
|
|
2635
|
+
function m() {
|
|
2636
|
+
const c = l.disparador.value;
|
|
2637
|
+
if (!c || !r.value) return;
|
|
2638
|
+
const f = c.getBoundingClientRect(), k = r.value.getBoundingClientRect();
|
|
2636
2639
|
let L = 0, A = 0;
|
|
2637
2640
|
switch (a.side) {
|
|
2638
2641
|
case "bottom":
|
|
2639
|
-
L =
|
|
2642
|
+
L = f.bottom + a.sideOffset, A = f.left + f.width / 2 - k.width / 2;
|
|
2640
2643
|
break;
|
|
2641
2644
|
case "top":
|
|
2642
|
-
L =
|
|
2645
|
+
L = f.top - k.height - a.sideOffset, A = f.left + f.width / 2 - k.width / 2;
|
|
2643
2646
|
break;
|
|
2644
2647
|
case "left":
|
|
2645
|
-
A =
|
|
2648
|
+
A = f.left - k.width - a.sideOffset, L = f.top + f.height / 2 - k.height / 2;
|
|
2646
2649
|
break;
|
|
2647
2650
|
case "right":
|
|
2648
|
-
A =
|
|
2651
|
+
A = f.right + a.sideOffset, L = f.top + f.height / 2 - k.height / 2;
|
|
2649
2652
|
break;
|
|
2650
2653
|
}
|
|
2651
2654
|
u.value = { top: L, left: A };
|
|
2652
2655
|
}
|
|
2653
|
-
return Q(o, async (
|
|
2654
|
-
|
|
2655
|
-
}), (
|
|
2656
|
+
return Q(o, async (c) => {
|
|
2657
|
+
c && (await J(), requestAnimationFrame(m));
|
|
2658
|
+
}), (c, f) => (i(), K(ge, { to: "body" }, [
|
|
2656
2659
|
j(ke, {
|
|
2657
2660
|
"enter-active-class": "transition-all duration-200 ease-in-out",
|
|
2658
2661
|
"leave-active-class": "transition-all duration-200 ease-in-out",
|
|
@@ -2669,7 +2672,7 @@ const Ol = { class: "inline-block" }, jl = /* @__PURE__ */ D({
|
|
|
2669
2672
|
"pointer-events-none rounded-corner border border-secondary bg-ui-bg/80 px-2 py-1 text-sm shadow-md"
|
|
2670
2673
|
])
|
|
2671
2674
|
}, [
|
|
2672
|
-
S(
|
|
2675
|
+
S(c.$slots, "default")
|
|
2673
2676
|
], 6), [
|
|
2674
2677
|
[Ye, o.value]
|
|
2675
2678
|
])
|
|
@@ -2678,7 +2681,7 @@ const Ol = { class: "inline-block" }, jl = /* @__PURE__ */ D({
|
|
|
2678
2681
|
})
|
|
2679
2682
|
]));
|
|
2680
2683
|
}
|
|
2681
|
-
}),
|
|
2684
|
+
}), Fl = /* @__PURE__ */ D({
|
|
2682
2685
|
__name: "TooltipTrigger",
|
|
2683
2686
|
setup(e) {
|
|
2684
2687
|
const n = mt(), t = w(null);
|
|
@@ -2702,9 +2705,9 @@ const Ol = { class: "inline-block" }, jl = /* @__PURE__ */ D({
|
|
|
2702
2705
|
S(o.$slots, "default")
|
|
2703
2706
|
], 544));
|
|
2704
2707
|
}
|
|
2705
|
-
}),
|
|
2708
|
+
}), Nl = ["src", "alt"], ql = {
|
|
2706
2709
|
key: 2,
|
|
2707
|
-
class: "absolute bottom-1 right-1 bg-primary text-
|
|
2710
|
+
class: "absolute bottom-1 right-1 bg-primary text-tx-on-primary text-xs rounded-full w-4 h-4 flex items-center justify-center font-bold animate-bounce"
|
|
2708
2711
|
}, Hl = /* @__PURE__ */ D({
|
|
2709
2712
|
__name: "TrayIconButton",
|
|
2710
2713
|
props: {
|
|
@@ -2718,109 +2721,113 @@ const Ol = { class: "inline-block" }, jl = /* @__PURE__ */ D({
|
|
|
2718
2721
|
customClass: { default: "" },
|
|
2719
2722
|
tooltipClass: { default: "" },
|
|
2720
2723
|
showCustomTooltip: { type: Boolean, default: !1 },
|
|
2721
|
-
customTooltipText: { default: "" }
|
|
2724
|
+
customTooltipText: { default: "" },
|
|
2725
|
+
interactive: { type: Boolean, default: !0 }
|
|
2722
2726
|
},
|
|
2723
2727
|
emits: ["click"],
|
|
2724
2728
|
setup(e, { emit: n }) {
|
|
2725
|
-
const t = e, a = n, l = w(!1);
|
|
2729
|
+
const t = e, a = n, l = v(() => t.alt || t.tooltip || void 0), o = w(!1);
|
|
2726
2730
|
W(() => {
|
|
2727
2731
|
t.icon && !t.name && console.warn(
|
|
2728
2732
|
"[TrayIconButton] «icon» está obsoleto y se va en la próxima mayor: recibe una ruta ya resuelta. Usá «name» con el nombre del icono del tema, y «type» si hace falta el símbolo."
|
|
2729
2733
|
);
|
|
2730
2734
|
});
|
|
2731
|
-
const
|
|
2735
|
+
const r = () => {
|
|
2732
2736
|
a("click");
|
|
2733
2737
|
};
|
|
2734
|
-
return (
|
|
2735
|
-
class:
|
|
2738
|
+
return (u, m) => (i(), K(Lt(e.interactive ? "button" : "div"), le(e.interactive ? { type: "button", "aria-label": l.value } : {}, {
|
|
2739
|
+
class: ["p-1 rounded-corner relative group transition-[background-color] duration-300", [e.customClass, e.interactive ? "cursor-pointer hover:bg-primary" : ""]],
|
|
2736
2740
|
title: e.tooltip,
|
|
2737
|
-
onClick:
|
|
2738
|
-
onMouseenter:
|
|
2739
|
-
onMouseleave:
|
|
2740
|
-
},
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2741
|
+
onClick: r,
|
|
2742
|
+
onMouseenter: m[0] || (m[0] = (c) => o.value = !0),
|
|
2743
|
+
onMouseleave: m[1] || (m[1] = (c) => o.value = !1)
|
|
2744
|
+
}), {
|
|
2745
|
+
default: G(() => [
|
|
2746
|
+
e.name ? (i(), K(N, {
|
|
2747
|
+
key: 0,
|
|
2748
|
+
name: e.name,
|
|
2749
|
+
type: e.type,
|
|
2750
|
+
size: 22,
|
|
2751
|
+
alt: e.alt,
|
|
2752
|
+
class: y(["m-auto", e.iconClass])
|
|
2753
|
+
}, null, 8, ["name", "type", "alt", "class"])) : (i(), s("img", {
|
|
2754
|
+
key: 1,
|
|
2755
|
+
src: e.icon,
|
|
2756
|
+
alt: e.alt,
|
|
2757
|
+
class: y(["m-auto h-5.5 w-auto", e.iconClass])
|
|
2758
|
+
}, null, 10, Nl)),
|
|
2759
|
+
e.badge !== null && e.badge > 0 ? (i(), s("div", ql, V(e.badge), 1)) : x("", !0),
|
|
2760
|
+
e.showCustomTooltip && e.customTooltipText ? (i(), s("div", {
|
|
2761
|
+
key: 3,
|
|
2762
|
+
class: y(["absolute top-1 left-1/2 transform -translate-x-1/2 text-xs font-semibold p-1 rounded-corner transition-[opacity,translate] duration-300 pointer-events-none background", [
|
|
2763
|
+
e.tooltipClass,
|
|
2764
|
+
{
|
|
2765
|
+
"opacity-0 -translate-y-2": !o.value,
|
|
2766
|
+
"opacity-100 translate-y-0": o.value
|
|
2767
|
+
}
|
|
2768
|
+
]])
|
|
2769
|
+
}, V(e.customTooltipText), 3)) : x("", !0),
|
|
2770
|
+
S(u.$slots, "default")
|
|
2771
|
+
]),
|
|
2772
|
+
_: 3
|
|
2773
|
+
}, 16, ["class", "title"]));
|
|
2767
2774
|
}
|
|
2768
|
-
}),
|
|
2769
|
-
|
|
2775
|
+
}), Kl = [
|
|
2776
|
+
ca,
|
|
2770
2777
|
_e,
|
|
2771
2778
|
Ze,
|
|
2772
|
-
|
|
2779
|
+
va,
|
|
2773
2780
|
N,
|
|
2774
|
-
|
|
2781
|
+
Da,
|
|
2775
2782
|
at,
|
|
2776
2783
|
tt,
|
|
2777
|
-
|
|
2784
|
+
Fa,
|
|
2778
2785
|
nt,
|
|
2779
2786
|
Ua,
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2787
|
+
Za,
|
|
2788
|
+
nn,
|
|
2789
|
+
sn,
|
|
2790
|
+
un,
|
|
2791
|
+
bn,
|
|
2785
2792
|
Ie,
|
|
2786
|
-
|
|
2793
|
+
Dn,
|
|
2787
2794
|
lt,
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
rl,
|
|
2795
|
+
dn,
|
|
2796
|
+
Bn,
|
|
2797
|
+
qn,
|
|
2798
|
+
Kn,
|
|
2799
|
+
Qn,
|
|
2800
|
+
Xn,
|
|
2801
|
+
Zn,
|
|
2802
|
+
el,
|
|
2803
|
+
al,
|
|
2804
|
+
ll,
|
|
2805
|
+
sl,
|
|
2800
2806
|
ul,
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2807
|
+
cl,
|
|
2808
|
+
fl,
|
|
2809
|
+
bl,
|
|
2810
|
+
yl,
|
|
2811
|
+
hl,
|
|
2812
|
+
El,
|
|
2813
|
+
Bl,
|
|
2814
|
+
Ml,
|
|
2808
2815
|
je,
|
|
2809
|
-
|
|
2810
|
-
jl,
|
|
2816
|
+
Ol,
|
|
2811
2817
|
Pl,
|
|
2812
2818
|
Rl,
|
|
2819
|
+
Fl,
|
|
2813
2820
|
Hl
|
|
2814
2821
|
], Zl = {
|
|
2815
2822
|
install(e) {
|
|
2816
|
-
|
|
2823
|
+
Kl.forEach((n) => {
|
|
2817
2824
|
e.component(n.name, n);
|
|
2818
2825
|
});
|
|
2819
2826
|
}
|
|
2820
2827
|
};
|
|
2821
2828
|
export {
|
|
2822
|
-
|
|
2823
|
-
|
|
2829
|
+
Za as ActionButton,
|
|
2830
|
+
nn as AlertMessage,
|
|
2824
2831
|
at as AppBar,
|
|
2825
2832
|
Ua as BarSearch,
|
|
2826
2833
|
ot as CLASES_POR_TONO,
|
|
@@ -2828,60 +2835,60 @@ export {
|
|
|
2828
2835
|
ut as CLAVE_DEL_MENU,
|
|
2829
2836
|
ft as CLAVE_DEL_TOOLTIP,
|
|
2830
2837
|
Me as CLAVE_DE_LA_BARRA,
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2838
|
+
Bn as ConfigSection,
|
|
2839
|
+
qn as DeviceCard,
|
|
2840
|
+
Kn as Dialog,
|
|
2841
|
+
Qn as DialogContent,
|
|
2842
|
+
Xn as DialogDescription,
|
|
2843
|
+
Zn as DialogFooter,
|
|
2844
|
+
el as DialogHeader,
|
|
2845
|
+
al as DialogTitle,
|
|
2846
|
+
ll as DropdownMenu,
|
|
2847
|
+
sl as DropdownMenuContent,
|
|
2848
|
+
ul as DropdownMenuItem,
|
|
2849
|
+
cl as DropdownMenuLabel,
|
|
2850
|
+
fl as DropdownMenuSeparator,
|
|
2851
|
+
bl as DropdownMenuTrigger,
|
|
2852
|
+
sn as EmptyState,
|
|
2853
|
+
yl as FormGroup,
|
|
2847
2854
|
Ve as LOS_TRES_CONTROLES,
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2855
|
+
hl as ListCard,
|
|
2856
|
+
un as LoadingState,
|
|
2857
|
+
pa as POSICIONES,
|
|
2858
|
+
bn as ProgressBar,
|
|
2852
2859
|
Ie as SearchField,
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2860
|
+
Dn as SearchSelect,
|
|
2861
|
+
va as SelectField,
|
|
2862
|
+
ca as SideBar,
|
|
2856
2863
|
_e as SideButton,
|
|
2857
2864
|
Ze as SideGroup,
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2865
|
+
El as SliderControl,
|
|
2866
|
+
Bl as SwitchRow,
|
|
2867
|
+
Ml as SwitchToggle,
|
|
2861
2868
|
je as SwitchTrack,
|
|
2862
|
-
|
|
2869
|
+
Fa as TabBar,
|
|
2863
2870
|
nt as TabItem,
|
|
2864
2871
|
lt as TextInput,
|
|
2865
2872
|
N as ThemeIcon,
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2873
|
+
dn as ToastArea,
|
|
2874
|
+
Ol as ToggleControl,
|
|
2875
|
+
Pl as Tooltip,
|
|
2876
|
+
Rl as TooltipContent,
|
|
2877
|
+
Fl as TooltipTrigger,
|
|
2871
2878
|
Hl as TrayIconButton,
|
|
2872
2879
|
tt as WindowControls,
|
|
2873
|
-
|
|
2874
|
-
|
|
2880
|
+
Da as WindowFrame,
|
|
2881
|
+
pn as buscarOpciones,
|
|
2875
2882
|
Zl as default,
|
|
2876
|
-
|
|
2883
|
+
ya as esPosicion,
|
|
2877
2884
|
Xl as olvidarLosIconosDelTema,
|
|
2878
2885
|
Ae as orientacionDe,
|
|
2879
|
-
|
|
2886
|
+
xa as posicionDe,
|
|
2880
2887
|
it as rolDelTono,
|
|
2881
2888
|
rt as usarElDialogo,
|
|
2882
2889
|
Ce as usarElMenu,
|
|
2883
2890
|
mt as usarElTooltip,
|
|
2884
2891
|
he as usarLaBarra,
|
|
2885
|
-
|
|
2892
|
+
wa as usarLaPosicionDeLaBarra,
|
|
2886
2893
|
Jl as usarLaVersionDelTema
|
|
2887
2894
|
};
|