@vasakgroup/vue-libvasak 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/index.d.ts +2 -2
- package/dist/types/window/AppBar.vue.d.ts +21 -6
- package/dist/types/window/WindowControls.vue.d.ts +13 -1
- package/dist/types/window/WindowFrame.vue.d.ts +22 -8
- package/dist/types/window/reenvio.d.ts +21 -0
- package/dist/types/window/tipos.d.ts +4 -0
- package/dist/vue-libvasak.es.js +862 -768
- package/dist/vue-libvasak.umd.js +1 -1
- package/package.json +1 -1
- package/readme.md +5 -0
package/dist/vue-libvasak.es.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { listen as
|
|
3
|
-
import { getSymbolSource as
|
|
4
|
-
import { getCurrentWindow as
|
|
5
|
-
function
|
|
6
|
-
const t =
|
|
7
|
-
let a = null, o = !1,
|
|
8
|
-
async function
|
|
9
|
-
const
|
|
10
|
-
if (!
|
|
1
|
+
import { ref as $, onMounted as Q, onUnmounted as Ve, watch as X, defineComponent as E, toRef as me, computed as x, createElementBlock as i, unref as V, openBlock as l, normalizeStyle as se, createCommentVNode as g, createElementVNode as C, createVNode as j, toDisplayString as S, normalizeClass as p, renderSlot as B, createBlock as G, onBeforeUnmount as J, Fragment as Y, renderList as ae, withCtx as U, mergeModels as je, useAttrs as Pe, useId as Ne, useModel as Fe, withDirectives as ye, mergeProps as ne, isRef as Re, vModelSelect as He, inject as xe, getCurrentInstance as ke, provide as ue, createTextVNode as We, toHandlers as we, createSlots as qe, withModifiers as A, withKeys as O, Teleport as $e, Transition as Ce, nextTick as ce, vShow as Ue, cloneVNode as Ke, h as Ge, Comment as Ye, Text as Qe } from "vue";
|
|
2
|
+
import { listen as Xe } from "@tauri-apps/api/event";
|
|
3
|
+
import { getSymbolSource as Je, getIconSource as Ze } from "@vasakgroup/plugin-vicons";
|
|
4
|
+
import { getCurrentWindow as _e } from "@tauri-apps/api/window";
|
|
5
|
+
function et(e, n) {
|
|
6
|
+
const t = $("");
|
|
7
|
+
let a = null, o = !1, s = 0;
|
|
8
|
+
async function c() {
|
|
9
|
+
const u = ++s, d = e.value;
|
|
10
|
+
if (!d) {
|
|
11
11
|
t.value = "";
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const v = n.value === "symbol" ? await Je(d) : await Ze(d);
|
|
15
|
+
u === s && (t.value = v);
|
|
16
16
|
}
|
|
17
|
-
return
|
|
18
|
-
const
|
|
17
|
+
return Q(async () => {
|
|
18
|
+
const u = await Xe("vicons:theme-changed", c);
|
|
19
19
|
if (o) {
|
|
20
|
-
|
|
20
|
+
u();
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
|
-
a =
|
|
24
|
-
}),
|
|
23
|
+
a = u, await c();
|
|
24
|
+
}), Ve(() => {
|
|
25
25
|
o = !0, a?.();
|
|
26
|
-
}),
|
|
26
|
+
}), X(e, c), t;
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const tt = ["src", "alt"], N = /* @__PURE__ */ E({
|
|
29
29
|
__name: "ThemeIcon",
|
|
30
30
|
props: {
|
|
31
31
|
name: {},
|
|
@@ -34,23 +34,23 @@ const Je = ["src", "alt"], N = /* @__PURE__ */ L({
|
|
|
34
34
|
alt: { default: "" }
|
|
35
35
|
},
|
|
36
36
|
setup(e) {
|
|
37
|
-
const
|
|
38
|
-
return (o,
|
|
37
|
+
const n = e, t = et(me(n, "name"), me(n, "type")), a = x(() => `${n.size}px`);
|
|
38
|
+
return (o, s) => V(t) ? (l(), i("img", {
|
|
39
39
|
key: 0,
|
|
40
|
-
src:
|
|
40
|
+
src: V(t),
|
|
41
41
|
alt: e.alt,
|
|
42
|
-
style:
|
|
42
|
+
style: se({ width: a.value, height: a.value }),
|
|
43
43
|
class: "shrink-0 object-contain"
|
|
44
|
-
}, null, 12,
|
|
44
|
+
}, null, 12, tt)) : (l(), i("span", {
|
|
45
45
|
key: 1,
|
|
46
|
-
style:
|
|
46
|
+
style: se({ width: a.value, height: a.value }),
|
|
47
47
|
class: "shrink-0"
|
|
48
48
|
}, null, 4));
|
|
49
49
|
}
|
|
50
|
-
}),
|
|
50
|
+
}), at = { class: "flex flex-col gap-2" }, nt = ["aria-expanded"], lt = {
|
|
51
51
|
key: 1,
|
|
52
52
|
class: "flex flex-col gap-1"
|
|
53
|
-
},
|
|
53
|
+
}, ze = /* @__PURE__ */ E({
|
|
54
54
|
__name: "SideGroup",
|
|
55
55
|
props: {
|
|
56
56
|
title: {},
|
|
@@ -58,40 +58,40 @@ const Je = ["src", "alt"], N = /* @__PURE__ */ L({
|
|
|
58
58
|
defaultOpen: { type: Boolean, default: !0 }
|
|
59
59
|
},
|
|
60
60
|
setup(e) {
|
|
61
|
-
const
|
|
62
|
-
return
|
|
63
|
-
() =>
|
|
61
|
+
const n = e, t = $(n.defaultOpen);
|
|
62
|
+
return X(
|
|
63
|
+
() => n.collapsed,
|
|
64
64
|
(a) => {
|
|
65
65
|
a && (t.value = !0);
|
|
66
66
|
}
|
|
67
|
-
), (a, o) => (
|
|
68
|
-
e.collapsed ? g("", !0) : (
|
|
67
|
+
), (a, o) => (l(), i("section", at, [
|
|
68
|
+
e.collapsed ? g("", !0) : (l(), i("button", {
|
|
69
69
|
key: 0,
|
|
70
70
|
type: "button",
|
|
71
71
|
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",
|
|
72
72
|
"aria-expanded": t.value,
|
|
73
|
-
onClick: o[0] || (o[0] = (
|
|
73
|
+
onClick: o[0] || (o[0] = (s) => t.value = !t.value)
|
|
74
74
|
}, [
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
C("span", null, S(e.title), 1),
|
|
76
|
+
j(N, {
|
|
77
77
|
name: "pan-down-symbolic",
|
|
78
78
|
type: "symbol",
|
|
79
79
|
size: 12,
|
|
80
80
|
class: p(["transition-transform duration-200", t.value ? "" : "-rotate-90"])
|
|
81
81
|
}, null, 8, ["class"])
|
|
82
|
-
], 8,
|
|
83
|
-
t.value || e.collapsed ? (
|
|
84
|
-
|
|
82
|
+
], 8, nt)),
|
|
83
|
+
t.value || e.collapsed ? (l(), i("div", lt, [
|
|
84
|
+
B(a.$slots, "default")
|
|
85
85
|
])) : g("", !0)
|
|
86
86
|
]));
|
|
87
87
|
}
|
|
88
|
-
}),
|
|
88
|
+
}), ot = ["title", "aria-label", "disabled", "aria-current"], it = { key: 1 }, st = {
|
|
89
89
|
key: 0,
|
|
90
90
|
class: "min-w-0 flex-1 truncate font-medium"
|
|
91
|
-
},
|
|
91
|
+
}, rt = {
|
|
92
92
|
key: 1,
|
|
93
93
|
class: "rounded-corner bg-ui-surface px-2 py-0.5 font-semibold text-tx-muted text-xs"
|
|
94
|
-
},
|
|
94
|
+
}, Le = /* @__PURE__ */ E({
|
|
95
95
|
__name: "SideButton",
|
|
96
96
|
props: {
|
|
97
97
|
label: {},
|
|
@@ -103,7 +103,7 @@ const Je = ["src", "alt"], N = /* @__PURE__ */ L({
|
|
|
103
103
|
},
|
|
104
104
|
emits: ["click"],
|
|
105
105
|
setup(e) {
|
|
106
|
-
return (
|
|
106
|
+
return (n, t) => (l(), i("button", {
|
|
107
107
|
type: "button",
|
|
108
108
|
title: e.collapsed ? e.label : void 0,
|
|
109
109
|
"aria-label": e.collapsed ? e.label : void 0,
|
|
@@ -114,38 +114,38 @@ const Je = ["src", "alt"], N = /* @__PURE__ */ L({
|
|
|
114
114
|
e.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer",
|
|
115
115
|
e.collapsed ? "justify-center px-2" : ""
|
|
116
116
|
]]),
|
|
117
|
-
onClick: t[0] || (t[0] = (a) =>
|
|
117
|
+
onClick: t[0] || (t[0] = (a) => n.$emit("click"))
|
|
118
118
|
}, [
|
|
119
|
-
|
|
119
|
+
C("span", {
|
|
120
120
|
class: p(["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" : ""]),
|
|
121
121
|
"aria-hidden": "true"
|
|
122
122
|
}, [
|
|
123
|
-
e.icon ? (
|
|
123
|
+
e.icon ? (l(), G(N, {
|
|
124
124
|
key: 0,
|
|
125
125
|
name: e.icon,
|
|
126
126
|
size: 20
|
|
127
|
-
}, null, 8, ["name"])) : (
|
|
127
|
+
}, null, 8, ["name"])) : (l(), i("span", it, S(e.label.charAt(0).toUpperCase()), 1))
|
|
128
128
|
], 2),
|
|
129
|
-
e.collapsed ? g("", !0) : (
|
|
130
|
-
!e.collapsed && e.badge !== "" ? (
|
|
131
|
-
], 10,
|
|
129
|
+
e.collapsed ? g("", !0) : (l(), i("span", st, S(e.label), 1)),
|
|
130
|
+
!e.collapsed && e.badge !== "" ? (l(), i("span", rt, S(e.badge), 1)) : g("", !0)
|
|
131
|
+
], 10, ot));
|
|
132
132
|
}
|
|
133
|
-
}),
|
|
133
|
+
}), ut = {
|
|
134
134
|
key: 0,
|
|
135
135
|
class: "flex flex-col gap-2 border-ui-border border-b p-2"
|
|
136
|
-
},
|
|
136
|
+
}, ct = { class: "flex items-center gap-2" }, dt = ["aria-label", "aria-expanded"], ft = {
|
|
137
137
|
key: 0,
|
|
138
138
|
class: "min-w-0 flex-1"
|
|
139
|
-
},
|
|
139
|
+
}, mt = {
|
|
140
140
|
key: 0,
|
|
141
141
|
class: "truncate font-semibold text-sm"
|
|
142
|
-
},
|
|
142
|
+
}, bt = {
|
|
143
143
|
key: 1,
|
|
144
144
|
class: "truncate text-tx-muted text-xs"
|
|
145
|
-
},
|
|
145
|
+
}, vt = { key: 0 }, pt = {
|
|
146
146
|
key: 1,
|
|
147
147
|
class: "flex border-ui-border border-b p-2"
|
|
148
|
-
},
|
|
148
|
+
}, gt = ["aria-label", "aria-expanded"], ht = { class: "flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-2" }, be = "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", ve = 767, yt = /* @__PURE__ */ E({
|
|
149
149
|
__name: "SideBar",
|
|
150
150
|
props: {
|
|
151
151
|
title: { default: "" },
|
|
@@ -157,101 +157,101 @@ const Je = ["src", "alt"], N = /* @__PURE__ */ L({
|
|
|
157
157
|
expandLabel: { default: "Expand" }
|
|
158
158
|
},
|
|
159
159
|
emits: ["update:modelValue", "update:collapsed", "change"],
|
|
160
|
-
setup(e, { expose:
|
|
161
|
-
const a = e, o = t,
|
|
162
|
-
let
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
function
|
|
160
|
+
setup(e, { expose: n, emit: t }) {
|
|
161
|
+
const a = e, o = t, s = $(a.collapsed ?? !1), c = $(!1);
|
|
162
|
+
let u = null, d = null;
|
|
163
|
+
const v = x(() => c.value || s.value), w = x(() => !!(a.title || a.subtitle));
|
|
164
|
+
x(() => a.categories.length > 0);
|
|
165
|
+
function I() {
|
|
166
166
|
return document.documentElement?.clientWidth || window.innerWidth;
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
|
|
168
|
+
function z() {
|
|
169
|
+
c.value = I() <= ve;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
|
|
171
|
+
function L() {
|
|
172
|
+
s.value = !s.value, o("update:collapsed", s.value);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
o("update:modelValue",
|
|
174
|
+
function h(k) {
|
|
175
|
+
o("update:modelValue", k), o("change", k);
|
|
176
176
|
}
|
|
177
|
-
return
|
|
177
|
+
return X(
|
|
178
178
|
() => a.collapsed,
|
|
179
|
-
(
|
|
180
|
-
|
|
179
|
+
(k) => {
|
|
180
|
+
k !== void 0 && (s.value = k);
|
|
181
181
|
}
|
|
182
|
-
),
|
|
183
|
-
|
|
184
|
-
}),
|
|
185
|
-
|
|
186
|
-
}),
|
|
187
|
-
class: p(["relative z-30 flex h-full shrink-0 flex-col rounded-corner border border-ui-border bg-ui-surface/70 transition-all duration-300", ["w-[84px]",
|
|
182
|
+
), Q(() => {
|
|
183
|
+
u = window.matchMedia(`(max-width: ${ve}px)`), z(), u.addEventListener("change", z), window.addEventListener("resize", z), typeof ResizeObserver < "u" && document.documentElement && (d = new ResizeObserver(z), d.observe(document.documentElement));
|
|
184
|
+
}), J(() => {
|
|
185
|
+
u?.removeEventListener("change", z), window.removeEventListener("resize", z), d?.disconnect(), d = null;
|
|
186
|
+
}), n({ collapsed: v }), (k, P) => (l(), i("aside", {
|
|
187
|
+
class: p(["relative z-30 flex h-full shrink-0 flex-col rounded-corner border border-ui-border bg-ui-surface/70 transition-all duration-300", ["w-[84px]", v.value ? "md:w-[84px]" : "md:w-72"]])
|
|
188
188
|
}, [
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
w.value || k.$slots.header ? (l(), i("header", ut, [
|
|
190
|
+
C("div", ct, [
|
|
191
|
+
C("button", {
|
|
192
192
|
type: "button",
|
|
193
|
-
class: p(
|
|
194
|
-
"aria-label":
|
|
195
|
-
"aria-expanded": !
|
|
196
|
-
onClick:
|
|
193
|
+
class: p(be),
|
|
194
|
+
"aria-label": v.value ? e.expandLabel : e.collapseLabel,
|
|
195
|
+
"aria-expanded": !v.value,
|
|
196
|
+
onClick: L
|
|
197
197
|
}, [
|
|
198
|
-
|
|
199
|
-
name:
|
|
198
|
+
j(N, {
|
|
199
|
+
name: v.value ? "pan-end-symbolic" : "pan-start-symbolic",
|
|
200
200
|
type: "symbol",
|
|
201
201
|
size: 16
|
|
202
202
|
}, null, 8, ["name"])
|
|
203
|
-
], 8,
|
|
204
|
-
|
|
205
|
-
e.title ? (
|
|
206
|
-
e.subtitle ? (
|
|
203
|
+
], 8, dt),
|
|
204
|
+
w.value && !v.value ? (l(), i("div", ft, [
|
|
205
|
+
e.title ? (l(), i("p", mt, S(e.title), 1)) : g("", !0),
|
|
206
|
+
e.subtitle ? (l(), i("p", bt, S(e.subtitle), 1)) : g("", !0)
|
|
207
207
|
])) : g("", !0)
|
|
208
208
|
]),
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
k.$slots.header && !v.value ? (l(), i("div", vt, [
|
|
210
|
+
B(k.$slots, "header", { collapsed: v.value })
|
|
211
211
|
])) : g("", !0)
|
|
212
|
-
])) : (
|
|
213
|
-
|
|
212
|
+
])) : (l(), i("div", pt, [
|
|
213
|
+
C("button", {
|
|
214
214
|
type: "button",
|
|
215
|
-
class: p(
|
|
216
|
-
"aria-label":
|
|
217
|
-
"aria-expanded": !
|
|
218
|
-
onClick:
|
|
215
|
+
class: p(be),
|
|
216
|
+
"aria-label": v.value ? e.expandLabel : e.collapseLabel,
|
|
217
|
+
"aria-expanded": !v.value,
|
|
218
|
+
onClick: L
|
|
219
219
|
}, [
|
|
220
|
-
|
|
221
|
-
name:
|
|
220
|
+
j(N, {
|
|
221
|
+
name: v.value ? "pan-end-symbolic" : "pan-start-symbolic",
|
|
222
222
|
type: "symbol",
|
|
223
223
|
size: 16
|
|
224
224
|
}, null, 8, ["name"])
|
|
225
|
-
], 8,
|
|
225
|
+
], 8, gt)
|
|
226
226
|
])),
|
|
227
|
-
|
|
228
|
-
(
|
|
229
|
-
key:
|
|
230
|
-
title:
|
|
231
|
-
collapsed:
|
|
227
|
+
C("div", ht, [
|
|
228
|
+
(l(!0), i(Y, null, ae(e.categories, (F) => (l(), G(ze, {
|
|
229
|
+
key: F.id,
|
|
230
|
+
title: F.title,
|
|
231
|
+
collapsed: v.value
|
|
232
232
|
}, {
|
|
233
|
-
default:
|
|
234
|
-
(
|
|
235
|
-
key:
|
|
236
|
-
label:
|
|
237
|
-
icon:
|
|
238
|
-
badge:
|
|
239
|
-
disabled:
|
|
240
|
-
collapsed:
|
|
241
|
-
active: e.modelValue ===
|
|
242
|
-
onClick: (
|
|
233
|
+
default: U(() => [
|
|
234
|
+
(l(!0), i(Y, null, ae(F.items, (y) => (l(), G(Le, {
|
|
235
|
+
key: y.id,
|
|
236
|
+
label: y.label,
|
|
237
|
+
icon: y.icon,
|
|
238
|
+
badge: y.badge,
|
|
239
|
+
disabled: y.disabled,
|
|
240
|
+
collapsed: v.value,
|
|
241
|
+
active: e.modelValue === y.id,
|
|
242
|
+
onClick: (r) => h(y.id)
|
|
243
243
|
}, null, 8, ["label", "icon", "badge", "disabled", "collapsed", "active", "onClick"]))), 128))
|
|
244
244
|
]),
|
|
245
245
|
_: 2
|
|
246
246
|
}, 1032, ["title", "collapsed"]))), 128)),
|
|
247
|
-
|
|
247
|
+
B(k.$slots, "default", { collapsed: v.value })
|
|
248
248
|
])
|
|
249
249
|
], 2));
|
|
250
250
|
}
|
|
251
|
-
}),
|
|
251
|
+
}), xt = { class: "flex min-w-0 flex-col gap-1" }, kt = ["for"], wt = { class: "relative flex min-w-0 items-center" }, $t = ["id"], Ct = /* @__PURE__ */ E({
|
|
252
252
|
inheritAttrs: !1,
|
|
253
253
|
__name: "SelectField",
|
|
254
|
-
props: /* @__PURE__ */
|
|
254
|
+
props: /* @__PURE__ */ je({
|
|
255
255
|
label: {}
|
|
256
256
|
}, {
|
|
257
257
|
modelValue: {
|
|
@@ -261,28 +261,28 @@ const Je = ["src", "alt"], N = /* @__PURE__ */ L({
|
|
|
261
261
|
}),
|
|
262
262
|
emits: ["update:modelValue"],
|
|
263
263
|
setup(e) {
|
|
264
|
-
const
|
|
265
|
-
set(
|
|
266
|
-
return
|
|
264
|
+
const n = e, t = Pe(), a = Ne(), o = x(() => t.id ?? a), [s, c] = Fe(e, "modelValue", {
|
|
265
|
+
set(u) {
|
|
266
|
+
return c.number ? Number(u) : u;
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
|
-
return (
|
|
270
|
-
|
|
269
|
+
return (u, d) => (l(), i("div", xt, [
|
|
270
|
+
n.label ? (l(), i("label", {
|
|
271
271
|
key: 0,
|
|
272
272
|
for: o.value,
|
|
273
273
|
class: "text-tx-muted text-xs"
|
|
274
|
-
},
|
|
275
|
-
|
|
276
|
-
|
|
274
|
+
}, S(n.label), 9, kt)) : g("", !0),
|
|
275
|
+
C("div", wt, [
|
|
276
|
+
ye(C("select", ne({
|
|
277
277
|
id: o.value,
|
|
278
|
-
"onUpdate:modelValue":
|
|
278
|
+
"onUpdate:modelValue": d[0] || (d[0] = (v) => Re(s) ? s.value = v : null),
|
|
279
279
|
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"
|
|
280
|
-
},
|
|
281
|
-
|
|
282
|
-
], 16,
|
|
283
|
-
[
|
|
280
|
+
}, V(t)), [
|
|
281
|
+
B(u.$slots, "default")
|
|
282
|
+
], 16, $t), [
|
|
283
|
+
[He, V(s)]
|
|
284
284
|
]),
|
|
285
|
-
|
|
285
|
+
j(N, {
|
|
286
286
|
name: "pan-down-symbolic",
|
|
287
287
|
type: "symbol",
|
|
288
288
|
size: 14,
|
|
@@ -291,119 +291,153 @@ const Je = ["src", "alt"], N = /* @__PURE__ */ L({
|
|
|
291
291
|
])
|
|
292
292
|
]));
|
|
293
293
|
}
|
|
294
|
-
}),
|
|
295
|
-
function
|
|
294
|
+
}), de = /* @__PURE__ */ Symbol("barra de vasak");
|
|
295
|
+
function re(e) {
|
|
296
296
|
return e === "left" || e === "right" ? "vertical" : "horizontal";
|
|
297
297
|
}
|
|
298
|
-
const
|
|
299
|
-
function
|
|
300
|
-
return typeof e == "string" &&
|
|
298
|
+
const zt = ["top", "bottom", "left", "right"];
|
|
299
|
+
function Lt(e) {
|
|
300
|
+
return typeof e == "string" && zt.includes(e);
|
|
301
301
|
}
|
|
302
|
-
function
|
|
303
|
-
const e =
|
|
302
|
+
function Z() {
|
|
303
|
+
const e = xe(de, null);
|
|
304
304
|
if (e) return e;
|
|
305
|
-
const
|
|
305
|
+
const n = $("top");
|
|
306
306
|
return {
|
|
307
|
-
posicion:
|
|
308
|
-
orientacion:
|
|
309
|
-
vertical:
|
|
307
|
+
posicion: n,
|
|
308
|
+
orientacion: x(() => re(n.value)),
|
|
309
|
+
vertical: x(() => re(n.value) === "vertical")
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
const
|
|
313
|
-
function
|
|
314
|
-
const t = e?.[
|
|
315
|
-
return
|
|
312
|
+
const fe = ["minimize", "maximize", "close"], Et = "window", Dt = "barPosition";
|
|
313
|
+
function Bt(e) {
|
|
314
|
+
const t = e?.[Et]?.[Dt];
|
|
315
|
+
return Lt(t) ? t : null;
|
|
316
316
|
}
|
|
317
|
-
function
|
|
318
|
-
const
|
|
317
|
+
function Mt(e = "top") {
|
|
318
|
+
const n = $(e);
|
|
319
319
|
let t = null, a = !1;
|
|
320
320
|
async function o() {
|
|
321
321
|
try {
|
|
322
|
-
const { readConfig:
|
|
323
|
-
|
|
322
|
+
const { readConfig: s } = await import("@vasakgroup/plugin-config-manager"), c = await s();
|
|
323
|
+
n.value = Bt(c) ?? e;
|
|
324
324
|
} catch {
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
|
-
return
|
|
327
|
+
return Q(async () => {
|
|
328
328
|
await o();
|
|
329
329
|
try {
|
|
330
|
-
const { listen:
|
|
330
|
+
const { listen: s } = await import("@tauri-apps/api/event"), c = await s("config-changed", () => {
|
|
331
331
|
o();
|
|
332
332
|
});
|
|
333
333
|
if (a) {
|
|
334
|
-
|
|
334
|
+
c();
|
|
335
335
|
return;
|
|
336
336
|
}
|
|
337
|
-
t =
|
|
337
|
+
t = c;
|
|
338
338
|
} catch {
|
|
339
339
|
}
|
|
340
|
-
}),
|
|
340
|
+
}), J(() => {
|
|
341
341
|
a = !0, t?.(), t = null;
|
|
342
|
-
}),
|
|
342
|
+
}), n;
|
|
343
|
+
}
|
|
344
|
+
function Ee(e) {
|
|
345
|
+
const n = ke(), t = {};
|
|
346
|
+
for (const a of e) {
|
|
347
|
+
const o = `on${a[0].toUpperCase()}${a.slice(1)}`;
|
|
348
|
+
n?.vnode.props?.[o] && (t[a] = () => n.emit(a));
|
|
349
|
+
}
|
|
350
|
+
return t;
|
|
343
351
|
}
|
|
344
|
-
const
|
|
352
|
+
const At = ["title", "aria-label"], St = ["title", "aria-label"], Tt = ["title", "aria-label"], ie = "flex items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 p-1 transition-colors", De = /* @__PURE__ */ E({
|
|
345
353
|
__name: "WindowControls",
|
|
346
354
|
props: {
|
|
355
|
+
controls: { default: () => fe },
|
|
347
356
|
minimizeLabel: { default: "Minimize" },
|
|
348
357
|
maximizeLabel: { default: "Maximize" },
|
|
349
358
|
closeLabel: { default: "Close" }
|
|
350
359
|
},
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
360
|
+
emits: ["minimize", "maximize", "close"],
|
|
361
|
+
setup(e, { emit: n }) {
|
|
362
|
+
const t = e, a = n, { vertical: o } = Z(), s = x(() => ({
|
|
363
|
+
minimize: t.controls.includes("minimize"),
|
|
364
|
+
maximize: t.controls.includes("maximize"),
|
|
365
|
+
close: t.controls.includes("close")
|
|
366
|
+
}));
|
|
367
|
+
function c() {
|
|
368
|
+
return _e();
|
|
355
369
|
}
|
|
356
|
-
|
|
357
|
-
|
|
370
|
+
const u = ke();
|
|
371
|
+
function d(z) {
|
|
372
|
+
return !!u?.vnode.props?.[`on${z}`];
|
|
373
|
+
}
|
|
374
|
+
function v() {
|
|
375
|
+
if (d("Minimize")) return a("minimize");
|
|
376
|
+
c().minimize();
|
|
377
|
+
}
|
|
378
|
+
function w() {
|
|
379
|
+
if (d("Maximize")) return a("maximize");
|
|
380
|
+
c().toggleMaximize();
|
|
381
|
+
}
|
|
382
|
+
function I() {
|
|
383
|
+
if (d("Close")) return a("close");
|
|
384
|
+
c().close();
|
|
385
|
+
}
|
|
386
|
+
return (z, L) => e.controls.length ? (l(), i("div", {
|
|
387
|
+
key: 0,
|
|
388
|
+
class: p(["flex shrink-0 gap-1", V(o) ? "flex-col" : ""]),
|
|
358
389
|
"data-tauri-drag-region": ""
|
|
359
390
|
}, [
|
|
360
|
-
|
|
391
|
+
s.value.minimize ? (l(), i("button", {
|
|
392
|
+
key: 0,
|
|
361
393
|
type: "button",
|
|
362
|
-
class: p([
|
|
394
|
+
class: p([ie, "hover:bg-status-success"]),
|
|
363
395
|
title: e.minimizeLabel,
|
|
364
396
|
"aria-label": e.minimizeLabel,
|
|
365
|
-
onClick:
|
|
397
|
+
onClick: L[0] || (L[0] = (h) => v())
|
|
366
398
|
}, [
|
|
367
|
-
|
|
399
|
+
j(N, {
|
|
368
400
|
name: "window-minimize",
|
|
369
401
|
size: 24
|
|
370
402
|
})
|
|
371
|
-
], 10,
|
|
372
|
-
|
|
403
|
+
], 10, At)) : g("", !0),
|
|
404
|
+
s.value.maximize ? (l(), i("button", {
|
|
405
|
+
key: 1,
|
|
373
406
|
type: "button",
|
|
374
|
-
class: p([
|
|
407
|
+
class: p([ie, "hover:bg-status-warning"]),
|
|
375
408
|
title: e.maximizeLabel,
|
|
376
409
|
"aria-label": e.maximizeLabel,
|
|
377
|
-
onClick:
|
|
410
|
+
onClick: L[1] || (L[1] = (h) => w())
|
|
378
411
|
}, [
|
|
379
|
-
|
|
412
|
+
j(N, {
|
|
380
413
|
name: "window-maximize",
|
|
381
414
|
size: 24
|
|
382
415
|
})
|
|
383
|
-
], 10,
|
|
384
|
-
|
|
416
|
+
], 10, St)) : g("", !0),
|
|
417
|
+
s.value.close ? (l(), i("button", {
|
|
418
|
+
key: 2,
|
|
385
419
|
type: "button",
|
|
386
|
-
class: p([
|
|
420
|
+
class: p([ie, "hover:bg-status-error"]),
|
|
387
421
|
title: e.closeLabel,
|
|
388
422
|
"aria-label": e.closeLabel,
|
|
389
|
-
onClick:
|
|
423
|
+
onClick: L[2] || (L[2] = (h) => I())
|
|
390
424
|
}, [
|
|
391
|
-
|
|
425
|
+
j(N, {
|
|
392
426
|
name: "window-close",
|
|
393
427
|
size: 24
|
|
394
428
|
})
|
|
395
|
-
], 10,
|
|
396
|
-
], 2));
|
|
429
|
+
], 10, Tt)) : g("", !0)
|
|
430
|
+
], 2)) : g("", !0);
|
|
397
431
|
}
|
|
398
|
-
}),
|
|
432
|
+
}), It = {
|
|
399
433
|
key: 0,
|
|
400
434
|
class: "flex shrink-0 items-center",
|
|
401
435
|
"data-tauri-drag-region": ""
|
|
402
|
-
},
|
|
436
|
+
}, Ot = {
|
|
403
437
|
key: 1,
|
|
404
438
|
class: "min-w-0 shrink truncate text-sm",
|
|
405
439
|
"data-tauri-drag-region": ""
|
|
406
|
-
},
|
|
440
|
+
}, Be = /* @__PURE__ */ E({
|
|
407
441
|
__name: "AppBar",
|
|
408
442
|
props: {
|
|
409
443
|
position: { default: null },
|
|
@@ -411,47 +445,58 @@ const zt = ["title", "aria-label"], Dt = ["title", "aria-label"], Et = ["title",
|
|
|
411
445
|
minimizeLabel: { default: "Minimize" },
|
|
412
446
|
maximizeLabel: { default: "Maximize" },
|
|
413
447
|
closeLabel: { default: "Close" },
|
|
414
|
-
|
|
448
|
+
controls: { default: () => fe }
|
|
415
449
|
},
|
|
450
|
+
emits: ["minimize", "maximize", "close"],
|
|
416
451
|
setup(e) {
|
|
417
|
-
const
|
|
418
|
-
return
|
|
452
|
+
const n = e, t = Z(), a = x(() => n.position ?? t.posicion.value), o = x(() => a.value === "left" || a.value === "right");
|
|
453
|
+
return ue(de, {
|
|
419
454
|
posicion: a,
|
|
420
|
-
orientacion:
|
|
455
|
+
orientacion: x(() => o.value ? "vertical" : "horizontal"),
|
|
421
456
|
vertical: o
|
|
422
|
-
}), (
|
|
423
|
-
class: p(["flex shrink-0 items-center gap-2 p-1 font-title", o.value ? "h-full flex-col" : "w-full"]),
|
|
457
|
+
}), (s, c) => (l(), i("div", {
|
|
458
|
+
class: p(["relative flex shrink-0 items-center gap-2 p-1 font-title", o.value ? "h-full flex-col" : "w-full"]),
|
|
424
459
|
"data-tauri-drag-region": ""
|
|
425
460
|
}, [
|
|
426
|
-
|
|
427
|
-
|
|
461
|
+
s.$slots.identidad ? (l(), i("div", It, [
|
|
462
|
+
B(s.$slots, "identidad")
|
|
428
463
|
])) : g("", !0),
|
|
429
|
-
(
|
|
430
|
-
|
|
431
|
-
|
|
464
|
+
(s.$slots.titulo || e.title) && !o.value ? (l(), i("p", Ot, [
|
|
465
|
+
B(s.$slots, "titulo", {}, () => [
|
|
466
|
+
We(S(e.title), 1)
|
|
432
467
|
])
|
|
433
468
|
])) : g("", !0),
|
|
434
|
-
|
|
469
|
+
C("div", {
|
|
435
470
|
class: p(["flex min-h-0 min-w-0 flex-1 items-center gap-2 overflow-auto", o.value ? "flex-col" : ""]),
|
|
436
471
|
"data-tauri-drag-region": ""
|
|
437
472
|
}, [
|
|
438
|
-
|
|
473
|
+
B(s.$slots, "default")
|
|
439
474
|
], 2),
|
|
440
|
-
|
|
475
|
+
s.$slots.acciones ? (l(), i("div", {
|
|
441
476
|
key: 2,
|
|
442
477
|
class: p(["flex shrink-0 items-center gap-1", o.value ? "flex-col" : ""])
|
|
443
478
|
}, [
|
|
444
|
-
|
|
479
|
+
B(s.$slots, "acciones")
|
|
445
480
|
], 2)) : g("", !0),
|
|
446
|
-
|
|
447
|
-
|
|
481
|
+
j(De, ne({
|
|
482
|
+
controls: e.controls,
|
|
448
483
|
"minimize-label": e.minimizeLabel,
|
|
449
484
|
"maximize-label": e.maximizeLabel,
|
|
450
485
|
"close-label": e.closeLabel
|
|
451
|
-
}, null,
|
|
486
|
+
}, we(V(Ee)(["minimize", "maximize", "close"]))), null, 16, ["controls", "minimize-label", "maximize-label", "close-label"]),
|
|
487
|
+
s.$slots.centro ? (l(), i("div", {
|
|
488
|
+
key: 3,
|
|
489
|
+
class: p(["pointer-events-none absolute flex items-center justify-center", o.value ? "inset-x-0 top-1/2 -translate-y-1/2 flex-col" : "inset-y-0 left-1/2 -translate-x-1/2"])
|
|
490
|
+
}, [
|
|
491
|
+
C("div", {
|
|
492
|
+
class: p(["pointer-events-auto flex items-center gap-2", o.value ? "flex-col" : ""])
|
|
493
|
+
}, [
|
|
494
|
+
B(s.$slots, "centro")
|
|
495
|
+
], 2)
|
|
496
|
+
], 2)) : g("", !0)
|
|
452
497
|
], 2));
|
|
453
498
|
}
|
|
454
|
-
}),
|
|
499
|
+
}), Vt = { class: "flex min-h-0 min-w-0 flex-1" }, jt = /* @__PURE__ */ E({
|
|
455
500
|
__name: "WindowFrame",
|
|
456
501
|
props: {
|
|
457
502
|
position: { default: null },
|
|
@@ -459,73 +504,81 @@ const zt = ["title", "aria-label"], Dt = ["title", "aria-label"], Et = ["title",
|
|
|
459
504
|
minimizeLabel: { default: "Minimize" },
|
|
460
505
|
maximizeLabel: { default: "Maximize" },
|
|
461
506
|
closeLabel: { default: "Close" },
|
|
462
|
-
|
|
507
|
+
controls: { default: () => fe },
|
|
463
508
|
hideBar: { type: Boolean, default: !1 }
|
|
464
509
|
},
|
|
510
|
+
emits: ["minimize", "maximize", "close"],
|
|
465
511
|
setup(e) {
|
|
466
|
-
const
|
|
467
|
-
|
|
468
|
-
const
|
|
512
|
+
const n = e, t = Mt(), a = x(() => n.position ?? t.value), o = x(() => re(a.value)), s = x(() => o.value === "vertical");
|
|
513
|
+
ue(de, { posicion: a, orientacion: o, vertical: s });
|
|
514
|
+
const c = {
|
|
469
515
|
top: "flex-col",
|
|
470
516
|
bottom: "flex-col-reverse",
|
|
471
517
|
left: "flex-row",
|
|
472
518
|
right: "flex-row-reverse"
|
|
473
519
|
};
|
|
474
|
-
return (
|
|
475
|
-
class: p(["flex h-screen w-screen overflow-hidden rounded-corner-window border border-ui-border bg-ui-bg/80",
|
|
520
|
+
return (u, d) => (l(), i("div", {
|
|
521
|
+
class: p(["flex h-screen w-screen overflow-hidden rounded-corner-window border border-ui-border bg-ui-bg/80", c[a.value]])
|
|
476
522
|
}, [
|
|
477
|
-
e.hideBar ? g("", !0) : (
|
|
523
|
+
e.hideBar ? g("", !0) : (l(), G(Be, ne({
|
|
478
524
|
key: 0,
|
|
479
525
|
position: a.value,
|
|
480
526
|
title: e.title,
|
|
481
527
|
"minimize-label": e.minimizeLabel,
|
|
482
528
|
"maximize-label": e.maximizeLabel,
|
|
483
529
|
"close-label": e.closeLabel,
|
|
484
|
-
|
|
485
|
-
},
|
|
486
|
-
default:
|
|
487
|
-
|
|
530
|
+
controls: e.controls
|
|
531
|
+
}, we(V(Ee)(["minimize", "maximize", "close"]))), qe({
|
|
532
|
+
default: U(() => [
|
|
533
|
+
B(u.$slots, "barra")
|
|
488
534
|
]),
|
|
489
535
|
_: 2
|
|
490
536
|
}, [
|
|
491
|
-
|
|
537
|
+
u.$slots.identidad ? {
|
|
492
538
|
name: "identidad",
|
|
493
|
-
fn:
|
|
494
|
-
|
|
539
|
+
fn: U(() => [
|
|
540
|
+
B(u.$slots, "identidad")
|
|
495
541
|
]),
|
|
496
542
|
key: "0"
|
|
497
543
|
} : void 0,
|
|
498
|
-
|
|
544
|
+
u.$slots.titulo ? {
|
|
499
545
|
name: "titulo",
|
|
500
|
-
fn:
|
|
501
|
-
|
|
546
|
+
fn: U(() => [
|
|
547
|
+
B(u.$slots, "titulo")
|
|
502
548
|
]),
|
|
503
549
|
key: "1"
|
|
504
550
|
} : void 0,
|
|
505
|
-
|
|
506
|
-
name: "
|
|
507
|
-
fn:
|
|
508
|
-
|
|
551
|
+
u.$slots.centro ? {
|
|
552
|
+
name: "centro",
|
|
553
|
+
fn: U(() => [
|
|
554
|
+
B(u.$slots, "centro")
|
|
509
555
|
]),
|
|
510
556
|
key: "2"
|
|
557
|
+
} : void 0,
|
|
558
|
+
u.$slots.acciones ? {
|
|
559
|
+
name: "acciones",
|
|
560
|
+
fn: U(() => [
|
|
561
|
+
B(u.$slots, "acciones")
|
|
562
|
+
]),
|
|
563
|
+
key: "3"
|
|
511
564
|
} : void 0
|
|
512
|
-
]),
|
|
513
|
-
|
|
514
|
-
|
|
565
|
+
]), 1040, ["position", "title", "minimize-label", "maximize-label", "close-label", "controls"])),
|
|
566
|
+
C("div", Vt, [
|
|
567
|
+
B(u.$slots, "default")
|
|
515
568
|
])
|
|
516
569
|
], 2));
|
|
517
570
|
}
|
|
518
|
-
}),
|
|
571
|
+
}), Pt = ["aria-selected", "title", "aria-label", "tabindex"], Nt = {
|
|
519
572
|
key: 1,
|
|
520
573
|
"aria-hidden": "true"
|
|
521
|
-
},
|
|
574
|
+
}, Ft = {
|
|
522
575
|
key: 2,
|
|
523
576
|
class: "min-w-0 flex-1 truncate"
|
|
524
|
-
},
|
|
577
|
+
}, Rt = ["title", "aria-label"], Ht = { class: "whitespace-nowrap" }, Wt = {
|
|
525
578
|
key: 0,
|
|
526
579
|
class: "size-2 shrink-0 rounded-full bg-current",
|
|
527
580
|
"aria-hidden": "true"
|
|
528
|
-
},
|
|
581
|
+
}, qt = ["title", "aria-label"], Ut = 500, pe = 8, ge = 6, Me = /* @__PURE__ */ E({
|
|
529
582
|
__name: "TabItem",
|
|
530
583
|
props: {
|
|
531
584
|
tab: {},
|
|
@@ -535,166 +588,166 @@ const zt = ["title", "aria-label"], Dt = ["title", "aria-label"], Et = ["title",
|
|
|
535
588
|
tabindex: { default: 0 }
|
|
536
589
|
},
|
|
537
590
|
emits: ["select", "close", "menu", "mover", "navegar"],
|
|
538
|
-
setup(e, { emit:
|
|
539
|
-
const t = e, a =
|
|
540
|
-
let
|
|
541
|
-
const
|
|
591
|
+
setup(e, { emit: n }) {
|
|
592
|
+
const t = e, a = n, { vertical: o, posicion: s } = Z(), c = $(null), u = $(null), d = $(!1), v = $(!1), w = $(!1), I = $({ top: 0, left: 0, right: 0 });
|
|
593
|
+
let z = null, L = null;
|
|
594
|
+
const h = x(() => t.tab.closable !== !1), k = x(() => t.tab.tooltip ?? t.tab.label), P = x(
|
|
542
595
|
() => t.tab.dirty ? `${t.tab.label} · ${t.dirtyLabel}` : t.tab.label
|
|
543
|
-
),
|
|
544
|
-
() => !!t.tab.dirty && !(
|
|
545
|
-
),
|
|
546
|
-
() =>
|
|
547
|
-
),
|
|
548
|
-
() => o.value && (
|
|
549
|
-
),
|
|
550
|
-
const
|
|
551
|
-
return
|
|
596
|
+
), F = x(() => t.tab.label.trim().charAt(0).toUpperCase()), y = x(() => d.value || w.value), r = x(
|
|
597
|
+
() => !!t.tab.dirty && !(y.value && h.value)
|
|
598
|
+
), f = x(
|
|
599
|
+
() => h.value && (y.value || t.active || !t.tab.dirty)
|
|
600
|
+
), b = x(
|
|
601
|
+
() => o.value && (d.value || v.value || w.value)
|
|
602
|
+
), D = x(() => {
|
|
603
|
+
const M = { position: "fixed", top: `${I.value.top}px`, zIndex: 50 };
|
|
604
|
+
return s.value === "right" ? { ...M, right: `${I.value.right + ge}px` } : { ...M, left: `${I.value.left + ge}px` };
|
|
552
605
|
});
|
|
553
|
-
function
|
|
554
|
-
const
|
|
555
|
-
if (!
|
|
556
|
-
const
|
|
557
|
-
|
|
558
|
-
top:
|
|
559
|
-
left:
|
|
560
|
-
right: window.innerWidth -
|
|
606
|
+
function _() {
|
|
607
|
+
const M = c.value;
|
|
608
|
+
if (!M) return;
|
|
609
|
+
const m = M.getBoundingClientRect();
|
|
610
|
+
I.value = {
|
|
611
|
+
top: m.top,
|
|
612
|
+
left: m.right,
|
|
613
|
+
right: window.innerWidth - m.left
|
|
561
614
|
};
|
|
562
615
|
}
|
|
563
|
-
function
|
|
564
|
-
const
|
|
565
|
-
|
|
616
|
+
function H(M) {
|
|
617
|
+
const m = M.relatedTarget;
|
|
618
|
+
m && u.value?.contains(m) || (w.value = !1);
|
|
566
619
|
}
|
|
567
|
-
function
|
|
568
|
-
|
|
620
|
+
function ee() {
|
|
621
|
+
d.value = !0, _();
|
|
569
622
|
}
|
|
570
|
-
function
|
|
571
|
-
|
|
623
|
+
function W() {
|
|
624
|
+
v.value = !0, _();
|
|
572
625
|
}
|
|
573
|
-
function
|
|
574
|
-
|
|
626
|
+
function R() {
|
|
627
|
+
z !== null && clearTimeout(z), z = null, L = null;
|
|
575
628
|
}
|
|
576
|
-
function
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
},
|
|
629
|
+
function K(M) {
|
|
630
|
+
M.button === 0 && (L = { x: M.clientX, y: M.clientY }, z = setTimeout(() => {
|
|
631
|
+
L && a("menu", L), R();
|
|
632
|
+
}, Ut));
|
|
580
633
|
}
|
|
581
|
-
function
|
|
582
|
-
if (!
|
|
583
|
-
(Math.abs(
|
|
634
|
+
function te(M) {
|
|
635
|
+
if (!L) return;
|
|
636
|
+
(Math.abs(M.clientX - L.x) > pe || Math.abs(M.clientY - L.y) > pe) && R();
|
|
584
637
|
}
|
|
585
|
-
function
|
|
586
|
-
|
|
638
|
+
function Ie(M) {
|
|
639
|
+
M.button === 1 && h.value && (M.preventDefault(), a("close"));
|
|
587
640
|
}
|
|
588
|
-
function
|
|
589
|
-
|
|
641
|
+
function Oe(M) {
|
|
642
|
+
M.preventDefault(), a("menu", { x: M.clientX, y: M.clientY });
|
|
590
643
|
}
|
|
591
|
-
return
|
|
644
|
+
return J(R), (M, m) => (l(), i("div", {
|
|
592
645
|
ref_key: "raiz",
|
|
593
|
-
ref:
|
|
646
|
+
ref: c,
|
|
594
647
|
class: p(["group relative flex shrink-0 cursor-pointer items-center gap-2 rounded-corner border border-ui-border transition-colors", [
|
|
595
648
|
e.active ? "bg-primary font-bold text-tx-on-primary" : "bg-ui-bg/80 hover:bg-ui-surface/70",
|
|
596
|
-
|
|
649
|
+
V(o) ? "size-8 justify-center p-0 text-sm" : "w-34 max-w-34 px-3 py-1 text-sm"
|
|
597
650
|
]]),
|
|
598
651
|
role: "tab",
|
|
599
652
|
"aria-selected": e.active,
|
|
600
|
-
title:
|
|
601
|
-
"aria-label":
|
|
653
|
+
title: k.value,
|
|
654
|
+
"aria-label": P.value,
|
|
602
655
|
tabindex: e.tabindex,
|
|
603
|
-
onClick:
|
|
656
|
+
onClick: m[5] || (m[5] = A((T) => a("select"), ["stop"])),
|
|
604
657
|
onKeydown: [
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
658
|
+
m[6] || (m[6] = O(A((T) => a("select"), ["stop"]), ["enter"])),
|
|
659
|
+
m[7] || (m[7] = O(A((T) => a("select"), ["prevent", "stop"]), ["space"])),
|
|
660
|
+
m[8] || (m[8] = O(A((T) => a("navegar", "anterior"), ["prevent", "stop"]), ["left"])),
|
|
661
|
+
m[9] || (m[9] = O(A((T) => a("navegar", "anterior"), ["prevent", "stop"]), ["up"])),
|
|
662
|
+
m[10] || (m[10] = O(A((T) => a("navegar", "siguiente"), ["prevent", "stop"]), ["right"])),
|
|
663
|
+
m[11] || (m[11] = O(A((T) => a("navegar", "siguiente"), ["prevent", "stop"]), ["down"])),
|
|
664
|
+
m[12] || (m[12] = O(A((T) => a("navegar", "primera"), ["prevent", "stop"]), ["home"])),
|
|
665
|
+
m[13] || (m[13] = O(A((T) => a("navegar", "ultima"), ["prevent", "stop"]), ["end"])),
|
|
666
|
+
m[14] || (m[14] = O(A((T) => a("mover", -1), ["alt", "prevent", "stop"]), ["left"])),
|
|
667
|
+
m[15] || (m[15] = O(A((T) => a("mover", -1), ["alt", "prevent", "stop"]), ["up"])),
|
|
668
|
+
m[16] || (m[16] = O(A((T) => a("mover", 1), ["alt", "prevent", "stop"]), ["right"])),
|
|
669
|
+
m[17] || (m[17] = O(A((T) => a("mover", 1), ["alt", "prevent", "stop"]), ["down"])),
|
|
670
|
+
m[18] || (m[18] = O(A((T) => h.value && a("close"), ["prevent", "stop"]), ["delete"]))
|
|
618
671
|
],
|
|
619
|
-
onAuxclick: A(
|
|
620
|
-
onContextmenu:
|
|
621
|
-
onPointerdown:
|
|
622
|
-
onPointermove:
|
|
623
|
-
onPointerup:
|
|
624
|
-
onPointerleave:
|
|
625
|
-
onMouseenter:
|
|
626
|
-
onMouseleave:
|
|
627
|
-
onFocus:
|
|
628
|
-
onBlur:
|
|
672
|
+
onAuxclick: A(Ie, ["stop"]),
|
|
673
|
+
onContextmenu: Oe,
|
|
674
|
+
onPointerdown: K,
|
|
675
|
+
onPointermove: te,
|
|
676
|
+
onPointerup: R,
|
|
677
|
+
onPointerleave: R,
|
|
678
|
+
onMouseenter: ee,
|
|
679
|
+
onMouseleave: m[19] || (m[19] = (T) => d.value = !1),
|
|
680
|
+
onFocus: W,
|
|
681
|
+
onBlur: m[20] || (m[20] = (T) => v.value = !1)
|
|
629
682
|
}, [
|
|
630
|
-
e.tab.icon ? (
|
|
683
|
+
e.tab.icon ? (l(), G(N, {
|
|
631
684
|
key: 0,
|
|
632
685
|
name: e.tab.icon,
|
|
633
686
|
size: 16,
|
|
634
687
|
class: "shrink-0"
|
|
635
|
-
}, null, 8, ["name"])) :
|
|
636
|
-
|
|
637
|
-
|
|
688
|
+
}, null, 8, ["name"])) : V(o) ? (l(), i("span", Nt, S(F.value), 1)) : g("", !0),
|
|
689
|
+
V(o) ? g("", !0) : (l(), i("span", Ft, S(e.tab.label), 1)),
|
|
690
|
+
r.value ? (l(), i("span", {
|
|
638
691
|
key: 3,
|
|
639
|
-
class: p(["size-2 shrink-0 rounded-full bg-current",
|
|
692
|
+
class: p(["size-2 shrink-0 rounded-full bg-current", V(o) ? "absolute right-0.5 top-0.5" : ""]),
|
|
640
693
|
"aria-hidden": "true"
|
|
641
|
-
}, null, 2)) :
|
|
694
|
+
}, null, 2)) : f.value && !V(o) ? (l(), i("button", {
|
|
642
695
|
key: 4,
|
|
643
696
|
type: "button",
|
|
644
697
|
class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
|
|
645
698
|
title: e.closeLabel,
|
|
646
|
-
"aria-label": `${e.closeLabel}: ${
|
|
647
|
-
onClick:
|
|
699
|
+
"aria-label": `${e.closeLabel}: ${P.value}`,
|
|
700
|
+
onClick: m[0] || (m[0] = A((T) => a("close"), ["stop"]))
|
|
648
701
|
}, [
|
|
649
|
-
|
|
702
|
+
j(N, {
|
|
650
703
|
name: "gtk-close",
|
|
651
704
|
type: "symbol",
|
|
652
705
|
size: 12
|
|
653
706
|
})
|
|
654
|
-
], 8,
|
|
655
|
-
(
|
|
656
|
-
|
|
707
|
+
], 8, Rt)) : g("", !0),
|
|
708
|
+
(l(), G($e, { to: "body" }, [
|
|
709
|
+
j(Ce, {
|
|
657
710
|
"enter-active-class": "transition duration-150 ease-out",
|
|
658
711
|
"enter-from-class": "opacity-0 scale-95",
|
|
659
712
|
"leave-active-class": "transition duration-100 ease-in",
|
|
660
713
|
"leave-to-class": "opacity-0 scale-95"
|
|
661
714
|
}, {
|
|
662
|
-
default:
|
|
663
|
-
|
|
715
|
+
default: U(() => [
|
|
716
|
+
b.value ? (l(), i("div", {
|
|
664
717
|
key: 0,
|
|
665
718
|
class: p(["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" : ""]),
|
|
666
719
|
ref_key: "desplegadoRef",
|
|
667
|
-
ref:
|
|
668
|
-
style:
|
|
669
|
-
onMouseenter:
|
|
670
|
-
onMouseleave:
|
|
671
|
-
onFocusin:
|
|
672
|
-
onFocusout:
|
|
720
|
+
ref: u,
|
|
721
|
+
style: se(D.value),
|
|
722
|
+
onMouseenter: m[2] || (m[2] = (T) => w.value = !0),
|
|
723
|
+
onMouseleave: m[3] || (m[3] = (T) => w.value = !1),
|
|
724
|
+
onFocusin: m[4] || (m[4] = (T) => w.value = !0),
|
|
725
|
+
onFocusout: H
|
|
673
726
|
}, [
|
|
674
|
-
|
|
675
|
-
e.tab.dirty ? (
|
|
676
|
-
|
|
727
|
+
C("span", Ht, S(e.tab.label), 1),
|
|
728
|
+
e.tab.dirty ? (l(), i("span", Wt)) : g("", !0),
|
|
729
|
+
h.value ? (l(), i("button", {
|
|
677
730
|
key: 1,
|
|
678
731
|
type: "button",
|
|
679
732
|
class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
|
|
680
733
|
title: e.closeLabel,
|
|
681
|
-
"aria-label": `${e.closeLabel}: ${
|
|
682
|
-
onClick:
|
|
734
|
+
"aria-label": `${e.closeLabel}: ${P.value}`,
|
|
735
|
+
onClick: m[1] || (m[1] = A((T) => a("close"), ["stop"]))
|
|
683
736
|
}, [
|
|
684
|
-
|
|
737
|
+
j(N, {
|
|
685
738
|
name: "gtk-close",
|
|
686
739
|
type: "symbol",
|
|
687
740
|
size: 12
|
|
688
741
|
})
|
|
689
|
-
], 8,
|
|
742
|
+
], 8, qt)) : g("", !0)
|
|
690
743
|
], 38)) : g("", !0)
|
|
691
744
|
]),
|
|
692
745
|
_: 1
|
|
693
746
|
})
|
|
694
747
|
]))
|
|
695
|
-
], 42,
|
|
748
|
+
], 42, Pt));
|
|
696
749
|
}
|
|
697
|
-
}),
|
|
750
|
+
}), Kt = ["aria-orientation"], Gt = ["draggable", "onDragstart", "onDragover", "onDrop"], Yt = ["title", "aria-label"], Qt = /* @__PURE__ */ E({
|
|
698
751
|
__name: "TabBar",
|
|
699
752
|
props: {
|
|
700
753
|
tabs: {},
|
|
@@ -705,102 +758,102 @@ const zt = ["title", "aria-label"], Dt = ["title", "aria-label"], Et = ["title",
|
|
|
705
758
|
fixedOrder: { type: Boolean, default: !1 }
|
|
706
759
|
},
|
|
707
760
|
emits: ["update:modelValue", "select", "close", "new", "reorder", "menu"],
|
|
708
|
-
setup(e, { emit:
|
|
709
|
-
const t = e, a =
|
|
710
|
-
function
|
|
711
|
-
a("update:modelValue",
|
|
761
|
+
setup(e, { emit: n }) {
|
|
762
|
+
const t = e, a = n, { vertical: o } = Z(), s = $(null), c = $(0), u = $(null), d = $(null);
|
|
763
|
+
function v(y) {
|
|
764
|
+
a("update:modelValue", y), a("select", y);
|
|
712
765
|
}
|
|
713
|
-
async function
|
|
714
|
-
const
|
|
715
|
-
if (
|
|
716
|
-
const
|
|
717
|
-
|
|
766
|
+
async function w(y, r) {
|
|
767
|
+
const f = t.tabs.length - 1;
|
|
768
|
+
if (f < 0) return;
|
|
769
|
+
const b = r === "primera" ? 0 : r === "ultima" ? f : r === "anterior" ? (y - 1 + t.tabs.length) % t.tabs.length : (y + 1) % t.tabs.length;
|
|
770
|
+
c.value = b, await ce(), s.value?.querySelectorAll('[role="tab"]')?.[b]?.focus();
|
|
718
771
|
}
|
|
719
|
-
function
|
|
772
|
+
function I(y, r) {
|
|
720
773
|
if (t.fixedOrder) return;
|
|
721
|
-
const
|
|
722
|
-
if (
|
|
723
|
-
const
|
|
724
|
-
|
|
774
|
+
const f = y + r;
|
|
775
|
+
if (f < 0 || f >= t.tabs.length) return;
|
|
776
|
+
const b = [...t.tabs], [D] = b.splice(y, 1);
|
|
777
|
+
D && (b.splice(f, 0, D), c.value = f, a("reorder", b));
|
|
725
778
|
}
|
|
726
|
-
function
|
|
727
|
-
const
|
|
728
|
-
if (!
|
|
729
|
-
const
|
|
730
|
-
o.value ?
|
|
779
|
+
function z(y) {
|
|
780
|
+
const r = s.value;
|
|
781
|
+
if (!r) return;
|
|
782
|
+
const f = y.deltaY || y.deltaX || 0, b = o.value ? r.scrollTop : r.scrollLeft;
|
|
783
|
+
o.value ? r.scrollTop += f : r.scrollLeft += f, (o.value ? r.scrollTop : r.scrollLeft) !== b && y.preventDefault();
|
|
731
784
|
}
|
|
732
|
-
function
|
|
733
|
-
t.fixedOrder || (
|
|
785
|
+
function L(y, r) {
|
|
786
|
+
t.fixedOrder || (u.value = y, r.dataTransfer?.setData("text/plain", String(y)), r.dataTransfer && (r.dataTransfer.effectAllowed = "move"));
|
|
734
787
|
}
|
|
735
|
-
function y
|
|
736
|
-
t.fixedOrder ||
|
|
788
|
+
function h(y, r) {
|
|
789
|
+
t.fixedOrder || u.value === null || (r.preventDefault(), d.value = y, r.dataTransfer && (r.dataTransfer.dropEffect = "move"));
|
|
737
790
|
}
|
|
738
|
-
function
|
|
739
|
-
const
|
|
740
|
-
if (
|
|
741
|
-
const
|
|
742
|
-
|
|
791
|
+
function k(y) {
|
|
792
|
+
const r = u.value;
|
|
793
|
+
if (P(), t.fixedOrder || r === null || r === y) return;
|
|
794
|
+
const f = [...t.tabs], [b] = f.splice(r, 1);
|
|
795
|
+
b && (f.splice(y, 0, b), a("reorder", f));
|
|
743
796
|
}
|
|
744
|
-
function
|
|
745
|
-
|
|
797
|
+
function P() {
|
|
798
|
+
u.value = null, d.value = null;
|
|
746
799
|
}
|
|
747
|
-
const
|
|
800
|
+
const F = x(
|
|
748
801
|
() => o.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"
|
|
749
802
|
);
|
|
750
|
-
return (
|
|
751
|
-
class: p(["flex min-h-0 min-w-0 items-center gap-1",
|
|
803
|
+
return (y, r) => (l(), i("div", {
|
|
804
|
+
class: p(["flex min-h-0 min-w-0 items-center gap-1", V(o) ? "w-full flex-col" : "h-full"]),
|
|
752
805
|
role: "tablist",
|
|
753
|
-
"aria-orientation":
|
|
806
|
+
"aria-orientation": V(o) ? "vertical" : "horizontal"
|
|
754
807
|
}, [
|
|
755
|
-
|
|
808
|
+
C("div", {
|
|
756
809
|
ref_key: "carril",
|
|
757
|
-
ref:
|
|
758
|
-
class: p(
|
|
759
|
-
onWheel:
|
|
810
|
+
ref: s,
|
|
811
|
+
class: p(F.value),
|
|
812
|
+
onWheel: z
|
|
760
813
|
}, [
|
|
761
|
-
(
|
|
762
|
-
key:
|
|
814
|
+
(l(!0), i(Y, null, ae(e.tabs, (f, b) => (l(), i("div", {
|
|
815
|
+
key: f.id,
|
|
763
816
|
class: p(["transition-opacity", [
|
|
764
|
-
|
|
765
|
-
|
|
817
|
+
u.value === b ? "opacity-40" : "",
|
|
818
|
+
d.value === b && u.value !== b ? "ring-2 ring-secondary rounded-corner" : ""
|
|
766
819
|
]]),
|
|
767
820
|
draggable: !e.fixedOrder,
|
|
768
|
-
onDragstart: (
|
|
769
|
-
onDragover: (
|
|
770
|
-
onDrop: A((
|
|
771
|
-
onDragend:
|
|
821
|
+
onDragstart: (D) => L(b, D),
|
|
822
|
+
onDragover: (D) => h(b, D),
|
|
823
|
+
onDrop: A((D) => k(b), ["prevent"]),
|
|
824
|
+
onDragend: P
|
|
772
825
|
}, [
|
|
773
|
-
|
|
774
|
-
tab:
|
|
775
|
-
active:
|
|
826
|
+
j(Me, {
|
|
827
|
+
tab: f,
|
|
828
|
+
active: f.id === e.modelValue,
|
|
776
829
|
"close-label": e.closeLabel,
|
|
777
830
|
"dirty-label": e.dirtyLabel,
|
|
778
|
-
tabindex:
|
|
779
|
-
onSelect: (
|
|
780
|
-
onClose: (
|
|
781
|
-
onMenu: (
|
|
782
|
-
onNavegar: (
|
|
783
|
-
onMover: (
|
|
831
|
+
tabindex: b === c.value ? 0 : -1,
|
|
832
|
+
onSelect: (D) => v(f.id),
|
|
833
|
+
onClose: (D) => a("close", f.id),
|
|
834
|
+
onMenu: (D) => a("menu", { id: f.id, ...D }),
|
|
835
|
+
onNavegar: (D) => w(b, D),
|
|
836
|
+
onMover: (D) => I(b, D)
|
|
784
837
|
}, null, 8, ["tab", "active", "close-label", "dirty-label", "tabindex", "onSelect", "onClose", "onMenu", "onNavegar", "onMover"])
|
|
785
|
-
], 42,
|
|
838
|
+
], 42, Gt))), 128))
|
|
786
839
|
], 34),
|
|
787
|
-
e.newLabel ? (
|
|
840
|
+
e.newLabel ? (l(), i("button", {
|
|
788
841
|
key: 0,
|
|
789
842
|
type: "button",
|
|
790
843
|
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",
|
|
791
844
|
title: e.newLabel,
|
|
792
845
|
"aria-label": e.newLabel,
|
|
793
|
-
onClick:
|
|
846
|
+
onClick: r[0] || (r[0] = (f) => a("new"))
|
|
794
847
|
}, [
|
|
795
|
-
|
|
848
|
+
j(N, {
|
|
796
849
|
name: "gtk-add",
|
|
797
850
|
type: "symbol",
|
|
798
851
|
size: 14
|
|
799
852
|
})
|
|
800
|
-
], 8,
|
|
801
|
-
], 10,
|
|
853
|
+
], 8, Yt)) : g("", !0)
|
|
854
|
+
], 10, Kt));
|
|
802
855
|
}
|
|
803
|
-
}),
|
|
856
|
+
}), Xt = { class: "relative flex shrink-0 items-center" }, Jt = ["title", "aria-label", "aria-expanded"], Zt = ["value", "placeholder", "aria-label"], _t = /* @__PURE__ */ E({
|
|
804
857
|
__name: "BarSearch",
|
|
805
858
|
props: {
|
|
806
859
|
modelValue: { default: "" },
|
|
@@ -809,68 +862,68 @@ const zt = ["title", "aria-label"], Dt = ["title", "aria-label"], Et = ["title",
|
|
|
809
862
|
collapsed: { type: Boolean, default: !1 }
|
|
810
863
|
},
|
|
811
864
|
emits: ["update:modelValue", "search", "open", "close"],
|
|
812
|
-
setup(e, { emit:
|
|
813
|
-
const t = e, a =
|
|
814
|
-
if (!
|
|
815
|
-
const
|
|
816
|
-
return
|
|
865
|
+
setup(e, { emit: n }) {
|
|
866
|
+
const t = e, a = n, { vertical: o, posicion: s } = Z(), c = $(!1), u = $(null), d = x(() => o.value || t.collapsed), v = x(() => !d.value || c.value), w = x(() => {
|
|
867
|
+
if (!d.value) return "";
|
|
868
|
+
const k = "absolute z-40 w-64 rounded-corner border border-ui-border bg-ui-surface/95 p-1 shadow-lg";
|
|
869
|
+
return s.value === "left" ? `${k} left-full top-0 ml-1` : s.value === "right" ? `${k} right-full top-0 mr-1` : s.value === "bottom" ? `${k} bottom-full right-0 mb-1` : `${k} top-full right-0 mt-1`;
|
|
817
870
|
});
|
|
818
|
-
async function
|
|
819
|
-
|
|
871
|
+
async function I() {
|
|
872
|
+
c.value = !0, a("open"), await ce(), u.value?.focus();
|
|
820
873
|
}
|
|
821
|
-
function
|
|
822
|
-
|
|
874
|
+
function z() {
|
|
875
|
+
c.value && (c.value = !1, a("close"));
|
|
823
876
|
}
|
|
824
|
-
function
|
|
825
|
-
a("update:modelValue",
|
|
877
|
+
function L(k) {
|
|
878
|
+
a("update:modelValue", k.target.value);
|
|
826
879
|
}
|
|
827
|
-
function
|
|
880
|
+
function h() {
|
|
828
881
|
a("search", t.modelValue);
|
|
829
882
|
}
|
|
830
|
-
return (
|
|
831
|
-
|
|
883
|
+
return (k, P) => (l(), i("div", Xt, [
|
|
884
|
+
d.value ? (l(), i("button", {
|
|
832
885
|
key: 0,
|
|
833
886
|
type: "button",
|
|
834
887
|
class: "flex size-7 items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 hover:bg-ui-surface/70",
|
|
835
888
|
title: e.label,
|
|
836
889
|
"aria-label": e.label,
|
|
837
|
-
"aria-expanded":
|
|
838
|
-
onMousedown:
|
|
890
|
+
"aria-expanded": c.value,
|
|
891
|
+
onMousedown: P[0] || (P[0] = A(() => {
|
|
839
892
|
}, ["prevent"])),
|
|
840
|
-
onClick:
|
|
893
|
+
onClick: P[1] || (P[1] = (F) => c.value ? z() : I())
|
|
841
894
|
}, [
|
|
842
|
-
|
|
895
|
+
j(N, {
|
|
843
896
|
name: "system-search",
|
|
844
897
|
type: "symbol",
|
|
845
898
|
size: 14
|
|
846
899
|
})
|
|
847
|
-
], 40,
|
|
848
|
-
|
|
900
|
+
], 40, Jt)) : g("", !0),
|
|
901
|
+
v.value ? (l(), i("div", {
|
|
849
902
|
key: 1,
|
|
850
|
-
class: p(
|
|
903
|
+
class: p(w.value)
|
|
851
904
|
}, [
|
|
852
|
-
|
|
905
|
+
C("input", {
|
|
853
906
|
ref_key: "campo",
|
|
854
|
-
ref:
|
|
907
|
+
ref: u,
|
|
855
908
|
type: "search",
|
|
856
|
-
class: p(["w-full rounded-corner border border-ui-border bg-ui-bg/80 px-2 py-1 text-sm outline-none focus:border-ui-border-strong",
|
|
909
|
+
class: p(["w-full rounded-corner border border-ui-border bg-ui-bg/80 px-2 py-1 text-sm outline-none focus:border-ui-border-strong", d.value ? "" : "w-48"]),
|
|
857
910
|
value: e.modelValue,
|
|
858
911
|
placeholder: e.placeholder || e.label,
|
|
859
912
|
"aria-label": e.label,
|
|
860
|
-
onInput:
|
|
913
|
+
onInput: L,
|
|
861
914
|
onKeydown: [
|
|
862
|
-
|
|
863
|
-
|
|
915
|
+
O(h, ["enter"]),
|
|
916
|
+
O(z, ["esc"])
|
|
864
917
|
],
|
|
865
|
-
onBlur:
|
|
866
|
-
}, null, 42,
|
|
918
|
+
onBlur: z
|
|
919
|
+
}, null, 42, Zt)
|
|
867
920
|
], 2)) : g("", !0)
|
|
868
921
|
]));
|
|
869
922
|
}
|
|
870
|
-
}),
|
|
923
|
+
}), ea = ["type", "disabled"], ta = {
|
|
871
924
|
key: 0,
|
|
872
925
|
class: "w-4 h-4 animate-spin rounded-full border-2 border-current border-t-transparent"
|
|
873
|
-
},
|
|
926
|
+
}, aa = ["src", "alt"], na = { key: 2 }, la = ["src", "alt"], oa = /* @__PURE__ */ E({
|
|
874
927
|
__name: "ActionButton",
|
|
875
928
|
props: {
|
|
876
929
|
label: {},
|
|
@@ -888,52 +941,52 @@ const zt = ["title", "aria-label"], Dt = ["title", "aria-label"], Et = ["title",
|
|
|
888
941
|
preventDefault: { type: Boolean, default: !1 }
|
|
889
942
|
},
|
|
890
943
|
emits: ["click"],
|
|
891
|
-
setup(e, { emit:
|
|
892
|
-
const t = e, a =
|
|
944
|
+
setup(e, { emit: n }) {
|
|
945
|
+
const t = e, a = n, o = {
|
|
893
946
|
primary: "bg-primary dark:bg-primary-dark text-tx-on-primary dark:text-tx-on-primary-dark hover:bg-primary/90 dark:hover:bg-primary-dark/90",
|
|
894
947
|
secondary: "bg-secondary dark:bg-secondary-dark text-tx-on-primary dark:text-tx-on-primary-dark hover:bg-secondary/80 dark:hover:bg-secondary-dark/80",
|
|
895
948
|
danger: "bg-status-error dark:bg-status-error-dark text-tx-on-primary dark:text-tx-on-primary-dark hover:bg-status-error/90 dark:hover:bg-status-error-dark/90"
|
|
896
|
-
},
|
|
949
|
+
}, s = {
|
|
897
950
|
sm: "px-2 py-1 text-xs",
|
|
898
951
|
md: "px-3 py-1 text-sm",
|
|
899
952
|
lg: "px-4 py-2 text-base"
|
|
900
|
-
},
|
|
901
|
-
t.stopPropagation &&
|
|
953
|
+
}, c = (u) => {
|
|
954
|
+
t.stopPropagation && u.stopPropagation(), t.preventDefault && u.preventDefault(), !t.disabled && !t.loading && a("click");
|
|
902
955
|
};
|
|
903
|
-
return (
|
|
956
|
+
return (u, d) => (l(), i("button", {
|
|
904
957
|
type: t.type,
|
|
905
|
-
onClick:
|
|
958
|
+
onClick: c,
|
|
906
959
|
class: p(["rounded-corner transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2", [
|
|
907
960
|
o[t.variant],
|
|
908
|
-
|
|
961
|
+
s[t.size],
|
|
909
962
|
t.fullWidth ? "w-full" : "",
|
|
910
963
|
t.iconSrc && !t.label ? "px-2 py-2" : "",
|
|
911
964
|
e.customClass
|
|
912
965
|
]]),
|
|
913
966
|
disabled: t.disabled || t.loading
|
|
914
967
|
}, [
|
|
915
|
-
e.loading ? (
|
|
916
|
-
t.iconSrc && !t.iconRight ? (
|
|
968
|
+
e.loading ? (l(), i("span", ta)) : g("", !0),
|
|
969
|
+
t.iconSrc && !t.iconRight ? (l(), i("img", {
|
|
917
970
|
key: 1,
|
|
918
971
|
src: t.iconSrc,
|
|
919
972
|
alt: t.iconAlt || t.label,
|
|
920
973
|
class: "w-4 h-4"
|
|
921
|
-
}, null, 8,
|
|
922
|
-
t.label ? (
|
|
923
|
-
t.iconSrc && t.iconRight ? (
|
|
974
|
+
}, null, 8, aa)) : g("", !0),
|
|
975
|
+
t.label ? (l(), i("span", na, S(t.label), 1)) : g("", !0),
|
|
976
|
+
t.iconSrc && t.iconRight ? (l(), i("img", {
|
|
924
977
|
key: 3,
|
|
925
978
|
src: t.iconSrc,
|
|
926
979
|
alt: t.iconAlt || t.label,
|
|
927
980
|
class: "w-4 h-4"
|
|
928
|
-
}, null, 8,
|
|
929
|
-
], 10,
|
|
981
|
+
}, null, 8, la)) : g("", !0)
|
|
982
|
+
], 10, ea));
|
|
930
983
|
}
|
|
931
|
-
}),
|
|
984
|
+
}), le = (e, n) => {
|
|
932
985
|
const t = e.__vccOpts || e;
|
|
933
|
-
for (const [a, o] of
|
|
986
|
+
for (const [a, o] of n)
|
|
934
987
|
t[a] = o;
|
|
935
988
|
return t;
|
|
936
|
-
},
|
|
989
|
+
}, ia = /* @__PURE__ */ le(oa, [["__scopeId", "data-v-2eaf6e27"]]), sa = { class: "text-base font-semibold m-0 text-primary dark:text-primary-dark" }, ra = /* @__PURE__ */ E({
|
|
937
990
|
__name: "ConfigSection",
|
|
938
991
|
props: {
|
|
939
992
|
title: {},
|
|
@@ -941,26 +994,26 @@ const zt = ["title", "aria-label"], Dt = ["title", "aria-label"], Et = ["title",
|
|
|
941
994
|
customClass: { default: () => ({}) }
|
|
942
995
|
},
|
|
943
996
|
setup(e) {
|
|
944
|
-
return (
|
|
997
|
+
return (n, t) => (l(), i("div", {
|
|
945
998
|
class: p(["flex flex-col gap-4 p-4 background rounded-corner", e.customClass])
|
|
946
999
|
}, [
|
|
947
|
-
|
|
948
|
-
|
|
1000
|
+
C("h3", sa, S(e.icon ? `${e.icon} ${e.title}` : e.title), 1),
|
|
1001
|
+
B(n.$slots, "default", {}, void 0, !0)
|
|
949
1002
|
], 2));
|
|
950
1003
|
}
|
|
951
|
-
}),
|
|
1004
|
+
}), ua = /* @__PURE__ */ le(ra, [["__scopeId", "data-v-45bd4eab"]]), ca = { class: "flex items-center gap-3 flex-1 min-w-0" }, da = ["src", "alt"], fa = { class: "min-w-0" }, ma = { class: "font-semibold truncate" }, ba = {
|
|
952
1005
|
key: 0,
|
|
953
1006
|
class: "text-xs text-gray-400 truncate"
|
|
954
|
-
},
|
|
1007
|
+
}, va = {
|
|
955
1008
|
key: 1,
|
|
956
1009
|
class: "text-xs text-gray-400 truncate"
|
|
957
|
-
},
|
|
1010
|
+
}, pa = {
|
|
958
1011
|
key: 2,
|
|
959
1012
|
class: "text-xs text-gray-400 flex gap-2 mt-1"
|
|
960
|
-
},
|
|
1013
|
+
}, ga = {
|
|
961
1014
|
key: 1,
|
|
962
1015
|
class: "w-2 h-2 rounded-full bg-green-500"
|
|
963
|
-
},
|
|
1016
|
+
}, ha = /* @__PURE__ */ E({
|
|
964
1017
|
__name: "DeviceCard",
|
|
965
1018
|
props: {
|
|
966
1019
|
icon: {},
|
|
@@ -976,129 +1029,129 @@ const zt = ["title", "aria-label"], Dt = ["title", "aria-label"], Et = ["title",
|
|
|
976
1029
|
clickable: { type: Boolean, default: !1 }
|
|
977
1030
|
},
|
|
978
1031
|
emits: ["action", "click"],
|
|
979
|
-
setup(e, { emit:
|
|
980
|
-
const t =
|
|
1032
|
+
setup(e, { emit: n }) {
|
|
1033
|
+
const t = n, a = () => {
|
|
981
1034
|
t("action");
|
|
982
1035
|
}, o = () => {
|
|
983
1036
|
t("click");
|
|
984
1037
|
};
|
|
985
|
-
return (
|
|
1038
|
+
return (s, c) => (l(), i("div", {
|
|
986
1039
|
class: p(["flex items-center justify-between background rounded-vsk px-6 py-3 mb-4", [{ "border-l-4 border-green-500": e.isConnected }, e.customClass]]),
|
|
987
1040
|
onClick: o
|
|
988
1041
|
}, [
|
|
989
|
-
|
|
990
|
-
|
|
1042
|
+
C("div", ca, [
|
|
1043
|
+
C("img", {
|
|
991
1044
|
src: e.icon,
|
|
992
1045
|
alt: e.title,
|
|
993
1046
|
class: "h-7 w-7 shrink-0"
|
|
994
|
-
}, null, 8,
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
e.subtitle ? (
|
|
998
|
-
e.metadata ? (
|
|
999
|
-
e.extraInfo && e.extraInfo.length > 0 ? (
|
|
1000
|
-
(
|
|
1047
|
+
}, null, 8, da),
|
|
1048
|
+
C("div", fa, [
|
|
1049
|
+
C("div", ma, S(e.title), 1),
|
|
1050
|
+
e.subtitle ? (l(), i("div", ba, S(e.subtitle), 1)) : g("", !0),
|
|
1051
|
+
e.metadata ? (l(), i("div", va, S(e.metadata), 1)) : g("", !0),
|
|
1052
|
+
e.extraInfo && e.extraInfo.length > 0 ? (l(), i("div", pa, [
|
|
1053
|
+
(l(!0), i(Y, null, ae(e.extraInfo, (u, d) => (l(), i("span", { key: d }, S(u), 1))), 128))
|
|
1001
1054
|
])) : g("", !0)
|
|
1002
1055
|
])
|
|
1003
1056
|
]),
|
|
1004
|
-
e.showActionButton ? (
|
|
1057
|
+
e.showActionButton ? (l(), i("button", {
|
|
1005
1058
|
key: 0,
|
|
1006
1059
|
class: "bg-vsk-primary rounded-vsk px-4 py-2 text-sm font-semibold cursor-pointer hover:opacity-70",
|
|
1007
1060
|
onClick: A(a, ["stop"])
|
|
1008
|
-
},
|
|
1009
|
-
e.showStatusIndicator && e.isConnected ? (
|
|
1061
|
+
}, S(e.actionLabel), 1)) : g("", !0),
|
|
1062
|
+
e.showStatusIndicator && e.isConnected ? (l(), i("div", ga)) : g("", !0)
|
|
1010
1063
|
], 2));
|
|
1011
1064
|
}
|
|
1012
|
-
}),
|
|
1013
|
-
function
|
|
1014
|
-
const e =
|
|
1065
|
+
}), Ae = /* @__PURE__ */ Symbol("menú de vasak");
|
|
1066
|
+
function oe() {
|
|
1067
|
+
const e = xe(Ae, null);
|
|
1015
1068
|
if (e) return e;
|
|
1016
|
-
const
|
|
1069
|
+
const n = $(!1);
|
|
1017
1070
|
return {
|
|
1018
|
-
abierto:
|
|
1071
|
+
abierto: n,
|
|
1019
1072
|
idDelMenu: "vsk-menu-suelto",
|
|
1020
|
-
idDeLaEtiqueta:
|
|
1073
|
+
idDeLaEtiqueta: $(null),
|
|
1021
1074
|
ponerLaEtiqueta: () => {
|
|
1022
1075
|
},
|
|
1023
|
-
disparador:
|
|
1076
|
+
disparador: $(null),
|
|
1024
1077
|
ponerElDisparador: () => {
|
|
1025
1078
|
},
|
|
1026
|
-
focoAlAbrir:
|
|
1079
|
+
focoAlAbrir: $("ninguno"),
|
|
1027
1080
|
abrir: () => {
|
|
1028
|
-
|
|
1081
|
+
n.value = !0;
|
|
1029
1082
|
},
|
|
1030
1083
|
cerrar: () => {
|
|
1031
|
-
|
|
1084
|
+
n.value = !1;
|
|
1032
1085
|
},
|
|
1033
1086
|
alternar: () => {
|
|
1034
|
-
|
|
1087
|
+
n.value = !n.value;
|
|
1035
1088
|
}
|
|
1036
1089
|
};
|
|
1037
1090
|
}
|
|
1038
|
-
let
|
|
1039
|
-
function
|
|
1040
|
-
return
|
|
1091
|
+
let he = 0;
|
|
1092
|
+
function Se() {
|
|
1093
|
+
return he += 1, `vsk-menu-${he}`;
|
|
1041
1094
|
}
|
|
1042
|
-
const
|
|
1095
|
+
const ya = { class: "relative inline-block" }, xa = /* @__PURE__ */ E({
|
|
1043
1096
|
__name: "DropdownMenu",
|
|
1044
1097
|
props: {
|
|
1045
1098
|
open: { type: Boolean, default: void 0 }
|
|
1046
1099
|
},
|
|
1047
1100
|
emits: ["update:open"],
|
|
1048
|
-
setup(e, { emit:
|
|
1049
|
-
const t = e, a =
|
|
1050
|
-
let
|
|
1051
|
-
const
|
|
1101
|
+
setup(e, { emit: n }) {
|
|
1102
|
+
const t = e, a = n, o = $(!1), s = $(null), c = $(null), u = $("ninguno"), d = Se();
|
|
1103
|
+
let v = null;
|
|
1104
|
+
const w = x({
|
|
1052
1105
|
get: () => t.open ?? o.value,
|
|
1053
|
-
set: (
|
|
1054
|
-
t.open === void 0 && (o.value =
|
|
1106
|
+
set: (h) => {
|
|
1107
|
+
t.open === void 0 && (o.value = h), a("update:open", h);
|
|
1055
1108
|
}
|
|
1056
1109
|
});
|
|
1057
|
-
|
|
1058
|
-
if (
|
|
1059
|
-
const
|
|
1060
|
-
|
|
1110
|
+
X(w, (h) => {
|
|
1111
|
+
if (h) {
|
|
1112
|
+
const k = document.activeElement;
|
|
1113
|
+
v = k instanceof HTMLElement ? k : null;
|
|
1061
1114
|
} else
|
|
1062
|
-
|
|
1115
|
+
u.value = "ninguno";
|
|
1063
1116
|
});
|
|
1064
|
-
function
|
|
1065
|
-
|
|
1117
|
+
function I(h = "ninguno") {
|
|
1118
|
+
u.value = h, w.value = !0;
|
|
1066
1119
|
}
|
|
1067
|
-
function
|
|
1068
|
-
if (
|
|
1069
|
-
const
|
|
1070
|
-
|
|
1120
|
+
function z(h = {}) {
|
|
1121
|
+
if (w.value = !1, !h.devolverElFoco) return;
|
|
1122
|
+
const k = v ?? s.value;
|
|
1123
|
+
k?.isConnected && k.focus();
|
|
1071
1124
|
}
|
|
1072
|
-
function
|
|
1073
|
-
if (
|
|
1074
|
-
|
|
1125
|
+
function L(h = "ninguno") {
|
|
1126
|
+
if (w.value) {
|
|
1127
|
+
z({ devolverElFoco: !0 });
|
|
1075
1128
|
return;
|
|
1076
1129
|
}
|
|
1077
|
-
|
|
1130
|
+
I(h);
|
|
1078
1131
|
}
|
|
1079
|
-
return
|
|
1080
|
-
abierto:
|
|
1081
|
-
idDelMenu:
|
|
1082
|
-
idDeLaEtiqueta:
|
|
1083
|
-
ponerLaEtiqueta: (
|
|
1084
|
-
|
|
1132
|
+
return ue(Ae, {
|
|
1133
|
+
abierto: w,
|
|
1134
|
+
idDelMenu: d,
|
|
1135
|
+
idDeLaEtiqueta: c,
|
|
1136
|
+
ponerLaEtiqueta: (h) => {
|
|
1137
|
+
c.value = h;
|
|
1085
1138
|
},
|
|
1086
|
-
disparador:
|
|
1087
|
-
ponerElDisparador: (
|
|
1088
|
-
|
|
1139
|
+
disparador: s,
|
|
1140
|
+
ponerElDisparador: (h) => {
|
|
1141
|
+
s.value = h;
|
|
1089
1142
|
},
|
|
1090
|
-
focoAlAbrir:
|
|
1091
|
-
abrir:
|
|
1092
|
-
cerrar:
|
|
1093
|
-
alternar:
|
|
1094
|
-
}), (
|
|
1095
|
-
|
|
1143
|
+
focoAlAbrir: u,
|
|
1144
|
+
abrir: I,
|
|
1145
|
+
cerrar: z,
|
|
1146
|
+
alternar: L
|
|
1147
|
+
}), (h, k) => (l(), i("div", ya, [
|
|
1148
|
+
B(h.$slots, "default")
|
|
1096
1149
|
]));
|
|
1097
1150
|
}
|
|
1098
|
-
}),
|
|
1151
|
+
}), ka = ["id", "aria-labelledby", "inert"], wa = {
|
|
1099
1152
|
role: "none",
|
|
1100
1153
|
class: "py-1"
|
|
1101
|
-
},
|
|
1154
|
+
}, q = 8, $a = /* @__PURE__ */ E({
|
|
1102
1155
|
inheritAttrs: !1,
|
|
1103
1156
|
__name: "DropdownMenuContent",
|
|
1104
1157
|
props: {
|
|
@@ -1107,152 +1160,192 @@ const ba = { class: "relative inline-block" }, va = /* @__PURE__ */ L({
|
|
|
1107
1160
|
sideOffset: { default: 4 }
|
|
1108
1161
|
},
|
|
1109
1162
|
setup(e) {
|
|
1110
|
-
const
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1163
|
+
const n = e, t = oe(), { idDelMenu: a, idDeLaEtiqueta: o } = t, s = x(() => t.disparador.value), c = x(() => t.abierto.value), u = $(null), d = $({
|
|
1164
|
+
top: 0,
|
|
1165
|
+
left: 0,
|
|
1166
|
+
techo: null
|
|
1167
|
+
}), v = {
|
|
1168
|
+
top: "bottom",
|
|
1169
|
+
bottom: "top",
|
|
1170
|
+
left: "right",
|
|
1171
|
+
right: "left"
|
|
1172
|
+
};
|
|
1173
|
+
function w(r, f) {
|
|
1174
|
+
const b = n.sideOffset + q;
|
|
1175
|
+
switch (r) {
|
|
1116
1176
|
case "bottom":
|
|
1117
|
-
|
|
1118
|
-
break;
|
|
1177
|
+
return window.innerHeight - f.bottom - b;
|
|
1119
1178
|
case "top":
|
|
1120
|
-
|
|
1121
|
-
break;
|
|
1122
|
-
case "left":
|
|
1123
|
-
v = m.left - x.width - l.sideOffset, c = m.top;
|
|
1124
|
-
break;
|
|
1179
|
+
return f.top - b;
|
|
1125
1180
|
case "right":
|
|
1126
|
-
|
|
1127
|
-
|
|
1181
|
+
return window.innerWidth - f.right - b;
|
|
1182
|
+
case "left":
|
|
1183
|
+
return f.left - b;
|
|
1128
1184
|
}
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1185
|
+
}
|
|
1186
|
+
function I(r, f, b) {
|
|
1187
|
+
return b < f ? f : Math.min(Math.max(r, f), b);
|
|
1188
|
+
}
|
|
1189
|
+
function z() {
|
|
1190
|
+
if (!s.value || !u.value) return;
|
|
1191
|
+
const r = s.value.getBoundingClientRect(), f = u.value.scrollHeight, b = u.value.offsetWidth, D = n.side === "top" || n.side === "bottom", _ = D ? f : b;
|
|
1192
|
+
let H = n.side;
|
|
1193
|
+
const ee = w(H, r);
|
|
1194
|
+
ee < _ && w(v[H], r) > ee && (H = v[H]);
|
|
1195
|
+
let W = 0, R = 0, K = null;
|
|
1196
|
+
switch (H) {
|
|
1197
|
+
case "bottom": {
|
|
1198
|
+
W = r.bottom + n.sideOffset, K = Math.max(window.innerHeight - W - q, 0);
|
|
1132
1199
|
break;
|
|
1133
|
-
|
|
1134
|
-
|
|
1200
|
+
}
|
|
1201
|
+
case "top": {
|
|
1202
|
+
K = Math.max(w("top", r), 0), W = r.top - n.sideOffset - Math.min(f, K);
|
|
1135
1203
|
break;
|
|
1136
|
-
|
|
1137
|
-
|
|
1204
|
+
}
|
|
1205
|
+
case "left":
|
|
1206
|
+
case "right": {
|
|
1207
|
+
R = H === "right" ? r.right + n.sideOffset : r.left - b - n.sideOffset;
|
|
1208
|
+
const te = window.innerHeight - 2 * q;
|
|
1209
|
+
W = I(r.top, q, window.innerHeight - Math.min(f, te) - q), K = Math.max(window.innerHeight - W - q, 0);
|
|
1138
1210
|
break;
|
|
1211
|
+
}
|
|
1139
1212
|
}
|
|
1140
|
-
|
|
1213
|
+
if (D)
|
|
1214
|
+
switch (n.align) {
|
|
1215
|
+
case "start":
|
|
1216
|
+
R = r.left;
|
|
1217
|
+
break;
|
|
1218
|
+
case "center":
|
|
1219
|
+
R = r.left + r.width / 2 - b / 2;
|
|
1220
|
+
break;
|
|
1221
|
+
case "end":
|
|
1222
|
+
R = r.right - b;
|
|
1223
|
+
break;
|
|
1224
|
+
}
|
|
1225
|
+
R = I(R, q, window.innerWidth - b - q), d.value = { top: W, left: R, techo: K };
|
|
1141
1226
|
}
|
|
1142
|
-
function
|
|
1143
|
-
return
|
|
1227
|
+
function L() {
|
|
1228
|
+
return u.value ? Array.from(u.value.querySelectorAll('[role="menuitem"]')) : [];
|
|
1144
1229
|
}
|
|
1145
|
-
function
|
|
1146
|
-
const
|
|
1147
|
-
if (!
|
|
1148
|
-
const
|
|
1149
|
-
|
|
1230
|
+
function h(r) {
|
|
1231
|
+
const f = L();
|
|
1232
|
+
if (!f.length) return;
|
|
1233
|
+
const b = f.length;
|
|
1234
|
+
f[(r % b + b) % b]?.focus();
|
|
1150
1235
|
}
|
|
1151
|
-
function
|
|
1152
|
-
const
|
|
1153
|
-
return
|
|
1236
|
+
function k() {
|
|
1237
|
+
const r = document.activeElement;
|
|
1238
|
+
return r instanceof HTMLElement ? L().indexOf(r) : -1;
|
|
1154
1239
|
}
|
|
1155
|
-
function
|
|
1156
|
-
const
|
|
1157
|
-
switch (
|
|
1240
|
+
function P(r) {
|
|
1241
|
+
const f = k();
|
|
1242
|
+
switch (r.key) {
|
|
1158
1243
|
case "ArrowDown":
|
|
1159
|
-
|
|
1244
|
+
r.preventDefault(), h(f + 1);
|
|
1160
1245
|
break;
|
|
1161
1246
|
case "ArrowUp":
|
|
1162
|
-
|
|
1247
|
+
r.preventDefault(), h(f <= 0 ? -1 : f - 1);
|
|
1163
1248
|
break;
|
|
1164
1249
|
case "Home":
|
|
1165
|
-
|
|
1250
|
+
r.preventDefault(), h(0);
|
|
1166
1251
|
break;
|
|
1167
1252
|
case "End":
|
|
1168
|
-
|
|
1253
|
+
r.preventDefault(), h(-1);
|
|
1169
1254
|
break;
|
|
1170
1255
|
case "Escape":
|
|
1171
|
-
|
|
1256
|
+
r.preventDefault(), r.stopPropagation(), t.cerrar({ devolverElFoco: !0 });
|
|
1172
1257
|
break;
|
|
1173
1258
|
case "Tab":
|
|
1174
|
-
|
|
1259
|
+
r.preventDefault(), t.cerrar({ devolverElFoco: !0 });
|
|
1175
1260
|
break;
|
|
1176
1261
|
}
|
|
1177
1262
|
}
|
|
1178
|
-
|
|
1179
|
-
if (
|
|
1180
|
-
switch (await
|
|
1181
|
-
|
|
1263
|
+
X(c, async (r) => {
|
|
1264
|
+
if (r)
|
|
1265
|
+
switch (await ce(), requestAnimationFrame(() => {
|
|
1266
|
+
z();
|
|
1182
1267
|
}), t.focoAlAbrir.value) {
|
|
1183
1268
|
case "primero":
|
|
1184
|
-
|
|
1269
|
+
h(0);
|
|
1185
1270
|
break;
|
|
1186
1271
|
case "ultimo":
|
|
1187
|
-
|
|
1272
|
+
h(-1);
|
|
1188
1273
|
break;
|
|
1189
1274
|
// Abierto con el ratón: el foco va al menú y no a un ítem —no hay
|
|
1190
1275
|
// ninguno elegido todavía—, que es lo que deja andar las flechas y el
|
|
1191
1276
|
// Escape sin haber tocado nada.
|
|
1192
1277
|
default:
|
|
1193
|
-
|
|
1278
|
+
u.value?.focus();
|
|
1194
1279
|
}
|
|
1195
1280
|
});
|
|
1196
|
-
function
|
|
1197
|
-
|
|
1281
|
+
function F(r) {
|
|
1282
|
+
c.value && (r && u.value?.contains(r.target) || z());
|
|
1198
1283
|
}
|
|
1199
|
-
function
|
|
1200
|
-
const
|
|
1201
|
-
!
|
|
1284
|
+
function y(r) {
|
|
1285
|
+
const f = r.target, b = !!f.closest("[dropdown-content]"), D = !!s.value?.contains(f);
|
|
1286
|
+
!b && !D && t.cerrar();
|
|
1202
1287
|
}
|
|
1203
|
-
return
|
|
1204
|
-
document.addEventListener("click",
|
|
1205
|
-
}),
|
|
1206
|
-
document.removeEventListener("click",
|
|
1207
|
-
}), (
|
|
1208
|
-
|
|
1288
|
+
return Q(() => {
|
|
1289
|
+
document.addEventListener("click", y), window.addEventListener("resize", F), window.addEventListener("scroll", F, !0);
|
|
1290
|
+
}), J(() => {
|
|
1291
|
+
document.removeEventListener("click", y), window.removeEventListener("resize", F), window.removeEventListener("scroll", F, !0);
|
|
1292
|
+
}), (r, f) => (l(), G($e, { to: "body" }, [
|
|
1293
|
+
j(Ce, {
|
|
1209
1294
|
"enter-active-class": "transition-all duration-150 ease-in-out",
|
|
1210
1295
|
"leave-active-class": "transition-all duration-150 ease-in-out",
|
|
1211
1296
|
"enter-from-class": "opacity-0 scale-95",
|
|
1212
1297
|
"leave-to-class": "opacity-0 scale-95",
|
|
1213
|
-
onEnter:
|
|
1214
|
-
onLeave:
|
|
1298
|
+
onEnter: f[1] || (f[1] = (b) => b.offsetHeight),
|
|
1299
|
+
onLeave: f[2] || (f[2] = (b) => b.offsetHeight)
|
|
1215
1300
|
}, {
|
|
1216
|
-
default:
|
|
1217
|
-
|
|
1301
|
+
default: U(() => [
|
|
1302
|
+
ye(C("div", ne({
|
|
1218
1303
|
ref_key: "contenido",
|
|
1219
|
-
ref:
|
|
1220
|
-
},
|
|
1221
|
-
id:
|
|
1304
|
+
ref: u
|
|
1305
|
+
}, r.$attrs, {
|
|
1306
|
+
id: V(a),
|
|
1222
1307
|
role: "menu",
|
|
1223
1308
|
tabindex: "-1",
|
|
1224
1309
|
"aria-orientation": "vertical",
|
|
1225
|
-
"aria-labelledby":
|
|
1226
|
-
inert: !
|
|
1227
|
-
style: {
|
|
1310
|
+
"aria-labelledby": V(o) ?? void 0,
|
|
1311
|
+
inert: !c.value,
|
|
1312
|
+
style: {
|
|
1313
|
+
position: "fixed",
|
|
1314
|
+
top: `${d.value.top}px`,
|
|
1315
|
+
left: `${d.value.left}px`,
|
|
1316
|
+
maxHeight: d.value.techo === null ? void 0 : `${d.value.techo}px`,
|
|
1317
|
+
overflowY: "auto",
|
|
1318
|
+
overscrollBehavior: "contain",
|
|
1319
|
+
zIndex: 50
|
|
1320
|
+
},
|
|
1228
1321
|
"dropdown-content": "",
|
|
1229
1322
|
class: "min-w-30 rounded-corner border border-primary bg-ui-bg/80 shadow-lg focus:outline-none",
|
|
1230
|
-
onClick:
|
|
1231
|
-
onKeydown:
|
|
1323
|
+
onClick: f[0] || (f[0] = (b) => b.stopPropagation()),
|
|
1324
|
+
onKeydown: P
|
|
1232
1325
|
}), [
|
|
1233
|
-
|
|
1234
|
-
|
|
1326
|
+
C("div", wa, [
|
|
1327
|
+
B(r.$slots, "default")
|
|
1235
1328
|
])
|
|
1236
|
-
], 16,
|
|
1237
|
-
[
|
|
1329
|
+
], 16, ka), [
|
|
1330
|
+
[Ue, c.value]
|
|
1238
1331
|
])
|
|
1239
1332
|
]),
|
|
1240
1333
|
_: 3
|
|
1241
1334
|
})
|
|
1242
1335
|
]));
|
|
1243
1336
|
}
|
|
1244
|
-
}),
|
|
1337
|
+
}), Ca = ["aria-disabled", "onKeydown"], za = /* @__PURE__ */ E({
|
|
1245
1338
|
__name: "DropdownMenuItem",
|
|
1246
1339
|
props: {
|
|
1247
1340
|
disabled: { type: Boolean, default: !1 }
|
|
1248
1341
|
},
|
|
1249
1342
|
emits: ["select", "click"],
|
|
1250
|
-
setup(e, { emit:
|
|
1251
|
-
const t = e, a =
|
|
1252
|
-
function
|
|
1253
|
-
t.disabled || (a("select"), a("click",
|
|
1343
|
+
setup(e, { emit: n }) {
|
|
1344
|
+
const t = e, a = n, o = oe();
|
|
1345
|
+
function s(c) {
|
|
1346
|
+
t.disabled || (a("select"), a("click", c), o.cerrar({ devolverElFoco: !0 }));
|
|
1254
1347
|
}
|
|
1255
|
-
return (
|
|
1348
|
+
return (c, u) => (l(), i("div", {
|
|
1256
1349
|
role: "menuitem",
|
|
1257
1350
|
tabindex: "0",
|
|
1258
1351
|
"aria-disabled": e.disabled || void 0,
|
|
@@ -1263,55 +1356,55 @@ const ba = { class: "relative inline-block" }, va = /* @__PURE__ */ L({
|
|
|
1263
1356
|
"cursor-pointer hover:bg-primary hover:text-tx-on-primary focus-visible:bg-primary focus-visible:text-tx-on-primary": !e.disabled
|
|
1264
1357
|
}
|
|
1265
1358
|
]),
|
|
1266
|
-
onClick:
|
|
1359
|
+
onClick: s,
|
|
1267
1360
|
onKeydown: [
|
|
1268
|
-
|
|
1269
|
-
|
|
1361
|
+
O(A(s, ["prevent"]), ["enter"]),
|
|
1362
|
+
O(A(s, ["prevent"]), ["space"])
|
|
1270
1363
|
]
|
|
1271
1364
|
}, [
|
|
1272
|
-
|
|
1273
|
-
], 42,
|
|
1365
|
+
B(c.$slots, "default")
|
|
1366
|
+
], 42, Ca));
|
|
1274
1367
|
}
|
|
1275
|
-
}),
|
|
1368
|
+
}), La = /* @__PURE__ */ E({
|
|
1276
1369
|
__name: "DropdownMenuLabel",
|
|
1277
1370
|
setup(e) {
|
|
1278
|
-
const
|
|
1279
|
-
return
|
|
1280
|
-
|
|
1281
|
-
}),
|
|
1282
|
-
|
|
1283
|
-
}), (a, o) => (
|
|
1371
|
+
const n = oe(), t = `${Se()}-titulo`;
|
|
1372
|
+
return Q(() => {
|
|
1373
|
+
n.ponerLaEtiqueta(t);
|
|
1374
|
+
}), J(() => {
|
|
1375
|
+
n.ponerLaEtiqueta(null);
|
|
1376
|
+
}), (a, o) => (l(), i("div", {
|
|
1284
1377
|
id: t,
|
|
1285
1378
|
role: "presentation",
|
|
1286
1379
|
class: "px-3 py-2 text-sm font-semibold text-tx-main"
|
|
1287
1380
|
}, [
|
|
1288
|
-
|
|
1381
|
+
B(a.$slots, "default")
|
|
1289
1382
|
]));
|
|
1290
1383
|
}
|
|
1291
|
-
}),
|
|
1384
|
+
}), Ea = {
|
|
1292
1385
|
role: "separator",
|
|
1293
1386
|
"aria-orientation": "horizontal",
|
|
1294
1387
|
class: "bg-ui-bg/80 my-4 h-0.5"
|
|
1295
|
-
},
|
|
1388
|
+
}, Da = /* @__PURE__ */ E({
|
|
1296
1389
|
__name: "DropdownMenuSeparator",
|
|
1297
1390
|
setup(e) {
|
|
1298
|
-
return (
|
|
1391
|
+
return (n, t) => (l(), i("div", Ea));
|
|
1299
1392
|
}
|
|
1300
1393
|
});
|
|
1301
|
-
function
|
|
1302
|
-
const
|
|
1303
|
-
(a) => a.type !==
|
|
1394
|
+
function Te(e) {
|
|
1395
|
+
const n = e.filter(
|
|
1396
|
+
(a) => a.type !== Ye && !(a.type === Qe && typeof a.children == "string" && !a.children.trim())
|
|
1304
1397
|
);
|
|
1305
|
-
if (
|
|
1306
|
-
const t =
|
|
1307
|
-
return t.type ===
|
|
1398
|
+
if (n.length !== 1) return null;
|
|
1399
|
+
const t = n[0];
|
|
1400
|
+
return t.type === Y && Array.isArray(t.children) ? Te(t.children) : t;
|
|
1308
1401
|
}
|
|
1309
|
-
function
|
|
1402
|
+
function Ba(e) {
|
|
1310
1403
|
if (e instanceof HTMLElement) return e;
|
|
1311
|
-
const
|
|
1312
|
-
return
|
|
1404
|
+
const n = e?.$el;
|
|
1405
|
+
return n instanceof HTMLElement ? n : null;
|
|
1313
1406
|
}
|
|
1314
|
-
const
|
|
1407
|
+
const Ma = E({
|
|
1315
1408
|
name: "DropdownMenuTrigger",
|
|
1316
1409
|
inheritAttrs: !1,
|
|
1317
1410
|
props: {
|
|
@@ -1320,36 +1413,36 @@ const La = L({
|
|
|
1320
1413
|
/** El disparador no abre nada; lo abre la aplicación por su cuenta. */
|
|
1321
1414
|
disabled: { type: Boolean, default: !1 }
|
|
1322
1415
|
},
|
|
1323
|
-
setup(e, { slots:
|
|
1324
|
-
const a =
|
|
1325
|
-
function
|
|
1326
|
-
a.ponerElDisparador(
|
|
1416
|
+
setup(e, { slots: n, attrs: t }) {
|
|
1417
|
+
const a = oe(), o = $(null);
|
|
1418
|
+
function s() {
|
|
1419
|
+
a.ponerElDisparador(Ba(o.value));
|
|
1327
1420
|
}
|
|
1328
|
-
function
|
|
1329
|
-
e.disabled || (
|
|
1421
|
+
function c() {
|
|
1422
|
+
e.disabled || (s(), a.alternar());
|
|
1330
1423
|
}
|
|
1331
|
-
function
|
|
1424
|
+
function u(d) {
|
|
1332
1425
|
if (!e.disabled)
|
|
1333
|
-
switch (
|
|
1426
|
+
switch (d.key) {
|
|
1334
1427
|
case "Enter":
|
|
1335
1428
|
case " ":
|
|
1336
|
-
|
|
1429
|
+
d.preventDefault(), s(), a.alternar("primero");
|
|
1337
1430
|
break;
|
|
1338
1431
|
case "ArrowDown":
|
|
1339
|
-
|
|
1432
|
+
d.preventDefault(), s(), a.abrir("primero");
|
|
1340
1433
|
break;
|
|
1341
1434
|
case "ArrowUp":
|
|
1342
|
-
|
|
1435
|
+
d.preventDefault(), s(), a.abrir("ultimo");
|
|
1343
1436
|
break;
|
|
1344
1437
|
case "Escape":
|
|
1345
|
-
a.abierto.value && (
|
|
1438
|
+
a.abierto.value && (d.preventDefault(), a.cerrar({ devolverElFoco: !0 }));
|
|
1346
1439
|
break;
|
|
1347
1440
|
}
|
|
1348
1441
|
}
|
|
1349
1442
|
return () => {
|
|
1350
|
-
const
|
|
1351
|
-
ref: (
|
|
1352
|
-
o.value =
|
|
1443
|
+
const d = {
|
|
1444
|
+
ref: (w) => {
|
|
1445
|
+
o.value = w, s();
|
|
1353
1446
|
},
|
|
1354
1447
|
"aria-haspopup": "menu",
|
|
1355
1448
|
"aria-expanded": a.abierto.value ? "true" : "false",
|
|
@@ -1357,21 +1450,21 @@ const La = L({
|
|
|
1357
1450
|
// a un elemento que el lector no expone —el menú cerrado está
|
|
1358
1451
|
// `inert`— es una referencia rota.
|
|
1359
1452
|
"aria-controls": a.abierto.value ? a.idDelMenu : void 0,
|
|
1360
|
-
onClick:
|
|
1361
|
-
onKeydown:
|
|
1362
|
-
},
|
|
1453
|
+
onClick: c,
|
|
1454
|
+
onKeydown: u
|
|
1455
|
+
}, v = n.default?.() ?? [];
|
|
1363
1456
|
if (e.asChild) {
|
|
1364
|
-
const
|
|
1365
|
-
if (
|
|
1457
|
+
const w = Te(v);
|
|
1458
|
+
if (w) return Ke(w, { ...t, ...d });
|
|
1366
1459
|
}
|
|
1367
|
-
return
|
|
1460
|
+
return Ge(
|
|
1368
1461
|
"div",
|
|
1369
|
-
{ ...t, class: ["dropdown-menu-trigger inline-block", t.class], ...
|
|
1370
|
-
|
|
1462
|
+
{ ...t, class: ["dropdown-menu-trigger inline-block", t.class], ...d },
|
|
1463
|
+
v
|
|
1371
1464
|
);
|
|
1372
1465
|
};
|
|
1373
1466
|
}
|
|
1374
|
-
}),
|
|
1467
|
+
}), Aa = ["for"], Sa = /* @__PURE__ */ E({
|
|
1375
1468
|
__name: "FormGroup",
|
|
1376
1469
|
props: {
|
|
1377
1470
|
label: {},
|
|
@@ -1380,29 +1473,29 @@ const La = L({
|
|
|
1380
1473
|
labelClass: { default: () => ({}) }
|
|
1381
1474
|
},
|
|
1382
1475
|
setup(e) {
|
|
1383
|
-
return (
|
|
1476
|
+
return (n, t) => (l(), i("div", {
|
|
1384
1477
|
class: p(["flex flex-col gap-2", e.customClass])
|
|
1385
1478
|
}, [
|
|
1386
|
-
e.label ? (
|
|
1479
|
+
e.label ? (l(), i("label", {
|
|
1387
1480
|
key: 0,
|
|
1388
1481
|
for: e.htmlFor,
|
|
1389
1482
|
class: p(["text-sm font-medium text-primary dark:text-primary-dark", e.labelClass])
|
|
1390
|
-
},
|
|
1391
|
-
|
|
1483
|
+
}, S(e.label), 11, Aa)) : g("", !0),
|
|
1484
|
+
B(n.$slots, "default", {}, void 0, !0)
|
|
1392
1485
|
], 2));
|
|
1393
1486
|
}
|
|
1394
|
-
}),
|
|
1487
|
+
}), Ta = /* @__PURE__ */ le(Sa, [["__scopeId", "data-v-c0d9d9cb"]]), Ia = /* @__PURE__ */ E({
|
|
1395
1488
|
__name: "ListCard",
|
|
1396
1489
|
props: {
|
|
1397
1490
|
clickable: { type: Boolean, default: !1 },
|
|
1398
1491
|
customClass: { default: () => ({}) }
|
|
1399
1492
|
},
|
|
1400
1493
|
emits: ["click"],
|
|
1401
|
-
setup(e, { emit:
|
|
1402
|
-
const t = e, a =
|
|
1494
|
+
setup(e, { emit: n }) {
|
|
1495
|
+
const t = e, a = n, o = () => {
|
|
1403
1496
|
t.clickable && a("click");
|
|
1404
1497
|
};
|
|
1405
|
-
return (
|
|
1498
|
+
return (s, c) => (l(), i("div", {
|
|
1406
1499
|
class: p([
|
|
1407
1500
|
"flex items-center justify-between background p-3 rounded-vsk border border-vsk-primary/70 transition-colors duration-200",
|
|
1408
1501
|
{
|
|
@@ -1412,13 +1505,13 @@ const La = L({
|
|
|
1412
1505
|
]),
|
|
1413
1506
|
onClick: o
|
|
1414
1507
|
}, [
|
|
1415
|
-
|
|
1508
|
+
B(s.$slots, "default", {}, void 0, !0)
|
|
1416
1509
|
], 2));
|
|
1417
1510
|
}
|
|
1418
|
-
}),
|
|
1511
|
+
}), Oa = /* @__PURE__ */ le(Ia, [["__scopeId", "data-v-f86d47da"]]), Va = { class: "background rounded-corner flex flex-row items-center gap-2 justify-between w-full h-auto p-4 transition-all duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80" }, ja = ["src", "alt", "title"], Pa = {
|
|
1419
1512
|
key: 1,
|
|
1420
1513
|
class: "w-8 h-8 flex items-center justify-center"
|
|
1421
|
-
},
|
|
1514
|
+
}, Na = ["src", "alt"], Fa = ["min", "max", "value"], Ra = /* @__PURE__ */ E({
|
|
1422
1515
|
__name: "SliderControl",
|
|
1423
1516
|
props: {
|
|
1424
1517
|
icon: {},
|
|
@@ -1432,50 +1525,50 @@ const La = L({
|
|
|
1432
1525
|
getPercentageClass: { type: Function, default: () => "" }
|
|
1433
1526
|
},
|
|
1434
1527
|
emits: ["update:modelValue", "buttonClick"],
|
|
1435
|
-
setup(e, { emit:
|
|
1436
|
-
const t = e, a =
|
|
1528
|
+
setup(e, { emit: n }) {
|
|
1529
|
+
const t = e, a = n, o = x(() => {
|
|
1437
1530
|
if (t.max <= t.min) return 0;
|
|
1438
|
-
const
|
|
1439
|
-
return Math.round(
|
|
1440
|
-
}),
|
|
1441
|
-
const
|
|
1442
|
-
a("update:modelValue", Number(
|
|
1443
|
-
},
|
|
1531
|
+
const d = t.max - t.min, v = t.modelValue - t.min;
|
|
1532
|
+
return Math.round(v / d * 100);
|
|
1533
|
+
}), s = x(() => t.getPercentageClass ? t.getPercentageClass(o.value) : ""), c = (d) => {
|
|
1534
|
+
const v = d.target;
|
|
1535
|
+
a("update:modelValue", Number(v.value));
|
|
1536
|
+
}, u = () => {
|
|
1444
1537
|
a("buttonClick");
|
|
1445
1538
|
};
|
|
1446
|
-
return (
|
|
1447
|
-
e.showButton ? (
|
|
1539
|
+
return (d, v) => (l(), i("div", Va, [
|
|
1540
|
+
e.showButton ? (l(), i("button", {
|
|
1448
1541
|
key: 0,
|
|
1449
|
-
onClick:
|
|
1542
|
+
onClick: u,
|
|
1450
1543
|
class: "w-8 h-8 flex items-center justify-center rounded-corner transition-all duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80 hover:scale-110 active:scale-95"
|
|
1451
1544
|
}, [
|
|
1452
|
-
|
|
1545
|
+
C("img", {
|
|
1453
1546
|
src: e.icon,
|
|
1454
1547
|
alt: e.alt,
|
|
1455
1548
|
title: e.tooltip,
|
|
1456
1549
|
class: p(["w-6 h-6 transition-all duration-200", e.iconClass])
|
|
1457
|
-
}, null, 10,
|
|
1458
|
-
])) : (
|
|
1459
|
-
|
|
1550
|
+
}, null, 10, ja)
|
|
1551
|
+
])) : (l(), i("div", Pa, [
|
|
1552
|
+
C("img", {
|
|
1460
1553
|
src: e.icon,
|
|
1461
1554
|
alt: e.alt,
|
|
1462
1555
|
class: "w-6 h-6 transition-all duration-200"
|
|
1463
|
-
}, null, 8,
|
|
1556
|
+
}, null, 8, Na)
|
|
1464
1557
|
])),
|
|
1465
|
-
|
|
1558
|
+
C("input", {
|
|
1466
1559
|
type: "range",
|
|
1467
1560
|
min: e.min,
|
|
1468
1561
|
max: e.max,
|
|
1469
1562
|
value: e.modelValue,
|
|
1470
|
-
onInput:
|
|
1563
|
+
onInput: c,
|
|
1471
1564
|
class: "flex-1 transition-all duration-200 hover:scale-105"
|
|
1472
|
-
}, null, 40,
|
|
1473
|
-
|
|
1474
|
-
class: p(["w-12 text-right transition-all duration-200 font-medium",
|
|
1475
|
-
},
|
|
1565
|
+
}, null, 40, Fa),
|
|
1566
|
+
C("span", {
|
|
1567
|
+
class: p(["w-12 text-right transition-all duration-200 font-medium", s.value])
|
|
1568
|
+
}, S(o.value) + "% ", 3)
|
|
1476
1569
|
]));
|
|
1477
1570
|
}
|
|
1478
|
-
}),
|
|
1571
|
+
}), Ha = ["disabled"], Wa = /* @__PURE__ */ E({
|
|
1479
1572
|
__name: "SwitchToggle",
|
|
1480
1573
|
props: {
|
|
1481
1574
|
isOn: { type: Boolean },
|
|
@@ -1486,11 +1579,11 @@ const La = L({
|
|
|
1486
1579
|
customClass: { default: "" }
|
|
1487
1580
|
},
|
|
1488
1581
|
emits: ["toggle"],
|
|
1489
|
-
setup(e, { emit:
|
|
1490
|
-
const t = e, a =
|
|
1582
|
+
setup(e, { emit: n }) {
|
|
1583
|
+
const t = e, a = n, o = () => {
|
|
1491
1584
|
a("toggle", !t.isOn);
|
|
1492
1585
|
};
|
|
1493
|
-
return (
|
|
1586
|
+
return (s, c) => (l(), i("button", {
|
|
1494
1587
|
type: "button",
|
|
1495
1588
|
onClick: o,
|
|
1496
1589
|
disabled: e.disabled,
|
|
@@ -1502,16 +1595,16 @@ const La = L({
|
|
|
1502
1595
|
e.customClass
|
|
1503
1596
|
])
|
|
1504
1597
|
}, [
|
|
1505
|
-
|
|
1598
|
+
C("span", {
|
|
1506
1599
|
class: p([
|
|
1507
1600
|
"inline-block transform rounded-full bg-white shadow transition-transform",
|
|
1508
1601
|
e.size === "small" ? "h-4 w-4" : "h-6 w-6",
|
|
1509
1602
|
e.isOn ? e.size === "small" ? "translate-x-6" : "translate-x-5" : "translate-x-1"
|
|
1510
1603
|
])
|
|
1511
1604
|
}, null, 2)
|
|
1512
|
-
], 10,
|
|
1605
|
+
], 10, Ha));
|
|
1513
1606
|
}
|
|
1514
|
-
}),
|
|
1607
|
+
}), qa = ["disabled"], Ua = ["src", "alt", "title"], Ka = /* @__PURE__ */ E({
|
|
1515
1608
|
__name: "ToggleControl",
|
|
1516
1609
|
props: {
|
|
1517
1610
|
icon: {},
|
|
@@ -1523,11 +1616,11 @@ const La = L({
|
|
|
1523
1616
|
customClass: { default: () => ({}) }
|
|
1524
1617
|
},
|
|
1525
1618
|
emits: ["click"],
|
|
1526
|
-
setup(e, { emit:
|
|
1527
|
-
const t =
|
|
1619
|
+
setup(e, { emit: n }) {
|
|
1620
|
+
const t = n, a = () => {
|
|
1528
1621
|
t("click");
|
|
1529
1622
|
};
|
|
1530
|
-
return (o,
|
|
1623
|
+
return (o, s) => (l(), i("button", {
|
|
1531
1624
|
onClick: a,
|
|
1532
1625
|
class: p(["p-2 rounded-corner background hover:opacity-50 transition-all duration-300 h-17.5 w-17.5 group relative overflow-hidden hover:scale-105 hover:shadow-lg active:scale-95", {
|
|
1533
1626
|
"animate-pulse": e.isLoading,
|
|
@@ -1537,7 +1630,7 @@ const La = L({
|
|
|
1537
1630
|
}]),
|
|
1538
1631
|
disabled: e.isLoading
|
|
1539
1632
|
}, [
|
|
1540
|
-
|
|
1633
|
+
C("img", {
|
|
1541
1634
|
src: e.icon,
|
|
1542
1635
|
alt: e.alt,
|
|
1543
1636
|
title: e.tooltip,
|
|
@@ -1547,13 +1640,13 @@ const La = L({
|
|
|
1547
1640
|
"drop-shadow-lg": e.isActive,
|
|
1548
1641
|
...e.iconClass
|
|
1549
1642
|
}])
|
|
1550
|
-
}, null, 10,
|
|
1551
|
-
], 10,
|
|
1643
|
+
}, null, 10, Ua)
|
|
1644
|
+
], 10, qa));
|
|
1552
1645
|
}
|
|
1553
|
-
}),
|
|
1646
|
+
}), Ga = ["title"], Ya = ["src", "alt"], Qa = {
|
|
1554
1647
|
key: 0,
|
|
1555
1648
|
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"
|
|
1556
|
-
},
|
|
1649
|
+
}, Xa = /* @__PURE__ */ E({
|
|
1557
1650
|
__name: "TrayIconButton",
|
|
1558
1651
|
props: {
|
|
1559
1652
|
icon: {},
|
|
@@ -1567,24 +1660,24 @@ const La = L({
|
|
|
1567
1660
|
customTooltipText: { default: "" }
|
|
1568
1661
|
},
|
|
1569
1662
|
emits: ["click"],
|
|
1570
|
-
setup(e, { emit:
|
|
1571
|
-
const t =
|
|
1663
|
+
setup(e, { emit: n }) {
|
|
1664
|
+
const t = n, a = $(!1), o = () => {
|
|
1572
1665
|
t("click");
|
|
1573
1666
|
};
|
|
1574
|
-
return (
|
|
1667
|
+
return (s, c) => (l(), i("div", {
|
|
1575
1668
|
class: p(["p-1 rounded-corner relative hover:bg-primary dark:hover:bg-primary-dark group transition-all duration-300", e.customClass]),
|
|
1576
1669
|
title: e.tooltip,
|
|
1577
1670
|
onClick: o,
|
|
1578
|
-
onMouseenter:
|
|
1579
|
-
onMouseleave:
|
|
1671
|
+
onMouseenter: c[0] || (c[0] = (u) => a.value = !0),
|
|
1672
|
+
onMouseleave: c[1] || (c[1] = (u) => a.value = !1)
|
|
1580
1673
|
}, [
|
|
1581
|
-
|
|
1674
|
+
C("img", {
|
|
1582
1675
|
src: e.icon,
|
|
1583
1676
|
alt: e.alt,
|
|
1584
1677
|
class: p(["m-auto h-5.5 w-auto transition-all duration-300", e.iconClass])
|
|
1585
|
-
}, null, 10,
|
|
1586
|
-
e.badge !== null && e.badge > 0 ? (
|
|
1587
|
-
e.showCustomTooltip && e.customTooltipText ? (
|
|
1678
|
+
}, null, 10, Ya),
|
|
1679
|
+
e.badge !== null && e.badge > 0 ? (l(), i("div", Qa, S(e.badge), 1)) : g("", !0),
|
|
1680
|
+
e.showCustomTooltip && e.customTooltipText ? (l(), i("div", {
|
|
1588
1681
|
key: 1,
|
|
1589
1682
|
class: p(["absolute top-1 left-1/2 transform -translate-x-1/2 text-xs font-semibold p-1 rounded-corner transition-all duration-300 pointer-events-none background", [
|
|
1590
1683
|
e.tooltipClass,
|
|
@@ -1593,79 +1686,80 @@ const La = L({
|
|
|
1593
1686
|
"opacity-100 translate-y-0": a.value
|
|
1594
1687
|
}
|
|
1595
1688
|
]])
|
|
1596
|
-
},
|
|
1597
|
-
|
|
1598
|
-
], 42,
|
|
1689
|
+
}, S(e.customTooltipText), 3)) : g("", !0),
|
|
1690
|
+
B(s.$slots, "default")
|
|
1691
|
+
], 42, Ga));
|
|
1599
1692
|
}
|
|
1600
|
-
}),
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1693
|
+
}), Ja = [
|
|
1694
|
+
yt,
|
|
1695
|
+
Le,
|
|
1696
|
+
ze,
|
|
1697
|
+
Ct,
|
|
1605
1698
|
N,
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
va,
|
|
1616
|
-
ya,
|
|
1699
|
+
jt,
|
|
1700
|
+
Be,
|
|
1701
|
+
De,
|
|
1702
|
+
Qt,
|
|
1703
|
+
Me,
|
|
1704
|
+
_t,
|
|
1705
|
+
ia,
|
|
1706
|
+
ua,
|
|
1707
|
+
ha,
|
|
1617
1708
|
xa,
|
|
1618
|
-
ka,
|
|
1619
1709
|
$a,
|
|
1710
|
+
za,
|
|
1620
1711
|
La,
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1712
|
+
Da,
|
|
1713
|
+
Ma,
|
|
1714
|
+
Ta,
|
|
1715
|
+
Oa,
|
|
1625
1716
|
Ra,
|
|
1626
|
-
Wa
|
|
1627
|
-
|
|
1717
|
+
Wa,
|
|
1718
|
+
Ka,
|
|
1719
|
+
Xa
|
|
1720
|
+
], an = {
|
|
1628
1721
|
install(e) {
|
|
1629
|
-
|
|
1630
|
-
e.component(
|
|
1722
|
+
Ja.forEach((n) => {
|
|
1723
|
+
e.component(n.name, n);
|
|
1631
1724
|
});
|
|
1632
1725
|
}
|
|
1633
1726
|
};
|
|
1634
1727
|
export {
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1728
|
+
ia as ActionButton,
|
|
1729
|
+
Be as AppBar,
|
|
1730
|
+
_t as BarSearch,
|
|
1731
|
+
Ae as CLAVE_DEL_MENU,
|
|
1732
|
+
de as CLAVE_DE_LA_BARRA,
|
|
1733
|
+
ua as ConfigSection,
|
|
1734
|
+
ha as DeviceCard,
|
|
1735
|
+
xa as DropdownMenu,
|
|
1736
|
+
$a as DropdownMenuContent,
|
|
1737
|
+
za as DropdownMenuItem,
|
|
1738
|
+
La as DropdownMenuLabel,
|
|
1739
|
+
Da as DropdownMenuSeparator,
|
|
1740
|
+
Ma as DropdownMenuTrigger,
|
|
1741
|
+
Ta as FormGroup,
|
|
1742
|
+
fe as LOS_TRES_CONTROLES,
|
|
1743
|
+
Oa as ListCard,
|
|
1744
|
+
zt as POSICIONES,
|
|
1745
|
+
Ct as SelectField,
|
|
1746
|
+
yt as SideBar,
|
|
1747
|
+
Le as SideButton,
|
|
1748
|
+
ze as SideGroup,
|
|
1749
|
+
Ra as SliderControl,
|
|
1750
|
+
Wa as SwitchToggle,
|
|
1751
|
+
Qt as TabBar,
|
|
1752
|
+
Me as TabItem,
|
|
1659
1753
|
N as ThemeIcon,
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1754
|
+
Ka as ToggleControl,
|
|
1755
|
+
Xa as TrayIconButton,
|
|
1756
|
+
De as WindowControls,
|
|
1757
|
+
jt as WindowFrame,
|
|
1758
|
+
an as default,
|
|
1759
|
+
Lt as esPosicion,
|
|
1760
|
+
re as orientacionDe,
|
|
1761
|
+
Bt as posicionDe,
|
|
1762
|
+
oe as usarElMenu,
|
|
1763
|
+
Z as usarLaBarra,
|
|
1764
|
+
Mt as usarLaPosicionDeLaBarra
|
|
1671
1765
|
};
|