@vasakgroup/vue-libvasak 1.3.0 → 1.4.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/cards/DeviceCard.vue.d.ts +9 -1
- package/dist/types/controls/ToggleControl.vue.d.ts +9 -15
- package/dist/types/forms/SliderControl.vue.d.ts +9 -1
- package/dist/types/tray/TrayIconButton.vue.d.ts +11 -3
- package/dist/vue-libvasak.es.js +634 -564
- package/dist/vue-libvasak.umd.js +1 -1
- package/package.json +1 -1
package/dist/vue-libvasak.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ref as w, onMounted as
|
|
2
|
-
import { listen as
|
|
1
|
+
import { ref as w, onMounted as W, onUnmounted as ve, readonly as vt, watch as Q, defineComponent as D, toRef as Pe, useTemplateRef as pt, computed as v, createElementBlock as r, unref as F, openBlock as i, normalizeStyle as fe, createCommentVNode as x, createElementVNode as B, createVNode as O, toDisplayString as M, normalizeClass as y, renderSlot as S, createBlock as U, onBeforeUnmount as pe, Fragment as te, renderList as ue, withCtx as G, mergeModels as Re, useAttrs as Be, useId as yt, useModel as gt, withDirectives as Se, mergeProps as ce, isRef as ht, vModelSelect as xt, inject as we, getCurrentInstance as Ge, provide as ye, createTextVNode as Me, toHandlers as Qe, createSlots as wt, withModifiers as V, withKeys as R, Teleport as ge, Transition as ke, nextTick as J, TransitionGroup as kt, vShow as Ye, cloneVNode as $t, h as Ct, Comment as zt, Text as Et } from "vue";
|
|
2
|
+
import { listen as Lt } from "@tauri-apps/api/event";
|
|
3
3
|
import { getSymbolSource as Dt, getIconSource as Tt } from "@vasakgroup/plugin-vicons";
|
|
4
4
|
import { getCurrentWindow as At } from "@tauri-apps/api/window";
|
|
5
5
|
import { useI18n as Bt } from "@vasakgroup/tauri-plugin-i18n";
|
|
6
|
-
const St = "vicons:theme-changed", xe = /* @__PURE__ */ new Map(),
|
|
7
|
-
let se = 0, be = null,
|
|
6
|
+
const St = "vicons:theme-changed", xe = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ new Map(), me = w(0);
|
|
7
|
+
let se = 0, be = null, ie = null;
|
|
8
8
|
function Ql() {
|
|
9
|
-
xe.clear(),
|
|
9
|
+
xe.clear(), re.clear(), se = 0, be = null, ie = null, me.value = 0, ae.clear(), ne.clear(), Xe = 0, ee?.disconnect(), ee = null, De = !1, X !== null && (clearTimeout(X), X = null), _ && (_.cancelado = !0), _ = null;
|
|
10
10
|
}
|
|
11
|
-
const Mt = 100,
|
|
11
|
+
const Mt = 100, ze = 10, Vt = 16, ae = /* @__PURE__ */ new Map(), ne = /* @__PURE__ */ new Set();
|
|
12
12
|
let Xe = 0, ee = null, De = !1;
|
|
13
13
|
function It() {
|
|
14
14
|
return De ? ee : (De = !0, typeof IntersectionObserver > "u" ? null : (ee = new IntersectionObserver(
|
|
@@ -37,37 +37,37 @@ function Pt(e) {
|
|
|
37
37
|
const n = ae.get(e);
|
|
38
38
|
n?.elemento && (ee?.unobserve(n.elemento), delete n.elemento.dataset.iconoId), ne.delete(e), ae.delete(e);
|
|
39
39
|
}
|
|
40
|
-
let
|
|
40
|
+
let X = null, _ = null;
|
|
41
41
|
function Rt(e) {
|
|
42
42
|
return new Promise((n) => setTimeout(n, e));
|
|
43
43
|
}
|
|
44
44
|
async function Ft(e) {
|
|
45
45
|
const n = [...ae.keys()], t = n.filter((l) => ne.has(l)), a = n.filter((l) => !ne.has(l));
|
|
46
46
|
for (const l of [t, a])
|
|
47
|
-
for (let o = 0; o < l.length; o +=
|
|
47
|
+
for (let o = 0; o < l.length; o += ze) {
|
|
48
48
|
if (e.cancelado) return;
|
|
49
|
-
const s = l.slice(o, o +
|
|
49
|
+
const s = l.slice(o, o + ze);
|
|
50
50
|
if (await Promise.allSettled(
|
|
51
51
|
s.map((u) => ae.get(u)?.recargar() ?? Promise.resolve())
|
|
52
52
|
), e.cancelado) return;
|
|
53
|
-
(o +
|
|
53
|
+
(o + ze < l.length || l === t) && await Rt(Vt);
|
|
54
54
|
}
|
|
55
55
|
_ === e && (_ = null);
|
|
56
56
|
}
|
|
57
57
|
function Nt() {
|
|
58
|
-
|
|
58
|
+
X !== null && (clearTimeout(X), X = null), _ && (_.cancelado = !0);
|
|
59
59
|
const e = { cancelado: !1 };
|
|
60
60
|
_ = e, Ft(e);
|
|
61
61
|
}
|
|
62
62
|
function qt() {
|
|
63
|
-
xe.clear(),
|
|
64
|
-
|
|
63
|
+
xe.clear(), re.clear(), me.value++, X !== null && clearTimeout(X), X = setTimeout(() => {
|
|
64
|
+
X = null, Nt();
|
|
65
65
|
}, Mt);
|
|
66
66
|
}
|
|
67
67
|
function Je() {
|
|
68
|
-
return se++, be ||
|
|
69
|
-
se <= 0 ? e() : be = e,
|
|
70
|
-
}),
|
|
68
|
+
return se++, be || ie ? ie ?? Promise.resolve() : (ie = Lt(St, qt).then((e) => {
|
|
69
|
+
se <= 0 ? e() : be = e, ie = null;
|
|
70
|
+
}), ie);
|
|
71
71
|
}
|
|
72
72
|
function Te() {
|
|
73
73
|
se--, !(se > 0) && (se = 0, be?.(), be = null);
|
|
@@ -76,17 +76,17 @@ function Ht(e, n) {
|
|
|
76
76
|
const t = `${n}:${e}`, a = xe.get(t);
|
|
77
77
|
if (a !== void 0)
|
|
78
78
|
return Promise.resolve(a);
|
|
79
|
-
const l =
|
|
79
|
+
const l = re.get(t);
|
|
80
80
|
if (l)
|
|
81
81
|
return l;
|
|
82
82
|
const o = me.value, s = (n === "symbol" ? Dt(e) : Tt(e)).then((u) => (me.value === o && xe.set(t, u), u)).finally(() => {
|
|
83
|
-
|
|
83
|
+
re.get(t) === s && re.delete(t);
|
|
84
84
|
});
|
|
85
|
-
return
|
|
85
|
+
return re.set(t, s), s;
|
|
86
86
|
}
|
|
87
87
|
function Yl() {
|
|
88
88
|
let e = !1;
|
|
89
|
-
return
|
|
89
|
+
return W(async () => {
|
|
90
90
|
await Je(), e && Te();
|
|
91
91
|
}), ve(() => {
|
|
92
92
|
e || (e = !0, Te());
|
|
@@ -107,13 +107,13 @@ function Ut(e, n) {
|
|
|
107
107
|
const f = await Ht(m, n.value);
|
|
108
108
|
u === l && !a && (t.value = f);
|
|
109
109
|
}
|
|
110
|
-
return
|
|
110
|
+
return W(async () => {
|
|
111
111
|
await Je(), a || await s();
|
|
112
112
|
}), ve(() => {
|
|
113
113
|
a = !0, Pt(o), Te();
|
|
114
|
-
}),
|
|
114
|
+
}), Q([e, n], s), { fuente: t, mirarElemento: (u) => jt(o, u) };
|
|
115
115
|
}
|
|
116
|
-
const Kt = ["src", "alt"],
|
|
116
|
+
const Kt = ["src", "alt"], N = /* @__PURE__ */ D({
|
|
117
117
|
__name: "ThemeIcon",
|
|
118
118
|
props: {
|
|
119
119
|
name: {},
|
|
@@ -123,9 +123,9 @@ const Kt = ["src", "alt"], H = /* @__PURE__ */ D({
|
|
|
123
123
|
},
|
|
124
124
|
setup(e) {
|
|
125
125
|
const n = e, { fuente: t, mirarElemento: a } = Ut(Pe(n, "name"), Pe(n, "type")), l = pt("dibujo");
|
|
126
|
-
|
|
126
|
+
Q(l, (s) => a(s), { immediate: !0 });
|
|
127
127
|
const o = v(() => `${n.size}px`);
|
|
128
|
-
return (s, u) => F(t) ? (
|
|
128
|
+
return (s, u) => F(t) ? (i(), r("img", {
|
|
129
129
|
key: 0,
|
|
130
130
|
ref_key: "dibujo",
|
|
131
131
|
ref: l,
|
|
@@ -133,7 +133,7 @@ const Kt = ["src", "alt"], H = /* @__PURE__ */ D({
|
|
|
133
133
|
alt: e.alt,
|
|
134
134
|
style: fe({ width: o.value, height: o.value }),
|
|
135
135
|
class: "shrink-0 object-contain"
|
|
136
|
-
}, null, 12, Kt)) : (
|
|
136
|
+
}, null, 12, Kt)) : (i(), r("span", {
|
|
137
137
|
key: 1,
|
|
138
138
|
ref_key: "dibujo",
|
|
139
139
|
ref: l,
|
|
@@ -153,28 +153,28 @@ const Kt = ["src", "alt"], H = /* @__PURE__ */ D({
|
|
|
153
153
|
},
|
|
154
154
|
setup(e) {
|
|
155
155
|
const n = e, t = w(n.defaultOpen);
|
|
156
|
-
return
|
|
156
|
+
return Q(
|
|
157
157
|
() => n.collapsed,
|
|
158
158
|
(a) => {
|
|
159
159
|
a && (t.value = !0);
|
|
160
160
|
}
|
|
161
|
-
), (a, l) => (
|
|
162
|
-
e.collapsed ? x("", !0) : (
|
|
161
|
+
), (a, l) => (i(), r("section", Wt, [
|
|
162
|
+
e.collapsed ? x("", !0) : (i(), r("button", {
|
|
163
163
|
key: 0,
|
|
164
164
|
type: "button",
|
|
165
165
|
class: "group flex w-full items-center justify-between rounded-corner px-2 py-1 text-tx-muted text-xs uppercase tracking-[0.08em] hover:bg-ui-surface/60",
|
|
166
166
|
"aria-expanded": t.value,
|
|
167
167
|
onClick: l[0] || (l[0] = (o) => t.value = !t.value)
|
|
168
168
|
}, [
|
|
169
|
-
|
|
170
|
-
O(
|
|
169
|
+
B("span", null, M(e.title), 1),
|
|
170
|
+
O(N, {
|
|
171
171
|
name: "pan-down-symbolic",
|
|
172
172
|
type: "symbol",
|
|
173
173
|
size: 12,
|
|
174
|
-
class:
|
|
174
|
+
class: y(["transition-transform duration-200", t.value ? "" : "-rotate-90"])
|
|
175
175
|
}, null, 8, ["class"])
|
|
176
176
|
], 8, Gt)),
|
|
177
|
-
t.value || e.collapsed ? (
|
|
177
|
+
t.value || e.collapsed ? (i(), r("div", Qt, [
|
|
178
178
|
S(a.$slots, "default")
|
|
179
179
|
])) : x("", !0)
|
|
180
180
|
]));
|
|
@@ -197,31 +197,31 @@ const Kt = ["src", "alt"], H = /* @__PURE__ */ D({
|
|
|
197
197
|
},
|
|
198
198
|
emits: ["click"],
|
|
199
199
|
setup(e) {
|
|
200
|
-
return (n, t) => (
|
|
200
|
+
return (n, t) => (i(), r("button", {
|
|
201
201
|
type: "button",
|
|
202
202
|
title: e.collapsed ? e.label : void 0,
|
|
203
203
|
"aria-label": e.collapsed ? e.label : void 0,
|
|
204
204
|
disabled: e.disabled,
|
|
205
205
|
"aria-current": e.active ? "page" : void 0,
|
|
206
|
-
class:
|
|
206
|
+
class: y(["group relative flex w-full items-center gap-3 rounded-corner border px-3 py-2 text-left text-sm transition-[color,background-color,border-color,scale] duration-200 active:scale-[0.98]", [
|
|
207
207
|
e.active ? "border-secondary bg-primary/15 text-tx-main shadow-sm" : "border-transparent bg-transparent hover:border-ui-border hover:bg-ui-surface/70",
|
|
208
208
|
e.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer",
|
|
209
209
|
e.collapsed ? "justify-center px-2" : ""
|
|
210
210
|
]]),
|
|
211
211
|
onClick: t[0] || (t[0] = (a) => n.$emit("click"))
|
|
212
212
|
}, [
|
|
213
|
-
|
|
214
|
-
class:
|
|
213
|
+
B("span", {
|
|
214
|
+
class: y(["flex h-8 w-8 shrink-0 items-center justify-center rounded-corner font-semibold text-xs uppercase tracking-wide", e.active ? "border-secondary bg-primary/20" : ""]),
|
|
215
215
|
"aria-hidden": "true"
|
|
216
216
|
}, [
|
|
217
|
-
e.icon ? (
|
|
217
|
+
e.icon ? (i(), U(N, {
|
|
218
218
|
key: 0,
|
|
219
219
|
name: e.icon,
|
|
220
220
|
size: 20
|
|
221
|
-
}, null, 8, ["name"])) : (
|
|
221
|
+
}, null, 8, ["name"])) : (i(), r("span", Xt, M(e.label.charAt(0).toUpperCase()), 1))
|
|
222
222
|
], 2),
|
|
223
|
-
e.collapsed ? x("", !0) : (
|
|
224
|
-
!e.collapsed && e.badge !== "" ? (
|
|
223
|
+
e.collapsed ? x("", !0) : (i(), r("span", Jt, M(e.label), 1)),
|
|
224
|
+
!e.collapsed && e.badge !== "" ? (i(), r("span", Zt, M(e.badge), 1)) : x("", !0)
|
|
225
225
|
], 10, Yt));
|
|
226
226
|
}
|
|
227
227
|
}), _t = {
|
|
@@ -236,10 +236,10 @@ const Kt = ["src", "alt"], H = /* @__PURE__ */ D({
|
|
|
236
236
|
}, la = {
|
|
237
237
|
key: 1,
|
|
238
238
|
class: "truncate text-tx-muted text-xs"
|
|
239
|
-
}, oa = { key: 0 },
|
|
239
|
+
}, oa = { key: 0 }, ia = {
|
|
240
240
|
key: 1,
|
|
241
241
|
class: "flex border-ui-border border-b p-2"
|
|
242
|
-
},
|
|
242
|
+
}, ra = ["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({
|
|
243
243
|
__name: "SideBar",
|
|
244
244
|
props: {
|
|
245
245
|
title: { default: "" },
|
|
@@ -256,84 +256,84 @@ const Kt = ["src", "alt"], H = /* @__PURE__ */ D({
|
|
|
256
256
|
let u = null, m = null;
|
|
257
257
|
const f = v(() => s.value || o.value), d = v(() => !!(a.title || a.subtitle));
|
|
258
258
|
v(() => a.categories.length > 0);
|
|
259
|
-
function
|
|
259
|
+
function E() {
|
|
260
260
|
return document.documentElement?.clientWidth || window.innerWidth;
|
|
261
261
|
}
|
|
262
|
-
function
|
|
263
|
-
s.value =
|
|
262
|
+
function L() {
|
|
263
|
+
s.value = E() <= Ne;
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function A() {
|
|
266
266
|
o.value = !o.value, l("update:collapsed", o.value);
|
|
267
267
|
}
|
|
268
268
|
function g($) {
|
|
269
269
|
l("update:modelValue", $), l("change", $);
|
|
270
270
|
}
|
|
271
|
-
return
|
|
271
|
+
return Q(
|
|
272
272
|
() => a.collapsed,
|
|
273
273
|
($) => {
|
|
274
274
|
$ !== void 0 && (o.value = $);
|
|
275
275
|
}
|
|
276
|
-
),
|
|
277
|
-
u = window.matchMedia(`(max-width: ${Ne}px)`),
|
|
276
|
+
), W(() => {
|
|
277
|
+
u = window.matchMedia(`(max-width: ${Ne}px)`), L(), u.addEventListener("change", L), window.addEventListener("resize", L), typeof ResizeObserver < "u" && document.documentElement && (m = new ResizeObserver(L), m.observe(document.documentElement));
|
|
278
278
|
}), pe(() => {
|
|
279
|
-
u?.removeEventListener("change",
|
|
280
|
-
}), n({ collapsed: f }), ($, j) => (
|
|
281
|
-
class:
|
|
279
|
+
u?.removeEventListener("change", L), window.removeEventListener("resize", L), m?.disconnect(), m = null;
|
|
280
|
+
}), n({ collapsed: f }), ($, j) => (i(), r("aside", {
|
|
281
|
+
class: y(["relative z-30 flex h-full shrink-0 flex-col rounded-corner border border-ui-border bg-ui-surface/70 transition-[width] duration-300", ["w-[84px]", f.value ? "md:w-[84px]" : "md:w-72"]])
|
|
282
282
|
}, [
|
|
283
|
-
d.value || $.$slots.header ? (
|
|
284
|
-
|
|
285
|
-
|
|
283
|
+
d.value || $.$slots.header ? (i(), r("header", _t, [
|
|
284
|
+
B("div", ea, [
|
|
285
|
+
B("button", {
|
|
286
286
|
type: "button",
|
|
287
|
-
class:
|
|
287
|
+
class: y(Fe),
|
|
288
288
|
"aria-label": f.value ? e.expandLabel : e.collapseLabel,
|
|
289
289
|
"aria-expanded": !f.value,
|
|
290
|
-
onClick:
|
|
290
|
+
onClick: A
|
|
291
291
|
}, [
|
|
292
|
-
O(
|
|
292
|
+
O(N, {
|
|
293
293
|
name: f.value ? "pan-end-symbolic" : "pan-start-symbolic",
|
|
294
294
|
type: "symbol",
|
|
295
295
|
size: 16
|
|
296
296
|
}, null, 8, ["name"])
|
|
297
297
|
], 8, ta),
|
|
298
|
-
d.value && !f.value ? (
|
|
299
|
-
e.title ? (
|
|
300
|
-
e.subtitle ? (
|
|
298
|
+
d.value && !f.value ? (i(), r("div", aa, [
|
|
299
|
+
e.title ? (i(), r("p", na, M(e.title), 1)) : x("", !0),
|
|
300
|
+
e.subtitle ? (i(), r("p", la, M(e.subtitle), 1)) : x("", !0)
|
|
301
301
|
])) : x("", !0)
|
|
302
302
|
]),
|
|
303
|
-
$.$slots.header && !f.value ? (
|
|
303
|
+
$.$slots.header && !f.value ? (i(), r("div", oa, [
|
|
304
304
|
S($.$slots, "header", { collapsed: f.value })
|
|
305
305
|
])) : x("", !0)
|
|
306
|
-
])) : (
|
|
307
|
-
|
|
306
|
+
])) : (i(), r("div", ia, [
|
|
307
|
+
B("button", {
|
|
308
308
|
type: "button",
|
|
309
|
-
class:
|
|
309
|
+
class: y(Fe),
|
|
310
310
|
"aria-label": f.value ? e.expandLabel : e.collapseLabel,
|
|
311
311
|
"aria-expanded": !f.value,
|
|
312
|
-
onClick:
|
|
312
|
+
onClick: A
|
|
313
313
|
}, [
|
|
314
|
-
O(
|
|
314
|
+
O(N, {
|
|
315
315
|
name: f.value ? "pan-end-symbolic" : "pan-start-symbolic",
|
|
316
316
|
type: "symbol",
|
|
317
317
|
size: 16
|
|
318
318
|
}, null, 8, ["name"])
|
|
319
|
-
], 8,
|
|
319
|
+
], 8, ra)
|
|
320
320
|
])),
|
|
321
|
-
|
|
322
|
-
(
|
|
321
|
+
B("div", sa, [
|
|
322
|
+
(i(!0), r(te, null, ue(e.categories, (C) => (i(), U(Ze, {
|
|
323
323
|
key: C.id,
|
|
324
324
|
title: C.title,
|
|
325
325
|
collapsed: f.value
|
|
326
326
|
}, {
|
|
327
|
-
default:
|
|
328
|
-
(
|
|
329
|
-
key:
|
|
330
|
-
label:
|
|
331
|
-
icon:
|
|
332
|
-
badge:
|
|
333
|
-
disabled:
|
|
327
|
+
default: G(() => [
|
|
328
|
+
(i(!0), r(te, null, ue(C.items, (h) => (i(), U(_e, {
|
|
329
|
+
key: h.id,
|
|
330
|
+
label: h.label,
|
|
331
|
+
icon: h.icon,
|
|
332
|
+
badge: h.badge,
|
|
333
|
+
disabled: h.disabled,
|
|
334
334
|
collapsed: f.value,
|
|
335
|
-
active: e.modelValue ===
|
|
336
|
-
onClick: (c) => g(
|
|
335
|
+
active: e.modelValue === h.id,
|
|
336
|
+
onClick: (c) => g(h.id)
|
|
337
337
|
}, null, 8, ["label", "icon", "badge", "disabled", "collapsed", "active", "onClick"]))), 128))
|
|
338
338
|
]),
|
|
339
339
|
_: 2
|
|
@@ -355,30 +355,30 @@ const Kt = ["src", "alt"], H = /* @__PURE__ */ D({
|
|
|
355
355
|
}),
|
|
356
356
|
emits: /* @__PURE__ */ Re(["change"], ["update:modelValue"]),
|
|
357
357
|
setup(e, { emit: n }) {
|
|
358
|
-
const t = e, a = Be(), l =
|
|
358
|
+
const t = e, a = Be(), l = yt(), o = v(() => a.id ?? l), s = n, [u, m] = gt(e, "modelValue", {
|
|
359
359
|
set(f) {
|
|
360
360
|
return m.number ? Number(f) : f;
|
|
361
361
|
}
|
|
362
362
|
});
|
|
363
|
-
return (f, d) => (
|
|
364
|
-
t.label ? (
|
|
363
|
+
return (f, d) => (i(), r("div", ca, [
|
|
364
|
+
t.label ? (i(), r("label", {
|
|
365
365
|
key: 0,
|
|
366
366
|
for: o.value,
|
|
367
367
|
class: "text-tx-muted text-xs"
|
|
368
368
|
}, M(t.label), 9, da)) : x("", !0),
|
|
369
|
-
|
|
370
|
-
Se(
|
|
369
|
+
B("div", fa, [
|
|
370
|
+
Se(B("select", ce({
|
|
371
371
|
id: o.value,
|
|
372
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
372
|
+
"onUpdate:modelValue": d[0] || (d[0] = (E) => ht(u) ? u.value = E : null),
|
|
373
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"
|
|
374
374
|
}, F(a), {
|
|
375
|
-
onChange: d[1] || (d[1] = (
|
|
375
|
+
onChange: d[1] || (d[1] = (E) => s("change", E))
|
|
376
376
|
}), [
|
|
377
377
|
S(f.$slots, "default")
|
|
378
378
|
], 16, ma), [
|
|
379
379
|
[xt, F(u)]
|
|
380
380
|
]),
|
|
381
|
-
O(
|
|
381
|
+
O(N, {
|
|
382
382
|
name: "pan-down-symbolic",
|
|
383
383
|
type: "symbol",
|
|
384
384
|
size: 14,
|
|
@@ -405,9 +405,9 @@ function he() {
|
|
|
405
405
|
vertical: v(() => Ae(n.value) === "vertical")
|
|
406
406
|
};
|
|
407
407
|
}
|
|
408
|
-
const Ie = ["minimize", "maximize", "close"],
|
|
408
|
+
const Ie = ["minimize", "maximize", "close"], ya = "window", ga = "barPosition";
|
|
409
409
|
function ha(e) {
|
|
410
|
-
const t = e?.[
|
|
410
|
+
const t = e?.[ya]?.[ga];
|
|
411
411
|
return pa(t) ? t : null;
|
|
412
412
|
}
|
|
413
413
|
function xa(e = "top") {
|
|
@@ -420,7 +420,7 @@ function xa(e = "top") {
|
|
|
420
420
|
} catch {
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
-
return
|
|
423
|
+
return W(async () => {
|
|
424
424
|
await l();
|
|
425
425
|
try {
|
|
426
426
|
const { listen: o } = await import("@tauri-apps/api/event"), s = await o("config-changed", () => {
|
|
@@ -445,7 +445,7 @@ function et(e) {
|
|
|
445
445
|
}
|
|
446
446
|
return t;
|
|
447
447
|
}
|
|
448
|
-
const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title", "aria-label"],
|
|
448
|
+
const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title", "aria-label"], Ee = "flex items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 p-1 transition-colors", tt = /* @__PURE__ */ D({
|
|
449
449
|
__name: "WindowControls",
|
|
450
450
|
props: {
|
|
451
451
|
controls: { default: () => Ie },
|
|
@@ -463,64 +463,64 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
463
463
|
function d() {
|
|
464
464
|
return At();
|
|
465
465
|
}
|
|
466
|
-
const
|
|
467
|
-
function
|
|
468
|
-
return !!
|
|
466
|
+
const E = Ge();
|
|
467
|
+
function L(j) {
|
|
468
|
+
return !!E?.vnode.props?.[`on${j}`];
|
|
469
469
|
}
|
|
470
|
-
function
|
|
471
|
-
if (
|
|
470
|
+
function A() {
|
|
471
|
+
if (L("Minimize")) return u("minimize");
|
|
472
472
|
d().minimize();
|
|
473
473
|
}
|
|
474
474
|
function g() {
|
|
475
|
-
if (
|
|
475
|
+
if (L("Maximize")) return u("maximize");
|
|
476
476
|
d().toggleMaximize();
|
|
477
477
|
}
|
|
478
478
|
function $() {
|
|
479
|
-
if (
|
|
479
|
+
if (L("Close")) return u("close");
|
|
480
480
|
d().close();
|
|
481
481
|
}
|
|
482
|
-
return (j, C) => e.controls.length ? (
|
|
482
|
+
return (j, C) => e.controls.length ? (i(), r("div", {
|
|
483
483
|
key: 0,
|
|
484
|
-
class:
|
|
484
|
+
class: y(["flex shrink-0 gap-1", F(m) ? "flex-col" : ""]),
|
|
485
485
|
"data-tauri-drag-region": ""
|
|
486
486
|
}, [
|
|
487
|
-
f.value.minimize ? (
|
|
487
|
+
f.value.minimize ? (i(), r("button", {
|
|
488
488
|
key: 0,
|
|
489
489
|
type: "button",
|
|
490
|
-
class:
|
|
490
|
+
class: y([Ee, "hover:bg-status-success"]),
|
|
491
491
|
title: l.value,
|
|
492
492
|
"aria-label": l.value,
|
|
493
|
-
onClick: C[0] || (C[0] = (
|
|
493
|
+
onClick: C[0] || (C[0] = (h) => A())
|
|
494
494
|
}, [
|
|
495
|
-
O(
|
|
495
|
+
O(N, {
|
|
496
496
|
name: "window-minimize",
|
|
497
497
|
type: "symbol",
|
|
498
498
|
size: 24
|
|
499
499
|
})
|
|
500
500
|
], 10, wa)) : x("", !0),
|
|
501
|
-
f.value.maximize ? (
|
|
501
|
+
f.value.maximize ? (i(), r("button", {
|
|
502
502
|
key: 1,
|
|
503
503
|
type: "button",
|
|
504
|
-
class:
|
|
504
|
+
class: y([Ee, "hover:bg-status-warning"]),
|
|
505
505
|
title: o.value,
|
|
506
506
|
"aria-label": o.value,
|
|
507
|
-
onClick: C[1] || (C[1] = (
|
|
507
|
+
onClick: C[1] || (C[1] = (h) => g())
|
|
508
508
|
}, [
|
|
509
|
-
O(
|
|
509
|
+
O(N, {
|
|
510
510
|
name: "window-maximize",
|
|
511
511
|
type: "symbol",
|
|
512
512
|
size: 24
|
|
513
513
|
})
|
|
514
514
|
], 10, ka)) : x("", !0),
|
|
515
|
-
f.value.close ? (
|
|
515
|
+
f.value.close ? (i(), r("button", {
|
|
516
516
|
key: 2,
|
|
517
517
|
type: "button",
|
|
518
|
-
class:
|
|
518
|
+
class: y([Ee, "hover:bg-status-error"]),
|
|
519
519
|
title: s.value,
|
|
520
520
|
"aria-label": s.value,
|
|
521
|
-
onClick: C[2] || (C[2] = (
|
|
521
|
+
onClick: C[2] || (C[2] = (h) => $())
|
|
522
522
|
}, [
|
|
523
|
-
O(
|
|
523
|
+
O(N, {
|
|
524
524
|
name: "window-close",
|
|
525
525
|
type: "symbol",
|
|
526
526
|
size: 24
|
|
@@ -532,7 +532,7 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
532
532
|
key: 0,
|
|
533
533
|
class: "flex shrink-0 items-center",
|
|
534
534
|
"data-tauri-drag-region": ""
|
|
535
|
-
},
|
|
535
|
+
}, za = {
|
|
536
536
|
key: 1,
|
|
537
537
|
class: "min-w-0 shrink truncate text-sm",
|
|
538
538
|
"data-tauri-drag-region": ""
|
|
@@ -549,31 +549,31 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
549
549
|
emits: ["minimize", "maximize", "close"],
|
|
550
550
|
setup(e) {
|
|
551
551
|
const n = e, t = he(), a = v(() => n.position ?? t.posicion.value), l = v(() => a.value === "left" || a.value === "right");
|
|
552
|
-
return
|
|
552
|
+
return ye(Ve, {
|
|
553
553
|
posicion: a,
|
|
554
554
|
orientacion: v(() => l.value ? "vertical" : "horizontal"),
|
|
555
555
|
vertical: l
|
|
556
|
-
}), (o, s) => (
|
|
557
|
-
class:
|
|
556
|
+
}), (o, s) => (i(), r("div", {
|
|
557
|
+
class: y(["relative flex shrink-0 items-center gap-2 p-1 font-title", l.value ? "h-full flex-col" : "w-full"]),
|
|
558
558
|
"data-tauri-drag-region": ""
|
|
559
559
|
}, [
|
|
560
|
-
o.$slots.identidad ? (
|
|
560
|
+
o.$slots.identidad ? (i(), r("div", Ca, [
|
|
561
561
|
S(o.$slots, "identidad")
|
|
562
562
|
])) : x("", !0),
|
|
563
|
-
(o.$slots.titulo || e.title) && !l.value ? (
|
|
563
|
+
(o.$slots.titulo || e.title) && !l.value ? (i(), r("p", za, [
|
|
564
564
|
S(o.$slots, "titulo", {}, () => [
|
|
565
565
|
Me(M(e.title), 1)
|
|
566
566
|
])
|
|
567
567
|
])) : x("", !0),
|
|
568
|
-
|
|
569
|
-
class:
|
|
568
|
+
B("div", {
|
|
569
|
+
class: y(["flex min-h-0 min-w-0 flex-1 items-center gap-2 overflow-auto", l.value ? "flex-col" : ""]),
|
|
570
570
|
"data-tauri-drag-region": ""
|
|
571
571
|
}, [
|
|
572
572
|
S(o.$slots, "default")
|
|
573
573
|
], 2),
|
|
574
|
-
o.$slots.acciones ? (
|
|
574
|
+
o.$slots.acciones ? (i(), r("div", {
|
|
575
575
|
key: 2,
|
|
576
|
-
class:
|
|
576
|
+
class: y(["flex shrink-0 items-center gap-1", l.value ? "flex-col" : ""])
|
|
577
577
|
}, [
|
|
578
578
|
S(o.$slots, "acciones")
|
|
579
579
|
], 2)) : x("", !0),
|
|
@@ -583,19 +583,19 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
583
583
|
"maximize-label": e.maximizeLabel,
|
|
584
584
|
"close-label": e.closeLabel
|
|
585
585
|
}, Qe(F(et)(["minimize", "maximize", "close"]))), null, 16, ["controls", "minimize-label", "maximize-label", "close-label"]),
|
|
586
|
-
o.$slots.centro ? (
|
|
586
|
+
o.$slots.centro ? (i(), r("div", {
|
|
587
587
|
key: 3,
|
|
588
|
-
class:
|
|
588
|
+
class: y(["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"])
|
|
589
589
|
}, [
|
|
590
|
-
|
|
591
|
-
class:
|
|
590
|
+
B("div", {
|
|
591
|
+
class: y(["pointer-events-auto flex items-center gap-2", l.value ? "flex-col" : ""])
|
|
592
592
|
}, [
|
|
593
593
|
S(o.$slots, "centro")
|
|
594
594
|
], 2)
|
|
595
595
|
], 2)) : x("", !0)
|
|
596
596
|
], 2));
|
|
597
597
|
}
|
|
598
|
-
}),
|
|
598
|
+
}), Ea = { class: "flex min-h-0 min-w-0 flex-1" }, La = /* @__PURE__ */ D({
|
|
599
599
|
__name: "WindowFrame",
|
|
600
600
|
props: {
|
|
601
601
|
position: { default: null },
|
|
@@ -609,17 +609,17 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
609
609
|
emits: ["minimize", "maximize", "close"],
|
|
610
610
|
setup(e) {
|
|
611
611
|
const n = e, t = xa(), a = v(() => n.position ?? t.value), l = v(() => Ae(a.value)), o = v(() => l.value === "vertical");
|
|
612
|
-
|
|
612
|
+
ye(Ve, { posicion: a, orientacion: l, vertical: o });
|
|
613
613
|
const s = {
|
|
614
614
|
top: "flex-col",
|
|
615
615
|
bottom: "flex-col-reverse",
|
|
616
616
|
left: "flex-row",
|
|
617
617
|
right: "flex-row-reverse"
|
|
618
618
|
};
|
|
619
|
-
return (u, m) => (
|
|
620
|
-
class:
|
|
619
|
+
return (u, m) => (i(), r("div", {
|
|
620
|
+
class: y(["flex h-screen w-screen overflow-hidden rounded-corner-window border border-ui-border bg-ui-bg/80", s[a.value]])
|
|
621
621
|
}, [
|
|
622
|
-
e.hideBar ? x("", !0) : (
|
|
622
|
+
e.hideBar ? x("", !0) : (i(), U(at, ce({
|
|
623
623
|
key: 0,
|
|
624
624
|
position: a.value,
|
|
625
625
|
title: e.title,
|
|
@@ -628,41 +628,41 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
628
628
|
"close-label": e.closeLabel,
|
|
629
629
|
controls: e.controls
|
|
630
630
|
}, Qe(F(et)(["minimize", "maximize", "close"]))), wt({
|
|
631
|
-
default:
|
|
631
|
+
default: G(() => [
|
|
632
632
|
S(u.$slots, "barra")
|
|
633
633
|
]),
|
|
634
634
|
_: 2
|
|
635
635
|
}, [
|
|
636
636
|
u.$slots.identidad ? {
|
|
637
637
|
name: "identidad",
|
|
638
|
-
fn:
|
|
638
|
+
fn: G(() => [
|
|
639
639
|
S(u.$slots, "identidad")
|
|
640
640
|
]),
|
|
641
641
|
key: "0"
|
|
642
642
|
} : void 0,
|
|
643
643
|
u.$slots.titulo ? {
|
|
644
644
|
name: "titulo",
|
|
645
|
-
fn:
|
|
645
|
+
fn: G(() => [
|
|
646
646
|
S(u.$slots, "titulo")
|
|
647
647
|
]),
|
|
648
648
|
key: "1"
|
|
649
649
|
} : void 0,
|
|
650
650
|
u.$slots.centro ? {
|
|
651
651
|
name: "centro",
|
|
652
|
-
fn:
|
|
652
|
+
fn: G(() => [
|
|
653
653
|
S(u.$slots, "centro")
|
|
654
654
|
]),
|
|
655
655
|
key: "2"
|
|
656
656
|
} : void 0,
|
|
657
657
|
u.$slots.acciones ? {
|
|
658
658
|
name: "acciones",
|
|
659
|
-
fn:
|
|
659
|
+
fn: G(() => [
|
|
660
660
|
S(u.$slots, "acciones")
|
|
661
661
|
]),
|
|
662
662
|
key: "3"
|
|
663
663
|
} : void 0
|
|
664
664
|
]), 1040, ["position", "title", "minimize-label", "maximize-label", "close-label", "controls"])),
|
|
665
|
-
|
|
665
|
+
B("div", Ea, [
|
|
666
666
|
S(u.$slots, "default")
|
|
667
667
|
])
|
|
668
668
|
], 2));
|
|
@@ -688,62 +688,62 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
688
688
|
},
|
|
689
689
|
emits: ["select", "close", "menu", "mover", "navegar"],
|
|
690
690
|
setup(e, { emit: n }) {
|
|
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),
|
|
692
|
-
let
|
|
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), E = w({ top: 0, left: 0, right: 0 });
|
|
692
|
+
let L = null, A = null;
|
|
693
693
|
const g = v(() => t.tab.closable !== !1), $ = v(() => t.tab.tooltip ?? t.tab.label), j = v(
|
|
694
694
|
() => t.tab.dirty ? `${t.tab.label} · ${t.dirtyLabel}` : t.tab.label
|
|
695
|
-
), C = v(() => t.tab.label.trim().charAt(0).toUpperCase()),
|
|
696
|
-
() => !!t.tab.dirty && !(
|
|
695
|
+
), C = v(() => t.tab.label.trim().charAt(0).toUpperCase()), h = v(() => m.value || d.value), c = v(
|
|
696
|
+
() => !!t.tab.dirty && !(h.value && g.value)
|
|
697
697
|
), b = v(
|
|
698
|
-
() => g.value && (
|
|
698
|
+
() => g.value && (h.value || t.active || !t.tab.dirty)
|
|
699
699
|
), p = v(
|
|
700
700
|
() => l.value && (m.value || f.value || d.value)
|
|
701
701
|
), P = v(() => {
|
|
702
|
-
const
|
|
703
|
-
return o.value === "right" ? { ...
|
|
702
|
+
const q = { position: "fixed", top: `${E.value.top}px`, zIndex: 50 };
|
|
703
|
+
return o.value === "right" ? { ...q, right: `${E.value.right + He}px` } : { ...q, left: `${E.value.left + He}px` };
|
|
704
704
|
});
|
|
705
705
|
function le() {
|
|
706
|
-
const
|
|
707
|
-
if (!
|
|
708
|
-
const k =
|
|
709
|
-
|
|
706
|
+
const q = s.value;
|
|
707
|
+
if (!q) return;
|
|
708
|
+
const k = q.getBoundingClientRect();
|
|
709
|
+
E.value = {
|
|
710
710
|
top: k.top,
|
|
711
711
|
left: k.right,
|
|
712
712
|
right: window.innerWidth - k.left
|
|
713
713
|
};
|
|
714
714
|
}
|
|
715
|
-
function
|
|
716
|
-
const k =
|
|
715
|
+
function K(q) {
|
|
716
|
+
const k = q.relatedTarget;
|
|
717
717
|
k && u.value?.contains(k) || (d.value = !1);
|
|
718
718
|
}
|
|
719
719
|
function oe() {
|
|
720
720
|
m.value = !0, le();
|
|
721
721
|
}
|
|
722
|
-
function
|
|
722
|
+
function Y() {
|
|
723
723
|
f.value = !0, le();
|
|
724
724
|
}
|
|
725
|
-
function
|
|
726
|
-
|
|
725
|
+
function T() {
|
|
726
|
+
L !== null && clearTimeout(L), L = null, A = null;
|
|
727
727
|
}
|
|
728
|
-
function
|
|
729
|
-
|
|
730
|
-
|
|
728
|
+
function z(q) {
|
|
729
|
+
q.button === 0 && (A = { x: q.clientX, y: q.clientY }, L = setTimeout(() => {
|
|
730
|
+
A && a("menu", A), T();
|
|
731
731
|
}, Ia));
|
|
732
732
|
}
|
|
733
|
-
function I(
|
|
734
|
-
if (!
|
|
735
|
-
(Math.abs(
|
|
733
|
+
function I(q) {
|
|
734
|
+
if (!A) return;
|
|
735
|
+
(Math.abs(q.clientX - A.x) > qe || Math.abs(q.clientY - A.y) > qe) && T();
|
|
736
736
|
}
|
|
737
|
-
function de(
|
|
738
|
-
|
|
737
|
+
function de(q) {
|
|
738
|
+
q.button === 1 && g.value && (q.preventDefault(), a("close"));
|
|
739
739
|
}
|
|
740
|
-
function bt(
|
|
741
|
-
|
|
740
|
+
function bt(q) {
|
|
741
|
+
q.preventDefault(), a("menu", { x: q.clientX, y: q.clientY });
|
|
742
742
|
}
|
|
743
|
-
return pe(
|
|
743
|
+
return pe(T), (q, k) => (i(), r("div", {
|
|
744
744
|
ref_key: "raiz",
|
|
745
745
|
ref: s,
|
|
746
|
-
class:
|
|
746
|
+
class: y(["group relative flex shrink-0 cursor-pointer items-center gap-2 rounded-corner border border-ui-border transition-colors", [
|
|
747
747
|
e.active ? "bg-primary font-bold text-tx-on-primary" : "bg-ui-bg/80 hover:bg-ui-surface/70",
|
|
748
748
|
F(l) ? "size-8 justify-center p-0 text-sm" : "w-34 max-w-34 px-3 py-1 text-sm"
|
|
749
749
|
]]),
|
|
@@ -752,88 +752,88 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
752
752
|
title: $.value,
|
|
753
753
|
"aria-label": j.value,
|
|
754
754
|
tabindex: e.tabindex,
|
|
755
|
-
onClick: k[5] || (k[5] = V((
|
|
755
|
+
onClick: k[5] || (k[5] = V((H) => a("select"), ["stop"])),
|
|
756
756
|
onKeydown: [
|
|
757
|
-
k[6] || (k[6] = R(V((
|
|
758
|
-
k[7] || (k[7] = R(V((
|
|
759
|
-
k[8] || (k[8] = R(V((
|
|
760
|
-
k[9] || (k[9] = R(V((
|
|
761
|
-
k[10] || (k[10] = R(V((
|
|
762
|
-
k[11] || (k[11] = R(V((
|
|
763
|
-
k[12] || (k[12] = R(V((
|
|
764
|
-
k[13] || (k[13] = R(V((
|
|
765
|
-
k[14] || (k[14] = R(V((
|
|
766
|
-
k[15] || (k[15] = R(V((
|
|
767
|
-
k[16] || (k[16] = R(V((
|
|
768
|
-
k[17] || (k[17] = R(V((
|
|
769
|
-
k[18] || (k[18] = R(V((
|
|
757
|
+
k[6] || (k[6] = R(V((H) => a("select"), ["stop"]), ["enter"])),
|
|
758
|
+
k[7] || (k[7] = R(V((H) => a("select"), ["prevent", "stop"]), ["space"])),
|
|
759
|
+
k[8] || (k[8] = R(V((H) => a("navegar", "anterior"), ["prevent", "stop"]), ["left"])),
|
|
760
|
+
k[9] || (k[9] = R(V((H) => a("navegar", "anterior"), ["prevent", "stop"]), ["up"])),
|
|
761
|
+
k[10] || (k[10] = R(V((H) => a("navegar", "siguiente"), ["prevent", "stop"]), ["right"])),
|
|
762
|
+
k[11] || (k[11] = R(V((H) => a("navegar", "siguiente"), ["prevent", "stop"]), ["down"])),
|
|
763
|
+
k[12] || (k[12] = R(V((H) => a("navegar", "primera"), ["prevent", "stop"]), ["home"])),
|
|
764
|
+
k[13] || (k[13] = R(V((H) => a("navegar", "ultima"), ["prevent", "stop"]), ["end"])),
|
|
765
|
+
k[14] || (k[14] = R(V((H) => a("mover", -1), ["alt", "prevent", "stop"]), ["left"])),
|
|
766
|
+
k[15] || (k[15] = R(V((H) => a("mover", -1), ["alt", "prevent", "stop"]), ["up"])),
|
|
767
|
+
k[16] || (k[16] = R(V((H) => a("mover", 1), ["alt", "prevent", "stop"]), ["right"])),
|
|
768
|
+
k[17] || (k[17] = R(V((H) => a("mover", 1), ["alt", "prevent", "stop"]), ["down"])),
|
|
769
|
+
k[18] || (k[18] = R(V((H) => g.value && a("close"), ["prevent", "stop"]), ["delete"]))
|
|
770
770
|
],
|
|
771
771
|
onAuxclick: V(de, ["stop"]),
|
|
772
772
|
onContextmenu: bt,
|
|
773
|
-
onPointerdown:
|
|
773
|
+
onPointerdown: z,
|
|
774
774
|
onPointermove: I,
|
|
775
|
-
onPointerup:
|
|
776
|
-
onPointerleave:
|
|
775
|
+
onPointerup: T,
|
|
776
|
+
onPointerleave: T,
|
|
777
777
|
onMouseenter: oe,
|
|
778
|
-
onMouseleave: k[19] || (k[19] = (
|
|
779
|
-
onFocus:
|
|
780
|
-
onBlur: k[20] || (k[20] = (
|
|
778
|
+
onMouseleave: k[19] || (k[19] = (H) => m.value = !1),
|
|
779
|
+
onFocus: Y,
|
|
780
|
+
onBlur: k[20] || (k[20] = (H) => f.value = !1)
|
|
781
781
|
}, [
|
|
782
|
-
e.tab.icon ? (
|
|
782
|
+
e.tab.icon ? (i(), U(N, {
|
|
783
783
|
key: 0,
|
|
784
784
|
name: e.tab.icon,
|
|
785
785
|
size: 16,
|
|
786
786
|
class: "shrink-0"
|
|
787
|
-
}, null, 8, ["name"])) : F(l) ? (
|
|
788
|
-
F(l) ? x("", !0) : (
|
|
789
|
-
c.value ? (
|
|
787
|
+
}, null, 8, ["name"])) : F(l) ? (i(), r("span", Ta, M(C.value), 1)) : x("", !0),
|
|
788
|
+
F(l) ? x("", !0) : (i(), r("span", Aa, M(e.tab.label), 1)),
|
|
789
|
+
c.value ? (i(), r("span", {
|
|
790
790
|
key: 3,
|
|
791
|
-
class:
|
|
791
|
+
class: y(["size-2 shrink-0 rounded-full bg-current", F(l) ? "absolute right-0.5 top-0.5" : ""]),
|
|
792
792
|
"aria-hidden": "true"
|
|
793
|
-
}, null, 2)) : b.value && !F(l) ? (
|
|
793
|
+
}, null, 2)) : b.value && !F(l) ? (i(), r("button", {
|
|
794
794
|
key: 4,
|
|
795
795
|
type: "button",
|
|
796
796
|
class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
|
|
797
797
|
title: e.closeLabel,
|
|
798
798
|
"aria-label": `${e.closeLabel}: ${j.value}`,
|
|
799
|
-
onClick: k[0] || (k[0] = V((
|
|
799
|
+
onClick: k[0] || (k[0] = V((H) => a("close"), ["stop"]))
|
|
800
800
|
}, [
|
|
801
|
-
O(
|
|
801
|
+
O(N, {
|
|
802
802
|
name: "gtk-close",
|
|
803
803
|
type: "symbol",
|
|
804
804
|
size: 12
|
|
805
805
|
})
|
|
806
806
|
], 8, Ba)) : x("", !0),
|
|
807
|
-
(
|
|
807
|
+
(i(), U(ge, { to: "body" }, [
|
|
808
808
|
O(ke, {
|
|
809
809
|
"enter-active-class": "transition duration-150 ease-out",
|
|
810
810
|
"enter-from-class": "opacity-0 scale-95",
|
|
811
811
|
"leave-active-class": "transition duration-100 ease-in",
|
|
812
812
|
"leave-to-class": "opacity-0 scale-95"
|
|
813
813
|
}, {
|
|
814
|
-
default:
|
|
815
|
-
p.value ? (
|
|
814
|
+
default: G(() => [
|
|
815
|
+
p.value ? (i(), r("div", {
|
|
816
816
|
key: 0,
|
|
817
|
-
class:
|
|
817
|
+
class: y(["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" : ""]),
|
|
818
818
|
ref_key: "desplegadoRef",
|
|
819
819
|
ref: u,
|
|
820
820
|
style: fe(P.value),
|
|
821
|
-
onMouseenter: k[2] || (k[2] = (
|
|
822
|
-
onMouseleave: k[3] || (k[3] = (
|
|
823
|
-
onFocusin: k[4] || (k[4] = (
|
|
824
|
-
onFocusout:
|
|
821
|
+
onMouseenter: k[2] || (k[2] = (H) => d.value = !0),
|
|
822
|
+
onMouseleave: k[3] || (k[3] = (H) => d.value = !1),
|
|
823
|
+
onFocusin: k[4] || (k[4] = (H) => d.value = !0),
|
|
824
|
+
onFocusout: K
|
|
825
825
|
}, [
|
|
826
|
-
|
|
827
|
-
e.tab.dirty ? (
|
|
828
|
-
g.value ? (
|
|
826
|
+
B("span", Sa, M(e.tab.label), 1),
|
|
827
|
+
e.tab.dirty ? (i(), r("span", Ma)) : x("", !0),
|
|
828
|
+
g.value ? (i(), r("button", {
|
|
829
829
|
key: 1,
|
|
830
830
|
type: "button",
|
|
831
831
|
class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
|
|
832
832
|
title: e.closeLabel,
|
|
833
833
|
"aria-label": `${e.closeLabel}: ${j.value}`,
|
|
834
|
-
onClick: k[1] || (k[1] = V((
|
|
834
|
+
onClick: k[1] || (k[1] = V((H) => a("close"), ["stop"]))
|
|
835
835
|
}, [
|
|
836
|
-
O(
|
|
836
|
+
O(N, {
|
|
837
837
|
name: "gtk-close",
|
|
838
838
|
type: "symbol",
|
|
839
839
|
size: 12
|
|
@@ -859,39 +859,39 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
859
859
|
emits: ["update:modelValue", "select", "close", "new", "reorder", "menu"],
|
|
860
860
|
setup(e, { emit: n }) {
|
|
861
861
|
const t = e, a = n, { vertical: l } = he(), o = w(null), s = w(0), u = w(null), m = w(null);
|
|
862
|
-
function f(
|
|
863
|
-
a("update:modelValue",
|
|
862
|
+
function f(h) {
|
|
863
|
+
a("update:modelValue", h), a("select", h);
|
|
864
864
|
}
|
|
865
|
-
async function d(
|
|
865
|
+
async function d(h, c) {
|
|
866
866
|
const b = t.tabs.length - 1;
|
|
867
867
|
if (b < 0) return;
|
|
868
|
-
const p = c === "primera" ? 0 : c === "ultima" ? b : c === "anterior" ? (
|
|
869
|
-
s.value = p, await
|
|
868
|
+
const p = c === "primera" ? 0 : c === "ultima" ? b : c === "anterior" ? (h - 1 + t.tabs.length) % t.tabs.length : (h + 1) % t.tabs.length;
|
|
869
|
+
s.value = p, await J(), o.value?.querySelectorAll('[role="tab"]')?.[p]?.focus();
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function E(h, c) {
|
|
872
872
|
if (t.fixedOrder) return;
|
|
873
|
-
const b =
|
|
873
|
+
const b = h + c;
|
|
874
874
|
if (b < 0 || b >= t.tabs.length) return;
|
|
875
|
-
const p = [...t.tabs], [P] = p.splice(
|
|
875
|
+
const p = [...t.tabs], [P] = p.splice(h, 1);
|
|
876
876
|
P && (p.splice(b, 0, P), s.value = b, a("reorder", p));
|
|
877
877
|
}
|
|
878
|
-
function
|
|
878
|
+
function L(h) {
|
|
879
879
|
const c = o.value;
|
|
880
880
|
if (!c) return;
|
|
881
|
-
const b =
|
|
882
|
-
l.value ? c.scrollTop += b : c.scrollLeft += b, (l.value ? c.scrollTop : c.scrollLeft) !== p &&
|
|
881
|
+
const b = h.deltaY || h.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 && h.preventDefault();
|
|
883
883
|
}
|
|
884
|
-
function
|
|
885
|
-
t.fixedOrder || (u.value =
|
|
884
|
+
function A(h, c) {
|
|
885
|
+
t.fixedOrder || (u.value = h, c.dataTransfer?.setData("text/plain", String(h)), c.dataTransfer && (c.dataTransfer.effectAllowed = "move"));
|
|
886
886
|
}
|
|
887
|
-
function g(
|
|
888
|
-
t.fixedOrder || u.value === null || (c.preventDefault(), m.value =
|
|
887
|
+
function g(h, c) {
|
|
888
|
+
t.fixedOrder || u.value === null || (c.preventDefault(), m.value = h, c.dataTransfer && (c.dataTransfer.dropEffect = "move"));
|
|
889
889
|
}
|
|
890
|
-
function $(
|
|
890
|
+
function $(h) {
|
|
891
891
|
const c = u.value;
|
|
892
|
-
if (j(), t.fixedOrder || c === null || c ===
|
|
892
|
+
if (j(), t.fixedOrder || c === null || c === h) return;
|
|
893
893
|
const b = [...t.tabs], [p] = b.splice(c, 1);
|
|
894
|
-
p && (b.splice(
|
|
894
|
+
p && (b.splice(h, 0, p), a("reorder", b));
|
|
895
895
|
}
|
|
896
896
|
function j() {
|
|
897
897
|
u.value = null, m.value = null;
|
|
@@ -899,25 +899,25 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
899
899
|
const C = v(
|
|
900
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"
|
|
901
901
|
);
|
|
902
|
-
return (
|
|
903
|
-
class:
|
|
902
|
+
return (h, c) => (i(), r("div", {
|
|
903
|
+
class: y(["flex min-h-0 min-w-0 items-center gap-1", F(l) ? "w-full flex-col" : "h-full"]),
|
|
904
904
|
role: "tablist",
|
|
905
905
|
"aria-orientation": F(l) ? "vertical" : "horizontal"
|
|
906
906
|
}, [
|
|
907
|
-
|
|
907
|
+
B("div", {
|
|
908
908
|
ref_key: "carril",
|
|
909
909
|
ref: o,
|
|
910
|
-
class:
|
|
911
|
-
onWheel:
|
|
910
|
+
class: y(C.value),
|
|
911
|
+
onWheel: L
|
|
912
912
|
}, [
|
|
913
|
-
(
|
|
913
|
+
(i(!0), r(te, null, ue(e.tabs, (b, p) => (i(), r("div", {
|
|
914
914
|
key: b.id,
|
|
915
|
-
class:
|
|
915
|
+
class: y(["transition-opacity", [
|
|
916
916
|
u.value === p ? "opacity-40" : "",
|
|
917
917
|
m.value === p && u.value !== p ? "ring-2 ring-secondary rounded-corner" : ""
|
|
918
918
|
]]),
|
|
919
919
|
draggable: !e.fixedOrder,
|
|
920
|
-
onDragstart: (P) =>
|
|
920
|
+
onDragstart: (P) => A(p, P),
|
|
921
921
|
onDragover: (P) => g(p, P),
|
|
922
922
|
onDrop: V((P) => $(p), ["prevent"]),
|
|
923
923
|
onDragend: j
|
|
@@ -932,11 +932,11 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
932
932
|
onClose: (P) => a("close", b.id),
|
|
933
933
|
onMenu: (P) => a("menu", { id: b.id, ...P }),
|
|
934
934
|
onNavegar: (P) => d(p, P),
|
|
935
|
-
onMover: (P) =>
|
|
935
|
+
onMover: (P) => E(p, P)
|
|
936
936
|
}, null, 8, ["tab", "active", "close-label", "dirty-label", "tabindex", "onSelect", "onClose", "onMenu", "onNavegar", "onMover"])
|
|
937
937
|
], 42, ja))), 128))
|
|
938
938
|
], 34),
|
|
939
|
-
e.newLabel ? (
|
|
939
|
+
e.newLabel ? (i(), r("button", {
|
|
940
940
|
key: 0,
|
|
941
941
|
type: "button",
|
|
942
942
|
class: "flex size-7 shrink-0 items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 hover:bg-ui-surface/70",
|
|
@@ -944,7 +944,7 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
944
944
|
"aria-label": e.newLabel,
|
|
945
945
|
onClick: c[0] || (c[0] = (b) => a("new"))
|
|
946
946
|
}, [
|
|
947
|
-
O(
|
|
947
|
+
O(N, {
|
|
948
948
|
name: "gtk-add",
|
|
949
949
|
type: "symbol",
|
|
950
950
|
size: 14
|
|
@@ -990,7 +990,7 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
990
990
|
a.mono ? "font-mono" : "",
|
|
991
991
|
a.disabled ? "cursor-not-allowed opacity-60" : ""
|
|
992
992
|
]);
|
|
993
|
-
return (d,
|
|
993
|
+
return (d, E) => (i(), r("input", {
|
|
994
994
|
ref_key: "campo",
|
|
995
995
|
ref: u,
|
|
996
996
|
id: e.id,
|
|
@@ -1004,11 +1004,11 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1004
1004
|
"aria-describedby": e.describedBy,
|
|
1005
1005
|
autocomplete: e.autocomplete,
|
|
1006
1006
|
"aria-invalid": e.invalid || void 0,
|
|
1007
|
-
class:
|
|
1007
|
+
class: y(f.value),
|
|
1008
1008
|
onInput: o,
|
|
1009
1009
|
onChange: s,
|
|
1010
|
-
onKeyup:
|
|
1011
|
-
onKeydown:
|
|
1010
|
+
onKeyup: E[0] || (E[0] = (L) => l("keyup", L)),
|
|
1011
|
+
onKeydown: E[1] || (E[1] = (L) => l("keydown", L))
|
|
1012
1012
|
}, null, 42, Fa));
|
|
1013
1013
|
}
|
|
1014
1014
|
}), Na = { class: "pointer-events-none absolute left-2 flex items-center" }, qa = ["aria-label"], Oe = /* @__PURE__ */ D({
|
|
@@ -1042,35 +1042,35 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1042
1042
|
function d() {
|
|
1043
1043
|
clearTimeout(s), s = void 0;
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1045
|
+
function E($) {
|
|
1046
1046
|
l("update:modelValue", $), !(a.debounce <= 0) && (d(), s = setTimeout(() => l("search", $), a.debounce));
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1048
|
+
function L() {
|
|
1049
1049
|
d(), l("search", a.modelValue);
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1051
|
+
function A() {
|
|
1052
1052
|
d(), l("update:modelValue", ""), l("clear"), g();
|
|
1053
1053
|
}
|
|
1054
1054
|
function g() {
|
|
1055
1055
|
return o.value?.enfocar() ?? !1;
|
|
1056
1056
|
}
|
|
1057
|
-
return n({ enfocar: g }),
|
|
1058
|
-
a.autofocus && (await
|
|
1059
|
-
}), ve(d),
|
|
1057
|
+
return n({ enfocar: g }), W(async () => {
|
|
1058
|
+
a.autofocus && (await J(), g());
|
|
1059
|
+
}), ve(d), Q(
|
|
1060
1060
|
() => a.disabled,
|
|
1061
1061
|
($) => {
|
|
1062
1062
|
$ && d();
|
|
1063
1063
|
}
|
|
1064
|
-
), ($, j) => (
|
|
1064
|
+
), ($, j) => (i(), r("div", {
|
|
1065
1065
|
class: "relative flex items-center",
|
|
1066
|
-
onKeydown: R(
|
|
1066
|
+
onKeydown: R(L, ["enter"])
|
|
1067
1067
|
}, [
|
|
1068
|
-
|
|
1069
|
-
O(
|
|
1068
|
+
B("span", Na, [
|
|
1069
|
+
O(N, {
|
|
1070
1070
|
name: e.busy ? "content-loading" : "system-search",
|
|
1071
1071
|
type: "symbol",
|
|
1072
1072
|
size: 14,
|
|
1073
|
-
class:
|
|
1073
|
+
class: y(e.busy ? "animate-spin opacity-70" : "opacity-60")
|
|
1074
1074
|
}, null, 8, ["name", "class"])
|
|
1075
1075
|
]),
|
|
1076
1076
|
O(lt, ce({
|
|
@@ -1083,19 +1083,19 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1083
1083
|
}, m.value, {
|
|
1084
1084
|
disabled: e.disabled,
|
|
1085
1085
|
class: ["pl-7 [&::-webkit-search-cancel-button]:appearance-none", f.value ? "pr-8" : ""],
|
|
1086
|
-
"onUpdate:modelValue":
|
|
1086
|
+
"onUpdate:modelValue": E,
|
|
1087
1087
|
onKeydown: j[0] || (j[0] = (C) => l("keydown", C))
|
|
1088
1088
|
}), null, 16, ["model-value", "placeholder", "ariaLabel", "disabled", "class"]),
|
|
1089
|
-
f.value ? (
|
|
1089
|
+
f.value ? (i(), r("button", {
|
|
1090
1090
|
key: 0,
|
|
1091
1091
|
type: "button",
|
|
1092
1092
|
class: "absolute right-1 flex size-6 items-center justify-center rounded-corner text-tx-muted hover:bg-ui-surface",
|
|
1093
1093
|
"aria-label": e.label ? `${e.label}: vaciar` : "Vaciar",
|
|
1094
1094
|
onMousedown: j[1] || (j[1] = V(() => {
|
|
1095
1095
|
}, ["prevent"])),
|
|
1096
|
-
onClick:
|
|
1096
|
+
onClick: A
|
|
1097
1097
|
}, [
|
|
1098
|
-
O(
|
|
1098
|
+
O(N, {
|
|
1099
1099
|
name: "gtk-close",
|
|
1100
1100
|
type: "symbol",
|
|
1101
1101
|
size: 12,
|
|
@@ -1121,21 +1121,21 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1121
1121
|
const g = "absolute z-40 w-64 rounded-corner border border-ui-border bg-ui-surface/95 p-1 shadow-lg";
|
|
1122
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`;
|
|
1123
1123
|
});
|
|
1124
|
-
async function
|
|
1125
|
-
s.value = !0, a("open"), await
|
|
1124
|
+
async function E() {
|
|
1125
|
+
s.value = !0, a("open"), await J(), u.value?.enfocar();
|
|
1126
1126
|
}
|
|
1127
|
-
function
|
|
1127
|
+
function L() {
|
|
1128
1128
|
s.value && (s.value = !1, a("close"));
|
|
1129
1129
|
}
|
|
1130
|
-
function
|
|
1130
|
+
function A(g) {
|
|
1131
1131
|
const $ = g.relatedTarget;
|
|
1132
|
-
$ && g.currentTarget.contains($) ||
|
|
1132
|
+
$ && g.currentTarget.contains($) || L();
|
|
1133
1133
|
}
|
|
1134
|
-
return (g, $) => (
|
|
1134
|
+
return (g, $) => (i(), r("div", {
|
|
1135
1135
|
class: "relative flex shrink-0 items-center",
|
|
1136
|
-
onFocusout:
|
|
1136
|
+
onFocusout: A
|
|
1137
1137
|
}, [
|
|
1138
|
-
m.value ? (
|
|
1138
|
+
m.value ? (i(), r("button", {
|
|
1139
1139
|
key: 0,
|
|
1140
1140
|
type: "button",
|
|
1141
1141
|
class: "flex size-7 items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 hover:bg-ui-surface/70",
|
|
@@ -1144,18 +1144,18 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1144
1144
|
"aria-expanded": s.value,
|
|
1145
1145
|
onMousedown: $[0] || ($[0] = V(() => {
|
|
1146
1146
|
}, ["prevent"])),
|
|
1147
|
-
onClick: $[1] || ($[1] = (j) => s.value ?
|
|
1147
|
+
onClick: $[1] || ($[1] = (j) => s.value ? L() : E())
|
|
1148
1148
|
}, [
|
|
1149
|
-
O(
|
|
1149
|
+
O(N, {
|
|
1150
1150
|
name: "system-search",
|
|
1151
1151
|
type: "symbol",
|
|
1152
1152
|
size: 14
|
|
1153
1153
|
})
|
|
1154
1154
|
], 40, Ha)) : x("", !0),
|
|
1155
|
-
f.value ? (
|
|
1155
|
+
f.value ? (i(), r("div", {
|
|
1156
1156
|
key: 1,
|
|
1157
|
-
class:
|
|
1158
|
-
onKeydown: R(
|
|
1157
|
+
class: y(d.value),
|
|
1158
|
+
onKeydown: R(L, ["esc"])
|
|
1159
1159
|
}, [
|
|
1160
1160
|
O(Oe, {
|
|
1161
1161
|
ref_key: "campo",
|
|
@@ -1165,7 +1165,7 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1165
1165
|
label: e.label,
|
|
1166
1166
|
disabled: e.disabled,
|
|
1167
1167
|
debounce: e.debounce,
|
|
1168
|
-
class:
|
|
1168
|
+
class: y(m.value ? "" : "w-48"),
|
|
1169
1169
|
"onUpdate:modelValue": $[2] || ($[2] = (j) => a("update:modelValue", j)),
|
|
1170
1170
|
onSearch: $[3] || ($[3] = (j) => a("search", j))
|
|
1171
1171
|
}, null, 8, ["model-value", "placeholder", "label", "disabled", "debounce", "class"])
|
|
@@ -1205,10 +1205,10 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1205
1205
|
}, s = (u) => {
|
|
1206
1206
|
t.stopPropagation && u.stopPropagation(), t.preventDefault && u.preventDefault(), !t.disabled && !t.loading && a("click");
|
|
1207
1207
|
};
|
|
1208
|
-
return (u, m) => (
|
|
1208
|
+
return (u, m) => (i(), r("button", {
|
|
1209
1209
|
type: t.type,
|
|
1210
1210
|
onClick: s,
|
|
1211
|
-
class:
|
|
1211
|
+
class: y(["rounded-corner transition-[background-color,opacity] duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2", [
|
|
1212
1212
|
l[t.variant],
|
|
1213
1213
|
o[t.size],
|
|
1214
1214
|
t.fullWidth ? "w-full" : "",
|
|
@@ -1217,15 +1217,15 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1217
1217
|
]]),
|
|
1218
1218
|
disabled: t.disabled || t.loading
|
|
1219
1219
|
}, [
|
|
1220
|
-
e.loading ? (
|
|
1221
|
-
t.iconSrc && !t.iconRight ? (
|
|
1220
|
+
e.loading ? (i(), r("span", Wa)) : x("", !0),
|
|
1221
|
+
t.iconSrc && !t.iconRight ? (i(), r("img", {
|
|
1222
1222
|
key: 1,
|
|
1223
1223
|
src: t.iconSrc,
|
|
1224
1224
|
alt: t.iconAlt || t.label,
|
|
1225
1225
|
class: "w-4 h-4"
|
|
1226
1226
|
}, null, 8, Ga)) : x("", !0),
|
|
1227
|
-
t.label ? (
|
|
1228
|
-
t.iconSrc && t.iconRight ? (
|
|
1227
|
+
t.label ? (i(), r("span", Qa, M(t.label), 1)) : x("", !0),
|
|
1228
|
+
t.iconSrc && t.iconRight ? (i(), r("img", {
|
|
1229
1229
|
key: 3,
|
|
1230
1230
|
src: t.iconSrc,
|
|
1231
1231
|
alt: t.iconAlt || t.label,
|
|
@@ -1244,7 +1244,7 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1244
1244
|
warning: "border-status-warning/40 bg-status-warning/10 text-tx-main",
|
|
1245
1245
|
error: "border-status-error/40 bg-status-error/10 text-tx-main"
|
|
1246
1246
|
};
|
|
1247
|
-
function
|
|
1247
|
+
function it(e) {
|
|
1248
1248
|
return e === "error" ? "alert" : "status";
|
|
1249
1249
|
}
|
|
1250
1250
|
const Za = ["role"], _a = {
|
|
@@ -1262,24 +1262,24 @@ const Za = ["role"], _a = {
|
|
|
1262
1262
|
iconType: { default: "symbol" }
|
|
1263
1263
|
},
|
|
1264
1264
|
setup(e) {
|
|
1265
|
-
const n = e, t = v(() => ot[n.tone]), a = v(() =>
|
|
1266
|
-
return (l, o) => (
|
|
1265
|
+
const n = e, t = v(() => ot[n.tone]), a = v(() => it(n.tone));
|
|
1266
|
+
return (l, o) => (i(), r("div", {
|
|
1267
1267
|
role: a.value,
|
|
1268
1268
|
"aria-atomic": "true",
|
|
1269
|
-
class:
|
|
1269
|
+
class: y(["flex gap-3 rounded-corner border px-4 py-2 text-sm", t.value])
|
|
1270
1270
|
}, [
|
|
1271
|
-
e.icon ? (
|
|
1272
|
-
O(
|
|
1271
|
+
e.icon ? (i(), r("span", _a, [
|
|
1272
|
+
O(N, {
|
|
1273
1273
|
name: e.icon,
|
|
1274
1274
|
type: e.iconType,
|
|
1275
1275
|
size: 18,
|
|
1276
1276
|
alt: ""
|
|
1277
1277
|
}, null, 8, ["name", "type"])
|
|
1278
1278
|
])) : x("", !0),
|
|
1279
|
-
|
|
1280
|
-
e.title ? (
|
|
1281
|
-
|
|
1282
|
-
class:
|
|
1279
|
+
B("div", en, [
|
|
1280
|
+
e.title ? (i(), r("p", tn, M(e.title), 1)) : x("", !0),
|
|
1281
|
+
B("div", {
|
|
1282
|
+
class: y(e.title ? "mt-1" : "")
|
|
1283
1283
|
}, [
|
|
1284
1284
|
S(l.$slots, "default")
|
|
1285
1285
|
], 2)
|
|
@@ -1299,17 +1299,17 @@ const Za = ["role"], _a = {
|
|
|
1299
1299
|
bordered: { type: Boolean, default: !1 }
|
|
1300
1300
|
},
|
|
1301
1301
|
setup(e) {
|
|
1302
|
-
return (n, t) => (
|
|
1303
|
-
class:
|
|
1302
|
+
return (n, t) => (i(), r("div", {
|
|
1303
|
+
class: y(["flex flex-col items-center justify-center gap-3 px-8 py-12 text-center", e.bordered ? "rounded-corner border border-ui-border border-dashed bg-ui-surface/20" : ""])
|
|
1304
1304
|
}, [
|
|
1305
|
-
O(
|
|
1305
|
+
O(N, {
|
|
1306
1306
|
name: e.icon,
|
|
1307
1307
|
type: e.iconType,
|
|
1308
1308
|
size: 48,
|
|
1309
1309
|
class: "opacity-60"
|
|
1310
1310
|
}, null, 8, ["name", "type"]),
|
|
1311
|
-
|
|
1312
|
-
e.note ? (
|
|
1311
|
+
B("p", nn, M(e.title), 1),
|
|
1312
|
+
e.note ? (i(), r("p", ln, M(e.note), 1)) : x("", !0),
|
|
1313
1313
|
S(n.$slots, "default")
|
|
1314
1314
|
], 2));
|
|
1315
1315
|
}
|
|
@@ -1320,13 +1320,13 @@ const Za = ["role"], _a = {
|
|
|
1320
1320
|
bordered: { type: Boolean, default: !1 }
|
|
1321
1321
|
},
|
|
1322
1322
|
setup(e) {
|
|
1323
|
-
return (n, t) => (
|
|
1323
|
+
return (n, t) => (i(), r("div", {
|
|
1324
1324
|
role: "status",
|
|
1325
1325
|
"aria-atomic": "true",
|
|
1326
|
-
class:
|
|
1326
|
+
class: y(["flex flex-col items-center justify-center gap-4 px-8 py-12 text-center", e.bordered ? "rounded-corner border border-ui-border border-dashed bg-ui-surface/20" : ""])
|
|
1327
1327
|
}, [
|
|
1328
|
-
t[0] || (t[0] =
|
|
1329
|
-
|
|
1328
|
+
t[0] || (t[0] = B("span", { class: "h-10 w-10 animate-spin rounded-full border-4 border-ui-border border-t-primary motion-reduce:animate-none" }, null, -1)),
|
|
1329
|
+
B("p", rn, M(e.label), 1)
|
|
1330
1330
|
], 2));
|
|
1331
1331
|
}
|
|
1332
1332
|
}), un = ["role"], cn = /* @__PURE__ */ D({
|
|
@@ -1339,9 +1339,9 @@ const Za = ["role"], _a = {
|
|
|
1339
1339
|
const n = e, t = v(
|
|
1340
1340
|
() => n.position === "bottom-center" ? "bottom-4 left-1/2 -translate-x-1/2" : "right-4 bottom-4"
|
|
1341
1341
|
);
|
|
1342
|
-
return (a, l) => (
|
|
1343
|
-
|
|
1344
|
-
class:
|
|
1342
|
+
return (a, l) => (i(), U(ge, { to: "body" }, [
|
|
1343
|
+
B("div", {
|
|
1344
|
+
class: y(["pointer-events-none fixed z-60 flex flex-col gap-2", t.value])
|
|
1345
1345
|
}, [
|
|
1346
1346
|
O(kt, {
|
|
1347
1347
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
@@ -1350,12 +1350,12 @@ const Za = ["role"], _a = {
|
|
|
1350
1350
|
"leave-to-class": "translate-y-2 opacity-0",
|
|
1351
1351
|
"move-class": "transition-transform duration-300"
|
|
1352
1352
|
}, {
|
|
1353
|
-
default:
|
|
1354
|
-
(
|
|
1353
|
+
default: G(() => [
|
|
1354
|
+
(i(!0), r(te, null, ue(e.toasts, (o) => (i(), r("div", {
|
|
1355
1355
|
key: o.id,
|
|
1356
|
-
role: F(
|
|
1356
|
+
role: F(it)(o.tone ?? "info"),
|
|
1357
1357
|
"aria-atomic": "true",
|
|
1358
|
-
class:
|
|
1358
|
+
class: y(["pointer-events-auto rounded-corner border px-4 py-2 text-sm shadow-lg backdrop-blur-sm", F(ot)[o.tone ?? "info"]])
|
|
1359
1359
|
}, [
|
|
1360
1360
|
S(a.$slots, "default", { aviso: o }, () => [
|
|
1361
1361
|
Me(M(o.message), 1)
|
|
@@ -1385,7 +1385,7 @@ const Za = ["role"], _a = {
|
|
|
1385
1385
|
}, a = v(
|
|
1386
1386
|
() => n.value === null ? null : Math.max(0, Math.min(100, n.value))
|
|
1387
1387
|
);
|
|
1388
|
-
return (l, o) => (
|
|
1388
|
+
return (l, o) => (i(), r("div", {
|
|
1389
1389
|
role: "progressbar",
|
|
1390
1390
|
"aria-label": e.label,
|
|
1391
1391
|
"aria-valuenow": a.value ?? void 0,
|
|
@@ -1393,15 +1393,15 @@ const Za = ["role"], _a = {
|
|
|
1393
1393
|
"aria-valuemax": "100",
|
|
1394
1394
|
class: "h-2 w-full overflow-hidden rounded-corner bg-ui-surface/70"
|
|
1395
1395
|
}, [
|
|
1396
|
-
a.value !== null ? (
|
|
1396
|
+
a.value !== null ? (i(), r("div", {
|
|
1397
1397
|
key: 0,
|
|
1398
|
-
class:
|
|
1398
|
+
class: y(["h-full rounded-corner transition-[width] duration-300 ease-out", t[e.tone]]),
|
|
1399
1399
|
style: fe({ width: `${a.value}%` })
|
|
1400
|
-
}, null, 6)) : (
|
|
1400
|
+
}, null, 6)) : (i(), r("div", fn))
|
|
1401
1401
|
], 8, dn));
|
|
1402
1402
|
}
|
|
1403
1403
|
}), bn = /[/\-_.]/;
|
|
1404
|
-
function
|
|
1404
|
+
function Le(e, n) {
|
|
1405
1405
|
if (!n) return 100;
|
|
1406
1406
|
const t = n.toLowerCase();
|
|
1407
1407
|
return t === e ? 0 : t.startsWith(e) ? 10 : t.split(bn).some((a) => a.startsWith(e)) ? 30 : t.includes(e) ? 40 : 100;
|
|
@@ -1411,8 +1411,8 @@ function vn(e, n) {
|
|
|
1411
1411
|
if (!t) return e;
|
|
1412
1412
|
const a = [];
|
|
1413
1413
|
for (let l = 0; l < e.length; l++) {
|
|
1414
|
-
const o = e[l], s =
|
|
1415
|
-
|
|
1414
|
+
const o = e[l], s = Le(t, o.valor), u = Le(t, o.etiqueta), m = u === 10 ? 20 : u, d = Le(t, o.detalle) === 100 ? 100 : 40, E = Math.min(s, m, d);
|
|
1415
|
+
E !== 100 && a.push({ opcion: o, rango: E, orden: l });
|
|
1416
1416
|
}
|
|
1417
1417
|
return a.sort((l, o) => l.rango - o.rango || l.orden - o.orden), a.map((l) => l.opcion);
|
|
1418
1418
|
}
|
|
@@ -1420,19 +1420,19 @@ let Ue = 0;
|
|
|
1420
1420
|
function pn() {
|
|
1421
1421
|
return Ue += 1, `vsk-lista-${Ue}`;
|
|
1422
1422
|
}
|
|
1423
|
-
const
|
|
1423
|
+
const yn = ["disabled", "aria-label", "aria-expanded"], gn = { class: "min-w-0 flex-1 truncate" }, hn = {
|
|
1424
1424
|
key: 0,
|
|
1425
1425
|
class: "ml-2 text-tx-muted text-xs"
|
|
1426
1426
|
}, xn = { class: "border-ui-border border-b p-2" }, wn = ["id"], kn = {
|
|
1427
1427
|
key: 0,
|
|
1428
1428
|
class: "p-3 text-center text-tx-muted text-xs"
|
|
1429
|
-
}, $n = ["id", "data-indice", "aria-selected"], Cn = { class: "min-w-0 flex-1 truncate" },
|
|
1429
|
+
}, $n = ["id", "data-indice", "aria-selected"], Cn = { class: "min-w-0 flex-1 truncate" }, zn = {
|
|
1430
1430
|
key: 0,
|
|
1431
1431
|
class: "shrink-0 text-tx-muted text-xs"
|
|
1432
|
-
},
|
|
1432
|
+
}, En = {
|
|
1433
1433
|
key: 1,
|
|
1434
1434
|
class: "px-2 py-1 text-tx-muted text-xs"
|
|
1435
|
-
},
|
|
1435
|
+
}, Ln = /* @__PURE__ */ D({
|
|
1436
1436
|
__name: "SearchSelect",
|
|
1437
1437
|
props: {
|
|
1438
1438
|
modelValue: {},
|
|
@@ -1447,69 +1447,69 @@ const gn = ["disabled", "aria-label", "aria-expanded"], yn = { class: "min-w-0 f
|
|
|
1447
1447
|
},
|
|
1448
1448
|
emits: ["update:modelValue"],
|
|
1449
1449
|
setup(e, { emit: n }) {
|
|
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(),
|
|
1451
|
-
() => t.options.find((
|
|
1452
|
-
),
|
|
1453
|
-
() =>
|
|
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(), E = v(
|
|
1451
|
+
() => t.options.find((T) => T.valor === t.modelValue) ?? null
|
|
1452
|
+
), L = v(() => vn(t.options, l.value)), A = v(() => L.value.slice(0, t.limit)), g = v(() => Math.max(0, L.value.length - t.limit)), $ = v(
|
|
1453
|
+
() => A.value.length > 0 ? `${d}-${s.value}` : void 0
|
|
1454
1454
|
);
|
|
1455
|
-
function j(
|
|
1456
|
-
a("update:modelValue",
|
|
1455
|
+
function j(T) {
|
|
1456
|
+
a("update:modelValue", T), h();
|
|
1457
1457
|
}
|
|
1458
1458
|
async function C() {
|
|
1459
1459
|
o.value = !0;
|
|
1460
|
-
const
|
|
1461
|
-
s.value =
|
|
1460
|
+
const T = A.value.findIndex((z) => z.valor === t.modelValue);
|
|
1461
|
+
s.value = T >= 0 ? T : 0, await J(), f.value?.enfocar(), K();
|
|
1462
1462
|
}
|
|
1463
|
-
function
|
|
1464
|
-
o.value && (o.value = !1, l.value = "",
|
|
1463
|
+
function h(T = !0) {
|
|
1464
|
+
o.value && (o.value = !1, l.value = "", T && J(() => m.value?.focus()));
|
|
1465
1465
|
}
|
|
1466
|
-
function c(
|
|
1467
|
-
const
|
|
1468
|
-
|
|
1466
|
+
function c(T) {
|
|
1467
|
+
const z = A.value.length;
|
|
1468
|
+
z !== 0 && (s.value = (s.value + T + z) % z, K());
|
|
1469
1469
|
}
|
|
1470
|
-
function b(
|
|
1471
|
-
s.value =
|
|
1470
|
+
function b(T) {
|
|
1471
|
+
s.value = T, K();
|
|
1472
1472
|
}
|
|
1473
|
-
function p(
|
|
1474
|
-
const
|
|
1475
|
-
if (!
|
|
1476
|
-
const I = Number(
|
|
1473
|
+
function p(T) {
|
|
1474
|
+
const z = T.target?.closest?.("[data-indice]");
|
|
1475
|
+
if (!z) return null;
|
|
1476
|
+
const I = Number(z.getAttribute("data-indice"));
|
|
1477
1477
|
return Number.isInteger(I) ? I : null;
|
|
1478
1478
|
}
|
|
1479
|
-
function P(
|
|
1480
|
-
const
|
|
1479
|
+
function P(T) {
|
|
1480
|
+
const z = p(T), I = z === null ? void 0 : A.value[z];
|
|
1481
1481
|
I && j(I.valor);
|
|
1482
1482
|
}
|
|
1483
|
-
function le(
|
|
1484
|
-
const
|
|
1485
|
-
|
|
1483
|
+
function le(T) {
|
|
1484
|
+
const z = p(T);
|
|
1485
|
+
z !== null && (s.value = z);
|
|
1486
1486
|
}
|
|
1487
|
-
function
|
|
1488
|
-
|
|
1487
|
+
function K() {
|
|
1488
|
+
J(() => {
|
|
1489
1489
|
u.value?.querySelector(`[data-indice="${s.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
1490
1490
|
});
|
|
1491
1491
|
}
|
|
1492
1492
|
function oe() {
|
|
1493
|
-
const
|
|
1494
|
-
|
|
1493
|
+
const T = A.value[s.value];
|
|
1494
|
+
T && j(T.valor);
|
|
1495
1495
|
}
|
|
1496
|
-
|
|
1496
|
+
Q(
|
|
1497
1497
|
() => t.disabled,
|
|
1498
|
-
(
|
|
1499
|
-
|
|
1498
|
+
(T) => {
|
|
1499
|
+
T && h(!1);
|
|
1500
1500
|
}
|
|
1501
|
-
),
|
|
1502
|
-
s.value = 0,
|
|
1501
|
+
), Q(l, () => {
|
|
1502
|
+
s.value = 0, K();
|
|
1503
1503
|
});
|
|
1504
|
-
function
|
|
1505
|
-
const
|
|
1506
|
-
|
|
1504
|
+
function Y(T) {
|
|
1505
|
+
const z = T.relatedTarget;
|
|
1506
|
+
z && T.currentTarget.contains(z) || h(!1);
|
|
1507
1507
|
}
|
|
1508
|
-
return (
|
|
1508
|
+
return (T, z) => (i(), r("div", {
|
|
1509
1509
|
class: "relative",
|
|
1510
|
-
onFocusout:
|
|
1510
|
+
onFocusout: Y
|
|
1511
1511
|
}, [
|
|
1512
|
-
|
|
1512
|
+
B("button", {
|
|
1513
1513
|
ref_key: "boton",
|
|
1514
1514
|
ref: m,
|
|
1515
1515
|
type: "button",
|
|
@@ -1518,44 +1518,44 @@ const gn = ["disabled", "aria-label", "aria-expanded"], yn = { class: "min-w-0 f
|
|
|
1518
1518
|
"aria-label": e.label || void 0,
|
|
1519
1519
|
"aria-expanded": o.value,
|
|
1520
1520
|
"aria-haspopup": "listbox",
|
|
1521
|
-
onClick:
|
|
1521
|
+
onClick: z[0] || (z[0] = (I) => o.value ? h() : C()),
|
|
1522
1522
|
onKeydown: [
|
|
1523
|
-
|
|
1524
|
-
|
|
1523
|
+
z[1] || (z[1] = R(V((I) => o.value ? c(1) : C(), ["prevent"]), ["down"])),
|
|
1524
|
+
z[2] || (z[2] = R(V((I) => o.value ? c(-1) : C(), ["prevent"]), ["up"]))
|
|
1525
1525
|
]
|
|
1526
1526
|
}, [
|
|
1527
|
-
|
|
1528
|
-
Me(M(
|
|
1529
|
-
|
|
1527
|
+
B("span", gn, [
|
|
1528
|
+
Me(M(E.value?.etiqueta ?? e.placeholder) + " ", 1),
|
|
1529
|
+
E.value?.detalle ? (i(), r("span", hn, M(E.value.detalle), 1)) : x("", !0)
|
|
1530
1530
|
]),
|
|
1531
|
-
O(
|
|
1531
|
+
O(N, {
|
|
1532
1532
|
name: "go-down",
|
|
1533
1533
|
type: "symbol",
|
|
1534
1534
|
size: 12,
|
|
1535
1535
|
class: "shrink-0 opacity-60"
|
|
1536
1536
|
})
|
|
1537
|
-
], 40,
|
|
1538
|
-
o.value ? (
|
|
1537
|
+
], 40, yn),
|
|
1538
|
+
o.value ? (i(), r("div", {
|
|
1539
1539
|
key: 0,
|
|
1540
|
-
class:
|
|
1540
|
+
class: y(["absolute z-20 w-full min-w-64 rounded-corner border border-ui-border-strong bg-ui-bg shadow-lg", e.up ? "bottom-full mb-1" : "mt-1"]),
|
|
1541
1541
|
onKeydown: [
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1542
|
+
z[4] || (z[4] = R(V((I) => h(), ["prevent"]), ["escape"])),
|
|
1543
|
+
z[5] || (z[5] = R(V((I) => c(1), ["prevent"]), ["down"])),
|
|
1544
|
+
z[6] || (z[6] = R(V((I) => c(-1), ["prevent"]), ["up"])),
|
|
1545
|
+
z[7] || (z[7] = R(V((I) => b(0), ["prevent"]), ["home"])),
|
|
1546
|
+
z[8] || (z[8] = R(V((I) => b(A.value.length - 1), ["prevent"]), ["end"])),
|
|
1547
|
+
z[9] || (z[9] = R(V((I) => oe(), ["prevent"]), ["enter"])),
|
|
1548
|
+
z[10] || (z[10] = R((I) => h(!1), ["tab"]))
|
|
1549
1549
|
],
|
|
1550
1550
|
onClick: P,
|
|
1551
1551
|
onMousemove: le
|
|
1552
1552
|
}, [
|
|
1553
|
-
|
|
1553
|
+
B("div", xn, [
|
|
1554
1554
|
O(Oe, {
|
|
1555
1555
|
ref_key: "campo",
|
|
1556
1556
|
ref: f,
|
|
1557
1557
|
modelValue: l.value,
|
|
1558
|
-
"onUpdate:modelValue":
|
|
1558
|
+
"onUpdate:modelValue": z[3] || (z[3] = (I) => l.value = I),
|
|
1559
1559
|
label: e.label,
|
|
1560
1560
|
placeholder: e.searchPlaceholder,
|
|
1561
1561
|
"listbox-id": F(d),
|
|
@@ -1563,29 +1563,29 @@ const gn = ["disabled", "aria-label", "aria-expanded"], yn = { class: "min-w-0 f
|
|
|
1563
1563
|
expanded: o.value
|
|
1564
1564
|
}, null, 8, ["modelValue", "label", "placeholder", "listbox-id", "active-option-id", "expanded"])
|
|
1565
1565
|
]),
|
|
1566
|
-
|
|
1566
|
+
B("ul", {
|
|
1567
1567
|
id: F(d),
|
|
1568
1568
|
ref_key: "lista",
|
|
1569
1569
|
ref: u,
|
|
1570
1570
|
role: "listbox",
|
|
1571
1571
|
class: "max-h-56 overflow-y-auto p-1"
|
|
1572
1572
|
}, [
|
|
1573
|
-
|
|
1574
|
-
(
|
|
1573
|
+
A.value.length === 0 ? (i(), r("li", kn, M(e.emptyText), 1)) : x("", !0),
|
|
1574
|
+
(i(!0), r(te, null, ue(A.value, (I, de) => (i(), r("li", {
|
|
1575
1575
|
id: `${F(d)}-${de}`,
|
|
1576
1576
|
key: I.valor,
|
|
1577
1577
|
"data-indice": de,
|
|
1578
1578
|
role: "option",
|
|
1579
1579
|
"aria-selected": I.valor === e.modelValue,
|
|
1580
|
-
class:
|
|
1580
|
+
class: y(["flex cursor-pointer items-baseline gap-2 rounded-corner px-2 py-1 text-sm", [
|
|
1581
1581
|
de === s.value ? "bg-ui-surface" : "",
|
|
1582
1582
|
I.valor === e.modelValue ? "font-medium text-primary" : "text-tx-main"
|
|
1583
1583
|
]])
|
|
1584
1584
|
}, [
|
|
1585
|
-
|
|
1586
|
-
I.detalle ? (
|
|
1585
|
+
B("span", Cn, M(I.etiqueta), 1),
|
|
1586
|
+
I.detalle ? (i(), r("span", zn, M(I.detalle), 1)) : x("", !0)
|
|
1587
1587
|
], 10, $n))), 128)),
|
|
1588
|
-
g.value > 0 ? (
|
|
1588
|
+
g.value > 0 ? (i(), r("li", En, "+" + M(g.value), 1)) : x("", !0)
|
|
1589
1589
|
], 8, wn)
|
|
1590
1590
|
], 34)) : x("", !0)
|
|
1591
1591
|
], 32));
|
|
@@ -1598,10 +1598,10 @@ const gn = ["disabled", "aria-label", "aria-expanded"], yn = { class: "min-w-0 f
|
|
|
1598
1598
|
customClass: { default: () => ({}) }
|
|
1599
1599
|
},
|
|
1600
1600
|
setup(e) {
|
|
1601
|
-
return (n, t) => (
|
|
1602
|
-
class:
|
|
1601
|
+
return (n, t) => (i(), r("div", {
|
|
1602
|
+
class: y(["flex flex-col gap-4 p-4 background rounded-corner", e.customClass])
|
|
1603
1603
|
}, [
|
|
1604
|
-
|
|
1604
|
+
B("h3", Dn, M(e.icon ? `${e.icon} ${e.title}` : e.title), 1),
|
|
1605
1605
|
S(n.$slots, "default", {}, void 0, !0)
|
|
1606
1606
|
], 2));
|
|
1607
1607
|
}
|
|
@@ -1620,7 +1620,9 @@ const gn = ["disabled", "aria-label", "aria-expanded"], yn = { class: "min-w-0 f
|
|
|
1620
1620
|
}, Rn = /* @__PURE__ */ D({
|
|
1621
1621
|
__name: "DeviceCard",
|
|
1622
1622
|
props: {
|
|
1623
|
-
|
|
1623
|
+
name: { default: "" },
|
|
1624
|
+
type: { default: "icon" },
|
|
1625
|
+
icon: { default: "" },
|
|
1624
1626
|
title: {},
|
|
1625
1627
|
subtitle: { default: "" },
|
|
1626
1628
|
metadata: { default: "" },
|
|
@@ -1634,41 +1636,52 @@ const gn = ["disabled", "aria-label", "aria-expanded"], yn = { class: "min-w-0 f
|
|
|
1634
1636
|
},
|
|
1635
1637
|
emits: ["action", "click"],
|
|
1636
1638
|
setup(e, { emit: n }) {
|
|
1637
|
-
const t =
|
|
1638
|
-
|
|
1639
|
-
},
|
|
1640
|
-
|
|
1639
|
+
const t = e, a = n, l = () => {
|
|
1640
|
+
a("action");
|
|
1641
|
+
}, o = () => {
|
|
1642
|
+
a("click");
|
|
1641
1643
|
};
|
|
1642
|
-
return (
|
|
1643
|
-
|
|
1644
|
-
|
|
1644
|
+
return W(() => {
|
|
1645
|
+
t.icon && !t.name && console.warn(
|
|
1646
|
+
"[DeviceCard] «icon» está obsoleto y se va en la próxima mayor: recibe una ruta ya resuelta. Usá «name» con el nombre del icono del tema, y «type» si hace falta el símbolo."
|
|
1647
|
+
);
|
|
1648
|
+
}), (s, u) => (i(), r("div", {
|
|
1649
|
+
class: y(["flex items-center justify-between background rounded-vsk px-6 py-3 mb-4", [{ "border-l-4 border-green-500": e.isConnected }, e.customClass]]),
|
|
1650
|
+
onClick: o
|
|
1645
1651
|
}, [
|
|
1646
|
-
|
|
1647
|
-
|
|
1652
|
+
B("div", Bn, [
|
|
1653
|
+
e.name ? (i(), U(N, {
|
|
1654
|
+
key: 0,
|
|
1655
|
+
name: e.name,
|
|
1656
|
+
type: e.type,
|
|
1657
|
+
size: 28,
|
|
1658
|
+
alt: e.title
|
|
1659
|
+
}, null, 8, ["name", "type", "alt"])) : (i(), r("img", {
|
|
1660
|
+
key: 1,
|
|
1648
1661
|
src: e.icon,
|
|
1649
1662
|
alt: e.title,
|
|
1650
1663
|
class: "h-7 w-7 shrink-0"
|
|
1651
|
-
}, null, 8, Sn),
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
e.subtitle ? (
|
|
1655
|
-
e.metadata ? (
|
|
1656
|
-
e.extraInfo && e.extraInfo.length > 0 ? (
|
|
1657
|
-
(
|
|
1664
|
+
}, null, 8, Sn)),
|
|
1665
|
+
B("div", Mn, [
|
|
1666
|
+
B("div", Vn, M(e.title), 1),
|
|
1667
|
+
e.subtitle ? (i(), r("div", In, M(e.subtitle), 1)) : x("", !0),
|
|
1668
|
+
e.metadata ? (i(), r("div", On, M(e.metadata), 1)) : x("", !0),
|
|
1669
|
+
e.extraInfo && e.extraInfo.length > 0 ? (i(), r("div", jn, [
|
|
1670
|
+
(i(!0), r(te, null, ue(e.extraInfo, (m, f) => (i(), r("span", { key: f }, M(m), 1))), 128))
|
|
1658
1671
|
])) : x("", !0)
|
|
1659
1672
|
])
|
|
1660
1673
|
]),
|
|
1661
|
-
e.showActionButton ? (
|
|
1674
|
+
e.showActionButton ? (i(), r("button", {
|
|
1662
1675
|
key: 0,
|
|
1663
1676
|
class: "bg-vsk-primary rounded-vsk px-4 py-2 text-sm font-semibold cursor-pointer hover:opacity-70",
|
|
1664
|
-
onClick: V(
|
|
1677
|
+
onClick: V(l, ["stop"])
|
|
1665
1678
|
}, M(e.actionLabel), 1)) : x("", !0),
|
|
1666
|
-
e.showStatusIndicator && e.isConnected ? (
|
|
1679
|
+
e.showStatusIndicator && e.isConnected ? (i(), r("div", Pn)) : x("", !0)
|
|
1667
1680
|
], 2));
|
|
1668
1681
|
}
|
|
1669
|
-
}),
|
|
1682
|
+
}), rt = /* @__PURE__ */ Symbol("diálogo de vasak");
|
|
1670
1683
|
function st() {
|
|
1671
|
-
const e = we(
|
|
1684
|
+
const e = we(rt, null);
|
|
1672
1685
|
if (e) return e;
|
|
1673
1686
|
const n = w(!1);
|
|
1674
1687
|
return {
|
|
@@ -1693,7 +1706,7 @@ const Nn = /* @__PURE__ */ D({
|
|
|
1693
1706
|
emits: ["update:open"],
|
|
1694
1707
|
setup(e, { emit: n }) {
|
|
1695
1708
|
const t = e, a = n, l = w(null);
|
|
1696
|
-
return
|
|
1709
|
+
return ye(rt, {
|
|
1697
1710
|
abierto: v(() => t.open),
|
|
1698
1711
|
cerrar: () => a("update:open", !1),
|
|
1699
1712
|
idDelTitulo: l,
|
|
@@ -1714,32 +1727,32 @@ const Nn = /* @__PURE__ */ D({
|
|
|
1714
1727
|
},
|
|
1715
1728
|
setup(e) {
|
|
1716
1729
|
const n = e, t = Be(), a = v(() => t.class ?? ""), l = v(() => {
|
|
1717
|
-
const { class: C, ...
|
|
1718
|
-
return
|
|
1730
|
+
const { class: C, ...h } = t;
|
|
1731
|
+
return h;
|
|
1719
1732
|
}), 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);
|
|
1720
1733
|
let d = null;
|
|
1721
|
-
function
|
|
1734
|
+
function E() {
|
|
1722
1735
|
return f.value ? [...f.value.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')] : [];
|
|
1723
1736
|
}
|
|
1724
|
-
function
|
|
1737
|
+
function L(C) {
|
|
1725
1738
|
if (C.key === "Escape") {
|
|
1726
1739
|
s.cerrar();
|
|
1727
1740
|
return;
|
|
1728
1741
|
}
|
|
1729
1742
|
if (C.key !== "Tab") return;
|
|
1730
|
-
const
|
|
1731
|
-
if (
|
|
1743
|
+
const h = E();
|
|
1744
|
+
if (h.length === 0) {
|
|
1732
1745
|
C.preventDefault(), f.value?.focus();
|
|
1733
1746
|
return;
|
|
1734
1747
|
}
|
|
1735
|
-
const c =
|
|
1748
|
+
const c = h[0], b = h[h.length - 1], p = document.activeElement;
|
|
1736
1749
|
C.shiftKey && (p === c || p === f.value) ? (C.preventDefault(), b.focus()) : !C.shiftKey && p === b && (C.preventDefault(), c.focus());
|
|
1737
1750
|
}
|
|
1738
|
-
function
|
|
1751
|
+
function A(C) {
|
|
1739
1752
|
C.target === C.currentTarget && s.cerrar();
|
|
1740
1753
|
}
|
|
1741
1754
|
function g(C) {
|
|
1742
|
-
m.value?.contains(C.target) ||
|
|
1755
|
+
m.value?.contains(C.target) || L(C);
|
|
1743
1756
|
}
|
|
1744
1757
|
function $() {
|
|
1745
1758
|
document.removeEventListener("keydown", g);
|
|
@@ -1748,11 +1761,11 @@ const Nn = /* @__PURE__ */ D({
|
|
|
1748
1761
|
const C = d;
|
|
1749
1762
|
d = null, C?.isConnected && C.focus();
|
|
1750
1763
|
}
|
|
1751
|
-
return
|
|
1764
|
+
return Q(
|
|
1752
1765
|
u,
|
|
1753
1766
|
async (C) => {
|
|
1754
1767
|
if (C) {
|
|
1755
|
-
d = document.activeElement, document.addEventListener("keydown", g), await
|
|
1768
|
+
d = document.activeElement, document.addEventListener("keydown", g), await J(), f.value?.focus();
|
|
1756
1769
|
return;
|
|
1757
1770
|
}
|
|
1758
1771
|
$(), j();
|
|
@@ -1763,24 +1776,24 @@ const Nn = /* @__PURE__ */ D({
|
|
|
1763
1776
|
{ immediate: !0 }
|
|
1764
1777
|
), ve(() => {
|
|
1765
1778
|
$(), j();
|
|
1766
|
-
}), (C,
|
|
1779
|
+
}), (C, h) => (i(), U(ge, { to: "body" }, [
|
|
1767
1780
|
O(ke, {
|
|
1768
1781
|
"enter-active-class": "transition-opacity duration-200 ease-out",
|
|
1769
1782
|
"leave-active-class": "transition-opacity duration-150 ease-in",
|
|
1770
1783
|
"enter-from-class": "opacity-0",
|
|
1771
1784
|
"leave-to-class": "opacity-0"
|
|
1772
1785
|
}, {
|
|
1773
|
-
default:
|
|
1774
|
-
u.value ? (
|
|
1786
|
+
default: G(() => [
|
|
1787
|
+
u.value ? (i(), r("div", {
|
|
1775
1788
|
key: 0,
|
|
1776
1789
|
ref_key: "velo",
|
|
1777
1790
|
ref: m,
|
|
1778
1791
|
class: "fixed inset-0 z-50 flex items-center justify-center",
|
|
1779
|
-
onClick:
|
|
1780
|
-
onKeydown:
|
|
1792
|
+
onClick: A,
|
|
1793
|
+
onKeydown: L
|
|
1781
1794
|
}, [
|
|
1782
|
-
n.size === "md" ? (
|
|
1783
|
-
|
|
1795
|
+
n.size === "md" ? (i(), r("div", qn)) : x("", !0),
|
|
1796
|
+
B("div", ce({
|
|
1784
1797
|
ref_key: "panel",
|
|
1785
1798
|
ref: f,
|
|
1786
1799
|
tabindex: "-1",
|
|
@@ -1802,21 +1815,21 @@ const Nn = /* @__PURE__ */ D({
|
|
|
1802
1815
|
}), Wn = { class: "text-sm text-tx-muted" }, Gn = /* @__PURE__ */ D({
|
|
1803
1816
|
__name: "DialogDescription",
|
|
1804
1817
|
setup(e) {
|
|
1805
|
-
return (n, t) => (
|
|
1818
|
+
return (n, t) => (i(), r("p", Wn, [
|
|
1806
1819
|
S(n.$slots, "default")
|
|
1807
1820
|
]));
|
|
1808
1821
|
}
|
|
1809
1822
|
}), Qn = { class: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end" }, Yn = /* @__PURE__ */ D({
|
|
1810
1823
|
__name: "DialogFooter",
|
|
1811
1824
|
setup(e) {
|
|
1812
|
-
return (n, t) => (
|
|
1825
|
+
return (n, t) => (i(), r("div", Qn, [
|
|
1813
1826
|
S(n.$slots, "default")
|
|
1814
1827
|
]));
|
|
1815
1828
|
}
|
|
1816
1829
|
}), Xn = { class: "flex flex-col gap-1.5 text-center sm:text-left" }, Jn = /* @__PURE__ */ D({
|
|
1817
1830
|
__name: "DialogHeader",
|
|
1818
1831
|
setup(e) {
|
|
1819
|
-
return (n, t) => (
|
|
1832
|
+
return (n, t) => (i(), r("div", Xn, [
|
|
1820
1833
|
S(n.$slots, "default")
|
|
1821
1834
|
]));
|
|
1822
1835
|
}
|
|
@@ -1824,7 +1837,7 @@ const Nn = /* @__PURE__ */ D({
|
|
|
1824
1837
|
__name: "DialogTitle",
|
|
1825
1838
|
setup(e) {
|
|
1826
1839
|
const n = st(), t = Fn();
|
|
1827
|
-
return
|
|
1840
|
+
return W(() => n.ponerElTitulo(t)), ve(() => n.ponerElTitulo(null)), (a, l) => (i(), r("h2", {
|
|
1828
1841
|
id: F(t),
|
|
1829
1842
|
class: "font-semibold text-lg leading-none tracking-tight"
|
|
1830
1843
|
}, [
|
|
@@ -1876,29 +1889,29 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
1876
1889
|
t.open === void 0 && (l.value = g), a("update:open", g);
|
|
1877
1890
|
}
|
|
1878
1891
|
});
|
|
1879
|
-
|
|
1892
|
+
Q(d, (g) => {
|
|
1880
1893
|
if (g) {
|
|
1881
1894
|
const $ = document.activeElement;
|
|
1882
1895
|
f = $ instanceof HTMLElement ? $ : null;
|
|
1883
1896
|
} else
|
|
1884
1897
|
u.value = "ninguno";
|
|
1885
1898
|
});
|
|
1886
|
-
function
|
|
1899
|
+
function E(g = "ninguno") {
|
|
1887
1900
|
u.value = g, d.value = !0;
|
|
1888
1901
|
}
|
|
1889
|
-
function
|
|
1902
|
+
function L(g = {}) {
|
|
1890
1903
|
if (d.value = !1, !g.devolverElFoco) return;
|
|
1891
1904
|
const $ = f ?? o.value;
|
|
1892
1905
|
$?.isConnected && $.focus();
|
|
1893
1906
|
}
|
|
1894
|
-
function
|
|
1907
|
+
function A(g = "ninguno") {
|
|
1895
1908
|
if (d.value) {
|
|
1896
|
-
|
|
1909
|
+
L({ devolverElFoco: !0 });
|
|
1897
1910
|
return;
|
|
1898
1911
|
}
|
|
1899
|
-
|
|
1912
|
+
E(g);
|
|
1900
1913
|
}
|
|
1901
|
-
return
|
|
1914
|
+
return ye(ut, {
|
|
1902
1915
|
abierto: d,
|
|
1903
1916
|
idDelMenu: m,
|
|
1904
1917
|
idDeLaEtiqueta: s,
|
|
@@ -1910,10 +1923,10 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
1910
1923
|
o.value = g;
|
|
1911
1924
|
},
|
|
1912
1925
|
focoAlAbrir: u,
|
|
1913
|
-
abrir:
|
|
1914
|
-
cerrar:
|
|
1915
|
-
alternar:
|
|
1916
|
-
}), (g, $) => (
|
|
1926
|
+
abrir: E,
|
|
1927
|
+
cerrar: L,
|
|
1928
|
+
alternar: A
|
|
1929
|
+
}), (g, $) => (i(), r("div", el, [
|
|
1917
1930
|
S(g.$slots, "default")
|
|
1918
1931
|
]));
|
|
1919
1932
|
}
|
|
@@ -1952,59 +1965,59 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
1952
1965
|
return b.left - p;
|
|
1953
1966
|
}
|
|
1954
1967
|
}
|
|
1955
|
-
function
|
|
1968
|
+
function E(c, b, p) {
|
|
1956
1969
|
return p < b ? b : Math.min(Math.max(c, b), p);
|
|
1957
1970
|
}
|
|
1958
|
-
function
|
|
1971
|
+
function L() {
|
|
1959
1972
|
if (!o.value || !u.value) return;
|
|
1960
1973
|
const c = o.value.getBoundingClientRect(), b = u.value.scrollHeight, p = u.value.offsetWidth, P = n.side === "top" || n.side === "bottom", le = P ? b : p;
|
|
1961
|
-
let
|
|
1962
|
-
const oe = d(
|
|
1963
|
-
oe < le && d(f[
|
|
1964
|
-
let
|
|
1965
|
-
switch (
|
|
1974
|
+
let K = n.side;
|
|
1975
|
+
const oe = d(K, c);
|
|
1976
|
+
oe < le && d(f[K], c) > oe && (K = f[K]);
|
|
1977
|
+
let Y = 0, T = 0, z = null;
|
|
1978
|
+
switch (K) {
|
|
1966
1979
|
case "bottom": {
|
|
1967
|
-
|
|
1980
|
+
Y = c.bottom + n.sideOffset, z = Math.max(window.innerHeight - Y - Z, 0);
|
|
1968
1981
|
break;
|
|
1969
1982
|
}
|
|
1970
1983
|
case "top": {
|
|
1971
|
-
|
|
1984
|
+
z = Math.max(d("top", c), 0), Y = c.top - n.sideOffset - Math.min(b, z);
|
|
1972
1985
|
break;
|
|
1973
1986
|
}
|
|
1974
1987
|
case "left":
|
|
1975
1988
|
case "right": {
|
|
1976
|
-
|
|
1989
|
+
T = K === "right" ? c.right + n.sideOffset : c.left - p - n.sideOffset;
|
|
1977
1990
|
const I = window.innerHeight - 2 * Z;
|
|
1978
|
-
|
|
1991
|
+
Y = E(c.top, Z, window.innerHeight - Math.min(b, I) - Z), z = Math.max(window.innerHeight - Y - Z, 0);
|
|
1979
1992
|
break;
|
|
1980
1993
|
}
|
|
1981
1994
|
}
|
|
1982
1995
|
if (P)
|
|
1983
1996
|
switch (n.align) {
|
|
1984
1997
|
case "start":
|
|
1985
|
-
|
|
1998
|
+
T = c.left;
|
|
1986
1999
|
break;
|
|
1987
2000
|
case "center":
|
|
1988
|
-
|
|
2001
|
+
T = c.left + c.width / 2 - p / 2;
|
|
1989
2002
|
break;
|
|
1990
2003
|
case "end":
|
|
1991
|
-
|
|
2004
|
+
T = c.right - p;
|
|
1992
2005
|
break;
|
|
1993
2006
|
}
|
|
1994
|
-
|
|
2007
|
+
T = E(T, Z, window.innerWidth - p - Z), m.value = { top: Y, left: T, techo: z };
|
|
1995
2008
|
}
|
|
1996
|
-
function
|
|
2009
|
+
function A() {
|
|
1997
2010
|
return u.value ? Array.from(u.value.querySelectorAll('[role="menuitem"]')) : [];
|
|
1998
2011
|
}
|
|
1999
2012
|
function g(c) {
|
|
2000
|
-
const b =
|
|
2013
|
+
const b = A();
|
|
2001
2014
|
if (!b.length) return;
|
|
2002
2015
|
const p = b.length;
|
|
2003
2016
|
b[(c % p + p) % p]?.focus();
|
|
2004
2017
|
}
|
|
2005
2018
|
function $() {
|
|
2006
2019
|
const c = document.activeElement;
|
|
2007
|
-
return c instanceof HTMLElement ?
|
|
2020
|
+
return c instanceof HTMLElement ? A().indexOf(c) : -1;
|
|
2008
2021
|
}
|
|
2009
2022
|
function j(c) {
|
|
2010
2023
|
const b = $();
|
|
@@ -2029,10 +2042,10 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
2029
2042
|
break;
|
|
2030
2043
|
}
|
|
2031
2044
|
}
|
|
2032
|
-
|
|
2045
|
+
Q(s, async (c) => {
|
|
2033
2046
|
if (c)
|
|
2034
|
-
switch (await
|
|
2035
|
-
|
|
2047
|
+
switch (await J(), requestAnimationFrame(() => {
|
|
2048
|
+
L();
|
|
2036
2049
|
}), t.focoAlAbrir.value) {
|
|
2037
2050
|
case "primero":
|
|
2038
2051
|
g(0);
|
|
@@ -2048,17 +2061,17 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
2048
2061
|
}
|
|
2049
2062
|
});
|
|
2050
2063
|
function C(c) {
|
|
2051
|
-
s.value && (c && u.value?.contains(c.target) ||
|
|
2064
|
+
s.value && (c && u.value?.contains(c.target) || L());
|
|
2052
2065
|
}
|
|
2053
|
-
function
|
|
2066
|
+
function h(c) {
|
|
2054
2067
|
const b = c.target, p = !!b.closest("[data-dropdown-content]"), P = !!o.value?.contains(b);
|
|
2055
2068
|
!p && !P && t.cerrar();
|
|
2056
2069
|
}
|
|
2057
|
-
return
|
|
2058
|
-
document.addEventListener("click",
|
|
2070
|
+
return W(() => {
|
|
2071
|
+
document.addEventListener("click", h), window.addEventListener("resize", C), window.addEventListener("scroll", C, !0);
|
|
2059
2072
|
}), pe(() => {
|
|
2060
|
-
document.removeEventListener("click",
|
|
2061
|
-
}), (c, b) => (
|
|
2073
|
+
document.removeEventListener("click", h), window.removeEventListener("resize", C), window.removeEventListener("scroll", C, !0);
|
|
2074
|
+
}), (c, b) => (i(), U(ge, { to: "body" }, [
|
|
2062
2075
|
O(ke, {
|
|
2063
2076
|
"enter-active-class": "transition-all duration-150 ease-in-out",
|
|
2064
2077
|
"leave-active-class": "transition-all duration-150 ease-in-out",
|
|
@@ -2067,8 +2080,8 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
2067
2080
|
onEnter: b[1] || (b[1] = (p) => p.offsetHeight),
|
|
2068
2081
|
onLeave: b[2] || (b[2] = (p) => p.offsetHeight)
|
|
2069
2082
|
}, {
|
|
2070
|
-
default:
|
|
2071
|
-
Se(
|
|
2083
|
+
default: G(() => [
|
|
2084
|
+
Se(B("div", ce({
|
|
2072
2085
|
ref_key: "contenido",
|
|
2073
2086
|
ref: u
|
|
2074
2087
|
}, c.$attrs, {
|
|
@@ -2092,7 +2105,7 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
2092
2105
|
onClick: b[0] || (b[0] = (p) => p.stopPropagation()),
|
|
2093
2106
|
onKeydown: j
|
|
2094
2107
|
}), [
|
|
2095
|
-
|
|
2108
|
+
B("div", nl, [
|
|
2096
2109
|
S(c.$slots, "default")
|
|
2097
2110
|
])
|
|
2098
2111
|
], 16, al), [
|
|
@@ -2103,7 +2116,7 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
2103
2116
|
})
|
|
2104
2117
|
]));
|
|
2105
2118
|
}
|
|
2106
|
-
}), ol = ["aria-disabled", "onKeydown"],
|
|
2119
|
+
}), ol = ["aria-disabled", "onKeydown"], il = /* @__PURE__ */ D({
|
|
2107
2120
|
__name: "DropdownMenuItem",
|
|
2108
2121
|
props: {
|
|
2109
2122
|
disabled: { type: Boolean, default: !1 }
|
|
@@ -2114,11 +2127,11 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
2114
2127
|
function o(s) {
|
|
2115
2128
|
t.disabled || (a("select"), a("click", s), l.cerrar({ devolverElFoco: !0 }));
|
|
2116
2129
|
}
|
|
2117
|
-
return (s, u) => (
|
|
2130
|
+
return (s, u) => (i(), r("div", {
|
|
2118
2131
|
role: "menuitem",
|
|
2119
2132
|
tabindex: "0",
|
|
2120
2133
|
"aria-disabled": e.disabled || void 0,
|
|
2121
|
-
class:
|
|
2134
|
+
class: y([
|
|
2122
2135
|
"px-3 py-2 text-sm transition-colors outline-none",
|
|
2123
2136
|
{
|
|
2124
2137
|
"opacity-50 cursor-not-allowed": e.disabled,
|
|
@@ -2134,15 +2147,15 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
2134
2147
|
S(s.$slots, "default")
|
|
2135
2148
|
], 42, ol));
|
|
2136
2149
|
}
|
|
2137
|
-
}),
|
|
2150
|
+
}), rl = /* @__PURE__ */ D({
|
|
2138
2151
|
__name: "DropdownMenuLabel",
|
|
2139
2152
|
setup(e) {
|
|
2140
2153
|
const n = Ce(), t = `${ct()}-titulo`;
|
|
2141
|
-
return
|
|
2154
|
+
return W(() => {
|
|
2142
2155
|
n.ponerLaEtiqueta(t);
|
|
2143
2156
|
}), pe(() => {
|
|
2144
2157
|
n.ponerLaEtiqueta(null);
|
|
2145
|
-
}), (a, l) => (
|
|
2158
|
+
}), (a, l) => (i(), r("div", {
|
|
2146
2159
|
id: t,
|
|
2147
2160
|
role: "presentation",
|
|
2148
2161
|
class: "px-3 py-2 text-sm font-semibold text-tx-main"
|
|
@@ -2157,12 +2170,12 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
2157
2170
|
}, ul = /* @__PURE__ */ D({
|
|
2158
2171
|
__name: "DropdownMenuSeparator",
|
|
2159
2172
|
setup(e) {
|
|
2160
|
-
return (n, t) => (
|
|
2173
|
+
return (n, t) => (i(), r("div", sl));
|
|
2161
2174
|
}
|
|
2162
2175
|
});
|
|
2163
2176
|
function dt(e) {
|
|
2164
2177
|
const n = e.filter(
|
|
2165
|
-
(a) => a.type !==
|
|
2178
|
+
(a) => a.type !== zt && !(a.type === Et && typeof a.children == "string" && !a.children.trim())
|
|
2166
2179
|
);
|
|
2167
2180
|
if (n.length !== 1) return null;
|
|
2168
2181
|
const t = n[0];
|
|
@@ -2242,13 +2255,13 @@ const dl = D({
|
|
|
2242
2255
|
labelClass: { default: () => ({}) }
|
|
2243
2256
|
},
|
|
2244
2257
|
setup(e) {
|
|
2245
|
-
return (n, t) => (
|
|
2246
|
-
class:
|
|
2258
|
+
return (n, t) => (i(), r("div", {
|
|
2259
|
+
class: y(["flex flex-col gap-2", e.customClass])
|
|
2247
2260
|
}, [
|
|
2248
|
-
e.label ? (
|
|
2261
|
+
e.label ? (i(), r("label", {
|
|
2249
2262
|
key: 0,
|
|
2250
2263
|
for: e.htmlFor,
|
|
2251
|
-
class:
|
|
2264
|
+
class: y(["text-sm font-medium text-primary dark:text-primary-dark", e.labelClass])
|
|
2252
2265
|
}, M(e.label), 11, fl)) : x("", !0),
|
|
2253
2266
|
S(n.$slots, "default", {}, void 0, !0)
|
|
2254
2267
|
], 2));
|
|
@@ -2264,8 +2277,8 @@ const dl = D({
|
|
|
2264
2277
|
const t = e, a = n, l = () => {
|
|
2265
2278
|
t.clickable && a("click");
|
|
2266
2279
|
};
|
|
2267
|
-
return (o, s) => (
|
|
2268
|
-
class:
|
|
2280
|
+
return (o, s) => (i(), r("div", {
|
|
2281
|
+
class: y([
|
|
2269
2282
|
"flex items-center justify-between background p-3 rounded-vsk border border-vsk-primary/70 transition-colors duration-200",
|
|
2270
2283
|
{
|
|
2271
2284
|
"hover:bg-vsk-primary/5 cursor-pointer": t.clickable
|
|
@@ -2277,13 +2290,15 @@ const dl = D({
|
|
|
2277
2290
|
S(o.$slots, "default", {}, void 0, !0)
|
|
2278
2291
|
], 2));
|
|
2279
2292
|
}
|
|
2280
|
-
}), pl = /* @__PURE__ */ $e(vl, [["__scopeId", "data-v-f86d47da"]]),
|
|
2293
|
+
}), pl = /* @__PURE__ */ $e(vl, [["__scopeId", "data-v-f86d47da"]]), yl = { 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" }, gl = ["title", "aria-label"], hl = ["src"], xl = {
|
|
2281
2294
|
key: 1,
|
|
2282
2295
|
class: "w-8 h-8 flex items-center justify-center"
|
|
2283
2296
|
}, wl = ["src"], kl = ["min", "max", "value", "aria-label", "aria-valuetext"], $l = /* @__PURE__ */ D({
|
|
2284
2297
|
__name: "SliderControl",
|
|
2285
2298
|
props: {
|
|
2286
|
-
|
|
2299
|
+
name: { default: "" },
|
|
2300
|
+
type: { default: "icon" },
|
|
2301
|
+
icon: { default: "" },
|
|
2287
2302
|
label: {},
|
|
2288
2303
|
buttonLabel: {},
|
|
2289
2304
|
modelValue: {},
|
|
@@ -2295,7 +2310,13 @@ const dl = D({
|
|
|
2295
2310
|
},
|
|
2296
2311
|
emits: ["update:modelValue", "buttonClick"],
|
|
2297
2312
|
setup(e, { emit: n }) {
|
|
2298
|
-
const t = e
|
|
2313
|
+
const t = e;
|
|
2314
|
+
W(() => {
|
|
2315
|
+
t.icon && !t.name && console.warn(
|
|
2316
|
+
"[SliderControl] «icon» está obsoleto y se va en la próxima mayor: recibe una ruta ya resuelta. Usá «name» con el nombre del icono del tema, y «type» si hace falta el símbolo."
|
|
2317
|
+
);
|
|
2318
|
+
});
|
|
2319
|
+
const a = n, l = v(() => {
|
|
2299
2320
|
if (t.max <= t.min) return 0;
|
|
2300
2321
|
const m = t.max - t.min, f = t.modelValue - t.min;
|
|
2301
2322
|
return Math.round(f / m * 100);
|
|
@@ -2305,8 +2326,8 @@ const dl = D({
|
|
|
2305
2326
|
}, u = () => {
|
|
2306
2327
|
a("buttonClick");
|
|
2307
2328
|
};
|
|
2308
|
-
return (m, f) => (
|
|
2309
|
-
e.showButton ? (
|
|
2329
|
+
return (m, f) => (i(), r("div", yl, [
|
|
2330
|
+
e.showButton ? (i(), r("button", {
|
|
2310
2331
|
key: 0,
|
|
2311
2332
|
onClick: u,
|
|
2312
2333
|
type: "button",
|
|
@@ -2314,19 +2335,32 @@ const dl = D({
|
|
|
2314
2335
|
"aria-label": e.buttonLabel ?? e.label,
|
|
2315
2336
|
class: "w-8 h-8 flex items-center justify-center rounded-corner transition-[background-color,scale] duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80 hover:scale-110 active:scale-95"
|
|
2316
2337
|
}, [
|
|
2317
|
-
|
|
2338
|
+
e.name ? (i(), U(N, {
|
|
2339
|
+
key: 0,
|
|
2340
|
+
name: e.name,
|
|
2341
|
+
type: e.type,
|
|
2342
|
+
size: 24,
|
|
2343
|
+
class: y(e.iconClass)
|
|
2344
|
+
}, null, 8, ["name", "type", "class"])) : (i(), r("img", {
|
|
2345
|
+
key: 1,
|
|
2318
2346
|
src: e.icon,
|
|
2319
2347
|
alt: "",
|
|
2320
|
-
class:
|
|
2321
|
-
}, null, 10, hl)
|
|
2322
|
-
], 8,
|
|
2323
|
-
|
|
2348
|
+
class: y(["w-6 h-6", e.iconClass])
|
|
2349
|
+
}, null, 10, hl))
|
|
2350
|
+
], 8, gl)) : (i(), r("div", xl, [
|
|
2351
|
+
e.name ? (i(), U(N, {
|
|
2352
|
+
key: 0,
|
|
2353
|
+
name: e.name,
|
|
2354
|
+
type: e.type,
|
|
2355
|
+
size: 24
|
|
2356
|
+
}, null, 8, ["name", "type"])) : (i(), r("img", {
|
|
2357
|
+
key: 1,
|
|
2324
2358
|
src: e.icon,
|
|
2325
2359
|
alt: "",
|
|
2326
2360
|
class: "w-6 h-6"
|
|
2327
|
-
}, null, 8, wl)
|
|
2361
|
+
}, null, 8, wl))
|
|
2328
2362
|
])),
|
|
2329
|
-
|
|
2363
|
+
B("input", {
|
|
2330
2364
|
type: "range",
|
|
2331
2365
|
min: e.min,
|
|
2332
2366
|
max: e.max,
|
|
@@ -2336,8 +2370,8 @@ const dl = D({
|
|
|
2336
2370
|
"aria-valuetext": `${l.value}%`,
|
|
2337
2371
|
class: "flex-1 transition-[scale] duration-200 hover:scale-105"
|
|
2338
2372
|
}, null, 40, kl),
|
|
2339
|
-
|
|
2340
|
-
class:
|
|
2373
|
+
B("span", {
|
|
2374
|
+
class: y(["w-12 text-right transition-[color] duration-200 font-medium", o.value])
|
|
2341
2375
|
}, M(l.value) + "% ", 3)
|
|
2342
2376
|
]));
|
|
2343
2377
|
}
|
|
@@ -2349,15 +2383,15 @@ const dl = D({
|
|
|
2349
2383
|
},
|
|
2350
2384
|
setup(e) {
|
|
2351
2385
|
const n = e, t = v(() => n.size === "small");
|
|
2352
|
-
return (a, l) => (
|
|
2386
|
+
return (a, l) => (i(), r("span", {
|
|
2353
2387
|
"aria-hidden": "true",
|
|
2354
|
-
class:
|
|
2388
|
+
class: y(["inline-flex shrink-0 items-center rounded-full border transition-colors", [
|
|
2355
2389
|
t.value ? "h-6 w-11" : "h-7 w-12",
|
|
2356
2390
|
e.on ? "border-transparent bg-primary" : "border-ui-border-strong bg-ui-surface"
|
|
2357
2391
|
]])
|
|
2358
2392
|
}, [
|
|
2359
|
-
|
|
2360
|
-
class:
|
|
2393
|
+
B("span", {
|
|
2394
|
+
class: y(["inline-block transform rounded-full shadow transition-transform", [
|
|
2361
2395
|
t.value ? "h-4 w-4" : "h-5 w-5",
|
|
2362
2396
|
e.on ? "bg-tx-on-primary" : "bg-tx-main",
|
|
2363
2397
|
e.on ? "translate-x-6" : "translate-x-1"
|
|
@@ -2365,7 +2399,7 @@ const dl = D({
|
|
|
2365
2399
|
}, null, 2)
|
|
2366
2400
|
], 2));
|
|
2367
2401
|
}
|
|
2368
|
-
}), Cl = ["aria-checked", "disabled"],
|
|
2402
|
+
}), Cl = ["aria-checked", "disabled"], zl = { class: "min-w-0 flex-1" }, El = { class: "block font-medium text-sm text-tx-main" }, Ll = {
|
|
2369
2403
|
key: 0,
|
|
2370
2404
|
class: "mt-0.5 block text-tx-muted text-xs"
|
|
2371
2405
|
}, Dl = /* @__PURE__ */ D({
|
|
@@ -2381,7 +2415,7 @@ const dl = D({
|
|
|
2381
2415
|
emits: ["update:modelValue"],
|
|
2382
2416
|
setup(e, { emit: n }) {
|
|
2383
2417
|
const t = e, a = n;
|
|
2384
|
-
return (l, o) => (
|
|
2418
|
+
return (l, o) => (i(), r("button", {
|
|
2385
2419
|
type: "button",
|
|
2386
2420
|
role: "switch",
|
|
2387
2421
|
"aria-checked": e.modelValue,
|
|
@@ -2393,21 +2427,21 @@ const dl = D({
|
|
|
2393
2427
|
on: e.modelValue,
|
|
2394
2428
|
class: "mt-0.5"
|
|
2395
2429
|
}, null, 8, ["on"]),
|
|
2396
|
-
e.icon ? (
|
|
2430
|
+
e.icon ? (i(), r("span", {
|
|
2397
2431
|
key: 0,
|
|
2398
|
-
class:
|
|
2432
|
+
class: y(["flex size-10 shrink-0 items-center justify-center rounded-corner border", e.modelValue ? "border-secondary bg-primary/20" : "border-ui-border bg-ui-surface/40"]),
|
|
2399
2433
|
"aria-hidden": "true"
|
|
2400
2434
|
}, [
|
|
2401
|
-
O(
|
|
2435
|
+
O(N, {
|
|
2402
2436
|
name: e.icon,
|
|
2403
2437
|
type: e.iconType,
|
|
2404
2438
|
size: 24,
|
|
2405
2439
|
alt: ""
|
|
2406
2440
|
}, null, 8, ["name", "type"])
|
|
2407
2441
|
], 2)) : x("", !0),
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
e.description ? (
|
|
2442
|
+
B("span", zl, [
|
|
2443
|
+
B("span", El, M(e.label), 1),
|
|
2444
|
+
e.description ? (i(), r("span", Ll, M(e.description), 1)) : x("", !0),
|
|
2411
2445
|
S(l.$slots, "pie")
|
|
2412
2446
|
])
|
|
2413
2447
|
], 8, Cl));
|
|
@@ -2426,7 +2460,7 @@ const dl = D({
|
|
|
2426
2460
|
function l() {
|
|
2427
2461
|
a("update:modelValue", !t.modelValue);
|
|
2428
2462
|
}
|
|
2429
|
-
return (o, s) => (
|
|
2463
|
+
return (o, s) => (i(), r("button", {
|
|
2430
2464
|
type: "button",
|
|
2431
2465
|
role: "switch",
|
|
2432
2466
|
"aria-checked": e.modelValue,
|
|
@@ -2444,7 +2478,9 @@ const dl = D({
|
|
|
2444
2478
|
}), Bl = ["disabled", "title", "aria-label", "aria-pressed", "aria-busy"], Sl = ["src"], Ml = /* @__PURE__ */ D({
|
|
2445
2479
|
__name: "ToggleControl",
|
|
2446
2480
|
props: {
|
|
2447
|
-
|
|
2481
|
+
name: { default: "" },
|
|
2482
|
+
type: { default: "icon" },
|
|
2483
|
+
icon: { default: "" },
|
|
2448
2484
|
label: {},
|
|
2449
2485
|
pressed: { type: [Boolean, null], default: null },
|
|
2450
2486
|
isActive: { type: Boolean, default: !1 },
|
|
@@ -2454,13 +2490,19 @@ const dl = D({
|
|
|
2454
2490
|
},
|
|
2455
2491
|
emits: ["click"],
|
|
2456
2492
|
setup(e, { emit: n }) {
|
|
2457
|
-
const t =
|
|
2458
|
-
|
|
2459
|
-
t(
|
|
2493
|
+
const t = e;
|
|
2494
|
+
W(() => {
|
|
2495
|
+
t.icon && !t.name && console.warn(
|
|
2496
|
+
"[ToggleControl] «icon» está obsoleto y se va en la próxima mayor: recibe una ruta ya resuelta. Usá «name» con el nombre del icono del tema, y «type» si hace falta el símbolo."
|
|
2497
|
+
);
|
|
2498
|
+
});
|
|
2499
|
+
const a = n;
|
|
2500
|
+
function l() {
|
|
2501
|
+
a("click");
|
|
2460
2502
|
}
|
|
2461
|
-
return (
|
|
2503
|
+
return (o, s) => (i(), r("button", {
|
|
2462
2504
|
type: "button",
|
|
2463
|
-
class:
|
|
2505
|
+
class: y(["p-2 rounded-corner bg-ui-bg/80 hover:opacity-50 transition-[opacity,scale,box-shadow] duration-300 h-17.5 w-17.5 group relative overflow-hidden hover:scale-105 hover:shadow-lg active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2", {
|
|
2464
2506
|
"animate-pulse": e.isLoading,
|
|
2465
2507
|
"ring-2 ring-primary": e.isActive,
|
|
2466
2508
|
"opacity-60": !e.isActive,
|
|
@@ -2471,18 +2513,30 @@ const dl = D({
|
|
|
2471
2513
|
"aria-label": e.label,
|
|
2472
2514
|
"aria-pressed": e.pressed ?? void 0,
|
|
2473
2515
|
"aria-busy": e.isLoading || void 0,
|
|
2474
|
-
onClick:
|
|
2516
|
+
onClick: l
|
|
2475
2517
|
}, [
|
|
2476
|
-
|
|
2518
|
+
e.name ? (i(), U(N, {
|
|
2519
|
+
key: 0,
|
|
2520
|
+
name: e.name,
|
|
2521
|
+
type: e.type,
|
|
2522
|
+
size: 50,
|
|
2523
|
+
class: y(["m-auto transition-[scale,filter] duration-300 group-hover:scale-110 relative z-10", {
|
|
2524
|
+
"animate-spin": e.isLoading,
|
|
2525
|
+
"filter brightness-75": !e.isActive,
|
|
2526
|
+
"drop-shadow-lg": e.isActive,
|
|
2527
|
+
...e.iconClass
|
|
2528
|
+
}])
|
|
2529
|
+
}, null, 8, ["name", "type", "class"])) : (i(), r("img", {
|
|
2530
|
+
key: 1,
|
|
2477
2531
|
src: e.icon,
|
|
2478
2532
|
alt: "",
|
|
2479
|
-
class:
|
|
2533
|
+
class: y(["m-auto w-12.5 h-12.5 transition-[scale,filter] duration-300 group-hover:scale-110 relative z-10", {
|
|
2480
2534
|
"animate-spin": e.isLoading,
|
|
2481
2535
|
"filter brightness-75": !e.isActive,
|
|
2482
2536
|
"drop-shadow-lg": e.isActive,
|
|
2483
2537
|
...e.iconClass
|
|
2484
2538
|
}])
|
|
2485
|
-
}, null, 10, Sl)
|
|
2539
|
+
}, null, 10, Sl))
|
|
2486
2540
|
], 10, Bl));
|
|
2487
2541
|
}
|
|
2488
2542
|
}), ft = /* @__PURE__ */ Symbol("tooltip de vasak");
|
|
@@ -2520,7 +2574,7 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2520
2574
|
function s() {
|
|
2521
2575
|
l && clearTimeout(l), t.value = !1;
|
|
2522
2576
|
}
|
|
2523
|
-
return
|
|
2577
|
+
return ye(ft, {
|
|
2524
2578
|
abierto: v(() => t.value && !n.disabled),
|
|
2525
2579
|
disparador: a,
|
|
2526
2580
|
ponerElDisparador: (u) => {
|
|
@@ -2528,7 +2582,7 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2528
2582
|
},
|
|
2529
2583
|
abrir: o,
|
|
2530
2584
|
cerrar: s
|
|
2531
|
-
}), (u, m) => (
|
|
2585
|
+
}), (u, m) => (i(), r("div", Vl, [
|
|
2532
2586
|
S(u.$slots, "default")
|
|
2533
2587
|
]));
|
|
2534
2588
|
}
|
|
@@ -2545,39 +2599,39 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2545
2599
|
function m() {
|
|
2546
2600
|
const f = l.disparador.value;
|
|
2547
2601
|
if (!f || !s.value) return;
|
|
2548
|
-
const d = f.getBoundingClientRect(),
|
|
2549
|
-
let
|
|
2602
|
+
const d = f.getBoundingClientRect(), E = s.value.getBoundingClientRect();
|
|
2603
|
+
let L = 0, A = 0;
|
|
2550
2604
|
switch (a.side) {
|
|
2551
2605
|
case "bottom":
|
|
2552
|
-
|
|
2606
|
+
L = d.bottom + a.sideOffset, A = d.left + d.width / 2 - E.width / 2;
|
|
2553
2607
|
break;
|
|
2554
2608
|
case "top":
|
|
2555
|
-
|
|
2609
|
+
L = d.top - E.height - a.sideOffset, A = d.left + d.width / 2 - E.width / 2;
|
|
2556
2610
|
break;
|
|
2557
2611
|
case "left":
|
|
2558
|
-
|
|
2612
|
+
A = d.left - E.width - a.sideOffset, L = d.top + d.height / 2 - E.height / 2;
|
|
2559
2613
|
break;
|
|
2560
2614
|
case "right":
|
|
2561
|
-
|
|
2615
|
+
A = d.right + a.sideOffset, L = d.top + d.height / 2 - E.height / 2;
|
|
2562
2616
|
break;
|
|
2563
2617
|
}
|
|
2564
|
-
u.value = { top:
|
|
2618
|
+
u.value = { top: L, left: A };
|
|
2565
2619
|
}
|
|
2566
|
-
return
|
|
2567
|
-
f && (await
|
|
2568
|
-
}), (f, d) => (
|
|
2620
|
+
return Q(o, async (f) => {
|
|
2621
|
+
f && (await J(), requestAnimationFrame(m));
|
|
2622
|
+
}), (f, d) => (i(), U(ge, { to: "body" }, [
|
|
2569
2623
|
O(ke, {
|
|
2570
2624
|
"enter-active-class": "transition-all duration-200 ease-in-out",
|
|
2571
2625
|
"leave-active-class": "transition-all duration-200 ease-in-out",
|
|
2572
2626
|
"enter-from-class": "opacity-0 scale-95",
|
|
2573
2627
|
"leave-to-class": "opacity-0 scale-95"
|
|
2574
2628
|
}, {
|
|
2575
|
-
default:
|
|
2576
|
-
Se(
|
|
2629
|
+
default: G(() => [
|
|
2630
|
+
Se(B("div", {
|
|
2577
2631
|
ref_key: "globo",
|
|
2578
2632
|
ref: s,
|
|
2579
2633
|
style: fe({ position: "fixed", top: `${u.value.top}px`, left: `${u.value.left}px`, zIndex: 50 }),
|
|
2580
|
-
class:
|
|
2634
|
+
class: y([
|
|
2581
2635
|
t.value,
|
|
2582
2636
|
"pointer-events-none rounded-corner border border-secondary bg-ui-bg/80 px-2 py-1 text-sm shadow-md"
|
|
2583
2637
|
])
|
|
@@ -2601,9 +2655,9 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2601
2655
|
function l() {
|
|
2602
2656
|
n.ponerElDisparador(a()), n.abrir();
|
|
2603
2657
|
}
|
|
2604
|
-
return
|
|
2658
|
+
return W(() => {
|
|
2605
2659
|
n.ponerElDisparador(a());
|
|
2606
|
-
}), (o, s) => (
|
|
2660
|
+
}), (o, s) => (i(), r("div", {
|
|
2607
2661
|
ref_key: "envoltorio",
|
|
2608
2662
|
ref: t,
|
|
2609
2663
|
class: "inline-block",
|
|
@@ -2616,12 +2670,14 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2616
2670
|
], 544));
|
|
2617
2671
|
}
|
|
2618
2672
|
}), Pl = ["title"], Rl = ["src", "alt"], Fl = {
|
|
2619
|
-
key:
|
|
2673
|
+
key: 2,
|
|
2620
2674
|
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"
|
|
2621
2675
|
}, Nl = /* @__PURE__ */ D({
|
|
2622
2676
|
__name: "TrayIconButton",
|
|
2623
2677
|
props: {
|
|
2624
|
-
|
|
2678
|
+
name: { default: "" },
|
|
2679
|
+
type: { default: "icon" },
|
|
2680
|
+
icon: { default: "" },
|
|
2625
2681
|
alt: { default: "" },
|
|
2626
2682
|
tooltip: { default: "" },
|
|
2627
2683
|
badge: { default: null },
|
|
@@ -2633,33 +2689,47 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2633
2689
|
},
|
|
2634
2690
|
emits: ["click"],
|
|
2635
2691
|
setup(e, { emit: n }) {
|
|
2636
|
-
const t =
|
|
2637
|
-
|
|
2692
|
+
const t = e, a = n, l = w(!1);
|
|
2693
|
+
W(() => {
|
|
2694
|
+
t.icon && !t.name && console.warn(
|
|
2695
|
+
"[TrayIconButton] «icon» está obsoleto y se va en la próxima mayor: recibe una ruta ya resuelta. Usá «name» con el nombre del icono del tema, y «type» si hace falta el símbolo."
|
|
2696
|
+
);
|
|
2697
|
+
});
|
|
2698
|
+
const o = () => {
|
|
2699
|
+
a("click");
|
|
2638
2700
|
};
|
|
2639
|
-
return (
|
|
2640
|
-
class:
|
|
2701
|
+
return (s, u) => (i(), r("div", {
|
|
2702
|
+
class: y(["p-1 rounded-corner relative hover:bg-primary dark:hover:bg-primary-dark group transition-[background-color] duration-300", e.customClass]),
|
|
2641
2703
|
title: e.tooltip,
|
|
2642
|
-
onClick:
|
|
2643
|
-
onMouseenter:
|
|
2644
|
-
onMouseleave:
|
|
2704
|
+
onClick: o,
|
|
2705
|
+
onMouseenter: u[0] || (u[0] = (m) => l.value = !0),
|
|
2706
|
+
onMouseleave: u[1] || (u[1] = (m) => l.value = !1)
|
|
2645
2707
|
}, [
|
|
2646
|
-
|
|
2647
|
-
|
|
2708
|
+
e.name ? (i(), U(N, {
|
|
2709
|
+
key: 0,
|
|
2710
|
+
name: e.name,
|
|
2711
|
+
type: e.type,
|
|
2712
|
+
size: 22,
|
|
2648
2713
|
alt: e.alt,
|
|
2649
|
-
class:
|
|
2650
|
-
}, null,
|
|
2651
|
-
e.badge !== null && e.badge > 0 ? (r(), i("div", Fl, M(e.badge), 1)) : x("", !0),
|
|
2652
|
-
e.showCustomTooltip && e.customTooltipText ? (r(), i("div", {
|
|
2714
|
+
class: y(["m-auto", e.iconClass])
|
|
2715
|
+
}, null, 8, ["name", "type", "alt", "class"])) : (i(), r("img", {
|
|
2653
2716
|
key: 1,
|
|
2654
|
-
|
|
2717
|
+
src: e.icon,
|
|
2718
|
+
alt: e.alt,
|
|
2719
|
+
class: y(["m-auto h-5.5 w-auto", e.iconClass])
|
|
2720
|
+
}, null, 10, Rl)),
|
|
2721
|
+
e.badge !== null && e.badge > 0 ? (i(), r("div", Fl, M(e.badge), 1)) : x("", !0),
|
|
2722
|
+
e.showCustomTooltip && e.customTooltipText ? (i(), r("div", {
|
|
2723
|
+
key: 3,
|
|
2724
|
+
class: y(["absolute top-1 left-1/2 transform -translate-x-1/2 text-xs font-semibold p-1 rounded-corner transition-[opacity,translate] duration-300 pointer-events-none background", [
|
|
2655
2725
|
e.tooltipClass,
|
|
2656
2726
|
{
|
|
2657
|
-
"opacity-0 -translate-y-2": !
|
|
2658
|
-
"opacity-100 translate-y-0":
|
|
2727
|
+
"opacity-0 -translate-y-2": !l.value,
|
|
2728
|
+
"opacity-100 translate-y-0": l.value
|
|
2659
2729
|
}
|
|
2660
2730
|
]])
|
|
2661
2731
|
}, M(e.customTooltipText), 3)) : x("", !0),
|
|
2662
|
-
S(
|
|
2732
|
+
S(s.$slots, "default")
|
|
2663
2733
|
], 42, Pl));
|
|
2664
2734
|
}
|
|
2665
2735
|
}), ql = [
|
|
@@ -2667,8 +2737,8 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2667
2737
|
_e,
|
|
2668
2738
|
Ze,
|
|
2669
2739
|
ba,
|
|
2670
|
-
|
|
2671
|
-
|
|
2740
|
+
N,
|
|
2741
|
+
La,
|
|
2672
2742
|
at,
|
|
2673
2743
|
tt,
|
|
2674
2744
|
Ra,
|
|
@@ -2680,7 +2750,7 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2680
2750
|
sn,
|
|
2681
2751
|
mn,
|
|
2682
2752
|
Oe,
|
|
2683
|
-
|
|
2753
|
+
Ln,
|
|
2684
2754
|
lt,
|
|
2685
2755
|
cn,
|
|
2686
2756
|
An,
|
|
@@ -2693,8 +2763,8 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2693
2763
|
_n,
|
|
2694
2764
|
tl,
|
|
2695
2765
|
ll,
|
|
2696
|
-
rl,
|
|
2697
2766
|
il,
|
|
2767
|
+
rl,
|
|
2698
2768
|
ul,
|
|
2699
2769
|
dl,
|
|
2700
2770
|
bl,
|
|
@@ -2721,7 +2791,7 @@ export {
|
|
|
2721
2791
|
at as AppBar,
|
|
2722
2792
|
Ua as BarSearch,
|
|
2723
2793
|
ot as CLASES_POR_TONO,
|
|
2724
|
-
|
|
2794
|
+
rt as CLAVE_DEL_DIALOGO,
|
|
2725
2795
|
ut as CLAVE_DEL_MENU,
|
|
2726
2796
|
ft as CLAVE_DEL_TOOLTIP,
|
|
2727
2797
|
Ve as CLAVE_DE_LA_BARRA,
|
|
@@ -2735,8 +2805,8 @@ export {
|
|
|
2735
2805
|
_n as DialogTitle,
|
|
2736
2806
|
tl as DropdownMenu,
|
|
2737
2807
|
ll as DropdownMenuContent,
|
|
2738
|
-
|
|
2739
|
-
|
|
2808
|
+
il as DropdownMenuItem,
|
|
2809
|
+
rl as DropdownMenuLabel,
|
|
2740
2810
|
ul as DropdownMenuSeparator,
|
|
2741
2811
|
dl as DropdownMenuTrigger,
|
|
2742
2812
|
on as EmptyState,
|
|
@@ -2747,7 +2817,7 @@ export {
|
|
|
2747
2817
|
va as POSICIONES,
|
|
2748
2818
|
mn as ProgressBar,
|
|
2749
2819
|
Oe as SearchField,
|
|
2750
|
-
|
|
2820
|
+
Ln as SearchSelect,
|
|
2751
2821
|
ba as SelectField,
|
|
2752
2822
|
ua as SideBar,
|
|
2753
2823
|
_e as SideButton,
|
|
@@ -2759,7 +2829,7 @@ export {
|
|
|
2759
2829
|
Ra as TabBar,
|
|
2760
2830
|
nt as TabItem,
|
|
2761
2831
|
lt as TextInput,
|
|
2762
|
-
|
|
2832
|
+
N as ThemeIcon,
|
|
2763
2833
|
cn as ToastArea,
|
|
2764
2834
|
Ml as ToggleControl,
|
|
2765
2835
|
Il as Tooltip,
|
|
@@ -2767,14 +2837,14 @@ export {
|
|
|
2767
2837
|
jl as TooltipTrigger,
|
|
2768
2838
|
Nl as TrayIconButton,
|
|
2769
2839
|
tt as WindowControls,
|
|
2770
|
-
|
|
2840
|
+
La as WindowFrame,
|
|
2771
2841
|
vn as buscarOpciones,
|
|
2772
2842
|
Xl as default,
|
|
2773
2843
|
pa as esPosicion,
|
|
2774
2844
|
Ql as olvidarLosIconosDelTema,
|
|
2775
2845
|
Ae as orientacionDe,
|
|
2776
2846
|
ha as posicionDe,
|
|
2777
|
-
|
|
2847
|
+
it as rolDelTono,
|
|
2778
2848
|
st as usarElDialogo,
|
|
2779
2849
|
Ce as usarElMenu,
|
|
2780
2850
|
mt as usarElTooltip,
|