@vasakgroup/vue-libvasak 1.2.0 → 1.3.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/types/internos/iconoDelTema.d.ts +22 -1
- package/dist/vue-libvasak.es.js +805 -743
- package/dist/vue-libvasak.umd.js +1 -1
- package/package.json +1 -1
package/dist/vue-libvasak.es.js
CHANGED
|
@@ -1,63 +1,119 @@
|
|
|
1
|
-
import { ref as w, onMounted as
|
|
2
|
-
import { listen as
|
|
3
|
-
import { getSymbolSource as
|
|
4
|
-
import { getCurrentWindow as
|
|
5
|
-
import { useI18n as
|
|
6
|
-
const
|
|
7
|
-
let
|
|
8
|
-
function
|
|
9
|
-
|
|
1
|
+
import { ref as w, onMounted as J, onUnmounted as ve, readonly as vt, watch as W, defineComponent as D, toRef as Pe, useTemplateRef as pt, computed as v, createElementBlock as i, unref as F, openBlock as r, normalizeStyle as fe, createCommentVNode as x, createElementVNode as T, createVNode as O, toDisplayString as M, normalizeClass as h, renderSlot as S, createBlock as Y, onBeforeUnmount as pe, Fragment as te, renderList as ue, withCtx as K, mergeModels as Re, useAttrs as Be, useId as gt, useModel as yt, withDirectives as Se, mergeProps as ce, isRef as ht, vModelSelect as xt, inject as we, getCurrentInstance as Ge, provide as ge, createTextVNode as Me, toHandlers as Qe, createSlots as wt, withModifiers as V, withKeys as R, Teleport as ye, Transition as ke, nextTick as X, TransitionGroup as kt, vShow as Ye, cloneVNode as $t, h as Ct, Comment as Et, Text as Lt } from "vue";
|
|
2
|
+
import { listen as zt } from "@tauri-apps/api/event";
|
|
3
|
+
import { getSymbolSource as Dt, getIconSource as Tt } from "@vasakgroup/plugin-vicons";
|
|
4
|
+
import { getCurrentWindow as At } from "@tauri-apps/api/window";
|
|
5
|
+
import { useI18n as Bt } from "@vasakgroup/tauri-plugin-i18n";
|
|
6
|
+
const St = "vicons:theme-changed", xe = /* @__PURE__ */ new Map(), ie = /* @__PURE__ */ new Map(), me = w(0);
|
|
7
|
+
let se = 0, be = null, re = null;
|
|
8
|
+
function Ql() {
|
|
9
|
+
xe.clear(), ie.clear(), se = 0, be = null, re = null, me.value = 0, ae.clear(), ne.clear(), Xe = 0, ee?.disconnect(), ee = null, De = !1, Q !== null && (clearTimeout(Q), Q = null), _ && (_.cancelado = !0), _ = null;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const Mt = 100, Ee = 10, Vt = 16, ae = /* @__PURE__ */ new Map(), ne = /* @__PURE__ */ new Set();
|
|
12
|
+
let Xe = 0, ee = null, De = !1;
|
|
13
|
+
function It() {
|
|
14
|
+
return De ? ee : (De = !0, typeof IntersectionObserver > "u" ? null : (ee = new IntersectionObserver(
|
|
15
|
+
(e) => {
|
|
16
|
+
for (const n of e) {
|
|
17
|
+
const t = n.target.dataset?.iconoId;
|
|
18
|
+
if (t == null) continue;
|
|
19
|
+
const a = Number.parseInt(t, 10);
|
|
20
|
+
n.isIntersecting ? ne.add(a) : ne.delete(a);
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{ threshold: 0 }
|
|
24
|
+
), ee));
|
|
25
|
+
}
|
|
26
|
+
function Ot(e) {
|
|
27
|
+
const n = Xe++;
|
|
28
|
+
return ae.set(n, { recargar: e, elemento: null }), ne.add(n), n;
|
|
29
|
+
}
|
|
30
|
+
function jt(e, n) {
|
|
31
|
+
const t = ae.get(e);
|
|
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 = It();
|
|
34
|
+
a && (t.elemento = n, n.dataset.iconoId = String(e), a.observe(n));
|
|
35
|
+
}
|
|
36
|
+
function Pt(e) {
|
|
37
|
+
const n = ae.get(e);
|
|
38
|
+
n?.elemento && (ee?.unobserve(n.elemento), delete n.elemento.dataset.iconoId), ne.delete(e), ae.delete(e);
|
|
39
|
+
}
|
|
40
|
+
let Q = null, _ = null;
|
|
41
|
+
function Rt(e) {
|
|
42
|
+
return new Promise((n) => setTimeout(n, e));
|
|
43
|
+
}
|
|
44
|
+
async function Ft(e) {
|
|
45
|
+
const n = [...ae.keys()], t = n.filter((l) => ne.has(l)), a = n.filter((l) => !ne.has(l));
|
|
46
|
+
for (const l of [t, a])
|
|
47
|
+
for (let o = 0; o < l.length; o += Ee) {
|
|
48
|
+
if (e.cancelado) return;
|
|
49
|
+
const s = l.slice(o, o + Ee);
|
|
50
|
+
if (await Promise.allSettled(
|
|
51
|
+
s.map((u) => ae.get(u)?.recargar() ?? Promise.resolve())
|
|
52
|
+
), e.cancelado) return;
|
|
53
|
+
(o + Ee < l.length || l === t) && await Rt(Vt);
|
|
54
|
+
}
|
|
55
|
+
_ === e && (_ = null);
|
|
56
|
+
}
|
|
57
|
+
function Nt() {
|
|
58
|
+
Q !== null && (clearTimeout(Q), Q = null), _ && (_.cancelado = !0);
|
|
59
|
+
const e = { cancelado: !1 };
|
|
60
|
+
_ = e, Ft(e);
|
|
13
61
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
62
|
+
function qt() {
|
|
63
|
+
xe.clear(), ie.clear(), me.value++, Q !== null && clearTimeout(Q), Q = setTimeout(() => {
|
|
64
|
+
Q = null, Nt();
|
|
65
|
+
}, Mt);
|
|
18
66
|
}
|
|
19
|
-
function
|
|
20
|
-
|
|
67
|
+
function Je() {
|
|
68
|
+
return se++, be || re ? re ?? Promise.resolve() : (re = zt(St, qt).then((e) => {
|
|
69
|
+
se <= 0 ? e() : be = e, re = null;
|
|
70
|
+
}), re);
|
|
21
71
|
}
|
|
22
|
-
function
|
|
23
|
-
|
|
72
|
+
function Te() {
|
|
73
|
+
se--, !(se > 0) && (se = 0, be?.(), be = null);
|
|
74
|
+
}
|
|
75
|
+
function Ht(e, n) {
|
|
76
|
+
const t = `${n}:${e}`, a = xe.get(t);
|
|
24
77
|
if (a !== void 0)
|
|
25
78
|
return Promise.resolve(a);
|
|
26
|
-
const l =
|
|
79
|
+
const l = ie.get(t);
|
|
27
80
|
if (l)
|
|
28
81
|
return l;
|
|
29
|
-
const o =
|
|
30
|
-
|
|
82
|
+
const o = me.value, s = (n === "symbol" ? Dt(e) : Tt(e)).then((u) => (me.value === o && xe.set(t, u), u)).finally(() => {
|
|
83
|
+
ie.get(t) === s && ie.delete(t);
|
|
31
84
|
});
|
|
32
|
-
return
|
|
85
|
+
return ie.set(t, s), s;
|
|
33
86
|
}
|
|
34
|
-
function
|
|
87
|
+
function Yl() {
|
|
35
88
|
let e = !1;
|
|
36
|
-
return
|
|
37
|
-
await
|
|
38
|
-
}),
|
|
39
|
-
e || (e = !0,
|
|
40
|
-
}),
|
|
89
|
+
return J(async () => {
|
|
90
|
+
await Je(), e && Te();
|
|
91
|
+
}), ve(() => {
|
|
92
|
+
e || (e = !0, Te());
|
|
93
|
+
}), vt(me);
|
|
41
94
|
}
|
|
42
|
-
function
|
|
95
|
+
function Ut(e, n) {
|
|
43
96
|
const t = w("");
|
|
44
97
|
let a = !1, l = 0;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
98
|
+
const o = Ot(async () => {
|
|
99
|
+
await s();
|
|
100
|
+
});
|
|
101
|
+
async function s() {
|
|
102
|
+
const u = ++l, m = e.value;
|
|
103
|
+
if (!m) {
|
|
48
104
|
t.value = "";
|
|
49
105
|
return;
|
|
50
106
|
}
|
|
51
|
-
const
|
|
52
|
-
|
|
107
|
+
const f = await Ht(m, n.value);
|
|
108
|
+
u === l && !a && (t.value = f);
|
|
53
109
|
}
|
|
54
|
-
return
|
|
55
|
-
await
|
|
56
|
-
}),
|
|
57
|
-
a = !0,
|
|
58
|
-
}), W([e, n],
|
|
110
|
+
return J(async () => {
|
|
111
|
+
await Je(), a || await s();
|
|
112
|
+
}), ve(() => {
|
|
113
|
+
a = !0, Pt(o), Te();
|
|
114
|
+
}), W([e, n], s), { fuente: t, mirarElemento: (u) => jt(o, u) };
|
|
59
115
|
}
|
|
60
|
-
const
|
|
116
|
+
const Kt = ["src", "alt"], H = /* @__PURE__ */ D({
|
|
61
117
|
__name: "ThemeIcon",
|
|
62
118
|
props: {
|
|
63
119
|
name: {},
|
|
@@ -66,23 +122,29 @@ const Dt = ["src", "alt"], H = /* @__PURE__ */ E({
|
|
|
66
122
|
alt: { default: "" }
|
|
67
123
|
},
|
|
68
124
|
setup(e) {
|
|
69
|
-
const n = e, t =
|
|
70
|
-
|
|
125
|
+
const n = e, { fuente: t, mirarElemento: a } = Ut(Pe(n, "name"), Pe(n, "type")), l = pt("dibujo");
|
|
126
|
+
W(l, (s) => a(s), { immediate: !0 });
|
|
127
|
+
const o = v(() => `${n.size}px`);
|
|
128
|
+
return (s, u) => F(t) ? (r(), i("img", {
|
|
71
129
|
key: 0,
|
|
72
|
-
|
|
130
|
+
ref_key: "dibujo",
|
|
131
|
+
ref: l,
|
|
132
|
+
src: F(t),
|
|
73
133
|
alt: e.alt,
|
|
74
|
-
style:
|
|
134
|
+
style: fe({ width: o.value, height: o.value }),
|
|
75
135
|
class: "shrink-0 object-contain"
|
|
76
|
-
}, null, 12,
|
|
136
|
+
}, null, 12, Kt)) : (r(), i("span", {
|
|
77
137
|
key: 1,
|
|
78
|
-
|
|
138
|
+
ref_key: "dibujo",
|
|
139
|
+
ref: l,
|
|
140
|
+
style: fe({ width: o.value, height: o.value }),
|
|
79
141
|
class: "shrink-0"
|
|
80
142
|
}, null, 4));
|
|
81
143
|
}
|
|
82
|
-
}),
|
|
144
|
+
}), Wt = { class: "flex flex-col gap-2" }, Gt = ["aria-expanded"], Qt = {
|
|
83
145
|
key: 1,
|
|
84
146
|
class: "flex flex-col gap-1"
|
|
85
|
-
},
|
|
147
|
+
}, Ze = /* @__PURE__ */ D({
|
|
86
148
|
__name: "SideGroup",
|
|
87
149
|
props: {
|
|
88
150
|
title: {},
|
|
@@ -96,7 +158,7 @@ const Dt = ["src", "alt"], H = /* @__PURE__ */ E({
|
|
|
96
158
|
(a) => {
|
|
97
159
|
a && (t.value = !0);
|
|
98
160
|
}
|
|
99
|
-
), (a, l) => (r(), i("section",
|
|
161
|
+
), (a, l) => (r(), i("section", Wt, [
|
|
100
162
|
e.collapsed ? x("", !0) : (r(), i("button", {
|
|
101
163
|
key: 0,
|
|
102
164
|
type: "button",
|
|
@@ -104,26 +166,26 @@ const Dt = ["src", "alt"], H = /* @__PURE__ */ E({
|
|
|
104
166
|
"aria-expanded": t.value,
|
|
105
167
|
onClick: l[0] || (l[0] = (o) => t.value = !t.value)
|
|
106
168
|
}, [
|
|
107
|
-
T("span", null,
|
|
169
|
+
T("span", null, M(e.title), 1),
|
|
108
170
|
O(H, {
|
|
109
171
|
name: "pan-down-symbolic",
|
|
110
172
|
type: "symbol",
|
|
111
173
|
size: 12,
|
|
112
174
|
class: h(["transition-transform duration-200", t.value ? "" : "-rotate-90"])
|
|
113
175
|
}, null, 8, ["class"])
|
|
114
|
-
], 8,
|
|
115
|
-
t.value || e.collapsed ? (r(), i("div",
|
|
176
|
+
], 8, Gt)),
|
|
177
|
+
t.value || e.collapsed ? (r(), i("div", Qt, [
|
|
116
178
|
S(a.$slots, "default")
|
|
117
179
|
])) : x("", !0)
|
|
118
180
|
]));
|
|
119
181
|
}
|
|
120
|
-
}),
|
|
182
|
+
}), Yt = ["title", "aria-label", "disabled", "aria-current"], Xt = { key: 1 }, Jt = {
|
|
121
183
|
key: 0,
|
|
122
184
|
class: "min-w-0 flex-1 truncate font-medium"
|
|
123
|
-
},
|
|
185
|
+
}, Zt = {
|
|
124
186
|
key: 1,
|
|
125
187
|
class: "rounded-corner bg-ui-surface px-2 py-0.5 font-semibold text-tx-muted text-xs"
|
|
126
|
-
},
|
|
188
|
+
}, _e = /* @__PURE__ */ D({
|
|
127
189
|
__name: "SideButton",
|
|
128
190
|
props: {
|
|
129
191
|
label: {},
|
|
@@ -152,32 +214,32 @@ const Dt = ["src", "alt"], H = /* @__PURE__ */ E({
|
|
|
152
214
|
class: h(["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" : ""]),
|
|
153
215
|
"aria-hidden": "true"
|
|
154
216
|
}, [
|
|
155
|
-
e.icon ? (r(),
|
|
217
|
+
e.icon ? (r(), Y(H, {
|
|
156
218
|
key: 0,
|
|
157
219
|
name: e.icon,
|
|
158
220
|
size: 20
|
|
159
|
-
}, null, 8, ["name"])) : (r(), i("span",
|
|
221
|
+
}, null, 8, ["name"])) : (r(), i("span", Xt, M(e.label.charAt(0).toUpperCase()), 1))
|
|
160
222
|
], 2),
|
|
161
|
-
e.collapsed ? x("", !0) : (r(), i("span",
|
|
162
|
-
!e.collapsed && e.badge !== "" ? (r(), i("span",
|
|
163
|
-
], 10,
|
|
223
|
+
e.collapsed ? x("", !0) : (r(), i("span", Jt, M(e.label), 1)),
|
|
224
|
+
!e.collapsed && e.badge !== "" ? (r(), i("span", Zt, M(e.badge), 1)) : x("", !0)
|
|
225
|
+
], 10, Yt));
|
|
164
226
|
}
|
|
165
|
-
}),
|
|
227
|
+
}), _t = {
|
|
166
228
|
key: 0,
|
|
167
229
|
class: "flex flex-col gap-2 border-ui-border border-b p-2"
|
|
168
|
-
},
|
|
230
|
+
}, ea = { class: "flex items-center gap-2" }, ta = ["aria-label", "aria-expanded"], aa = {
|
|
169
231
|
key: 0,
|
|
170
232
|
class: "min-w-0 flex-1"
|
|
171
|
-
},
|
|
233
|
+
}, na = {
|
|
172
234
|
key: 0,
|
|
173
235
|
class: "truncate font-semibold text-sm"
|
|
174
|
-
},
|
|
236
|
+
}, la = {
|
|
175
237
|
key: 1,
|
|
176
238
|
class: "truncate text-tx-muted text-xs"
|
|
177
|
-
},
|
|
239
|
+
}, oa = { key: 0 }, ra = {
|
|
178
240
|
key: 1,
|
|
179
241
|
class: "flex border-ui-border border-b p-2"
|
|
180
|
-
},
|
|
242
|
+
}, ia = ["aria-label", "aria-expanded"], sa = { 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, ua = /* @__PURE__ */ D({
|
|
181
243
|
__name: "SideBar",
|
|
182
244
|
props: {
|
|
183
245
|
title: { default: "" },
|
|
@@ -197,13 +259,13 @@ const Dt = ["src", "alt"], H = /* @__PURE__ */ E({
|
|
|
197
259
|
function L() {
|
|
198
260
|
return document.documentElement?.clientWidth || window.innerWidth;
|
|
199
261
|
}
|
|
200
|
-
function
|
|
201
|
-
s.value = L() <=
|
|
262
|
+
function z() {
|
|
263
|
+
s.value = L() <= Ne;
|
|
202
264
|
}
|
|
203
|
-
function
|
|
265
|
+
function B() {
|
|
204
266
|
o.value = !o.value, l("update:collapsed", o.value);
|
|
205
267
|
}
|
|
206
|
-
function
|
|
268
|
+
function g($) {
|
|
207
269
|
l("update:modelValue", $), l("change", $);
|
|
208
270
|
}
|
|
209
271
|
return W(
|
|
@@ -211,67 +273,67 @@ const Dt = ["src", "alt"], H = /* @__PURE__ */ E({
|
|
|
211
273
|
($) => {
|
|
212
274
|
$ !== void 0 && (o.value = $);
|
|
213
275
|
}
|
|
214
|
-
),
|
|
215
|
-
u = window.matchMedia(`(max-width: ${
|
|
216
|
-
}),
|
|
217
|
-
u?.removeEventListener("change",
|
|
276
|
+
), J(() => {
|
|
277
|
+
u = window.matchMedia(`(max-width: ${Ne}px)`), z(), u.addEventListener("change", z), window.addEventListener("resize", z), typeof ResizeObserver < "u" && document.documentElement && (m = new ResizeObserver(z), m.observe(document.documentElement));
|
|
278
|
+
}), pe(() => {
|
|
279
|
+
u?.removeEventListener("change", z), window.removeEventListener("resize", z), m?.disconnect(), m = null;
|
|
218
280
|
}), n({ collapsed: f }), ($, j) => (r(), i("aside", {
|
|
219
281
|
class: h(["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]", f.value ? "md:w-[84px]" : "md:w-72"]])
|
|
220
282
|
}, [
|
|
221
|
-
d.value || $.$slots.header ? (r(), i("header",
|
|
222
|
-
T("div",
|
|
283
|
+
d.value || $.$slots.header ? (r(), i("header", _t, [
|
|
284
|
+
T("div", ea, [
|
|
223
285
|
T("button", {
|
|
224
286
|
type: "button",
|
|
225
|
-
class: h(
|
|
287
|
+
class: h(Fe),
|
|
226
288
|
"aria-label": f.value ? e.expandLabel : e.collapseLabel,
|
|
227
289
|
"aria-expanded": !f.value,
|
|
228
|
-
onClick:
|
|
290
|
+
onClick: B
|
|
229
291
|
}, [
|
|
230
292
|
O(H, {
|
|
231
293
|
name: f.value ? "pan-end-symbolic" : "pan-start-symbolic",
|
|
232
294
|
type: "symbol",
|
|
233
295
|
size: 16
|
|
234
296
|
}, null, 8, ["name"])
|
|
235
|
-
], 8,
|
|
236
|
-
d.value && !f.value ? (r(), i("div",
|
|
237
|
-
e.title ? (r(), i("p",
|
|
238
|
-
e.subtitle ? (r(), i("p",
|
|
297
|
+
], 8, ta),
|
|
298
|
+
d.value && !f.value ? (r(), i("div", aa, [
|
|
299
|
+
e.title ? (r(), i("p", na, M(e.title), 1)) : x("", !0),
|
|
300
|
+
e.subtitle ? (r(), i("p", la, M(e.subtitle), 1)) : x("", !0)
|
|
239
301
|
])) : x("", !0)
|
|
240
302
|
]),
|
|
241
|
-
$.$slots.header && !f.value ? (r(), i("div",
|
|
303
|
+
$.$slots.header && !f.value ? (r(), i("div", oa, [
|
|
242
304
|
S($.$slots, "header", { collapsed: f.value })
|
|
243
305
|
])) : x("", !0)
|
|
244
|
-
])) : (r(), i("div",
|
|
306
|
+
])) : (r(), i("div", ra, [
|
|
245
307
|
T("button", {
|
|
246
308
|
type: "button",
|
|
247
|
-
class: h(
|
|
309
|
+
class: h(Fe),
|
|
248
310
|
"aria-label": f.value ? e.expandLabel : e.collapseLabel,
|
|
249
311
|
"aria-expanded": !f.value,
|
|
250
|
-
onClick:
|
|
312
|
+
onClick: B
|
|
251
313
|
}, [
|
|
252
314
|
O(H, {
|
|
253
315
|
name: f.value ? "pan-end-symbolic" : "pan-start-symbolic",
|
|
254
316
|
type: "symbol",
|
|
255
317
|
size: 16
|
|
256
318
|
}, null, 8, ["name"])
|
|
257
|
-
], 8,
|
|
319
|
+
], 8, ia)
|
|
258
320
|
])),
|
|
259
|
-
T("div",
|
|
260
|
-
(r(!0), i(
|
|
321
|
+
T("div", sa, [
|
|
322
|
+
(r(!0), i(te, null, ue(e.categories, (C) => (r(), Y(Ze, {
|
|
261
323
|
key: C.id,
|
|
262
324
|
title: C.title,
|
|
263
325
|
collapsed: f.value
|
|
264
326
|
}, {
|
|
265
327
|
default: K(() => [
|
|
266
|
-
(r(!0), i(
|
|
267
|
-
key:
|
|
268
|
-
label:
|
|
269
|
-
icon:
|
|
270
|
-
badge:
|
|
271
|
-
disabled:
|
|
328
|
+
(r(!0), i(te, null, ue(C.items, (y) => (r(), Y(_e, {
|
|
329
|
+
key: y.id,
|
|
330
|
+
label: y.label,
|
|
331
|
+
icon: y.icon,
|
|
332
|
+
badge: y.badge,
|
|
333
|
+
disabled: y.disabled,
|
|
272
334
|
collapsed: f.value,
|
|
273
|
-
active: e.modelValue ===
|
|
274
|
-
onClick: (c) => y
|
|
335
|
+
active: e.modelValue === y.id,
|
|
336
|
+
onClick: (c) => g(y.id)
|
|
275
337
|
}, null, 8, ["label", "icon", "badge", "disabled", "collapsed", "active", "onClick"]))), 128))
|
|
276
338
|
]),
|
|
277
339
|
_: 2
|
|
@@ -280,10 +342,10 @@ const Dt = ["src", "alt"], H = /* @__PURE__ */ E({
|
|
|
280
342
|
])
|
|
281
343
|
], 2));
|
|
282
344
|
}
|
|
283
|
-
}),
|
|
345
|
+
}), ca = { class: "flex min-w-0 flex-col gap-1" }, da = ["for"], fa = { class: "relative flex min-w-0 items-center" }, ma = ["id"], ba = /* @__PURE__ */ D({
|
|
284
346
|
inheritAttrs: !1,
|
|
285
347
|
__name: "SelectField",
|
|
286
|
-
props: /* @__PURE__ */
|
|
348
|
+
props: /* @__PURE__ */ Re({
|
|
287
349
|
label: {}
|
|
288
350
|
}, {
|
|
289
351
|
modelValue: {
|
|
@@ -291,30 +353,30 @@ const Dt = ["src", "alt"], H = /* @__PURE__ */ E({
|
|
|
291
353
|
},
|
|
292
354
|
modelModifiers: {}
|
|
293
355
|
}),
|
|
294
|
-
emits: /* @__PURE__ */
|
|
356
|
+
emits: /* @__PURE__ */ Re(["change"], ["update:modelValue"]),
|
|
295
357
|
setup(e, { emit: n }) {
|
|
296
|
-
const t = e, a =
|
|
358
|
+
const t = e, a = Be(), l = gt(), o = v(() => a.id ?? l), s = n, [u, m] = yt(e, "modelValue", {
|
|
297
359
|
set(f) {
|
|
298
360
|
return m.number ? Number(f) : f;
|
|
299
361
|
}
|
|
300
362
|
});
|
|
301
|
-
return (f, d) => (r(), i("div",
|
|
363
|
+
return (f, d) => (r(), i("div", ca, [
|
|
302
364
|
t.label ? (r(), i("label", {
|
|
303
365
|
key: 0,
|
|
304
366
|
for: o.value,
|
|
305
367
|
class: "text-tx-muted text-xs"
|
|
306
|
-
},
|
|
307
|
-
T("div",
|
|
308
|
-
|
|
368
|
+
}, M(t.label), 9, da)) : x("", !0),
|
|
369
|
+
T("div", fa, [
|
|
370
|
+
Se(T("select", ce({
|
|
309
371
|
id: o.value,
|
|
310
|
-
"onUpdate:modelValue": d[0] || (d[0] = (L) =>
|
|
372
|
+
"onUpdate:modelValue": d[0] || (d[0] = (L) => ht(u) ? u.value = L : null),
|
|
311
373
|
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"
|
|
312
|
-
},
|
|
374
|
+
}, F(a), {
|
|
313
375
|
onChange: d[1] || (d[1] = (L) => s("change", L))
|
|
314
376
|
}), [
|
|
315
377
|
S(f.$slots, "default")
|
|
316
|
-
], 16,
|
|
317
|
-
[
|
|
378
|
+
], 16, ma), [
|
|
379
|
+
[xt, F(u)]
|
|
318
380
|
]),
|
|
319
381
|
O(H, {
|
|
320
382
|
name: "pan-down-symbolic",
|
|
@@ -325,40 +387,40 @@ const Dt = ["src", "alt"], H = /* @__PURE__ */ E({
|
|
|
325
387
|
])
|
|
326
388
|
]));
|
|
327
389
|
}
|
|
328
|
-
}),
|
|
329
|
-
function
|
|
390
|
+
}), Ve = /* @__PURE__ */ Symbol("barra de vasak");
|
|
391
|
+
function Ae(e) {
|
|
330
392
|
return e === "left" || e === "right" ? "vertical" : "horizontal";
|
|
331
393
|
}
|
|
332
|
-
const
|
|
333
|
-
function
|
|
334
|
-
return typeof e == "string" &&
|
|
394
|
+
const va = ["top", "bottom", "left", "right"];
|
|
395
|
+
function pa(e) {
|
|
396
|
+
return typeof e == "string" && va.includes(e);
|
|
335
397
|
}
|
|
336
|
-
function
|
|
337
|
-
const e =
|
|
398
|
+
function he() {
|
|
399
|
+
const e = we(Ve, null);
|
|
338
400
|
if (e) return e;
|
|
339
401
|
const n = w("top");
|
|
340
402
|
return {
|
|
341
403
|
posicion: n,
|
|
342
|
-
orientacion: v(() =>
|
|
343
|
-
vertical: v(() =>
|
|
404
|
+
orientacion: v(() => Ae(n.value)),
|
|
405
|
+
vertical: v(() => Ae(n.value) === "vertical")
|
|
344
406
|
};
|
|
345
407
|
}
|
|
346
|
-
const
|
|
347
|
-
function
|
|
348
|
-
const t = e?.[
|
|
349
|
-
return
|
|
408
|
+
const Ie = ["minimize", "maximize", "close"], ga = "window", ya = "barPosition";
|
|
409
|
+
function ha(e) {
|
|
410
|
+
const t = e?.[ga]?.[ya];
|
|
411
|
+
return pa(t) ? t : null;
|
|
350
412
|
}
|
|
351
|
-
function
|
|
413
|
+
function xa(e = "top") {
|
|
352
414
|
const n = w(e);
|
|
353
415
|
let t = null, a = !1;
|
|
354
416
|
async function l() {
|
|
355
417
|
try {
|
|
356
418
|
const { readConfig: o } = await import("@vasakgroup/plugin-config-manager"), s = await o();
|
|
357
|
-
n.value =
|
|
419
|
+
n.value = ha(s) ?? e;
|
|
358
420
|
} catch {
|
|
359
421
|
}
|
|
360
422
|
}
|
|
361
|
-
return
|
|
423
|
+
return J(async () => {
|
|
362
424
|
await l();
|
|
363
425
|
try {
|
|
364
426
|
const { listen: o } = await import("@tauri-apps/api/event"), s = await o("config-changed", () => {
|
|
@@ -371,110 +433,110 @@ function aa(e = "top") {
|
|
|
371
433
|
t = s;
|
|
372
434
|
} catch {
|
|
373
435
|
}
|
|
374
|
-
}),
|
|
436
|
+
}), pe(() => {
|
|
375
437
|
a = !0, t?.(), t = null;
|
|
376
438
|
}), n;
|
|
377
439
|
}
|
|
378
|
-
function
|
|
379
|
-
const n =
|
|
440
|
+
function et(e) {
|
|
441
|
+
const n = Ge(), t = {};
|
|
380
442
|
for (const a of e) {
|
|
381
443
|
const l = `on${a[0].toUpperCase()}${a.slice(1)}`;
|
|
382
444
|
n?.vnode.props?.[l] && (t[a] = () => n.emit(a));
|
|
383
445
|
}
|
|
384
446
|
return t;
|
|
385
447
|
}
|
|
386
|
-
const
|
|
448
|
+
const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title", "aria-label"], Le = "flex items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 p-1 transition-colors", tt = /* @__PURE__ */ D({
|
|
387
449
|
__name: "WindowControls",
|
|
388
450
|
props: {
|
|
389
|
-
controls: { default: () =>
|
|
451
|
+
controls: { default: () => Ie },
|
|
390
452
|
minimizeLabel: {},
|
|
391
453
|
maximizeLabel: {},
|
|
392
454
|
closeLabel: {}
|
|
393
455
|
},
|
|
394
456
|
emits: ["minimize", "maximize", "close"],
|
|
395
457
|
setup(e, { emit: n }) {
|
|
396
|
-
const t = e, { t: a } =
|
|
458
|
+
const t = e, { t: a } = Bt(), l = v(() => t.minimizeLabel ?? a("ventana.minimizar")), o = v(() => t.maximizeLabel ?? a("ventana.maximizar")), s = v(() => t.closeLabel ?? a("ventana.cerrar")), u = n, { vertical: m } = he(), f = v(() => ({
|
|
397
459
|
minimize: t.controls.includes("minimize"),
|
|
398
460
|
maximize: t.controls.includes("maximize"),
|
|
399
461
|
close: t.controls.includes("close")
|
|
400
462
|
}));
|
|
401
463
|
function d() {
|
|
402
|
-
return
|
|
464
|
+
return At();
|
|
403
465
|
}
|
|
404
|
-
const L =
|
|
405
|
-
function
|
|
466
|
+
const L = Ge();
|
|
467
|
+
function z(j) {
|
|
406
468
|
return !!L?.vnode.props?.[`on${j}`];
|
|
407
469
|
}
|
|
408
|
-
function
|
|
409
|
-
if (
|
|
470
|
+
function B() {
|
|
471
|
+
if (z("Minimize")) return u("minimize");
|
|
410
472
|
d().minimize();
|
|
411
473
|
}
|
|
412
|
-
function
|
|
413
|
-
if (
|
|
474
|
+
function g() {
|
|
475
|
+
if (z("Maximize")) return u("maximize");
|
|
414
476
|
d().toggleMaximize();
|
|
415
477
|
}
|
|
416
478
|
function $() {
|
|
417
|
-
if (
|
|
479
|
+
if (z("Close")) return u("close");
|
|
418
480
|
d().close();
|
|
419
481
|
}
|
|
420
482
|
return (j, C) => e.controls.length ? (r(), i("div", {
|
|
421
483
|
key: 0,
|
|
422
|
-
class: h(["flex shrink-0 gap-1",
|
|
484
|
+
class: h(["flex shrink-0 gap-1", F(m) ? "flex-col" : ""]),
|
|
423
485
|
"data-tauri-drag-region": ""
|
|
424
486
|
}, [
|
|
425
487
|
f.value.minimize ? (r(), i("button", {
|
|
426
488
|
key: 0,
|
|
427
489
|
type: "button",
|
|
428
|
-
class: h([
|
|
490
|
+
class: h([Le, "hover:bg-status-success"]),
|
|
429
491
|
title: l.value,
|
|
430
492
|
"aria-label": l.value,
|
|
431
|
-
onClick: C[0] || (C[0] = (
|
|
493
|
+
onClick: C[0] || (C[0] = (y) => B())
|
|
432
494
|
}, [
|
|
433
495
|
O(H, {
|
|
434
496
|
name: "window-minimize",
|
|
435
497
|
type: "symbol",
|
|
436
498
|
size: 24
|
|
437
499
|
})
|
|
438
|
-
], 10,
|
|
500
|
+
], 10, wa)) : x("", !0),
|
|
439
501
|
f.value.maximize ? (r(), i("button", {
|
|
440
502
|
key: 1,
|
|
441
503
|
type: "button",
|
|
442
|
-
class: h([
|
|
504
|
+
class: h([Le, "hover:bg-status-warning"]),
|
|
443
505
|
title: o.value,
|
|
444
506
|
"aria-label": o.value,
|
|
445
|
-
onClick: C[1] || (C[1] = (
|
|
507
|
+
onClick: C[1] || (C[1] = (y) => g())
|
|
446
508
|
}, [
|
|
447
509
|
O(H, {
|
|
448
510
|
name: "window-maximize",
|
|
449
511
|
type: "symbol",
|
|
450
512
|
size: 24
|
|
451
513
|
})
|
|
452
|
-
], 10,
|
|
514
|
+
], 10, ka)) : x("", !0),
|
|
453
515
|
f.value.close ? (r(), i("button", {
|
|
454
516
|
key: 2,
|
|
455
517
|
type: "button",
|
|
456
|
-
class: h([
|
|
518
|
+
class: h([Le, "hover:bg-status-error"]),
|
|
457
519
|
title: s.value,
|
|
458
520
|
"aria-label": s.value,
|
|
459
|
-
onClick: C[2] || (C[2] = (
|
|
521
|
+
onClick: C[2] || (C[2] = (y) => $())
|
|
460
522
|
}, [
|
|
461
523
|
O(H, {
|
|
462
524
|
name: "window-close",
|
|
463
525
|
type: "symbol",
|
|
464
526
|
size: 24
|
|
465
527
|
})
|
|
466
|
-
], 10,
|
|
528
|
+
], 10, $a)) : x("", !0)
|
|
467
529
|
], 2)) : x("", !0);
|
|
468
530
|
}
|
|
469
|
-
}),
|
|
531
|
+
}), Ca = {
|
|
470
532
|
key: 0,
|
|
471
533
|
class: "flex shrink-0 items-center",
|
|
472
534
|
"data-tauri-drag-region": ""
|
|
473
|
-
},
|
|
535
|
+
}, Ea = {
|
|
474
536
|
key: 1,
|
|
475
537
|
class: "min-w-0 shrink truncate text-sm",
|
|
476
538
|
"data-tauri-drag-region": ""
|
|
477
|
-
},
|
|
539
|
+
}, at = /* @__PURE__ */ D({
|
|
478
540
|
__name: "AppBar",
|
|
479
541
|
props: {
|
|
480
542
|
position: { default: null },
|
|
@@ -482,12 +544,12 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
482
544
|
minimizeLabel: {},
|
|
483
545
|
maximizeLabel: {},
|
|
484
546
|
closeLabel: {},
|
|
485
|
-
controls: { default: () =>
|
|
547
|
+
controls: { default: () => Ie }
|
|
486
548
|
},
|
|
487
549
|
emits: ["minimize", "maximize", "close"],
|
|
488
550
|
setup(e) {
|
|
489
|
-
const n = e, t =
|
|
490
|
-
return
|
|
551
|
+
const n = e, t = he(), a = v(() => n.position ?? t.posicion.value), l = v(() => a.value === "left" || a.value === "right");
|
|
552
|
+
return ge(Ve, {
|
|
491
553
|
posicion: a,
|
|
492
554
|
orientacion: v(() => l.value ? "vertical" : "horizontal"),
|
|
493
555
|
vertical: l
|
|
@@ -495,12 +557,12 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
495
557
|
class: h(["relative flex shrink-0 items-center gap-2 p-1 font-title", l.value ? "h-full flex-col" : "w-full"]),
|
|
496
558
|
"data-tauri-drag-region": ""
|
|
497
559
|
}, [
|
|
498
|
-
o.$slots.identidad ? (r(), i("div",
|
|
560
|
+
o.$slots.identidad ? (r(), i("div", Ca, [
|
|
499
561
|
S(o.$slots, "identidad")
|
|
500
562
|
])) : x("", !0),
|
|
501
|
-
(o.$slots.titulo || e.title) && !l.value ? (r(), i("p",
|
|
563
|
+
(o.$slots.titulo || e.title) && !l.value ? (r(), i("p", Ea, [
|
|
502
564
|
S(o.$slots, "titulo", {}, () => [
|
|
503
|
-
|
|
565
|
+
Me(M(e.title), 1)
|
|
504
566
|
])
|
|
505
567
|
])) : x("", !0),
|
|
506
568
|
T("div", {
|
|
@@ -515,12 +577,12 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
515
577
|
}, [
|
|
516
578
|
S(o.$slots, "acciones")
|
|
517
579
|
], 2)) : x("", !0),
|
|
518
|
-
O(
|
|
580
|
+
O(tt, ce({
|
|
519
581
|
controls: e.controls,
|
|
520
582
|
"minimize-label": e.minimizeLabel,
|
|
521
583
|
"maximize-label": e.maximizeLabel,
|
|
522
584
|
"close-label": e.closeLabel
|
|
523
|
-
},
|
|
585
|
+
}, Qe(F(et)(["minimize", "maximize", "close"]))), null, 16, ["controls", "minimize-label", "maximize-label", "close-label"]),
|
|
524
586
|
o.$slots.centro ? (r(), i("div", {
|
|
525
587
|
key: 3,
|
|
526
588
|
class: h(["pointer-events-none absolute flex items-center justify-center", l.value ? "inset-x-0 top-1/2 -translate-y-1/2 flex-col" : "inset-y-0 left-1/2 -translate-x-1/2"])
|
|
@@ -533,7 +595,7 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
533
595
|
], 2)) : x("", !0)
|
|
534
596
|
], 2));
|
|
535
597
|
}
|
|
536
|
-
}),
|
|
598
|
+
}), La = { class: "flex min-h-0 min-w-0 flex-1" }, za = /* @__PURE__ */ D({
|
|
537
599
|
__name: "WindowFrame",
|
|
538
600
|
props: {
|
|
539
601
|
position: { default: null },
|
|
@@ -541,13 +603,13 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
541
603
|
minimizeLabel: {},
|
|
542
604
|
maximizeLabel: {},
|
|
543
605
|
closeLabel: {},
|
|
544
|
-
controls: { default: () =>
|
|
606
|
+
controls: { default: () => Ie },
|
|
545
607
|
hideBar: { type: Boolean, default: !1 }
|
|
546
608
|
},
|
|
547
609
|
emits: ["minimize", "maximize", "close"],
|
|
548
610
|
setup(e) {
|
|
549
|
-
const n = e, t =
|
|
550
|
-
|
|
611
|
+
const n = e, t = xa(), a = v(() => n.position ?? t.value), l = v(() => Ae(a.value)), o = v(() => l.value === "vertical");
|
|
612
|
+
ge(Ve, { posicion: a, orientacion: l, vertical: o });
|
|
551
613
|
const s = {
|
|
552
614
|
top: "flex-col",
|
|
553
615
|
bottom: "flex-col-reverse",
|
|
@@ -557,7 +619,7 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
557
619
|
return (u, m) => (r(), i("div", {
|
|
558
620
|
class: h(["flex h-screen w-screen overflow-hidden rounded-corner-window border border-ui-border bg-ui-bg/80", s[a.value]])
|
|
559
621
|
}, [
|
|
560
|
-
e.hideBar ? x("", !0) : (r(),
|
|
622
|
+
e.hideBar ? x("", !0) : (r(), Y(at, ce({
|
|
561
623
|
key: 0,
|
|
562
624
|
position: a.value,
|
|
563
625
|
title: e.title,
|
|
@@ -565,7 +627,7 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
565
627
|
"maximize-label": e.maximizeLabel,
|
|
566
628
|
"close-label": e.closeLabel,
|
|
567
629
|
controls: e.controls
|
|
568
|
-
},
|
|
630
|
+
}, Qe(F(et)(["minimize", "maximize", "close"]))), wt({
|
|
569
631
|
default: K(() => [
|
|
570
632
|
S(u.$slots, "barra")
|
|
571
633
|
]),
|
|
@@ -600,22 +662,22 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
600
662
|
key: "3"
|
|
601
663
|
} : void 0
|
|
602
664
|
]), 1040, ["position", "title", "minimize-label", "maximize-label", "close-label", "controls"])),
|
|
603
|
-
T("div",
|
|
665
|
+
T("div", La, [
|
|
604
666
|
S(u.$slots, "default")
|
|
605
667
|
])
|
|
606
668
|
], 2));
|
|
607
669
|
}
|
|
608
|
-
}),
|
|
670
|
+
}), Da = ["aria-selected", "title", "aria-label", "tabindex"], Ta = {
|
|
609
671
|
key: 1,
|
|
610
672
|
"aria-hidden": "true"
|
|
611
|
-
},
|
|
673
|
+
}, Aa = {
|
|
612
674
|
key: 2,
|
|
613
675
|
class: "min-w-0 flex-1 truncate"
|
|
614
|
-
},
|
|
676
|
+
}, Ba = ["title", "aria-label"], Sa = { class: "whitespace-nowrap" }, Ma = {
|
|
615
677
|
key: 0,
|
|
616
678
|
class: "size-2 shrink-0 rounded-full bg-current",
|
|
617
679
|
"aria-hidden": "true"
|
|
618
|
-
},
|
|
680
|
+
}, Va = ["title", "aria-label"], Ia = 500, qe = 8, He = 6, nt = /* @__PURE__ */ D({
|
|
619
681
|
__name: "TabItem",
|
|
620
682
|
props: {
|
|
621
683
|
tab: {},
|
|
@@ -626,124 +688,124 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
626
688
|
},
|
|
627
689
|
emits: ["select", "close", "menu", "mover", "navegar"],
|
|
628
690
|
setup(e, { emit: n }) {
|
|
629
|
-
const t = e, a = n, { vertical: l, posicion: o } =
|
|
630
|
-
let
|
|
631
|
-
const
|
|
691
|
+
const t = e, a = n, { vertical: l, posicion: o } = he(), s = w(null), u = w(null), m = w(!1), f = w(!1), d = w(!1), L = w({ top: 0, left: 0, right: 0 });
|
|
692
|
+
let z = null, B = null;
|
|
693
|
+
const g = v(() => t.tab.closable !== !1), $ = v(() => t.tab.tooltip ?? t.tab.label), j = v(
|
|
632
694
|
() => t.tab.dirty ? `${t.tab.label} · ${t.dirtyLabel}` : t.tab.label
|
|
633
|
-
), C = v(() => t.tab.label.trim().charAt(0).toUpperCase()),
|
|
634
|
-
() => !!t.tab.dirty && !(
|
|
695
|
+
), C = v(() => t.tab.label.trim().charAt(0).toUpperCase()), y = v(() => m.value || d.value), c = v(
|
|
696
|
+
() => !!t.tab.dirty && !(y.value && g.value)
|
|
635
697
|
), b = v(
|
|
636
|
-
() =>
|
|
698
|
+
() => g.value && (y.value || t.active || !t.tab.dirty)
|
|
637
699
|
), p = v(
|
|
638
700
|
() => l.value && (m.value || f.value || d.value)
|
|
639
701
|
), P = v(() => {
|
|
640
|
-
const
|
|
641
|
-
return o.value === "right" ? { ...
|
|
702
|
+
const N = { position: "fixed", top: `${L.value.top}px`, zIndex: 50 };
|
|
703
|
+
return o.value === "right" ? { ...N, right: `${L.value.right + He}px` } : { ...N, left: `${L.value.left + He}px` };
|
|
642
704
|
});
|
|
643
|
-
function
|
|
644
|
-
const
|
|
645
|
-
if (!
|
|
646
|
-
const k =
|
|
705
|
+
function le() {
|
|
706
|
+
const N = s.value;
|
|
707
|
+
if (!N) return;
|
|
708
|
+
const k = N.getBoundingClientRect();
|
|
647
709
|
L.value = {
|
|
648
710
|
top: k.top,
|
|
649
711
|
left: k.right,
|
|
650
712
|
right: window.innerWidth - k.left
|
|
651
713
|
};
|
|
652
714
|
}
|
|
653
|
-
function U(
|
|
654
|
-
const k =
|
|
715
|
+
function U(N) {
|
|
716
|
+
const k = N.relatedTarget;
|
|
655
717
|
k && u.value?.contains(k) || (d.value = !1);
|
|
656
718
|
}
|
|
657
|
-
function
|
|
658
|
-
m.value = !0,
|
|
719
|
+
function oe() {
|
|
720
|
+
m.value = !0, le();
|
|
659
721
|
}
|
|
660
722
|
function G() {
|
|
661
|
-
f.value = !0,
|
|
723
|
+
f.value = !0, le();
|
|
662
724
|
}
|
|
663
|
-
function
|
|
664
|
-
|
|
725
|
+
function A() {
|
|
726
|
+
z !== null && clearTimeout(z), z = null, B = null;
|
|
665
727
|
}
|
|
666
|
-
function
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
},
|
|
728
|
+
function E(N) {
|
|
729
|
+
N.button === 0 && (B = { x: N.clientX, y: N.clientY }, z = setTimeout(() => {
|
|
730
|
+
B && a("menu", B), A();
|
|
731
|
+
}, Ia));
|
|
670
732
|
}
|
|
671
|
-
function I(
|
|
672
|
-
if (!
|
|
673
|
-
(Math.abs(
|
|
733
|
+
function I(N) {
|
|
734
|
+
if (!B) return;
|
|
735
|
+
(Math.abs(N.clientX - B.x) > qe || Math.abs(N.clientY - B.y) > qe) && A();
|
|
674
736
|
}
|
|
675
|
-
function
|
|
676
|
-
|
|
737
|
+
function de(N) {
|
|
738
|
+
N.button === 1 && g.value && (N.preventDefault(), a("close"));
|
|
677
739
|
}
|
|
678
|
-
function
|
|
679
|
-
|
|
740
|
+
function bt(N) {
|
|
741
|
+
N.preventDefault(), a("menu", { x: N.clientX, y: N.clientY });
|
|
680
742
|
}
|
|
681
|
-
return
|
|
743
|
+
return pe(A), (N, k) => (r(), i("div", {
|
|
682
744
|
ref_key: "raiz",
|
|
683
745
|
ref: s,
|
|
684
746
|
class: h(["group relative flex shrink-0 cursor-pointer items-center gap-2 rounded-corner border border-ui-border transition-colors", [
|
|
685
747
|
e.active ? "bg-primary font-bold text-tx-on-primary" : "bg-ui-bg/80 hover:bg-ui-surface/70",
|
|
686
|
-
|
|
748
|
+
F(l) ? "size-8 justify-center p-0 text-sm" : "w-34 max-w-34 px-3 py-1 text-sm"
|
|
687
749
|
]]),
|
|
688
750
|
role: "tab",
|
|
689
751
|
"aria-selected": e.active,
|
|
690
752
|
title: $.value,
|
|
691
753
|
"aria-label": j.value,
|
|
692
754
|
tabindex: e.tabindex,
|
|
693
|
-
onClick: k[5] || (k[5] =
|
|
755
|
+
onClick: k[5] || (k[5] = V((q) => a("select"), ["stop"])),
|
|
694
756
|
onKeydown: [
|
|
695
|
-
k[6] || (k[6] =
|
|
696
|
-
k[7] || (k[7] =
|
|
697
|
-
k[8] || (k[8] =
|
|
698
|
-
k[9] || (k[9] =
|
|
699
|
-
k[10] || (k[10] =
|
|
700
|
-
k[11] || (k[11] =
|
|
701
|
-
k[12] || (k[12] =
|
|
702
|
-
k[13] || (k[13] =
|
|
703
|
-
k[14] || (k[14] =
|
|
704
|
-
k[15] || (k[15] =
|
|
705
|
-
k[16] || (k[16] =
|
|
706
|
-
k[17] || (k[17] =
|
|
707
|
-
k[18] || (k[18] =
|
|
757
|
+
k[6] || (k[6] = R(V((q) => a("select"), ["stop"]), ["enter"])),
|
|
758
|
+
k[7] || (k[7] = R(V((q) => a("select"), ["prevent", "stop"]), ["space"])),
|
|
759
|
+
k[8] || (k[8] = R(V((q) => a("navegar", "anterior"), ["prevent", "stop"]), ["left"])),
|
|
760
|
+
k[9] || (k[9] = R(V((q) => a("navegar", "anterior"), ["prevent", "stop"]), ["up"])),
|
|
761
|
+
k[10] || (k[10] = R(V((q) => a("navegar", "siguiente"), ["prevent", "stop"]), ["right"])),
|
|
762
|
+
k[11] || (k[11] = R(V((q) => a("navegar", "siguiente"), ["prevent", "stop"]), ["down"])),
|
|
763
|
+
k[12] || (k[12] = R(V((q) => a("navegar", "primera"), ["prevent", "stop"]), ["home"])),
|
|
764
|
+
k[13] || (k[13] = R(V((q) => a("navegar", "ultima"), ["prevent", "stop"]), ["end"])),
|
|
765
|
+
k[14] || (k[14] = R(V((q) => a("mover", -1), ["alt", "prevent", "stop"]), ["left"])),
|
|
766
|
+
k[15] || (k[15] = R(V((q) => a("mover", -1), ["alt", "prevent", "stop"]), ["up"])),
|
|
767
|
+
k[16] || (k[16] = R(V((q) => a("mover", 1), ["alt", "prevent", "stop"]), ["right"])),
|
|
768
|
+
k[17] || (k[17] = R(V((q) => a("mover", 1), ["alt", "prevent", "stop"]), ["down"])),
|
|
769
|
+
k[18] || (k[18] = R(V((q) => g.value && a("close"), ["prevent", "stop"]), ["delete"]))
|
|
708
770
|
],
|
|
709
|
-
onAuxclick:
|
|
710
|
-
onContextmenu:
|
|
711
|
-
onPointerdown:
|
|
771
|
+
onAuxclick: V(de, ["stop"]),
|
|
772
|
+
onContextmenu: bt,
|
|
773
|
+
onPointerdown: E,
|
|
712
774
|
onPointermove: I,
|
|
713
|
-
onPointerup:
|
|
714
|
-
onPointerleave:
|
|
715
|
-
onMouseenter:
|
|
716
|
-
onMouseleave: k[19] || (k[19] = (
|
|
775
|
+
onPointerup: A,
|
|
776
|
+
onPointerleave: A,
|
|
777
|
+
onMouseenter: oe,
|
|
778
|
+
onMouseleave: k[19] || (k[19] = (q) => m.value = !1),
|
|
717
779
|
onFocus: G,
|
|
718
|
-
onBlur: k[20] || (k[20] = (
|
|
780
|
+
onBlur: k[20] || (k[20] = (q) => f.value = !1)
|
|
719
781
|
}, [
|
|
720
|
-
e.tab.icon ? (r(),
|
|
782
|
+
e.tab.icon ? (r(), Y(H, {
|
|
721
783
|
key: 0,
|
|
722
784
|
name: e.tab.icon,
|
|
723
785
|
size: 16,
|
|
724
786
|
class: "shrink-0"
|
|
725
|
-
}, null, 8, ["name"])) :
|
|
726
|
-
|
|
787
|
+
}, null, 8, ["name"])) : F(l) ? (r(), i("span", Ta, M(C.value), 1)) : x("", !0),
|
|
788
|
+
F(l) ? x("", !0) : (r(), i("span", Aa, M(e.tab.label), 1)),
|
|
727
789
|
c.value ? (r(), i("span", {
|
|
728
790
|
key: 3,
|
|
729
|
-
class: h(["size-2 shrink-0 rounded-full bg-current",
|
|
791
|
+
class: h(["size-2 shrink-0 rounded-full bg-current", F(l) ? "absolute right-0.5 top-0.5" : ""]),
|
|
730
792
|
"aria-hidden": "true"
|
|
731
|
-
}, null, 2)) : b.value && !
|
|
793
|
+
}, null, 2)) : b.value && !F(l) ? (r(), i("button", {
|
|
732
794
|
key: 4,
|
|
733
795
|
type: "button",
|
|
734
796
|
class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
|
|
735
797
|
title: e.closeLabel,
|
|
736
798
|
"aria-label": `${e.closeLabel}: ${j.value}`,
|
|
737
|
-
onClick: k[0] || (k[0] =
|
|
799
|
+
onClick: k[0] || (k[0] = V((q) => a("close"), ["stop"]))
|
|
738
800
|
}, [
|
|
739
801
|
O(H, {
|
|
740
802
|
name: "gtk-close",
|
|
741
803
|
type: "symbol",
|
|
742
804
|
size: 12
|
|
743
805
|
})
|
|
744
|
-
], 8,
|
|
745
|
-
(r(),
|
|
746
|
-
O(
|
|
806
|
+
], 8, Ba)) : x("", !0),
|
|
807
|
+
(r(), Y(ye, { to: "body" }, [
|
|
808
|
+
O(ke, {
|
|
747
809
|
"enter-active-class": "transition duration-150 ease-out",
|
|
748
810
|
"enter-from-class": "opacity-0 scale-95",
|
|
749
811
|
"leave-active-class": "transition duration-100 ease-in",
|
|
@@ -755,36 +817,36 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
755
817
|
class: h(["flex items-center gap-2 rounded-corner border border-ui-border bg-ui-surface/95 px-3 py-1 text-sm shadow-lg", e.active ? "font-bold" : ""]),
|
|
756
818
|
ref_key: "desplegadoRef",
|
|
757
819
|
ref: u,
|
|
758
|
-
style:
|
|
759
|
-
onMouseenter: k[2] || (k[2] = (
|
|
760
|
-
onMouseleave: k[3] || (k[3] = (
|
|
761
|
-
onFocusin: k[4] || (k[4] = (
|
|
820
|
+
style: fe(P.value),
|
|
821
|
+
onMouseenter: k[2] || (k[2] = (q) => d.value = !0),
|
|
822
|
+
onMouseleave: k[3] || (k[3] = (q) => d.value = !1),
|
|
823
|
+
onFocusin: k[4] || (k[4] = (q) => d.value = !0),
|
|
762
824
|
onFocusout: U
|
|
763
825
|
}, [
|
|
764
|
-
T("span",
|
|
765
|
-
e.tab.dirty ? (r(), i("span",
|
|
766
|
-
|
|
826
|
+
T("span", Sa, M(e.tab.label), 1),
|
|
827
|
+
e.tab.dirty ? (r(), i("span", Ma)) : x("", !0),
|
|
828
|
+
g.value ? (r(), i("button", {
|
|
767
829
|
key: 1,
|
|
768
830
|
type: "button",
|
|
769
831
|
class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
|
|
770
832
|
title: e.closeLabel,
|
|
771
833
|
"aria-label": `${e.closeLabel}: ${j.value}`,
|
|
772
|
-
onClick: k[1] || (k[1] =
|
|
834
|
+
onClick: k[1] || (k[1] = V((q) => a("close"), ["stop"]))
|
|
773
835
|
}, [
|
|
774
836
|
O(H, {
|
|
775
837
|
name: "gtk-close",
|
|
776
838
|
type: "symbol",
|
|
777
839
|
size: 12
|
|
778
840
|
})
|
|
779
|
-
], 8,
|
|
841
|
+
], 8, Va)) : x("", !0)
|
|
780
842
|
], 38)) : x("", !0)
|
|
781
843
|
]),
|
|
782
844
|
_: 1
|
|
783
845
|
})
|
|
784
846
|
]))
|
|
785
|
-
], 42,
|
|
847
|
+
], 42, Da));
|
|
786
848
|
}
|
|
787
|
-
}),
|
|
849
|
+
}), Oa = ["aria-orientation"], ja = ["draggable", "onDragstart", "onDragover", "onDrop"], Pa = ["title", "aria-label"], Ra = /* @__PURE__ */ D({
|
|
788
850
|
__name: "TabBar",
|
|
789
851
|
props: {
|
|
790
852
|
tabs: {},
|
|
@@ -796,40 +858,40 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
796
858
|
},
|
|
797
859
|
emits: ["update:modelValue", "select", "close", "new", "reorder", "menu"],
|
|
798
860
|
setup(e, { emit: n }) {
|
|
799
|
-
const t = e, a = n, { vertical: l } =
|
|
800
|
-
function f(
|
|
801
|
-
a("update:modelValue",
|
|
861
|
+
const t = e, a = n, { vertical: l } = he(), o = w(null), s = w(0), u = w(null), m = w(null);
|
|
862
|
+
function f(y) {
|
|
863
|
+
a("update:modelValue", y), a("select", y);
|
|
802
864
|
}
|
|
803
|
-
async function d(
|
|
865
|
+
async function d(y, c) {
|
|
804
866
|
const b = t.tabs.length - 1;
|
|
805
867
|
if (b < 0) return;
|
|
806
|
-
const p = c === "primera" ? 0 : c === "ultima" ? b : c === "anterior" ? (
|
|
807
|
-
s.value = p, await
|
|
868
|
+
const p = c === "primera" ? 0 : c === "ultima" ? b : c === "anterior" ? (y - 1 + t.tabs.length) % t.tabs.length : (y + 1) % t.tabs.length;
|
|
869
|
+
s.value = p, await X(), o.value?.querySelectorAll('[role="tab"]')?.[p]?.focus();
|
|
808
870
|
}
|
|
809
|
-
function L(
|
|
871
|
+
function L(y, c) {
|
|
810
872
|
if (t.fixedOrder) return;
|
|
811
|
-
const b =
|
|
873
|
+
const b = y + c;
|
|
812
874
|
if (b < 0 || b >= t.tabs.length) return;
|
|
813
|
-
const p = [...t.tabs], [P] = p.splice(
|
|
875
|
+
const p = [...t.tabs], [P] = p.splice(y, 1);
|
|
814
876
|
P && (p.splice(b, 0, P), s.value = b, a("reorder", p));
|
|
815
877
|
}
|
|
816
|
-
function
|
|
878
|
+
function z(y) {
|
|
817
879
|
const c = o.value;
|
|
818
880
|
if (!c) return;
|
|
819
|
-
const b =
|
|
820
|
-
l.value ? c.scrollTop += b : c.scrollLeft += b, (l.value ? c.scrollTop : c.scrollLeft) !== p &&
|
|
881
|
+
const b = y.deltaY || y.deltaX || 0, p = l.value ? c.scrollTop : c.scrollLeft;
|
|
882
|
+
l.value ? c.scrollTop += b : c.scrollLeft += b, (l.value ? c.scrollTop : c.scrollLeft) !== p && y.preventDefault();
|
|
821
883
|
}
|
|
822
|
-
function
|
|
823
|
-
t.fixedOrder || (u.value =
|
|
884
|
+
function B(y, c) {
|
|
885
|
+
t.fixedOrder || (u.value = y, c.dataTransfer?.setData("text/plain", String(y)), c.dataTransfer && (c.dataTransfer.effectAllowed = "move"));
|
|
824
886
|
}
|
|
825
|
-
function y
|
|
826
|
-
t.fixedOrder || u.value === null || (c.preventDefault(), m.value =
|
|
887
|
+
function g(y, c) {
|
|
888
|
+
t.fixedOrder || u.value === null || (c.preventDefault(), m.value = y, c.dataTransfer && (c.dataTransfer.dropEffect = "move"));
|
|
827
889
|
}
|
|
828
|
-
function $(
|
|
890
|
+
function $(y) {
|
|
829
891
|
const c = u.value;
|
|
830
|
-
if (j(), t.fixedOrder || c === null || c ===
|
|
892
|
+
if (j(), t.fixedOrder || c === null || c === y) return;
|
|
831
893
|
const b = [...t.tabs], [p] = b.splice(c, 1);
|
|
832
|
-
p && (b.splice(
|
|
894
|
+
p && (b.splice(y, 0, p), a("reorder", b));
|
|
833
895
|
}
|
|
834
896
|
function j() {
|
|
835
897
|
u.value = null, m.value = null;
|
|
@@ -837,30 +899,30 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
837
899
|
const C = v(
|
|
838
900
|
() => 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"
|
|
839
901
|
);
|
|
840
|
-
return (
|
|
841
|
-
class: h(["flex min-h-0 min-w-0 items-center gap-1",
|
|
902
|
+
return (y, c) => (r(), i("div", {
|
|
903
|
+
class: h(["flex min-h-0 min-w-0 items-center gap-1", F(l) ? "w-full flex-col" : "h-full"]),
|
|
842
904
|
role: "tablist",
|
|
843
|
-
"aria-orientation":
|
|
905
|
+
"aria-orientation": F(l) ? "vertical" : "horizontal"
|
|
844
906
|
}, [
|
|
845
907
|
T("div", {
|
|
846
908
|
ref_key: "carril",
|
|
847
909
|
ref: o,
|
|
848
910
|
class: h(C.value),
|
|
849
|
-
onWheel:
|
|
911
|
+
onWheel: z
|
|
850
912
|
}, [
|
|
851
|
-
(r(!0), i(
|
|
913
|
+
(r(!0), i(te, null, ue(e.tabs, (b, p) => (r(), i("div", {
|
|
852
914
|
key: b.id,
|
|
853
915
|
class: h(["transition-opacity", [
|
|
854
916
|
u.value === p ? "opacity-40" : "",
|
|
855
917
|
m.value === p && u.value !== p ? "ring-2 ring-secondary rounded-corner" : ""
|
|
856
918
|
]]),
|
|
857
919
|
draggable: !e.fixedOrder,
|
|
858
|
-
onDragstart: (P) =>
|
|
859
|
-
onDragover: (P) =>
|
|
860
|
-
onDrop:
|
|
920
|
+
onDragstart: (P) => B(p, P),
|
|
921
|
+
onDragover: (P) => g(p, P),
|
|
922
|
+
onDrop: V((P) => $(p), ["prevent"]),
|
|
861
923
|
onDragend: j
|
|
862
924
|
}, [
|
|
863
|
-
O(
|
|
925
|
+
O(nt, {
|
|
864
926
|
tab: b,
|
|
865
927
|
active: b.id === e.modelValue,
|
|
866
928
|
"close-label": e.closeLabel,
|
|
@@ -872,7 +934,7 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
872
934
|
onNavegar: (P) => d(p, P),
|
|
873
935
|
onMover: (P) => L(p, P)
|
|
874
936
|
}, null, 8, ["tab", "active", "close-label", "dirty-label", "tabindex", "onSelect", "onClose", "onMenu", "onNavegar", "onMover"])
|
|
875
|
-
], 42,
|
|
937
|
+
], 42, ja))), 128))
|
|
876
938
|
], 34),
|
|
877
939
|
e.newLabel ? (r(), i("button", {
|
|
878
940
|
key: 0,
|
|
@@ -887,10 +949,10 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
887
949
|
type: "symbol",
|
|
888
950
|
size: 14
|
|
889
951
|
})
|
|
890
|
-
], 8,
|
|
891
|
-
], 10,
|
|
952
|
+
], 8, Pa)) : x("", !0)
|
|
953
|
+
], 10, Oa));
|
|
892
954
|
}
|
|
893
|
-
}),
|
|
955
|
+
}), Fa = ["id", "aria-label", "type", "value", "placeholder", "disabled", "readonly", "required", "aria-describedby", "autocomplete", "aria-invalid"], lt = /* @__PURE__ */ D({
|
|
894
956
|
__name: "TextInput",
|
|
895
957
|
props: {
|
|
896
958
|
modelValue: {},
|
|
@@ -945,11 +1007,11 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
945
1007
|
class: h(f.value),
|
|
946
1008
|
onInput: o,
|
|
947
1009
|
onChange: s,
|
|
948
|
-
onKeyup: L[0] || (L[0] = (
|
|
949
|
-
onKeydown: L[1] || (L[1] = (
|
|
950
|
-
}, null, 42,
|
|
1010
|
+
onKeyup: L[0] || (L[0] = (z) => l("keyup", z)),
|
|
1011
|
+
onKeydown: L[1] || (L[1] = (z) => l("keydown", z))
|
|
1012
|
+
}, null, 42, Fa));
|
|
951
1013
|
}
|
|
952
|
-
}),
|
|
1014
|
+
}), Na = { class: "pointer-events-none absolute left-2 flex items-center" }, qa = ["aria-label"], Oe = /* @__PURE__ */ D({
|
|
953
1015
|
__name: "SearchField",
|
|
954
1016
|
props: {
|
|
955
1017
|
modelValue: { default: "" },
|
|
@@ -983,27 +1045,27 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
983
1045
|
function L($) {
|
|
984
1046
|
l("update:modelValue", $), !(a.debounce <= 0) && (d(), s = setTimeout(() => l("search", $), a.debounce));
|
|
985
1047
|
}
|
|
986
|
-
function
|
|
1048
|
+
function z() {
|
|
987
1049
|
d(), l("search", a.modelValue);
|
|
988
1050
|
}
|
|
989
|
-
function
|
|
990
|
-
d(), l("update:modelValue", ""), l("clear"),
|
|
1051
|
+
function B() {
|
|
1052
|
+
d(), l("update:modelValue", ""), l("clear"), g();
|
|
991
1053
|
}
|
|
992
|
-
function
|
|
1054
|
+
function g() {
|
|
993
1055
|
return o.value?.enfocar() ?? !1;
|
|
994
1056
|
}
|
|
995
|
-
return n({ enfocar:
|
|
996
|
-
a.autofocus && (await
|
|
997
|
-
}),
|
|
1057
|
+
return n({ enfocar: g }), J(async () => {
|
|
1058
|
+
a.autofocus && (await X(), g());
|
|
1059
|
+
}), ve(d), W(
|
|
998
1060
|
() => a.disabled,
|
|
999
1061
|
($) => {
|
|
1000
1062
|
$ && d();
|
|
1001
1063
|
}
|
|
1002
1064
|
), ($, j) => (r(), i("div", {
|
|
1003
1065
|
class: "relative flex items-center",
|
|
1004
|
-
onKeydown:
|
|
1066
|
+
onKeydown: R(z, ["enter"])
|
|
1005
1067
|
}, [
|
|
1006
|
-
T("span",
|
|
1068
|
+
T("span", Na, [
|
|
1007
1069
|
O(H, {
|
|
1008
1070
|
name: e.busy ? "content-loading" : "system-search",
|
|
1009
1071
|
type: "symbol",
|
|
@@ -1011,7 +1073,7 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
1011
1073
|
class: h(e.busy ? "animate-spin opacity-70" : "opacity-60")
|
|
1012
1074
|
}, null, 8, ["name", "class"])
|
|
1013
1075
|
]),
|
|
1014
|
-
O(
|
|
1076
|
+
O(lt, ce({
|
|
1015
1077
|
ref_key: "campo",
|
|
1016
1078
|
ref: o,
|
|
1017
1079
|
type: "search",
|
|
@@ -1029,9 +1091,9 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
1029
1091
|
type: "button",
|
|
1030
1092
|
class: "absolute right-1 flex size-6 items-center justify-center rounded-corner text-tx-muted hover:bg-ui-surface",
|
|
1031
1093
|
"aria-label": e.label ? `${e.label}: vaciar` : "Vaciar",
|
|
1032
|
-
onMousedown: j[1] || (j[1] =
|
|
1094
|
+
onMousedown: j[1] || (j[1] = V(() => {
|
|
1033
1095
|
}, ["prevent"])),
|
|
1034
|
-
onClick:
|
|
1096
|
+
onClick: B
|
|
1035
1097
|
}, [
|
|
1036
1098
|
O(H, {
|
|
1037
1099
|
name: "gtk-close",
|
|
@@ -1039,10 +1101,10 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
1039
1101
|
size: 12,
|
|
1040
1102
|
alt: ""
|
|
1041
1103
|
})
|
|
1042
|
-
], 40,
|
|
1104
|
+
], 40, qa)) : x("", !0)
|
|
1043
1105
|
], 32));
|
|
1044
1106
|
}
|
|
1045
|
-
}),
|
|
1107
|
+
}), Ha = ["title", "aria-label", "aria-expanded"], Ua = /* @__PURE__ */ D({
|
|
1046
1108
|
__name: "BarSearch",
|
|
1047
1109
|
props: {
|
|
1048
1110
|
modelValue: { default: "" },
|
|
@@ -1054,24 +1116,24 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
1054
1116
|
},
|
|
1055
1117
|
emits: ["update:modelValue", "search", "open", "close"],
|
|
1056
1118
|
setup(e, { emit: n }) {
|
|
1057
|
-
const t = e, a = n, { vertical: l, posicion: o } =
|
|
1119
|
+
const t = e, a = n, { vertical: l, posicion: o } = he(), s = w(!1), u = w(null), m = v(() => l.value || t.collapsed), f = v(() => !m.value || s.value), d = v(() => {
|
|
1058
1120
|
if (!m.value) return "";
|
|
1059
|
-
const
|
|
1060
|
-
return o.value === "left" ? `${
|
|
1121
|
+
const g = "absolute z-40 w-64 rounded-corner border border-ui-border bg-ui-surface/95 p-1 shadow-lg";
|
|
1122
|
+
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`;
|
|
1061
1123
|
});
|
|
1062
1124
|
async function L() {
|
|
1063
|
-
s.value = !0, a("open"), await
|
|
1125
|
+
s.value = !0, a("open"), await X(), u.value?.enfocar();
|
|
1064
1126
|
}
|
|
1065
|
-
function
|
|
1127
|
+
function z() {
|
|
1066
1128
|
s.value && (s.value = !1, a("close"));
|
|
1067
1129
|
}
|
|
1068
|
-
function
|
|
1069
|
-
const $ =
|
|
1070
|
-
$ &&
|
|
1130
|
+
function B(g) {
|
|
1131
|
+
const $ = g.relatedTarget;
|
|
1132
|
+
$ && g.currentTarget.contains($) || z();
|
|
1071
1133
|
}
|
|
1072
|
-
return (
|
|
1134
|
+
return (g, $) => (r(), i("div", {
|
|
1073
1135
|
class: "relative flex shrink-0 items-center",
|
|
1074
|
-
onFocusout:
|
|
1136
|
+
onFocusout: B
|
|
1075
1137
|
}, [
|
|
1076
1138
|
m.value ? (r(), i("button", {
|
|
1077
1139
|
key: 0,
|
|
@@ -1080,22 +1142,22 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
1080
1142
|
title: e.label,
|
|
1081
1143
|
"aria-label": e.label,
|
|
1082
1144
|
"aria-expanded": s.value,
|
|
1083
|
-
onMousedown: $[0] || ($[0] =
|
|
1145
|
+
onMousedown: $[0] || ($[0] = V(() => {
|
|
1084
1146
|
}, ["prevent"])),
|
|
1085
|
-
onClick: $[1] || ($[1] = (j) => s.value ?
|
|
1147
|
+
onClick: $[1] || ($[1] = (j) => s.value ? z() : L())
|
|
1086
1148
|
}, [
|
|
1087
1149
|
O(H, {
|
|
1088
1150
|
name: "system-search",
|
|
1089
1151
|
type: "symbol",
|
|
1090
1152
|
size: 14
|
|
1091
1153
|
})
|
|
1092
|
-
], 40,
|
|
1154
|
+
], 40, Ha)) : x("", !0),
|
|
1093
1155
|
f.value ? (r(), i("div", {
|
|
1094
1156
|
key: 1,
|
|
1095
1157
|
class: h(d.value),
|
|
1096
|
-
onKeydown:
|
|
1158
|
+
onKeydown: R(z, ["esc"])
|
|
1097
1159
|
}, [
|
|
1098
|
-
O(
|
|
1160
|
+
O(Oe, {
|
|
1099
1161
|
ref_key: "campo",
|
|
1100
1162
|
ref: u,
|
|
1101
1163
|
"model-value": e.modelValue,
|
|
@@ -1110,10 +1172,10 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
1110
1172
|
], 34)) : x("", !0)
|
|
1111
1173
|
], 32));
|
|
1112
1174
|
}
|
|
1113
|
-
}),
|
|
1175
|
+
}), Ka = ["type", "disabled"], Wa = {
|
|
1114
1176
|
key: 0,
|
|
1115
1177
|
class: "w-4 h-4 animate-spin rounded-full border-2 border-current border-t-transparent"
|
|
1116
|
-
},
|
|
1178
|
+
}, Ga = ["src", "alt"], Qa = { key: 2 }, Ya = ["src", "alt"], Xa = /* @__PURE__ */ D({
|
|
1117
1179
|
__name: "ActionButton",
|
|
1118
1180
|
props: {
|
|
1119
1181
|
label: {},
|
|
@@ -1155,43 +1217,43 @@ const na = ["title", "aria-label"], la = ["title", "aria-label"], oa = ["title",
|
|
|
1155
1217
|
]]),
|
|
1156
1218
|
disabled: t.disabled || t.loading
|
|
1157
1219
|
}, [
|
|
1158
|
-
e.loading ? (r(), i("span",
|
|
1220
|
+
e.loading ? (r(), i("span", Wa)) : x("", !0),
|
|
1159
1221
|
t.iconSrc && !t.iconRight ? (r(), i("img", {
|
|
1160
1222
|
key: 1,
|
|
1161
1223
|
src: t.iconSrc,
|
|
1162
1224
|
alt: t.iconAlt || t.label,
|
|
1163
1225
|
class: "w-4 h-4"
|
|
1164
|
-
}, null, 8,
|
|
1165
|
-
t.label ? (r(), i("span",
|
|
1226
|
+
}, null, 8, Ga)) : x("", !0),
|
|
1227
|
+
t.label ? (r(), i("span", Qa, M(t.label), 1)) : x("", !0),
|
|
1166
1228
|
t.iconSrc && t.iconRight ? (r(), i("img", {
|
|
1167
1229
|
key: 3,
|
|
1168
1230
|
src: t.iconSrc,
|
|
1169
1231
|
alt: t.iconAlt || t.label,
|
|
1170
1232
|
class: "w-4 h-4"
|
|
1171
|
-
}, null, 8,
|
|
1172
|
-
], 10,
|
|
1233
|
+
}, null, 8, Ya)) : x("", !0)
|
|
1234
|
+
], 10, Ka));
|
|
1173
1235
|
}
|
|
1174
|
-
}),
|
|
1236
|
+
}), $e = (e, n) => {
|
|
1175
1237
|
const t = e.__vccOpts || e;
|
|
1176
1238
|
for (const [a, l] of n)
|
|
1177
1239
|
t[a] = l;
|
|
1178
1240
|
return t;
|
|
1179
|
-
},
|
|
1241
|
+
}, Ja = /* @__PURE__ */ $e(Xa, [["__scopeId", "data-v-3c1bd6bd"]]), ot = {
|
|
1180
1242
|
info: "border-ui-border bg-ui-surface/70 text-tx-main",
|
|
1181
1243
|
success: "border-status-success/40 bg-status-success/10 text-tx-main",
|
|
1182
1244
|
warning: "border-status-warning/40 bg-status-warning/10 text-tx-main",
|
|
1183
1245
|
error: "border-status-error/40 bg-status-error/10 text-tx-main"
|
|
1184
1246
|
};
|
|
1185
|
-
function
|
|
1247
|
+
function rt(e) {
|
|
1186
1248
|
return e === "error" ? "alert" : "status";
|
|
1187
1249
|
}
|
|
1188
|
-
const
|
|
1250
|
+
const Za = ["role"], _a = {
|
|
1189
1251
|
key: 0,
|
|
1190
1252
|
class: "mt-0.5"
|
|
1191
|
-
},
|
|
1253
|
+
}, en = { class: "min-w-0 flex-1" }, tn = {
|
|
1192
1254
|
key: 0,
|
|
1193
1255
|
class: "font-semibold"
|
|
1194
|
-
},
|
|
1256
|
+
}, an = /* @__PURE__ */ D({
|
|
1195
1257
|
__name: "AlertMessage",
|
|
1196
1258
|
props: {
|
|
1197
1259
|
tone: { default: "info" },
|
|
@@ -1200,13 +1262,13 @@ const Ma = ["role"], Ia = {
|
|
|
1200
1262
|
iconType: { default: "symbol" }
|
|
1201
1263
|
},
|
|
1202
1264
|
setup(e) {
|
|
1203
|
-
const n = e, t = v(() =>
|
|
1265
|
+
const n = e, t = v(() => ot[n.tone]), a = v(() => rt(n.tone));
|
|
1204
1266
|
return (l, o) => (r(), i("div", {
|
|
1205
1267
|
role: a.value,
|
|
1206
1268
|
"aria-atomic": "true",
|
|
1207
1269
|
class: h(["flex gap-3 rounded-corner border px-4 py-2 text-sm", t.value])
|
|
1208
1270
|
}, [
|
|
1209
|
-
e.icon ? (r(), i("span",
|
|
1271
|
+
e.icon ? (r(), i("span", _a, [
|
|
1210
1272
|
O(H, {
|
|
1211
1273
|
name: e.icon,
|
|
1212
1274
|
type: e.iconType,
|
|
@@ -1214,20 +1276,20 @@ const Ma = ["role"], Ia = {
|
|
|
1214
1276
|
alt: ""
|
|
1215
1277
|
}, null, 8, ["name", "type"])
|
|
1216
1278
|
])) : x("", !0),
|
|
1217
|
-
T("div",
|
|
1218
|
-
e.title ? (r(), i("p",
|
|
1279
|
+
T("div", en, [
|
|
1280
|
+
e.title ? (r(), i("p", tn, M(e.title), 1)) : x("", !0),
|
|
1219
1281
|
T("div", {
|
|
1220
1282
|
class: h(e.title ? "mt-1" : "")
|
|
1221
1283
|
}, [
|
|
1222
1284
|
S(l.$slots, "default")
|
|
1223
1285
|
], 2)
|
|
1224
1286
|
])
|
|
1225
|
-
], 10,
|
|
1287
|
+
], 10, Za));
|
|
1226
1288
|
}
|
|
1227
|
-
}),
|
|
1289
|
+
}), nn = { class: "font-medium text-sm text-tx-main" }, ln = {
|
|
1228
1290
|
key: 0,
|
|
1229
1291
|
class: "text-sm text-tx-muted"
|
|
1230
|
-
},
|
|
1292
|
+
}, on = /* @__PURE__ */ D({
|
|
1231
1293
|
__name: "EmptyState",
|
|
1232
1294
|
props: {
|
|
1233
1295
|
title: {},
|
|
@@ -1246,12 +1308,12 @@ const Ma = ["role"], Ia = {
|
|
|
1246
1308
|
size: 48,
|
|
1247
1309
|
class: "opacity-60"
|
|
1248
1310
|
}, null, 8, ["name", "type"]),
|
|
1249
|
-
T("p",
|
|
1250
|
-
e.note ? (r(), i("p",
|
|
1311
|
+
T("p", nn, M(e.title), 1),
|
|
1312
|
+
e.note ? (r(), i("p", ln, M(e.note), 1)) : x("", !0),
|
|
1251
1313
|
S(n.$slots, "default")
|
|
1252
1314
|
], 2));
|
|
1253
1315
|
}
|
|
1254
|
-
}),
|
|
1316
|
+
}), rn = { class: "text-sm text-tx-muted" }, sn = /* @__PURE__ */ D({
|
|
1255
1317
|
__name: "LoadingState",
|
|
1256
1318
|
props: {
|
|
1257
1319
|
label: {},
|
|
@@ -1264,10 +1326,10 @@ const Ma = ["role"], Ia = {
|
|
|
1264
1326
|
class: h(["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" : ""])
|
|
1265
1327
|
}, [
|
|
1266
1328
|
t[0] || (t[0] = T("span", { class: "h-10 w-10 animate-spin rounded-full border-4 border-ui-border border-t-primary motion-reduce:animate-none" }, null, -1)),
|
|
1267
|
-
T("p",
|
|
1329
|
+
T("p", rn, M(e.label), 1)
|
|
1268
1330
|
], 2));
|
|
1269
1331
|
}
|
|
1270
|
-
}),
|
|
1332
|
+
}), un = ["role"], cn = /* @__PURE__ */ D({
|
|
1271
1333
|
__name: "ToastArea",
|
|
1272
1334
|
props: {
|
|
1273
1335
|
toasts: {},
|
|
@@ -1277,11 +1339,11 @@ const Ma = ["role"], Ia = {
|
|
|
1277
1339
|
const n = e, t = v(
|
|
1278
1340
|
() => n.position === "bottom-center" ? "bottom-4 left-1/2 -translate-x-1/2" : "right-4 bottom-4"
|
|
1279
1341
|
);
|
|
1280
|
-
return (a, l) => (r(),
|
|
1342
|
+
return (a, l) => (r(), Y(ye, { to: "body" }, [
|
|
1281
1343
|
T("div", {
|
|
1282
1344
|
class: h(["pointer-events-none fixed z-60 flex flex-col gap-2", t.value])
|
|
1283
1345
|
}, [
|
|
1284
|
-
O(
|
|
1346
|
+
O(kt, {
|
|
1285
1347
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
1286
1348
|
"leave-active-class": "transition-all duration-200 ease-in",
|
|
1287
1349
|
"enter-from-class": "translate-y-2 opacity-0",
|
|
@@ -1289,26 +1351,26 @@ const Ma = ["role"], Ia = {
|
|
|
1289
1351
|
"move-class": "transition-transform duration-300"
|
|
1290
1352
|
}, {
|
|
1291
1353
|
default: K(() => [
|
|
1292
|
-
(r(!0), i(
|
|
1354
|
+
(r(!0), i(te, null, ue(e.toasts, (o) => (r(), i("div", {
|
|
1293
1355
|
key: o.id,
|
|
1294
|
-
role:
|
|
1356
|
+
role: F(rt)(o.tone ?? "info"),
|
|
1295
1357
|
"aria-atomic": "true",
|
|
1296
|
-
class: h(["pointer-events-auto rounded-corner border px-4 py-2 text-sm shadow-lg backdrop-blur-sm",
|
|
1358
|
+
class: h(["pointer-events-auto rounded-corner border px-4 py-2 text-sm shadow-lg backdrop-blur-sm", F(ot)[o.tone ?? "info"]])
|
|
1297
1359
|
}, [
|
|
1298
1360
|
S(a.$slots, "default", { aviso: o }, () => [
|
|
1299
|
-
|
|
1361
|
+
Me(M(o.message), 1)
|
|
1300
1362
|
])
|
|
1301
|
-
], 10,
|
|
1363
|
+
], 10, un))), 128))
|
|
1302
1364
|
]),
|
|
1303
1365
|
_: 3
|
|
1304
1366
|
})
|
|
1305
1367
|
], 2)
|
|
1306
1368
|
]));
|
|
1307
1369
|
}
|
|
1308
|
-
}),
|
|
1370
|
+
}), dn = ["aria-label", "aria-valuenow"], fn = {
|
|
1309
1371
|
key: 1,
|
|
1310
1372
|
class: "h-full w-full animate-pulse rounded-corner bg-primary motion-reduce:animate-none motion-reduce:bg-primary/40"
|
|
1311
|
-
},
|
|
1373
|
+
}, mn = /* @__PURE__ */ D({
|
|
1312
1374
|
__name: "ProgressBar",
|
|
1313
1375
|
props: {
|
|
1314
1376
|
value: {},
|
|
@@ -1334,43 +1396,43 @@ const Ma = ["role"], Ia = {
|
|
|
1334
1396
|
a.value !== null ? (r(), i("div", {
|
|
1335
1397
|
key: 0,
|
|
1336
1398
|
class: h(["h-full rounded-corner transition-[width] duration-300 ease-out", t[e.tone]]),
|
|
1337
|
-
style:
|
|
1338
|
-
}, null, 6)) : (r(), i("div",
|
|
1339
|
-
], 8,
|
|
1399
|
+
style: fe({ width: `${a.value}%` })
|
|
1400
|
+
}, null, 6)) : (r(), i("div", fn))
|
|
1401
|
+
], 8, dn));
|
|
1340
1402
|
}
|
|
1341
|
-
}),
|
|
1342
|
-
function
|
|
1403
|
+
}), bn = /[/\-_.]/;
|
|
1404
|
+
function ze(e, n) {
|
|
1343
1405
|
if (!n) return 100;
|
|
1344
1406
|
const t = n.toLowerCase();
|
|
1345
|
-
return t === e ? 0 : t.startsWith(e) ? 10 : t.split(
|
|
1407
|
+
return t === e ? 0 : t.startsWith(e) ? 10 : t.split(bn).some((a) => a.startsWith(e)) ? 30 : t.includes(e) ? 40 : 100;
|
|
1346
1408
|
}
|
|
1347
|
-
function
|
|
1409
|
+
function vn(e, n) {
|
|
1348
1410
|
const t = n.trim().toLowerCase();
|
|
1349
1411
|
if (!t) return e;
|
|
1350
1412
|
const a = [];
|
|
1351
1413
|
for (let l = 0; l < e.length; l++) {
|
|
1352
|
-
const o = e[l], s =
|
|
1414
|
+
const o = e[l], s = ze(t, o.valor), u = ze(t, o.etiqueta), m = u === 10 ? 20 : u, d = ze(t, o.detalle) === 100 ? 100 : 40, L = Math.min(s, m, d);
|
|
1353
1415
|
L !== 100 && a.push({ opcion: o, rango: L, orden: l });
|
|
1354
1416
|
}
|
|
1355
1417
|
return a.sort((l, o) => l.rango - o.rango || l.orden - o.orden), a.map((l) => l.opcion);
|
|
1356
1418
|
}
|
|
1357
|
-
let
|
|
1358
|
-
function
|
|
1359
|
-
return
|
|
1419
|
+
let Ue = 0;
|
|
1420
|
+
function pn() {
|
|
1421
|
+
return Ue += 1, `vsk-lista-${Ue}`;
|
|
1360
1422
|
}
|
|
1361
|
-
const
|
|
1423
|
+
const gn = ["disabled", "aria-label", "aria-expanded"], yn = { class: "min-w-0 flex-1 truncate" }, hn = {
|
|
1362
1424
|
key: 0,
|
|
1363
1425
|
class: "ml-2 text-tx-muted text-xs"
|
|
1364
|
-
},
|
|
1426
|
+
}, xn = { class: "border-ui-border border-b p-2" }, wn = ["id"], kn = {
|
|
1365
1427
|
key: 0,
|
|
1366
1428
|
class: "p-3 text-center text-tx-muted text-xs"
|
|
1367
|
-
},
|
|
1429
|
+
}, $n = ["id", "data-indice", "aria-selected"], Cn = { class: "min-w-0 flex-1 truncate" }, En = {
|
|
1368
1430
|
key: 0,
|
|
1369
1431
|
class: "shrink-0 text-tx-muted text-xs"
|
|
1370
|
-
},
|
|
1432
|
+
}, Ln = {
|
|
1371
1433
|
key: 1,
|
|
1372
1434
|
class: "px-2 py-1 text-tx-muted text-xs"
|
|
1373
|
-
},
|
|
1435
|
+
}, zn = /* @__PURE__ */ D({
|
|
1374
1436
|
__name: "SearchSelect",
|
|
1375
1437
|
props: {
|
|
1376
1438
|
modelValue: {},
|
|
@@ -1385,65 +1447,65 @@ const Za = ["disabled", "aria-label", "aria-expanded"], _a = { class: "min-w-0 f
|
|
|
1385
1447
|
},
|
|
1386
1448
|
emits: ["update:modelValue"],
|
|
1387
1449
|
setup(e, { emit: n }) {
|
|
1388
|
-
const t = e, a = n, l = w(""), o = w(!1), s = w(0), u = w(null), m = w(null), f = w(null), d =
|
|
1389
|
-
() => t.options.find((
|
|
1390
|
-
),
|
|
1391
|
-
() =>
|
|
1450
|
+
const t = e, a = n, l = w(""), o = w(!1), s = w(0), u = w(null), m = w(null), f = w(null), d = pn(), L = v(
|
|
1451
|
+
() => t.options.find((A) => A.valor === t.modelValue) ?? null
|
|
1452
|
+
), z = v(() => vn(t.options, l.value)), B = v(() => z.value.slice(0, t.limit)), g = v(() => Math.max(0, z.value.length - t.limit)), $ = v(
|
|
1453
|
+
() => B.value.length > 0 ? `${d}-${s.value}` : void 0
|
|
1392
1454
|
);
|
|
1393
|
-
function j(
|
|
1394
|
-
a("update:modelValue",
|
|
1455
|
+
function j(A) {
|
|
1456
|
+
a("update:modelValue", A), y();
|
|
1395
1457
|
}
|
|
1396
1458
|
async function C() {
|
|
1397
1459
|
o.value = !0;
|
|
1398
|
-
const
|
|
1399
|
-
s.value =
|
|
1460
|
+
const A = B.value.findIndex((E) => E.valor === t.modelValue);
|
|
1461
|
+
s.value = A >= 0 ? A : 0, await X(), f.value?.enfocar(), U();
|
|
1400
1462
|
}
|
|
1401
|
-
function
|
|
1402
|
-
o.value && (o.value = !1, l.value = "",
|
|
1463
|
+
function y(A = !0) {
|
|
1464
|
+
o.value && (o.value = !1, l.value = "", A && X(() => m.value?.focus()));
|
|
1403
1465
|
}
|
|
1404
|
-
function c(
|
|
1405
|
-
const
|
|
1406
|
-
|
|
1466
|
+
function c(A) {
|
|
1467
|
+
const E = B.value.length;
|
|
1468
|
+
E !== 0 && (s.value = (s.value + A + E) % E, U());
|
|
1407
1469
|
}
|
|
1408
|
-
function b(
|
|
1409
|
-
s.value =
|
|
1470
|
+
function b(A) {
|
|
1471
|
+
s.value = A, U();
|
|
1410
1472
|
}
|
|
1411
|
-
function p(
|
|
1412
|
-
const
|
|
1413
|
-
if (!
|
|
1414
|
-
const I = Number(
|
|
1473
|
+
function p(A) {
|
|
1474
|
+
const E = A.target?.closest?.("[data-indice]");
|
|
1475
|
+
if (!E) return null;
|
|
1476
|
+
const I = Number(E.getAttribute("data-indice"));
|
|
1415
1477
|
return Number.isInteger(I) ? I : null;
|
|
1416
1478
|
}
|
|
1417
|
-
function P(
|
|
1418
|
-
const
|
|
1479
|
+
function P(A) {
|
|
1480
|
+
const E = p(A), I = E === null ? void 0 : B.value[E];
|
|
1419
1481
|
I && j(I.valor);
|
|
1420
1482
|
}
|
|
1421
|
-
function
|
|
1422
|
-
const
|
|
1423
|
-
|
|
1483
|
+
function le(A) {
|
|
1484
|
+
const E = p(A);
|
|
1485
|
+
E !== null && (s.value = E);
|
|
1424
1486
|
}
|
|
1425
1487
|
function U() {
|
|
1426
|
-
|
|
1488
|
+
X(() => {
|
|
1427
1489
|
u.value?.querySelector(`[data-indice="${s.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
1428
1490
|
});
|
|
1429
1491
|
}
|
|
1430
|
-
function
|
|
1431
|
-
const
|
|
1432
|
-
|
|
1492
|
+
function oe() {
|
|
1493
|
+
const A = B.value[s.value];
|
|
1494
|
+
A && j(A.valor);
|
|
1433
1495
|
}
|
|
1434
1496
|
W(
|
|
1435
1497
|
() => t.disabled,
|
|
1436
|
-
(
|
|
1437
|
-
|
|
1498
|
+
(A) => {
|
|
1499
|
+
A && y(!1);
|
|
1438
1500
|
}
|
|
1439
1501
|
), W(l, () => {
|
|
1440
1502
|
s.value = 0, U();
|
|
1441
1503
|
});
|
|
1442
|
-
function G(
|
|
1443
|
-
const
|
|
1444
|
-
|
|
1504
|
+
function G(A) {
|
|
1505
|
+
const E = A.relatedTarget;
|
|
1506
|
+
E && A.currentTarget.contains(E) || y(!1);
|
|
1445
1507
|
}
|
|
1446
|
-
return (
|
|
1508
|
+
return (A, E) => (r(), i("div", {
|
|
1447
1509
|
class: "relative",
|
|
1448
1510
|
onFocusout: G
|
|
1449
1511
|
}, [
|
|
@@ -1456,15 +1518,15 @@ const Za = ["disabled", "aria-label", "aria-expanded"], _a = { class: "min-w-0 f
|
|
|
1456
1518
|
"aria-label": e.label || void 0,
|
|
1457
1519
|
"aria-expanded": o.value,
|
|
1458
1520
|
"aria-haspopup": "listbox",
|
|
1459
|
-
onClick:
|
|
1521
|
+
onClick: E[0] || (E[0] = (I) => o.value ? y() : C()),
|
|
1460
1522
|
onKeydown: [
|
|
1461
|
-
|
|
1462
|
-
|
|
1523
|
+
E[1] || (E[1] = R(V((I) => o.value ? c(1) : C(), ["prevent"]), ["down"])),
|
|
1524
|
+
E[2] || (E[2] = R(V((I) => o.value ? c(-1) : C(), ["prevent"]), ["up"]))
|
|
1463
1525
|
]
|
|
1464
1526
|
}, [
|
|
1465
|
-
T("span",
|
|
1466
|
-
|
|
1467
|
-
L.value?.detalle ? (r(), i("span",
|
|
1527
|
+
T("span", yn, [
|
|
1528
|
+
Me(M(L.value?.etiqueta ?? e.placeholder) + " ", 1),
|
|
1529
|
+
L.value?.detalle ? (r(), i("span", hn, M(L.value.detalle), 1)) : x("", !0)
|
|
1468
1530
|
]),
|
|
1469
1531
|
O(H, {
|
|
1470
1532
|
name: "go-down",
|
|
@@ -1472,63 +1534,63 @@ const Za = ["disabled", "aria-label", "aria-expanded"], _a = { class: "min-w-0 f
|
|
|
1472
1534
|
size: 12,
|
|
1473
1535
|
class: "shrink-0 opacity-60"
|
|
1474
1536
|
})
|
|
1475
|
-
], 40,
|
|
1537
|
+
], 40, gn),
|
|
1476
1538
|
o.value ? (r(), i("div", {
|
|
1477
1539
|
key: 0,
|
|
1478
1540
|
class: h(["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"]),
|
|
1479
1541
|
onKeydown: [
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1542
|
+
E[4] || (E[4] = R(V((I) => y(), ["prevent"]), ["escape"])),
|
|
1543
|
+
E[5] || (E[5] = R(V((I) => c(1), ["prevent"]), ["down"])),
|
|
1544
|
+
E[6] || (E[6] = R(V((I) => c(-1), ["prevent"]), ["up"])),
|
|
1545
|
+
E[7] || (E[7] = R(V((I) => b(0), ["prevent"]), ["home"])),
|
|
1546
|
+
E[8] || (E[8] = R(V((I) => b(B.value.length - 1), ["prevent"]), ["end"])),
|
|
1547
|
+
E[9] || (E[9] = R(V((I) => oe(), ["prevent"]), ["enter"])),
|
|
1548
|
+
E[10] || (E[10] = R((I) => y(!1), ["tab"]))
|
|
1487
1549
|
],
|
|
1488
1550
|
onClick: P,
|
|
1489
|
-
onMousemove:
|
|
1551
|
+
onMousemove: le
|
|
1490
1552
|
}, [
|
|
1491
|
-
T("div",
|
|
1492
|
-
O(
|
|
1553
|
+
T("div", xn, [
|
|
1554
|
+
O(Oe, {
|
|
1493
1555
|
ref_key: "campo",
|
|
1494
1556
|
ref: f,
|
|
1495
1557
|
modelValue: l.value,
|
|
1496
|
-
"onUpdate:modelValue":
|
|
1558
|
+
"onUpdate:modelValue": E[3] || (E[3] = (I) => l.value = I),
|
|
1497
1559
|
label: e.label,
|
|
1498
1560
|
placeholder: e.searchPlaceholder,
|
|
1499
|
-
"listbox-id":
|
|
1561
|
+
"listbox-id": F(d),
|
|
1500
1562
|
"active-option-id": $.value,
|
|
1501
1563
|
expanded: o.value
|
|
1502
1564
|
}, null, 8, ["modelValue", "label", "placeholder", "listbox-id", "active-option-id", "expanded"])
|
|
1503
1565
|
]),
|
|
1504
1566
|
T("ul", {
|
|
1505
|
-
id:
|
|
1567
|
+
id: F(d),
|
|
1506
1568
|
ref_key: "lista",
|
|
1507
1569
|
ref: u,
|
|
1508
1570
|
role: "listbox",
|
|
1509
1571
|
class: "max-h-56 overflow-y-auto p-1"
|
|
1510
1572
|
}, [
|
|
1511
|
-
|
|
1512
|
-
(r(!0), i(
|
|
1513
|
-
id: `${
|
|
1573
|
+
B.value.length === 0 ? (r(), i("li", kn, M(e.emptyText), 1)) : x("", !0),
|
|
1574
|
+
(r(!0), i(te, null, ue(B.value, (I, de) => (r(), i("li", {
|
|
1575
|
+
id: `${F(d)}-${de}`,
|
|
1514
1576
|
key: I.valor,
|
|
1515
|
-
"data-indice":
|
|
1577
|
+
"data-indice": de,
|
|
1516
1578
|
role: "option",
|
|
1517
1579
|
"aria-selected": I.valor === e.modelValue,
|
|
1518
1580
|
class: h(["flex cursor-pointer items-baseline gap-2 rounded-corner px-2 py-1 text-sm", [
|
|
1519
|
-
|
|
1581
|
+
de === s.value ? "bg-ui-surface" : "",
|
|
1520
1582
|
I.valor === e.modelValue ? "font-medium text-primary" : "text-tx-main"
|
|
1521
1583
|
]])
|
|
1522
1584
|
}, [
|
|
1523
|
-
T("span",
|
|
1524
|
-
I.detalle ? (r(), i("span",
|
|
1525
|
-
], 10,
|
|
1526
|
-
|
|
1527
|
-
], 8,
|
|
1585
|
+
T("span", Cn, M(I.etiqueta), 1),
|
|
1586
|
+
I.detalle ? (r(), i("span", En, M(I.detalle), 1)) : x("", !0)
|
|
1587
|
+
], 10, $n))), 128)),
|
|
1588
|
+
g.value > 0 ? (r(), i("li", Ln, "+" + M(g.value), 1)) : x("", !0)
|
|
1589
|
+
], 8, wn)
|
|
1528
1590
|
], 34)) : x("", !0)
|
|
1529
1591
|
], 32));
|
|
1530
1592
|
}
|
|
1531
|
-
}),
|
|
1593
|
+
}), Dn = { class: "text-base font-semibold m-0 text-primary dark:text-primary-dark" }, Tn = /* @__PURE__ */ D({
|
|
1532
1594
|
__name: "ConfigSection",
|
|
1533
1595
|
props: {
|
|
1534
1596
|
title: {},
|
|
@@ -1539,23 +1601,23 @@ const Za = ["disabled", "aria-label", "aria-expanded"], _a = { class: "min-w-0 f
|
|
|
1539
1601
|
return (n, t) => (r(), i("div", {
|
|
1540
1602
|
class: h(["flex flex-col gap-4 p-4 background rounded-corner", e.customClass])
|
|
1541
1603
|
}, [
|
|
1542
|
-
T("h3",
|
|
1604
|
+
T("h3", Dn, M(e.icon ? `${e.icon} ${e.title}` : e.title), 1),
|
|
1543
1605
|
S(n.$slots, "default", {}, void 0, !0)
|
|
1544
1606
|
], 2));
|
|
1545
1607
|
}
|
|
1546
|
-
}),
|
|
1608
|
+
}), An = /* @__PURE__ */ $e(Tn, [["__scopeId", "data-v-45bd4eab"]]), Bn = { class: "flex items-center gap-3 flex-1 min-w-0" }, Sn = ["src", "alt"], Mn = { class: "min-w-0" }, Vn = { class: "font-semibold truncate" }, In = {
|
|
1547
1609
|
key: 0,
|
|
1548
1610
|
class: "text-xs text-gray-400 truncate"
|
|
1549
|
-
},
|
|
1611
|
+
}, On = {
|
|
1550
1612
|
key: 1,
|
|
1551
1613
|
class: "text-xs text-gray-400 truncate"
|
|
1552
|
-
},
|
|
1614
|
+
}, jn = {
|
|
1553
1615
|
key: 2,
|
|
1554
1616
|
class: "text-xs text-gray-400 flex gap-2 mt-1"
|
|
1555
|
-
},
|
|
1617
|
+
}, Pn = {
|
|
1556
1618
|
key: 1,
|
|
1557
1619
|
class: "w-2 h-2 rounded-full bg-green-500"
|
|
1558
|
-
},
|
|
1620
|
+
}, Rn = /* @__PURE__ */ D({
|
|
1559
1621
|
__name: "DeviceCard",
|
|
1560
1622
|
props: {
|
|
1561
1623
|
icon: {},
|
|
@@ -1581,32 +1643,32 @@ const Za = ["disabled", "aria-label", "aria-expanded"], _a = { class: "min-w-0 f
|
|
|
1581
1643
|
class: h(["flex items-center justify-between background rounded-vsk px-6 py-3 mb-4", [{ "border-l-4 border-green-500": e.isConnected }, e.customClass]]),
|
|
1582
1644
|
onClick: l
|
|
1583
1645
|
}, [
|
|
1584
|
-
T("div",
|
|
1646
|
+
T("div", Bn, [
|
|
1585
1647
|
T("img", {
|
|
1586
1648
|
src: e.icon,
|
|
1587
1649
|
alt: e.title,
|
|
1588
1650
|
class: "h-7 w-7 shrink-0"
|
|
1589
|
-
}, null, 8,
|
|
1590
|
-
T("div",
|
|
1591
|
-
T("div",
|
|
1592
|
-
e.subtitle ? (r(), i("div",
|
|
1593
|
-
e.metadata ? (r(), i("div",
|
|
1594
|
-
e.extraInfo && e.extraInfo.length > 0 ? (r(), i("div",
|
|
1595
|
-
(r(!0), i(
|
|
1651
|
+
}, null, 8, Sn),
|
|
1652
|
+
T("div", Mn, [
|
|
1653
|
+
T("div", Vn, M(e.title), 1),
|
|
1654
|
+
e.subtitle ? (r(), i("div", In, M(e.subtitle), 1)) : x("", !0),
|
|
1655
|
+
e.metadata ? (r(), i("div", On, M(e.metadata), 1)) : x("", !0),
|
|
1656
|
+
e.extraInfo && e.extraInfo.length > 0 ? (r(), i("div", jn, [
|
|
1657
|
+
(r(!0), i(te, null, ue(e.extraInfo, (u, m) => (r(), i("span", { key: m }, M(u), 1))), 128))
|
|
1596
1658
|
])) : x("", !0)
|
|
1597
1659
|
])
|
|
1598
1660
|
]),
|
|
1599
1661
|
e.showActionButton ? (r(), i("button", {
|
|
1600
1662
|
key: 0,
|
|
1601
1663
|
class: "bg-vsk-primary rounded-vsk px-4 py-2 text-sm font-semibold cursor-pointer hover:opacity-70",
|
|
1602
|
-
onClick:
|
|
1603
|
-
},
|
|
1604
|
-
e.showStatusIndicator && e.isConnected ? (r(), i("div",
|
|
1664
|
+
onClick: V(a, ["stop"])
|
|
1665
|
+
}, M(e.actionLabel), 1)) : x("", !0),
|
|
1666
|
+
e.showStatusIndicator && e.isConnected ? (r(), i("div", Pn)) : x("", !0)
|
|
1605
1667
|
], 2));
|
|
1606
1668
|
}
|
|
1607
|
-
}),
|
|
1608
|
-
function
|
|
1609
|
-
const e =
|
|
1669
|
+
}), it = /* @__PURE__ */ Symbol("diálogo de vasak");
|
|
1670
|
+
function st() {
|
|
1671
|
+
const e = we(it, null);
|
|
1610
1672
|
if (e) return e;
|
|
1611
1673
|
const n = w(!1);
|
|
1612
1674
|
return {
|
|
@@ -1619,11 +1681,11 @@ function et() {
|
|
|
1619
1681
|
}
|
|
1620
1682
|
};
|
|
1621
1683
|
}
|
|
1622
|
-
let
|
|
1623
|
-
function
|
|
1624
|
-
return
|
|
1684
|
+
let Ke = 0;
|
|
1685
|
+
function Fn() {
|
|
1686
|
+
return Ke += 1, `vsk-dialogo-titulo-${Ke}`;
|
|
1625
1687
|
}
|
|
1626
|
-
const
|
|
1688
|
+
const Nn = /* @__PURE__ */ D({
|
|
1627
1689
|
__name: "Dialog",
|
|
1628
1690
|
props: {
|
|
1629
1691
|
open: { type: Boolean, default: !1 }
|
|
@@ -1631,7 +1693,7 @@ const $n = /* @__PURE__ */ E({
|
|
|
1631
1693
|
emits: ["update:open"],
|
|
1632
1694
|
setup(e, { emit: n }) {
|
|
1633
1695
|
const t = e, a = n, l = w(null);
|
|
1634
|
-
return
|
|
1696
|
+
return ge(it, {
|
|
1635
1697
|
abierto: v(() => t.open),
|
|
1636
1698
|
cerrar: () => a("update:open", !1),
|
|
1637
1699
|
idDelTitulo: l,
|
|
@@ -1640,10 +1702,10 @@ const $n = /* @__PURE__ */ E({
|
|
|
1640
1702
|
}
|
|
1641
1703
|
}), (o, s) => S(o.$slots, "default");
|
|
1642
1704
|
}
|
|
1643
|
-
}),
|
|
1705
|
+
}), qn = {
|
|
1644
1706
|
key: 0,
|
|
1645
1707
|
class: "absolute inset-0 rounded-corner-window bg-ui-border-dark/40"
|
|
1646
|
-
},
|
|
1708
|
+
}, Hn = ["aria-labelledby", "aria-label"], Un = "relative z-10 w-full rounded-corner border border-ui-border bg-ui-bg/80 p-6 text-tx-main shadow-lg", Kn = /* @__PURE__ */ D({
|
|
1647
1709
|
inheritAttrs: !1,
|
|
1648
1710
|
__name: "DialogContent",
|
|
1649
1711
|
props: {
|
|
@@ -1651,36 +1713,36 @@ const $n = /* @__PURE__ */ E({
|
|
|
1651
1713
|
ariaLabel: {}
|
|
1652
1714
|
},
|
|
1653
1715
|
setup(e) {
|
|
1654
|
-
const n = e, t =
|
|
1655
|
-
const { class: C, ...
|
|
1656
|
-
return
|
|
1657
|
-
}), o = v(() => n.size === "full" ? "relative z-10 h-full w-full overflow-hidden rounded-corner-window text-tx-main" : `${
|
|
1716
|
+
const n = e, t = Be(), a = v(() => t.class ?? ""), l = v(() => {
|
|
1717
|
+
const { class: C, ...y } = t;
|
|
1718
|
+
return y;
|
|
1719
|
+
}), o = v(() => n.size === "full" ? "relative z-10 h-full w-full overflow-hidden rounded-corner-window text-tx-main" : `${Un} ${n.size === "lg" ? "max-w-2xl" : "max-w-lg"}`), s = st(), u = v(() => s.abierto.value), m = w(null), f = w(null);
|
|
1658
1720
|
let d = null;
|
|
1659
1721
|
function L() {
|
|
1660
1722
|
return f.value ? [...f.value.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')] : [];
|
|
1661
1723
|
}
|
|
1662
|
-
function
|
|
1724
|
+
function z(C) {
|
|
1663
1725
|
if (C.key === "Escape") {
|
|
1664
1726
|
s.cerrar();
|
|
1665
1727
|
return;
|
|
1666
1728
|
}
|
|
1667
1729
|
if (C.key !== "Tab") return;
|
|
1668
|
-
const
|
|
1669
|
-
if (
|
|
1730
|
+
const y = L();
|
|
1731
|
+
if (y.length === 0) {
|
|
1670
1732
|
C.preventDefault(), f.value?.focus();
|
|
1671
1733
|
return;
|
|
1672
1734
|
}
|
|
1673
|
-
const c =
|
|
1735
|
+
const c = y[0], b = y[y.length - 1], p = document.activeElement;
|
|
1674
1736
|
C.shiftKey && (p === c || p === f.value) ? (C.preventDefault(), b.focus()) : !C.shiftKey && p === b && (C.preventDefault(), c.focus());
|
|
1675
1737
|
}
|
|
1676
|
-
function
|
|
1738
|
+
function B(C) {
|
|
1677
1739
|
C.target === C.currentTarget && s.cerrar();
|
|
1678
1740
|
}
|
|
1679
|
-
function
|
|
1680
|
-
m.value?.contains(C.target) ||
|
|
1741
|
+
function g(C) {
|
|
1742
|
+
m.value?.contains(C.target) || z(C);
|
|
1681
1743
|
}
|
|
1682
1744
|
function $() {
|
|
1683
|
-
document.removeEventListener("keydown",
|
|
1745
|
+
document.removeEventListener("keydown", g);
|
|
1684
1746
|
}
|
|
1685
1747
|
function j() {
|
|
1686
1748
|
const C = d;
|
|
@@ -1690,7 +1752,7 @@ const $n = /* @__PURE__ */ E({
|
|
|
1690
1752
|
u,
|
|
1691
1753
|
async (C) => {
|
|
1692
1754
|
if (C) {
|
|
1693
|
-
d = document.activeElement, document.addEventListener("keydown",
|
|
1755
|
+
d = document.activeElement, document.addEventListener("keydown", g), await X(), f.value?.focus();
|
|
1694
1756
|
return;
|
|
1695
1757
|
}
|
|
1696
1758
|
$(), j();
|
|
@@ -1699,10 +1761,10 @@ const $n = /* @__PURE__ */ E({
|
|
|
1699
1761
|
// abierto —una vista que arranca preguntando algo—. Sin esto, ése no recibe
|
|
1700
1762
|
// el foco y ni Escape ni el Tab hacen nada: el `aria-modal` queda en promesa.
|
|
1701
1763
|
{ immediate: !0 }
|
|
1702
|
-
),
|
|
1764
|
+
), ve(() => {
|
|
1703
1765
|
$(), j();
|
|
1704
|
-
}), (C,
|
|
1705
|
-
O(
|
|
1766
|
+
}), (C, y) => (r(), Y(ye, { to: "body" }, [
|
|
1767
|
+
O(ke, {
|
|
1706
1768
|
"enter-active-class": "transition-opacity duration-200 ease-out",
|
|
1707
1769
|
"leave-active-class": "transition-opacity duration-150 ease-in",
|
|
1708
1770
|
"enter-from-class": "opacity-0",
|
|
@@ -1714,64 +1776,64 @@ const $n = /* @__PURE__ */ E({
|
|
|
1714
1776
|
ref_key: "velo",
|
|
1715
1777
|
ref: m,
|
|
1716
1778
|
class: "fixed inset-0 z-50 flex items-center justify-center",
|
|
1717
|
-
onClick:
|
|
1718
|
-
onKeydown:
|
|
1779
|
+
onClick: B,
|
|
1780
|
+
onKeydown: z
|
|
1719
1781
|
}, [
|
|
1720
|
-
n.size === "md" ? (r(), i("div",
|
|
1721
|
-
T("div",
|
|
1782
|
+
n.size === "md" ? (r(), i("div", qn)) : x("", !0),
|
|
1783
|
+
T("div", ce({
|
|
1722
1784
|
ref_key: "panel",
|
|
1723
1785
|
ref: f,
|
|
1724
1786
|
tabindex: "-1",
|
|
1725
1787
|
role: "dialog",
|
|
1726
1788
|
"aria-modal": "true",
|
|
1727
|
-
"aria-labelledby":
|
|
1728
|
-
"aria-label":
|
|
1789
|
+
"aria-labelledby": F(s).idDelTitulo.value ?? void 0,
|
|
1790
|
+
"aria-label": F(s).idDelTitulo.value ? void 0 : e.ariaLabel
|
|
1729
1791
|
}, l.value, {
|
|
1730
1792
|
class: [a.value, o.value]
|
|
1731
1793
|
}), [
|
|
1732
1794
|
S(C.$slots, "default")
|
|
1733
|
-
], 16,
|
|
1795
|
+
], 16, Hn)
|
|
1734
1796
|
], 544)) : x("", !0)
|
|
1735
1797
|
]),
|
|
1736
1798
|
_: 3
|
|
1737
1799
|
})
|
|
1738
1800
|
]));
|
|
1739
1801
|
}
|
|
1740
|
-
}),
|
|
1802
|
+
}), Wn = { class: "text-sm text-tx-muted" }, Gn = /* @__PURE__ */ D({
|
|
1741
1803
|
__name: "DialogDescription",
|
|
1742
1804
|
setup(e) {
|
|
1743
|
-
return (n, t) => (r(), i("p",
|
|
1805
|
+
return (n, t) => (r(), i("p", Wn, [
|
|
1744
1806
|
S(n.$slots, "default")
|
|
1745
1807
|
]));
|
|
1746
1808
|
}
|
|
1747
|
-
}),
|
|
1809
|
+
}), Qn = { class: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end" }, Yn = /* @__PURE__ */ D({
|
|
1748
1810
|
__name: "DialogFooter",
|
|
1749
1811
|
setup(e) {
|
|
1750
|
-
return (n, t) => (r(), i("div",
|
|
1812
|
+
return (n, t) => (r(), i("div", Qn, [
|
|
1751
1813
|
S(n.$slots, "default")
|
|
1752
1814
|
]));
|
|
1753
1815
|
}
|
|
1754
|
-
}),
|
|
1816
|
+
}), Xn = { class: "flex flex-col gap-1.5 text-center sm:text-left" }, Jn = /* @__PURE__ */ D({
|
|
1755
1817
|
__name: "DialogHeader",
|
|
1756
1818
|
setup(e) {
|
|
1757
|
-
return (n, t) => (r(), i("div",
|
|
1819
|
+
return (n, t) => (r(), i("div", Xn, [
|
|
1758
1820
|
S(n.$slots, "default")
|
|
1759
1821
|
]));
|
|
1760
1822
|
}
|
|
1761
|
-
}),
|
|
1823
|
+
}), Zn = ["id"], _n = /* @__PURE__ */ D({
|
|
1762
1824
|
__name: "DialogTitle",
|
|
1763
1825
|
setup(e) {
|
|
1764
|
-
const n =
|
|
1765
|
-
return
|
|
1766
|
-
id:
|
|
1826
|
+
const n = st(), t = Fn();
|
|
1827
|
+
return J(() => n.ponerElTitulo(t)), ve(() => n.ponerElTitulo(null)), (a, l) => (r(), i("h2", {
|
|
1828
|
+
id: F(t),
|
|
1767
1829
|
class: "font-semibold text-lg leading-none tracking-tight"
|
|
1768
1830
|
}, [
|
|
1769
1831
|
S(a.$slots, "default")
|
|
1770
|
-
], 8,
|
|
1832
|
+
], 8, Zn));
|
|
1771
1833
|
}
|
|
1772
|
-
}),
|
|
1773
|
-
function
|
|
1774
|
-
const e =
|
|
1834
|
+
}), ut = /* @__PURE__ */ Symbol("menú de vasak");
|
|
1835
|
+
function Ce() {
|
|
1836
|
+
const e = we(ut, null);
|
|
1775
1837
|
if (e) return e;
|
|
1776
1838
|
const n = w(!1);
|
|
1777
1839
|
return {
|
|
@@ -1795,70 +1857,70 @@ function he() {
|
|
|
1795
1857
|
}
|
|
1796
1858
|
};
|
|
1797
1859
|
}
|
|
1798
|
-
let
|
|
1799
|
-
function
|
|
1800
|
-
return
|
|
1860
|
+
let We = 0;
|
|
1861
|
+
function ct() {
|
|
1862
|
+
return We += 1, `vsk-menu-${We}`;
|
|
1801
1863
|
}
|
|
1802
|
-
const
|
|
1864
|
+
const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
1803
1865
|
__name: "DropdownMenu",
|
|
1804
1866
|
props: {
|
|
1805
1867
|
open: { type: Boolean, default: void 0 }
|
|
1806
1868
|
},
|
|
1807
1869
|
emits: ["update:open"],
|
|
1808
1870
|
setup(e, { emit: n }) {
|
|
1809
|
-
const t = e, a = n, l = w(!1), o = w(null), s = w(null), u = w("ninguno"), m =
|
|
1871
|
+
const t = e, a = n, l = w(!1), o = w(null), s = w(null), u = w("ninguno"), m = ct();
|
|
1810
1872
|
let f = null;
|
|
1811
1873
|
const d = v({
|
|
1812
1874
|
get: () => t.open ?? l.value,
|
|
1813
|
-
set: (
|
|
1814
|
-
t.open === void 0 && (l.value =
|
|
1875
|
+
set: (g) => {
|
|
1876
|
+
t.open === void 0 && (l.value = g), a("update:open", g);
|
|
1815
1877
|
}
|
|
1816
1878
|
});
|
|
1817
|
-
W(d, (
|
|
1818
|
-
if (
|
|
1879
|
+
W(d, (g) => {
|
|
1880
|
+
if (g) {
|
|
1819
1881
|
const $ = document.activeElement;
|
|
1820
1882
|
f = $ instanceof HTMLElement ? $ : null;
|
|
1821
1883
|
} else
|
|
1822
1884
|
u.value = "ninguno";
|
|
1823
1885
|
});
|
|
1824
|
-
function L(
|
|
1825
|
-
u.value =
|
|
1886
|
+
function L(g = "ninguno") {
|
|
1887
|
+
u.value = g, d.value = !0;
|
|
1826
1888
|
}
|
|
1827
|
-
function
|
|
1828
|
-
if (d.value = !1, !
|
|
1889
|
+
function z(g = {}) {
|
|
1890
|
+
if (d.value = !1, !g.devolverElFoco) return;
|
|
1829
1891
|
const $ = f ?? o.value;
|
|
1830
1892
|
$?.isConnected && $.focus();
|
|
1831
1893
|
}
|
|
1832
|
-
function
|
|
1894
|
+
function B(g = "ninguno") {
|
|
1833
1895
|
if (d.value) {
|
|
1834
|
-
|
|
1896
|
+
z({ devolverElFoco: !0 });
|
|
1835
1897
|
return;
|
|
1836
1898
|
}
|
|
1837
|
-
L(
|
|
1899
|
+
L(g);
|
|
1838
1900
|
}
|
|
1839
|
-
return
|
|
1901
|
+
return ge(ut, {
|
|
1840
1902
|
abierto: d,
|
|
1841
1903
|
idDelMenu: m,
|
|
1842
1904
|
idDeLaEtiqueta: s,
|
|
1843
|
-
ponerLaEtiqueta: (
|
|
1844
|
-
s.value =
|
|
1905
|
+
ponerLaEtiqueta: (g) => {
|
|
1906
|
+
s.value = g;
|
|
1845
1907
|
},
|
|
1846
1908
|
disparador: o,
|
|
1847
|
-
ponerElDisparador: (
|
|
1848
|
-
o.value =
|
|
1909
|
+
ponerElDisparador: (g) => {
|
|
1910
|
+
o.value = g;
|
|
1849
1911
|
},
|
|
1850
1912
|
focoAlAbrir: u,
|
|
1851
1913
|
abrir: L,
|
|
1852
|
-
cerrar:
|
|
1853
|
-
alternar:
|
|
1854
|
-
}), (
|
|
1855
|
-
S(
|
|
1914
|
+
cerrar: z,
|
|
1915
|
+
alternar: B
|
|
1916
|
+
}), (g, $) => (r(), i("div", el, [
|
|
1917
|
+
S(g.$slots, "default")
|
|
1856
1918
|
]));
|
|
1857
1919
|
}
|
|
1858
|
-
}),
|
|
1920
|
+
}), al = ["id", "aria-labelledby", "inert"], nl = {
|
|
1859
1921
|
role: "none",
|
|
1860
1922
|
class: "py-1"
|
|
1861
|
-
},
|
|
1923
|
+
}, Z = 8, ll = /* @__PURE__ */ D({
|
|
1862
1924
|
inheritAttrs: !1,
|
|
1863
1925
|
__name: "DropdownMenuContent",
|
|
1864
1926
|
props: {
|
|
@@ -1867,7 +1929,7 @@ const On = { class: "relative inline-block" }, jn = /* @__PURE__ */ E({
|
|
|
1867
1929
|
sideOffset: { default: 4 }
|
|
1868
1930
|
},
|
|
1869
1931
|
setup(e) {
|
|
1870
|
-
const n = e, t =
|
|
1932
|
+
const n = e, t = Ce(), { idDelMenu: a, idDeLaEtiqueta: l } = t, o = v(() => t.disparador.value), s = v(() => t.abierto.value), u = w(null), m = w({
|
|
1871
1933
|
top: 0,
|
|
1872
1934
|
left: 0,
|
|
1873
1935
|
techo: null
|
|
@@ -1878,7 +1940,7 @@ const On = { class: "relative inline-block" }, jn = /* @__PURE__ */ E({
|
|
|
1878
1940
|
right: "left"
|
|
1879
1941
|
};
|
|
1880
1942
|
function d(c, b) {
|
|
1881
|
-
const p = n.sideOffset +
|
|
1943
|
+
const p = n.sideOffset + Z;
|
|
1882
1944
|
switch (c) {
|
|
1883
1945
|
case "bottom":
|
|
1884
1946
|
return window.innerHeight - b.bottom - p;
|
|
@@ -1893,71 +1955,71 @@ const On = { class: "relative inline-block" }, jn = /* @__PURE__ */ E({
|
|
|
1893
1955
|
function L(c, b, p) {
|
|
1894
1956
|
return p < b ? b : Math.min(Math.max(c, b), p);
|
|
1895
1957
|
}
|
|
1896
|
-
function
|
|
1958
|
+
function z() {
|
|
1897
1959
|
if (!o.value || !u.value) return;
|
|
1898
|
-
const c = o.value.getBoundingClientRect(), b = u.value.scrollHeight, p = u.value.offsetWidth, P = n.side === "top" || n.side === "bottom",
|
|
1960
|
+
const c = o.value.getBoundingClientRect(), b = u.value.scrollHeight, p = u.value.offsetWidth, P = n.side === "top" || n.side === "bottom", le = P ? b : p;
|
|
1899
1961
|
let U = n.side;
|
|
1900
|
-
const
|
|
1901
|
-
|
|
1902
|
-
let G = 0,
|
|
1962
|
+
const oe = d(U, c);
|
|
1963
|
+
oe < le && d(f[U], c) > oe && (U = f[U]);
|
|
1964
|
+
let G = 0, A = 0, E = null;
|
|
1903
1965
|
switch (U) {
|
|
1904
1966
|
case "bottom": {
|
|
1905
|
-
G = c.bottom + n.sideOffset,
|
|
1967
|
+
G = c.bottom + n.sideOffset, E = Math.max(window.innerHeight - G - Z, 0);
|
|
1906
1968
|
break;
|
|
1907
1969
|
}
|
|
1908
1970
|
case "top": {
|
|
1909
|
-
|
|
1971
|
+
E = Math.max(d("top", c), 0), G = c.top - n.sideOffset - Math.min(b, E);
|
|
1910
1972
|
break;
|
|
1911
1973
|
}
|
|
1912
1974
|
case "left":
|
|
1913
1975
|
case "right": {
|
|
1914
|
-
|
|
1915
|
-
const I = window.innerHeight - 2 *
|
|
1916
|
-
G = L(c.top,
|
|
1976
|
+
A = U === "right" ? c.right + n.sideOffset : c.left - p - n.sideOffset;
|
|
1977
|
+
const I = window.innerHeight - 2 * Z;
|
|
1978
|
+
G = L(c.top, Z, window.innerHeight - Math.min(b, I) - Z), E = Math.max(window.innerHeight - G - Z, 0);
|
|
1917
1979
|
break;
|
|
1918
1980
|
}
|
|
1919
1981
|
}
|
|
1920
1982
|
if (P)
|
|
1921
1983
|
switch (n.align) {
|
|
1922
1984
|
case "start":
|
|
1923
|
-
|
|
1985
|
+
A = c.left;
|
|
1924
1986
|
break;
|
|
1925
1987
|
case "center":
|
|
1926
|
-
|
|
1988
|
+
A = c.left + c.width / 2 - p / 2;
|
|
1927
1989
|
break;
|
|
1928
1990
|
case "end":
|
|
1929
|
-
|
|
1991
|
+
A = c.right - p;
|
|
1930
1992
|
break;
|
|
1931
1993
|
}
|
|
1932
|
-
|
|
1994
|
+
A = L(A, Z, window.innerWidth - p - Z), m.value = { top: G, left: A, techo: E };
|
|
1933
1995
|
}
|
|
1934
|
-
function
|
|
1996
|
+
function B() {
|
|
1935
1997
|
return u.value ? Array.from(u.value.querySelectorAll('[role="menuitem"]')) : [];
|
|
1936
1998
|
}
|
|
1937
|
-
function
|
|
1938
|
-
const b =
|
|
1999
|
+
function g(c) {
|
|
2000
|
+
const b = B();
|
|
1939
2001
|
if (!b.length) return;
|
|
1940
2002
|
const p = b.length;
|
|
1941
2003
|
b[(c % p + p) % p]?.focus();
|
|
1942
2004
|
}
|
|
1943
2005
|
function $() {
|
|
1944
2006
|
const c = document.activeElement;
|
|
1945
|
-
return c instanceof HTMLElement ?
|
|
2007
|
+
return c instanceof HTMLElement ? B().indexOf(c) : -1;
|
|
1946
2008
|
}
|
|
1947
2009
|
function j(c) {
|
|
1948
2010
|
const b = $();
|
|
1949
2011
|
switch (c.key) {
|
|
1950
2012
|
case "ArrowDown":
|
|
1951
|
-
c.preventDefault(),
|
|
2013
|
+
c.preventDefault(), g(b + 1);
|
|
1952
2014
|
break;
|
|
1953
2015
|
case "ArrowUp":
|
|
1954
|
-
c.preventDefault(),
|
|
2016
|
+
c.preventDefault(), g(b <= 0 ? -1 : b - 1);
|
|
1955
2017
|
break;
|
|
1956
2018
|
case "Home":
|
|
1957
|
-
c.preventDefault(),
|
|
2019
|
+
c.preventDefault(), g(0);
|
|
1958
2020
|
break;
|
|
1959
2021
|
case "End":
|
|
1960
|
-
c.preventDefault(),
|
|
2022
|
+
c.preventDefault(), g(-1);
|
|
1961
2023
|
break;
|
|
1962
2024
|
case "Escape":
|
|
1963
2025
|
c.preventDefault(), c.stopPropagation(), t.cerrar({ devolverElFoco: !0 });
|
|
@@ -1969,14 +2031,14 @@ const On = { class: "relative inline-block" }, jn = /* @__PURE__ */ E({
|
|
|
1969
2031
|
}
|
|
1970
2032
|
W(s, async (c) => {
|
|
1971
2033
|
if (c)
|
|
1972
|
-
switch (await
|
|
1973
|
-
|
|
2034
|
+
switch (await X(), requestAnimationFrame(() => {
|
|
2035
|
+
z();
|
|
1974
2036
|
}), t.focoAlAbrir.value) {
|
|
1975
2037
|
case "primero":
|
|
1976
|
-
|
|
2038
|
+
g(0);
|
|
1977
2039
|
break;
|
|
1978
2040
|
case "ultimo":
|
|
1979
|
-
|
|
2041
|
+
g(-1);
|
|
1980
2042
|
break;
|
|
1981
2043
|
// Abierto con el ratón: el foco va al menú y no a un ítem —no hay
|
|
1982
2044
|
// ninguno elegido todavía—, que es lo que deja andar las flechas y el
|
|
@@ -1986,18 +2048,18 @@ const On = { class: "relative inline-block" }, jn = /* @__PURE__ */ E({
|
|
|
1986
2048
|
}
|
|
1987
2049
|
});
|
|
1988
2050
|
function C(c) {
|
|
1989
|
-
s.value && (c && u.value?.contains(c.target) ||
|
|
2051
|
+
s.value && (c && u.value?.contains(c.target) || z());
|
|
1990
2052
|
}
|
|
1991
|
-
function
|
|
2053
|
+
function y(c) {
|
|
1992
2054
|
const b = c.target, p = !!b.closest("[data-dropdown-content]"), P = !!o.value?.contains(b);
|
|
1993
2055
|
!p && !P && t.cerrar();
|
|
1994
2056
|
}
|
|
1995
|
-
return
|
|
1996
|
-
document.addEventListener("click",
|
|
1997
|
-
}),
|
|
1998
|
-
document.removeEventListener("click",
|
|
1999
|
-
}), (c, b) => (r(),
|
|
2000
|
-
O(
|
|
2057
|
+
return J(() => {
|
|
2058
|
+
document.addEventListener("click", y), window.addEventListener("resize", C), window.addEventListener("scroll", C, !0);
|
|
2059
|
+
}), pe(() => {
|
|
2060
|
+
document.removeEventListener("click", y), window.removeEventListener("resize", C), window.removeEventListener("scroll", C, !0);
|
|
2061
|
+
}), (c, b) => (r(), Y(ye, { to: "body" }, [
|
|
2062
|
+
O(ke, {
|
|
2001
2063
|
"enter-active-class": "transition-all duration-150 ease-in-out",
|
|
2002
2064
|
"leave-active-class": "transition-all duration-150 ease-in-out",
|
|
2003
2065
|
"enter-from-class": "opacity-0 scale-95",
|
|
@@ -2006,15 +2068,15 @@ const On = { class: "relative inline-block" }, jn = /* @__PURE__ */ E({
|
|
|
2006
2068
|
onLeave: b[2] || (b[2] = (p) => p.offsetHeight)
|
|
2007
2069
|
}, {
|
|
2008
2070
|
default: K(() => [
|
|
2009
|
-
|
|
2071
|
+
Se(T("div", ce({
|
|
2010
2072
|
ref_key: "contenido",
|
|
2011
2073
|
ref: u
|
|
2012
2074
|
}, c.$attrs, {
|
|
2013
|
-
id:
|
|
2075
|
+
id: F(a),
|
|
2014
2076
|
role: "menu",
|
|
2015
2077
|
tabindex: "-1",
|
|
2016
2078
|
"aria-orientation": "vertical",
|
|
2017
|
-
"aria-labelledby":
|
|
2079
|
+
"aria-labelledby": F(l) ?? void 0,
|
|
2018
2080
|
inert: !s.value,
|
|
2019
2081
|
style: {
|
|
2020
2082
|
position: "fixed",
|
|
@@ -2030,25 +2092,25 @@ const On = { class: "relative inline-block" }, jn = /* @__PURE__ */ E({
|
|
|
2030
2092
|
onClick: b[0] || (b[0] = (p) => p.stopPropagation()),
|
|
2031
2093
|
onKeydown: j
|
|
2032
2094
|
}), [
|
|
2033
|
-
T("div",
|
|
2095
|
+
T("div", nl, [
|
|
2034
2096
|
S(c.$slots, "default")
|
|
2035
2097
|
])
|
|
2036
|
-
], 16,
|
|
2037
|
-
[
|
|
2098
|
+
], 16, al), [
|
|
2099
|
+
[Ye, s.value]
|
|
2038
2100
|
])
|
|
2039
2101
|
]),
|
|
2040
2102
|
_: 3
|
|
2041
2103
|
})
|
|
2042
2104
|
]));
|
|
2043
2105
|
}
|
|
2044
|
-
}),
|
|
2106
|
+
}), ol = ["aria-disabled", "onKeydown"], rl = /* @__PURE__ */ D({
|
|
2045
2107
|
__name: "DropdownMenuItem",
|
|
2046
2108
|
props: {
|
|
2047
2109
|
disabled: { type: Boolean, default: !1 }
|
|
2048
2110
|
},
|
|
2049
2111
|
emits: ["select", "click"],
|
|
2050
2112
|
setup(e, { emit: n }) {
|
|
2051
|
-
const t = e, a = n, l =
|
|
2113
|
+
const t = e, a = n, l = Ce();
|
|
2052
2114
|
function o(s) {
|
|
2053
2115
|
t.disabled || (a("select"), a("click", s), l.cerrar({ devolverElFoco: !0 }));
|
|
2054
2116
|
}
|
|
@@ -2065,20 +2127,20 @@ const On = { class: "relative inline-block" }, jn = /* @__PURE__ */ E({
|
|
|
2065
2127
|
]),
|
|
2066
2128
|
onClick: o,
|
|
2067
2129
|
onKeydown: [
|
|
2068
|
-
|
|
2069
|
-
|
|
2130
|
+
R(V(o, ["prevent"]), ["enter"]),
|
|
2131
|
+
R(V(o, ["prevent"]), ["space"])
|
|
2070
2132
|
]
|
|
2071
2133
|
}, [
|
|
2072
2134
|
S(s.$slots, "default")
|
|
2073
|
-
], 42,
|
|
2135
|
+
], 42, ol));
|
|
2074
2136
|
}
|
|
2075
|
-
}),
|
|
2137
|
+
}), il = /* @__PURE__ */ D({
|
|
2076
2138
|
__name: "DropdownMenuLabel",
|
|
2077
2139
|
setup(e) {
|
|
2078
|
-
const n =
|
|
2079
|
-
return
|
|
2140
|
+
const n = Ce(), t = `${ct()}-titulo`;
|
|
2141
|
+
return J(() => {
|
|
2080
2142
|
n.ponerLaEtiqueta(t);
|
|
2081
|
-
}),
|
|
2143
|
+
}), pe(() => {
|
|
2082
2144
|
n.ponerLaEtiqueta(null);
|
|
2083
2145
|
}), (a, l) => (r(), i("div", {
|
|
2084
2146
|
id: t,
|
|
@@ -2088,30 +2150,30 @@ const On = { class: "relative inline-block" }, jn = /* @__PURE__ */ E({
|
|
|
2088
2150
|
S(a.$slots, "default")
|
|
2089
2151
|
]));
|
|
2090
2152
|
}
|
|
2091
|
-
}),
|
|
2153
|
+
}), sl = {
|
|
2092
2154
|
role: "separator",
|
|
2093
2155
|
"aria-orientation": "horizontal",
|
|
2094
2156
|
class: "bg-ui-bg/80 my-4 h-0.5"
|
|
2095
|
-
},
|
|
2157
|
+
}, ul = /* @__PURE__ */ D({
|
|
2096
2158
|
__name: "DropdownMenuSeparator",
|
|
2097
2159
|
setup(e) {
|
|
2098
|
-
return (n, t) => (r(), i("div",
|
|
2160
|
+
return (n, t) => (r(), i("div", sl));
|
|
2099
2161
|
}
|
|
2100
2162
|
});
|
|
2101
|
-
function
|
|
2163
|
+
function dt(e) {
|
|
2102
2164
|
const n = e.filter(
|
|
2103
|
-
(a) => a.type !==
|
|
2165
|
+
(a) => a.type !== Et && !(a.type === Lt && typeof a.children == "string" && !a.children.trim())
|
|
2104
2166
|
);
|
|
2105
2167
|
if (n.length !== 1) return null;
|
|
2106
2168
|
const t = n[0];
|
|
2107
|
-
return t.type ===
|
|
2169
|
+
return t.type === te && Array.isArray(t.children) ? dt(t.children) : t;
|
|
2108
2170
|
}
|
|
2109
|
-
function
|
|
2171
|
+
function cl(e) {
|
|
2110
2172
|
if (e instanceof HTMLElement) return e;
|
|
2111
2173
|
const n = e?.$el;
|
|
2112
2174
|
return n instanceof HTMLElement ? n : null;
|
|
2113
2175
|
}
|
|
2114
|
-
const
|
|
2176
|
+
const dl = D({
|
|
2115
2177
|
name: "DropdownMenuTrigger",
|
|
2116
2178
|
inheritAttrs: !1,
|
|
2117
2179
|
props: {
|
|
@@ -2121,9 +2183,9 @@ const Gn = E({
|
|
|
2121
2183
|
disabled: { type: Boolean, default: !1 }
|
|
2122
2184
|
},
|
|
2123
2185
|
setup(e, { slots: n, attrs: t }) {
|
|
2124
|
-
const a =
|
|
2186
|
+
const a = Ce(), l = w(null);
|
|
2125
2187
|
function o() {
|
|
2126
|
-
a.ponerElDisparador(
|
|
2188
|
+
a.ponerElDisparador(cl(l.value));
|
|
2127
2189
|
}
|
|
2128
2190
|
function s() {
|
|
2129
2191
|
e.disabled || (o(), a.alternar());
|
|
@@ -2161,17 +2223,17 @@ const Gn = E({
|
|
|
2161
2223
|
onKeydown: u
|
|
2162
2224
|
}, f = n.default?.() ?? [];
|
|
2163
2225
|
if (e.asChild) {
|
|
2164
|
-
const d =
|
|
2165
|
-
if (d) return
|
|
2226
|
+
const d = dt(f);
|
|
2227
|
+
if (d) return $t(d, { ...t, ...m });
|
|
2166
2228
|
}
|
|
2167
|
-
return
|
|
2229
|
+
return Ct(
|
|
2168
2230
|
"div",
|
|
2169
2231
|
{ ...t, class: ["dropdown-menu-trigger inline-block", t.class], ...m },
|
|
2170
2232
|
f
|
|
2171
2233
|
);
|
|
2172
2234
|
};
|
|
2173
2235
|
}
|
|
2174
|
-
}),
|
|
2236
|
+
}), fl = ["for"], ml = /* @__PURE__ */ D({
|
|
2175
2237
|
__name: "FormGroup",
|
|
2176
2238
|
props: {
|
|
2177
2239
|
label: {},
|
|
@@ -2187,11 +2249,11 @@ const Gn = E({
|
|
|
2187
2249
|
key: 0,
|
|
2188
2250
|
for: e.htmlFor,
|
|
2189
2251
|
class: h(["text-sm font-medium text-primary dark:text-primary-dark", e.labelClass])
|
|
2190
|
-
},
|
|
2252
|
+
}, M(e.label), 11, fl)) : x("", !0),
|
|
2191
2253
|
S(n.$slots, "default", {}, void 0, !0)
|
|
2192
2254
|
], 2));
|
|
2193
2255
|
}
|
|
2194
|
-
}),
|
|
2256
|
+
}), bl = /* @__PURE__ */ $e(ml, [["__scopeId", "data-v-c0d9d9cb"]]), vl = /* @__PURE__ */ D({
|
|
2195
2257
|
__name: "ListCard",
|
|
2196
2258
|
props: {
|
|
2197
2259
|
clickable: { type: Boolean, default: !1 },
|
|
@@ -2215,10 +2277,10 @@ const Gn = E({
|
|
|
2215
2277
|
S(o.$slots, "default", {}, void 0, !0)
|
|
2216
2278
|
], 2));
|
|
2217
2279
|
}
|
|
2218
|
-
}),
|
|
2280
|
+
}), pl = /* @__PURE__ */ $e(vl, [["__scopeId", "data-v-f86d47da"]]), gl = { class: "background rounded-corner flex flex-row items-center gap-2 justify-between w-full h-auto p-4 transition-[background-color] duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80" }, yl = ["title", "aria-label"], hl = ["src"], xl = {
|
|
2219
2281
|
key: 1,
|
|
2220
2282
|
class: "w-8 h-8 flex items-center justify-center"
|
|
2221
|
-
},
|
|
2283
|
+
}, wl = ["src"], kl = ["min", "max", "value", "aria-label", "aria-valuetext"], $l = /* @__PURE__ */ D({
|
|
2222
2284
|
__name: "SliderControl",
|
|
2223
2285
|
props: {
|
|
2224
2286
|
icon: {},
|
|
@@ -2243,7 +2305,7 @@ const Gn = E({
|
|
|
2243
2305
|
}, u = () => {
|
|
2244
2306
|
a("buttonClick");
|
|
2245
2307
|
};
|
|
2246
|
-
return (m, f) => (r(), i("div",
|
|
2308
|
+
return (m, f) => (r(), i("div", gl, [
|
|
2247
2309
|
e.showButton ? (r(), i("button", {
|
|
2248
2310
|
key: 0,
|
|
2249
2311
|
onClick: u,
|
|
@@ -2256,13 +2318,13 @@ const Gn = E({
|
|
|
2256
2318
|
src: e.icon,
|
|
2257
2319
|
alt: "",
|
|
2258
2320
|
class: h(["w-6 h-6", e.iconClass])
|
|
2259
|
-
}, null, 10,
|
|
2260
|
-
], 8,
|
|
2321
|
+
}, null, 10, hl)
|
|
2322
|
+
], 8, yl)) : (r(), i("div", xl, [
|
|
2261
2323
|
T("img", {
|
|
2262
2324
|
src: e.icon,
|
|
2263
2325
|
alt: "",
|
|
2264
2326
|
class: "w-6 h-6"
|
|
2265
|
-
}, null, 8,
|
|
2327
|
+
}, null, 8, wl)
|
|
2266
2328
|
])),
|
|
2267
2329
|
T("input", {
|
|
2268
2330
|
type: "range",
|
|
@@ -2273,13 +2335,13 @@ const Gn = E({
|
|
|
2273
2335
|
"aria-label": e.label,
|
|
2274
2336
|
"aria-valuetext": `${l.value}%`,
|
|
2275
2337
|
class: "flex-1 transition-[scale] duration-200 hover:scale-105"
|
|
2276
|
-
}, null, 40,
|
|
2338
|
+
}, null, 40, kl),
|
|
2277
2339
|
T("span", {
|
|
2278
2340
|
class: h(["w-12 text-right transition-[color] duration-200 font-medium", o.value])
|
|
2279
|
-
},
|
|
2341
|
+
}, M(l.value) + "% ", 3)
|
|
2280
2342
|
]));
|
|
2281
2343
|
}
|
|
2282
|
-
}),
|
|
2344
|
+
}), je = /* @__PURE__ */ D({
|
|
2283
2345
|
__name: "SwitchTrack",
|
|
2284
2346
|
props: {
|
|
2285
2347
|
on: { type: Boolean },
|
|
@@ -2303,10 +2365,10 @@ const Gn = E({
|
|
|
2303
2365
|
}, null, 2)
|
|
2304
2366
|
], 2));
|
|
2305
2367
|
}
|
|
2306
|
-
}),
|
|
2368
|
+
}), Cl = ["aria-checked", "disabled"], El = { class: "min-w-0 flex-1" }, Ll = { class: "block font-medium text-sm text-tx-main" }, zl = {
|
|
2307
2369
|
key: 0,
|
|
2308
2370
|
class: "mt-0.5 block text-tx-muted text-xs"
|
|
2309
|
-
},
|
|
2371
|
+
}, Dl = /* @__PURE__ */ D({
|
|
2310
2372
|
__name: "SwitchRow",
|
|
2311
2373
|
props: {
|
|
2312
2374
|
modelValue: { type: Boolean },
|
|
@@ -2327,7 +2389,7 @@ const Gn = E({
|
|
|
2327
2389
|
class: "flex w-full items-start gap-3 rounded-corner p-2 text-left transition-colors hover:bg-ui-surface/60 disabled:cursor-not-allowed disabled:opacity-60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
|
|
2328
2390
|
onClick: o[0] || (o[0] = (s) => a("update:modelValue", !t.modelValue))
|
|
2329
2391
|
}, [
|
|
2330
|
-
O(
|
|
2392
|
+
O(je, {
|
|
2331
2393
|
on: e.modelValue,
|
|
2332
2394
|
class: "mt-0.5"
|
|
2333
2395
|
}, null, 8, ["on"]),
|
|
@@ -2343,14 +2405,14 @@ const Gn = E({
|
|
|
2343
2405
|
alt: ""
|
|
2344
2406
|
}, null, 8, ["name", "type"])
|
|
2345
2407
|
], 2)) : x("", !0),
|
|
2346
|
-
T("span",
|
|
2347
|
-
T("span",
|
|
2348
|
-
e.description ? (r(), i("span",
|
|
2408
|
+
T("span", El, [
|
|
2409
|
+
T("span", Ll, M(e.label), 1),
|
|
2410
|
+
e.description ? (r(), i("span", zl, M(e.description), 1)) : x("", !0),
|
|
2349
2411
|
S(l.$slots, "pie")
|
|
2350
2412
|
])
|
|
2351
|
-
], 8,
|
|
2413
|
+
], 8, Cl));
|
|
2352
2414
|
}
|
|
2353
|
-
}),
|
|
2415
|
+
}), Tl = ["aria-checked", "aria-label", "disabled"], Al = /* @__PURE__ */ D({
|
|
2354
2416
|
__name: "SwitchToggle",
|
|
2355
2417
|
props: {
|
|
2356
2418
|
modelValue: { type: Boolean },
|
|
@@ -2373,13 +2435,13 @@ const Gn = E({
|
|
|
2373
2435
|
class: "rounded-full transition-opacity disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
|
|
2374
2436
|
onClick: l
|
|
2375
2437
|
}, [
|
|
2376
|
-
O(
|
|
2438
|
+
O(je, {
|
|
2377
2439
|
on: e.modelValue,
|
|
2378
2440
|
size: e.size
|
|
2379
2441
|
}, null, 8, ["on", "size"])
|
|
2380
|
-
], 8,
|
|
2442
|
+
], 8, Tl));
|
|
2381
2443
|
}
|
|
2382
|
-
}),
|
|
2444
|
+
}), Bl = ["disabled", "title", "aria-label", "aria-pressed", "aria-busy"], Sl = ["src"], Ml = /* @__PURE__ */ D({
|
|
2383
2445
|
__name: "ToggleControl",
|
|
2384
2446
|
props: {
|
|
2385
2447
|
icon: {},
|
|
@@ -2420,12 +2482,12 @@ const Gn = E({
|
|
|
2420
2482
|
"drop-shadow-lg": e.isActive,
|
|
2421
2483
|
...e.iconClass
|
|
2422
2484
|
}])
|
|
2423
|
-
}, null, 10,
|
|
2424
|
-
], 10,
|
|
2485
|
+
}, null, 10, Sl)
|
|
2486
|
+
], 10, Bl));
|
|
2425
2487
|
}
|
|
2426
|
-
}),
|
|
2427
|
-
function
|
|
2428
|
-
const e =
|
|
2488
|
+
}), ft = /* @__PURE__ */ Symbol("tooltip de vasak");
|
|
2489
|
+
function mt() {
|
|
2490
|
+
const e = we(ft, null);
|
|
2429
2491
|
if (e) return e;
|
|
2430
2492
|
const n = w(!1);
|
|
2431
2493
|
return {
|
|
@@ -2441,7 +2503,7 @@ function ot() {
|
|
|
2441
2503
|
}
|
|
2442
2504
|
};
|
|
2443
2505
|
}
|
|
2444
|
-
const
|
|
2506
|
+
const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
2445
2507
|
__name: "Tooltip",
|
|
2446
2508
|
props: {
|
|
2447
2509
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -2458,7 +2520,7 @@ const pl = { class: "inline-block" }, yl = /* @__PURE__ */ E({
|
|
|
2458
2520
|
function s() {
|
|
2459
2521
|
l && clearTimeout(l), t.value = !1;
|
|
2460
2522
|
}
|
|
2461
|
-
return
|
|
2523
|
+
return ge(ft, {
|
|
2462
2524
|
abierto: v(() => t.value && !n.disabled),
|
|
2463
2525
|
disparador: a,
|
|
2464
2526
|
ponerElDisparador: (u) => {
|
|
@@ -2466,11 +2528,11 @@ const pl = { class: "inline-block" }, yl = /* @__PURE__ */ E({
|
|
|
2466
2528
|
},
|
|
2467
2529
|
abrir: o,
|
|
2468
2530
|
cerrar: s
|
|
2469
|
-
}), (u, m) => (r(), i("div",
|
|
2531
|
+
}), (u, m) => (r(), i("div", Vl, [
|
|
2470
2532
|
S(u.$slots, "default")
|
|
2471
2533
|
]));
|
|
2472
2534
|
}
|
|
2473
|
-
}),
|
|
2535
|
+
}), Ol = /* @__PURE__ */ D({
|
|
2474
2536
|
inheritAttrs: !1,
|
|
2475
2537
|
__name: "TooltipContent",
|
|
2476
2538
|
props: {
|
|
@@ -2479,42 +2541,42 @@ const pl = { class: "inline-block" }, yl = /* @__PURE__ */ E({
|
|
|
2479
2541
|
sideOffset: { default: 4 }
|
|
2480
2542
|
},
|
|
2481
2543
|
setup(e) {
|
|
2482
|
-
const n =
|
|
2544
|
+
const n = Be(), t = v(() => n.class ?? ""), a = e, l = mt(), o = v(() => l.abierto.value), s = w(null), u = w({ top: 0, left: 0 });
|
|
2483
2545
|
function m() {
|
|
2484
2546
|
const f = l.disparador.value;
|
|
2485
2547
|
if (!f || !s.value) return;
|
|
2486
2548
|
const d = f.getBoundingClientRect(), L = s.value.getBoundingClientRect();
|
|
2487
|
-
let
|
|
2549
|
+
let z = 0, B = 0;
|
|
2488
2550
|
switch (a.side) {
|
|
2489
2551
|
case "bottom":
|
|
2490
|
-
|
|
2552
|
+
z = d.bottom + a.sideOffset, B = d.left + d.width / 2 - L.width / 2;
|
|
2491
2553
|
break;
|
|
2492
2554
|
case "top":
|
|
2493
|
-
|
|
2555
|
+
z = d.top - L.height - a.sideOffset, B = d.left + d.width / 2 - L.width / 2;
|
|
2494
2556
|
break;
|
|
2495
2557
|
case "left":
|
|
2496
|
-
|
|
2558
|
+
B = d.left - L.width - a.sideOffset, z = d.top + d.height / 2 - L.height / 2;
|
|
2497
2559
|
break;
|
|
2498
2560
|
case "right":
|
|
2499
|
-
|
|
2561
|
+
B = d.right + a.sideOffset, z = d.top + d.height / 2 - L.height / 2;
|
|
2500
2562
|
break;
|
|
2501
2563
|
}
|
|
2502
|
-
u.value = { top:
|
|
2564
|
+
u.value = { top: z, left: B };
|
|
2503
2565
|
}
|
|
2504
2566
|
return W(o, async (f) => {
|
|
2505
|
-
f && (await
|
|
2506
|
-
}), (f, d) => (r(),
|
|
2507
|
-
O(
|
|
2567
|
+
f && (await X(), requestAnimationFrame(m));
|
|
2568
|
+
}), (f, d) => (r(), Y(ye, { to: "body" }, [
|
|
2569
|
+
O(ke, {
|
|
2508
2570
|
"enter-active-class": "transition-all duration-200 ease-in-out",
|
|
2509
2571
|
"leave-active-class": "transition-all duration-200 ease-in-out",
|
|
2510
2572
|
"enter-from-class": "opacity-0 scale-95",
|
|
2511
2573
|
"leave-to-class": "opacity-0 scale-95"
|
|
2512
2574
|
}, {
|
|
2513
2575
|
default: K(() => [
|
|
2514
|
-
|
|
2576
|
+
Se(T("div", {
|
|
2515
2577
|
ref_key: "globo",
|
|
2516
2578
|
ref: s,
|
|
2517
|
-
style:
|
|
2579
|
+
style: fe({ position: "fixed", top: `${u.value.top}px`, left: `${u.value.left}px`, zIndex: 50 }),
|
|
2518
2580
|
class: h([
|
|
2519
2581
|
t.value,
|
|
2520
2582
|
"pointer-events-none rounded-corner border border-secondary bg-ui-bg/80 px-2 py-1 text-sm shadow-md"
|
|
@@ -2522,41 +2584,41 @@ const pl = { class: "inline-block" }, yl = /* @__PURE__ */ E({
|
|
|
2522
2584
|
}, [
|
|
2523
2585
|
S(f.$slots, "default")
|
|
2524
2586
|
], 6), [
|
|
2525
|
-
[
|
|
2587
|
+
[Ye, o.value]
|
|
2526
2588
|
])
|
|
2527
2589
|
]),
|
|
2528
2590
|
_: 3
|
|
2529
2591
|
})
|
|
2530
2592
|
]));
|
|
2531
2593
|
}
|
|
2532
|
-
}),
|
|
2594
|
+
}), jl = /* @__PURE__ */ D({
|
|
2533
2595
|
__name: "TooltipTrigger",
|
|
2534
2596
|
setup(e) {
|
|
2535
|
-
const n =
|
|
2597
|
+
const n = mt(), t = w(null);
|
|
2536
2598
|
function a() {
|
|
2537
2599
|
return t.value ? t.value.firstElementChild ?? t.value : null;
|
|
2538
2600
|
}
|
|
2539
2601
|
function l() {
|
|
2540
2602
|
n.ponerElDisparador(a()), n.abrir();
|
|
2541
2603
|
}
|
|
2542
|
-
return
|
|
2604
|
+
return J(() => {
|
|
2543
2605
|
n.ponerElDisparador(a());
|
|
2544
2606
|
}), (o, s) => (r(), i("div", {
|
|
2545
2607
|
ref_key: "envoltorio",
|
|
2546
2608
|
ref: t,
|
|
2547
2609
|
class: "inline-block",
|
|
2548
2610
|
onMouseenter: l,
|
|
2549
|
-
onMouseleave: s[0] || (s[0] = (u) =>
|
|
2611
|
+
onMouseleave: s[0] || (s[0] = (u) => F(n).cerrar()),
|
|
2550
2612
|
onFocus: l,
|
|
2551
|
-
onBlur: s[1] || (s[1] = (u) =>
|
|
2613
|
+
onBlur: s[1] || (s[1] = (u) => F(n).cerrar())
|
|
2552
2614
|
}, [
|
|
2553
2615
|
S(o.$slots, "default")
|
|
2554
2616
|
], 544));
|
|
2555
2617
|
}
|
|
2556
|
-
}),
|
|
2618
|
+
}), Pl = ["title"], Rl = ["src", "alt"], Fl = {
|
|
2557
2619
|
key: 0,
|
|
2558
2620
|
class: "absolute bottom-1 right-1 bg-primary dark:bg-primary-dark text-white text-xs rounded-full w-4 h-4 flex items-center justify-center font-bold animate-bounce"
|
|
2559
|
-
},
|
|
2621
|
+
}, Nl = /* @__PURE__ */ D({
|
|
2560
2622
|
__name: "TrayIconButton",
|
|
2561
2623
|
props: {
|
|
2562
2624
|
icon: {},
|
|
@@ -2585,8 +2647,8 @@ const pl = { class: "inline-block" }, yl = /* @__PURE__ */ E({
|
|
|
2585
2647
|
src: e.icon,
|
|
2586
2648
|
alt: e.alt,
|
|
2587
2649
|
class: h(["m-auto h-5.5 w-auto", e.iconClass])
|
|
2588
|
-
}, null, 10,
|
|
2589
|
-
e.badge !== null && e.badge > 0 ? (r(), i("div",
|
|
2650
|
+
}, null, 10, Rl),
|
|
2651
|
+
e.badge !== null && e.badge > 0 ? (r(), i("div", Fl, M(e.badge), 1)) : x("", !0),
|
|
2590
2652
|
e.showCustomTooltip && e.customTooltipText ? (r(), i("div", {
|
|
2591
2653
|
key: 1,
|
|
2592
2654
|
class: h(["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", [
|
|
@@ -2596,127 +2658,127 @@ const pl = { class: "inline-block" }, yl = /* @__PURE__ */ E({
|
|
|
2596
2658
|
"opacity-100 translate-y-0": a.value
|
|
2597
2659
|
}
|
|
2598
2660
|
]])
|
|
2599
|
-
},
|
|
2661
|
+
}, M(e.customTooltipText), 3)) : x("", !0),
|
|
2600
2662
|
S(o.$slots, "default")
|
|
2601
|
-
], 42,
|
|
2663
|
+
], 42, Pl));
|
|
2602
2664
|
}
|
|
2603
|
-
}),
|
|
2604
|
-
Kt,
|
|
2605
|
-
Ke,
|
|
2606
|
-
Ue,
|
|
2607
|
-
Xt,
|
|
2608
|
-
H,
|
|
2665
|
+
}), ql = [
|
|
2609
2666
|
ua,
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2667
|
+
_e,
|
|
2668
|
+
Ze,
|
|
2669
|
+
ba,
|
|
2670
|
+
H,
|
|
2671
|
+
za,
|
|
2672
|
+
at,
|
|
2673
|
+
tt,
|
|
2674
|
+
Ra,
|
|
2675
|
+
nt,
|
|
2676
|
+
Ua,
|
|
2677
|
+
Ja,
|
|
2678
|
+
an,
|
|
2679
|
+
on,
|
|
2680
|
+
sn,
|
|
2681
|
+
mn,
|
|
2682
|
+
Oe,
|
|
2683
|
+
zn,
|
|
2684
|
+
lt,
|
|
2685
|
+
cn,
|
|
2629
2686
|
An,
|
|
2630
|
-
Vn,
|
|
2631
|
-
In,
|
|
2632
|
-
jn,
|
|
2633
2687
|
Rn,
|
|
2634
2688
|
Nn,
|
|
2635
|
-
Hn,
|
|
2636
2689
|
Kn,
|
|
2637
2690
|
Gn,
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2691
|
+
Yn,
|
|
2692
|
+
Jn,
|
|
2693
|
+
_n,
|
|
2694
|
+
tl,
|
|
2695
|
+
ll,
|
|
2696
|
+
rl,
|
|
2697
|
+
il,
|
|
2698
|
+
ul,
|
|
2699
|
+
dl,
|
|
2700
|
+
bl,
|
|
2701
|
+
pl,
|
|
2702
|
+
$l,
|
|
2703
|
+
Dl,
|
|
2704
|
+
Al,
|
|
2705
|
+
je,
|
|
2706
|
+
Ml,
|
|
2707
|
+
Il,
|
|
2708
|
+
Ol,
|
|
2709
|
+
jl,
|
|
2710
|
+
Nl
|
|
2711
|
+
], Xl = {
|
|
2650
2712
|
install(e) {
|
|
2651
|
-
|
|
2713
|
+
ql.forEach((n) => {
|
|
2652
2714
|
e.component(n.name, n);
|
|
2653
2715
|
});
|
|
2654
2716
|
}
|
|
2655
2717
|
};
|
|
2656
2718
|
export {
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2719
|
+
Ja as ActionButton,
|
|
2720
|
+
an as AlertMessage,
|
|
2721
|
+
at as AppBar,
|
|
2722
|
+
Ua as BarSearch,
|
|
2723
|
+
ot as CLASES_POR_TONO,
|
|
2724
|
+
it as CLAVE_DEL_DIALOGO,
|
|
2725
|
+
ut as CLAVE_DEL_MENU,
|
|
2726
|
+
ft as CLAVE_DEL_TOOLTIP,
|
|
2727
|
+
Ve as CLAVE_DE_LA_BARRA,
|
|
2728
|
+
An as ConfigSection,
|
|
2729
|
+
Rn as DeviceCard,
|
|
2730
|
+
Nn as Dialog,
|
|
2731
|
+
Kn as DialogContent,
|
|
2732
|
+
Gn as DialogDescription,
|
|
2733
|
+
Yn as DialogFooter,
|
|
2734
|
+
Jn as DialogHeader,
|
|
2735
|
+
_n as DialogTitle,
|
|
2736
|
+
tl as DropdownMenu,
|
|
2737
|
+
ll as DropdownMenuContent,
|
|
2738
|
+
rl as DropdownMenuItem,
|
|
2739
|
+
il as DropdownMenuLabel,
|
|
2740
|
+
ul as DropdownMenuSeparator,
|
|
2741
|
+
dl as DropdownMenuTrigger,
|
|
2742
|
+
on as EmptyState,
|
|
2743
|
+
bl as FormGroup,
|
|
2744
|
+
Ie as LOS_TRES_CONTROLES,
|
|
2745
|
+
pl as ListCard,
|
|
2746
|
+
sn as LoadingState,
|
|
2747
|
+
va as POSICIONES,
|
|
2748
|
+
mn as ProgressBar,
|
|
2749
|
+
Oe as SearchField,
|
|
2750
|
+
zn as SearchSelect,
|
|
2751
|
+
ba as SelectField,
|
|
2752
|
+
ua as SideBar,
|
|
2753
|
+
_e as SideButton,
|
|
2754
|
+
Ze as SideGroup,
|
|
2755
|
+
$l as SliderControl,
|
|
2756
|
+
Dl as SwitchRow,
|
|
2757
|
+
Al as SwitchToggle,
|
|
2758
|
+
je as SwitchTrack,
|
|
2759
|
+
Ra as TabBar,
|
|
2760
|
+
nt as TabItem,
|
|
2761
|
+
lt as TextInput,
|
|
2700
2762
|
H as ThemeIcon,
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2763
|
+
cn as ToastArea,
|
|
2764
|
+
Ml as ToggleControl,
|
|
2765
|
+
Il as Tooltip,
|
|
2766
|
+
Ol as TooltipContent,
|
|
2767
|
+
jl as TooltipTrigger,
|
|
2768
|
+
Nl as TrayIconButton,
|
|
2769
|
+
tt as WindowControls,
|
|
2770
|
+
za as WindowFrame,
|
|
2771
|
+
vn as buscarOpciones,
|
|
2772
|
+
Xl as default,
|
|
2773
|
+
pa as esPosicion,
|
|
2774
|
+
Ql as olvidarLosIconosDelTema,
|
|
2775
|
+
Ae as orientacionDe,
|
|
2776
|
+
ha as posicionDe,
|
|
2777
|
+
rt as rolDelTono,
|
|
2778
|
+
st as usarElDialogo,
|
|
2779
|
+
Ce as usarElMenu,
|
|
2780
|
+
mt as usarElTooltip,
|
|
2781
|
+
he as usarLaBarra,
|
|
2782
|
+
xa as usarLaPosicionDeLaBarra,
|
|
2783
|
+
Yl as usarLaVersionDelTema
|
|
2722
2784
|
};
|