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