@vasakgroup/vue-libvasak 0.4.0 → 0.4.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/vue-libvasak.es.js +608 -526
- package/dist/vue-libvasak.umd.js +1 -1
- package/package.json +1 -1
package/dist/vue-libvasak.es.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { ref as S, onMounted as
|
|
2
|
-
import { listen as
|
|
3
|
-
import { getSymbolSource as
|
|
4
|
-
import { getCurrentWindow as
|
|
5
|
-
function
|
|
1
|
+
import { ref as S, onMounted as Q, onUnmounted as ke, watch as Z, defineComponent as L, toRef as ae, computed as y, createElementBlock as n, unref as O, openBlock as l, normalizeStyle as H, createCommentVNode as f, createElementVNode as h, createVNode as V, toDisplayString as w, normalizeClass as d, renderSlot as T, createBlock as F, onBeforeUnmount as _, Fragment as X, renderList as Y, withCtx as W, mergeModels as $e, useAttrs as we, useId as Ce, useModel as ze, withDirectives as Le, mergeProps as Be, isRef as Se, vModelSelect as Ae, inject as Te, provide as ie, createTextVNode as De, createSlots as Ee, withModifiers as z, withKeys as D, Teleport as Me, Transition as Ie, nextTick as re } from "vue";
|
|
2
|
+
import { listen as Ve } from "@tauri-apps/api/event";
|
|
3
|
+
import { getSymbolSource as je, getIconSource as Oe } from "@vasakgroup/plugin-vicons";
|
|
4
|
+
import { getCurrentWindow as Pe } from "@tauri-apps/api/window";
|
|
5
|
+
function Ne(e, s) {
|
|
6
6
|
const t = S("");
|
|
7
|
-
let a = null,
|
|
7
|
+
let a = null, o = !1, i = 0;
|
|
8
8
|
async function c() {
|
|
9
|
-
const u = ++
|
|
10
|
-
if (!
|
|
9
|
+
const u = ++i, m = e.value;
|
|
10
|
+
if (!m) {
|
|
11
11
|
t.value = "";
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
|
-
const
|
|
15
|
-
u ===
|
|
14
|
+
const v = s.value === "symbol" ? await je(m) : await Oe(m);
|
|
15
|
+
u === i && (t.value = v);
|
|
16
16
|
}
|
|
17
|
-
return
|
|
18
|
-
const u = await
|
|
19
|
-
if (
|
|
17
|
+
return Q(async () => {
|
|
18
|
+
const u = await Ve("vicons:theme-changed", c);
|
|
19
|
+
if (o) {
|
|
20
20
|
u();
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
a = u, await c();
|
|
24
|
-
}),
|
|
25
|
-
|
|
26
|
-
}),
|
|
24
|
+
}), ke(() => {
|
|
25
|
+
o = !0, a?.();
|
|
26
|
+
}), Z(e, c), t;
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const Re = ["src", "alt"], M = /* @__PURE__ */ L({
|
|
29
29
|
__name: "ThemeIcon",
|
|
30
30
|
props: {
|
|
31
31
|
name: {},
|
|
@@ -34,23 +34,23 @@ const ze = ["src", "alt"], A = /* @__PURE__ */ w({
|
|
|
34
34
|
alt: { default: "" }
|
|
35
35
|
},
|
|
36
36
|
setup(e) {
|
|
37
|
-
const
|
|
38
|
-
return (
|
|
37
|
+
const s = e, t = Ne(ae(s, "name"), ae(s, "type")), a = y(() => `${s.size}px`);
|
|
38
|
+
return (o, i) => O(t) ? (l(), n("img", {
|
|
39
39
|
key: 0,
|
|
40
|
-
src:
|
|
40
|
+
src: O(t),
|
|
41
41
|
alt: e.alt,
|
|
42
|
-
style:
|
|
42
|
+
style: H({ width: a.value, height: a.value }),
|
|
43
43
|
class: "shrink-0 object-contain"
|
|
44
|
-
}, null, 12,
|
|
44
|
+
}, null, 12, Re)) : (l(), n("span", {
|
|
45
45
|
key: 1,
|
|
46
|
-
style:
|
|
46
|
+
style: H({ width: a.value, height: a.value }),
|
|
47
47
|
class: "shrink-0"
|
|
48
48
|
}, null, 4));
|
|
49
49
|
}
|
|
50
|
-
}),
|
|
50
|
+
}), Fe = { class: "flex flex-col gap-2" }, We = ["aria-expanded"], Ue = {
|
|
51
51
|
key: 1,
|
|
52
52
|
class: "flex flex-col gap-1"
|
|
53
|
-
},
|
|
53
|
+
}, ue = /* @__PURE__ */ L({
|
|
54
54
|
__name: "SideGroup",
|
|
55
55
|
props: {
|
|
56
56
|
title: {},
|
|
@@ -58,40 +58,40 @@ const ze = ["src", "alt"], A = /* @__PURE__ */ w({
|
|
|
58
58
|
defaultOpen: { type: Boolean, default: !0 }
|
|
59
59
|
},
|
|
60
60
|
setup(e) {
|
|
61
|
-
const
|
|
62
|
-
return
|
|
63
|
-
() =>
|
|
61
|
+
const s = e, t = S(s.defaultOpen);
|
|
62
|
+
return Z(
|
|
63
|
+
() => s.collapsed,
|
|
64
64
|
(a) => {
|
|
65
65
|
a && (t.value = !0);
|
|
66
66
|
}
|
|
67
|
-
), (a,
|
|
68
|
-
e.collapsed ?
|
|
67
|
+
), (a, o) => (l(), n("section", Fe, [
|
|
68
|
+
e.collapsed ? f("", !0) : (l(), n("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:
|
|
73
|
+
onClick: o[0] || (o[0] = (i) => t.value = !t.value)
|
|
74
74
|
}, [
|
|
75
|
-
h("span", null,
|
|
76
|
-
|
|
75
|
+
h("span", null, w(e.title), 1),
|
|
76
|
+
V(M, {
|
|
77
77
|
name: "pan-down-symbolic",
|
|
78
78
|
type: "symbol",
|
|
79
79
|
size: 12,
|
|
80
|
-
class:
|
|
80
|
+
class: d(["transition-transform duration-200", t.value ? "" : "-rotate-90"])
|
|
81
81
|
}, null, 8, ["class"])
|
|
82
|
-
], 8,
|
|
83
|
-
t.value || e.collapsed ? (l(),
|
|
84
|
-
|
|
85
|
-
])) :
|
|
82
|
+
], 8, We)),
|
|
83
|
+
t.value || e.collapsed ? (l(), n("div", Ue, [
|
|
84
|
+
T(a.$slots, "default")
|
|
85
|
+
])) : f("", !0)
|
|
86
86
|
]));
|
|
87
87
|
}
|
|
88
|
-
}),
|
|
88
|
+
}), Ge = ["title", "aria-label", "disabled", "aria-current"], Xe = { key: 1 }, Ye = {
|
|
89
89
|
key: 0,
|
|
90
90
|
class: "min-w-0 flex-1 truncate font-medium"
|
|
91
|
-
},
|
|
91
|
+
}, Ke = {
|
|
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
|
+
}, ce = /* @__PURE__ */ L({
|
|
95
95
|
__name: "SideButton",
|
|
96
96
|
props: {
|
|
97
97
|
label: {},
|
|
@@ -103,49 +103,49 @@ const ze = ["src", "alt"], A = /* @__PURE__ */ w({
|
|
|
103
103
|
},
|
|
104
104
|
emits: ["click"],
|
|
105
105
|
setup(e) {
|
|
106
|
-
return (
|
|
106
|
+
return (s, t) => (l(), n("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: d(["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) => s.$emit("click"))
|
|
118
118
|
}, [
|
|
119
119
|
h("span", {
|
|
120
|
-
class:
|
|
120
|
+
class: d(["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 ? (l(),
|
|
123
|
+
e.icon ? (l(), F(M, {
|
|
124
124
|
key: 0,
|
|
125
125
|
name: e.icon,
|
|
126
126
|
size: 20
|
|
127
|
-
}, null, 8, ["name"])) : (l(),
|
|
127
|
+
}, null, 8, ["name"])) : (l(), n("span", Xe, w(e.label.charAt(0).toUpperCase()), 1))
|
|
128
128
|
], 2),
|
|
129
|
-
e.collapsed ?
|
|
130
|
-
!e.collapsed && e.badge !== "" ? (l(),
|
|
131
|
-
], 10,
|
|
129
|
+
e.collapsed ? f("", !0) : (l(), n("span", Ye, w(e.label), 1)),
|
|
130
|
+
!e.collapsed && e.badge !== "" ? (l(), n("span", Ke, w(e.badge), 1)) : f("", !0)
|
|
131
|
+
], 10, Ge));
|
|
132
132
|
}
|
|
133
|
-
}),
|
|
133
|
+
}), qe = {
|
|
134
134
|
key: 0,
|
|
135
135
|
class: "flex flex-col gap-2 border-ui-border border-b p-2"
|
|
136
|
-
},
|
|
136
|
+
}, He = { class: "flex items-center gap-2" }, Je = ["aria-label", "aria-expanded"], Qe = {
|
|
137
137
|
key: 0,
|
|
138
138
|
class: "min-w-0 flex-1"
|
|
139
|
-
},
|
|
139
|
+
}, Ze = {
|
|
140
140
|
key: 0,
|
|
141
141
|
class: "truncate font-semibold text-sm"
|
|
142
|
-
},
|
|
142
|
+
}, _e = {
|
|
143
143
|
key: 1,
|
|
144
144
|
class: "truncate text-tx-muted text-xs"
|
|
145
|
-
},
|
|
145
|
+
}, et = { key: 0 }, tt = {
|
|
146
146
|
key: 1,
|
|
147
147
|
class: "flex border-ui-border border-b p-2"
|
|
148
|
-
},
|
|
148
|
+
}, at = ["aria-label", "aria-expanded"], lt = { class: "flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-2" }, le = "hidden h-8 w-8 shrink-0 items-center justify-center rounded-corner border border-ui-border bg-ui-surface/70 transition-colors hover:bg-ui-surface md:inline-flex", ne = 767, nt = /* @__PURE__ */ L({
|
|
149
149
|
__name: "SideBar",
|
|
150
150
|
props: {
|
|
151
151
|
title: { default: "" },
|
|
@@ -157,101 +157,101 @@ const ze = ["src", "alt"], A = /* @__PURE__ */ w({
|
|
|
157
157
|
expandLabel: { default: "Expand" }
|
|
158
158
|
},
|
|
159
159
|
emits: ["update:modelValue", "update:collapsed", "change"],
|
|
160
|
-
setup(e, { expose:
|
|
161
|
-
const a = e,
|
|
162
|
-
let u = null,
|
|
163
|
-
const
|
|
160
|
+
setup(e, { expose: s, emit: t }) {
|
|
161
|
+
const a = e, o = t, i = S(a.collapsed ?? !1), c = S(!1);
|
|
162
|
+
let u = null, m = null;
|
|
163
|
+
const v = y(() => c.value || i.value), I = y(() => !!(a.title || a.subtitle));
|
|
164
164
|
y(() => a.categories.length > 0);
|
|
165
|
-
function
|
|
165
|
+
function N() {
|
|
166
166
|
return document.documentElement?.clientWidth || window.innerWidth;
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
c.value =
|
|
168
|
+
function A() {
|
|
169
|
+
c.value = N() <= ne;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
|
|
171
|
+
function E() {
|
|
172
|
+
i.value = !i.value, o("update:collapsed", i.value);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
|
|
174
|
+
function P(k) {
|
|
175
|
+
o("update:modelValue", k), o("change", k);
|
|
176
176
|
}
|
|
177
|
-
return
|
|
177
|
+
return Z(
|
|
178
178
|
() => a.collapsed,
|
|
179
|
-
(
|
|
180
|
-
|
|
179
|
+
(k) => {
|
|
180
|
+
k !== void 0 && (i.value = k);
|
|
181
181
|
}
|
|
182
|
-
),
|
|
183
|
-
u = window.matchMedia(`(max-width: ${
|
|
184
|
-
}),
|
|
185
|
-
u?.removeEventListener("change",
|
|
186
|
-
}),
|
|
187
|
-
class:
|
|
182
|
+
), Q(() => {
|
|
183
|
+
u = window.matchMedia(`(max-width: ${ne}px)`), A(), u.addEventListener("change", A), window.addEventListener("resize", A), typeof ResizeObserver < "u" && document.documentElement && (m = new ResizeObserver(A), m.observe(document.documentElement));
|
|
184
|
+
}), _(() => {
|
|
185
|
+
u?.removeEventListener("change", A), window.removeEventListener("resize", A), m?.disconnect(), m = null;
|
|
186
|
+
}), s({ collapsed: v }), (k, j) => (l(), n("aside", {
|
|
187
|
+
class: d(["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
|
-
h("div",
|
|
189
|
+
I.value || k.$slots.header ? (l(), n("header", qe, [
|
|
190
|
+
h("div", He, [
|
|
191
191
|
h("button", {
|
|
192
192
|
type: "button",
|
|
193
|
-
class:
|
|
194
|
-
"aria-label":
|
|
195
|
-
"aria-expanded": !
|
|
196
|
-
onClick:
|
|
193
|
+
class: d(le),
|
|
194
|
+
"aria-label": v.value ? e.expandLabel : e.collapseLabel,
|
|
195
|
+
"aria-expanded": !v.value,
|
|
196
|
+
onClick: E
|
|
197
197
|
}, [
|
|
198
|
-
|
|
199
|
-
name:
|
|
198
|
+
V(M, {
|
|
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 ? (l(),
|
|
206
|
-
e.subtitle ? (l(),
|
|
207
|
-
])) :
|
|
203
|
+
], 8, Je),
|
|
204
|
+
I.value && !v.value ? (l(), n("div", Qe, [
|
|
205
|
+
e.title ? (l(), n("p", Ze, w(e.title), 1)) : f("", !0),
|
|
206
|
+
e.subtitle ? (l(), n("p", _e, w(e.subtitle), 1)) : f("", !0)
|
|
207
|
+
])) : f("", !0)
|
|
208
208
|
]),
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
])) :
|
|
212
|
-
])) : (l(),
|
|
209
|
+
k.$slots.header && !v.value ? (l(), n("div", et, [
|
|
210
|
+
T(k.$slots, "header", { collapsed: v.value })
|
|
211
|
+
])) : f("", !0)
|
|
212
|
+
])) : (l(), n("div", tt, [
|
|
213
213
|
h("button", {
|
|
214
214
|
type: "button",
|
|
215
|
-
class:
|
|
216
|
-
"aria-label":
|
|
217
|
-
"aria-expanded": !
|
|
218
|
-
onClick:
|
|
215
|
+
class: d(le),
|
|
216
|
+
"aria-label": v.value ? e.expandLabel : e.collapseLabel,
|
|
217
|
+
"aria-expanded": !v.value,
|
|
218
|
+
onClick: E
|
|
219
219
|
}, [
|
|
220
|
-
|
|
221
|
-
name:
|
|
220
|
+
V(M, {
|
|
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, at)
|
|
226
226
|
])),
|
|
227
|
-
h("div",
|
|
228
|
-
(l(!0),
|
|
229
|
-
key:
|
|
230
|
-
title:
|
|
231
|
-
collapsed:
|
|
227
|
+
h("div", lt, [
|
|
228
|
+
(l(!0), n(X, null, Y(e.categories, (R) => (l(), F(ue, {
|
|
229
|
+
key: R.id,
|
|
230
|
+
title: R.title,
|
|
231
|
+
collapsed: v.value
|
|
232
232
|
}, {
|
|
233
|
-
default:
|
|
234
|
-
(l(!0),
|
|
235
|
-
key:
|
|
236
|
-
label:
|
|
237
|
-
icon:
|
|
238
|
-
badge:
|
|
239
|
-
disabled:
|
|
240
|
-
collapsed:
|
|
241
|
-
active: e.modelValue ===
|
|
242
|
-
onClick: (
|
|
233
|
+
default: W(() => [
|
|
234
|
+
(l(!0), n(X, null, Y(R.items, (b) => (l(), F(ce, {
|
|
235
|
+
key: b.id,
|
|
236
|
+
label: b.label,
|
|
237
|
+
icon: b.icon,
|
|
238
|
+
badge: b.badge,
|
|
239
|
+
disabled: b.disabled,
|
|
240
|
+
collapsed: v.value,
|
|
241
|
+
active: e.modelValue === b.id,
|
|
242
|
+
onClick: (g) => P(b.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
|
+
T(k.$slots, "default", { collapsed: v.value })
|
|
248
248
|
])
|
|
249
249
|
], 2));
|
|
250
250
|
}
|
|
251
|
-
}),
|
|
251
|
+
}), ot = { class: "flex min-w-0 flex-col gap-1" }, st = ["for"], it = { class: "relative flex min-w-0 items-center" }, rt = ["id"], ut = /* @__PURE__ */ L({
|
|
252
252
|
inheritAttrs: !1,
|
|
253
253
|
__name: "SelectField",
|
|
254
|
-
props: /* @__PURE__ */
|
|
254
|
+
props: /* @__PURE__ */ $e({
|
|
255
255
|
label: {}
|
|
256
256
|
}, {
|
|
257
257
|
modelValue: {
|
|
@@ -261,28 +261,28 @@ const ze = ["src", "alt"], A = /* @__PURE__ */ w({
|
|
|
261
261
|
}),
|
|
262
262
|
emits: ["update:modelValue"],
|
|
263
263
|
setup(e) {
|
|
264
|
-
const
|
|
264
|
+
const s = e, t = we(), a = Ce(), o = y(() => t.id ?? a), [i, c] = ze(e, "modelValue", {
|
|
265
265
|
set(u) {
|
|
266
266
|
return c.number ? Number(u) : u;
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
|
-
return (u,
|
|
270
|
-
|
|
269
|
+
return (u, m) => (l(), n("div", ot, [
|
|
270
|
+
s.label ? (l(), n("label", {
|
|
271
271
|
key: 0,
|
|
272
|
-
for:
|
|
272
|
+
for: o.value,
|
|
273
273
|
class: "text-tx-muted text-xs"
|
|
274
|
-
},
|
|
275
|
-
h("div",
|
|
276
|
-
|
|
277
|
-
id:
|
|
278
|
-
"onUpdate:modelValue":
|
|
274
|
+
}, w(s.label), 9, st)) : f("", !0),
|
|
275
|
+
h("div", it, [
|
|
276
|
+
Le(h("select", Be({
|
|
277
|
+
id: o.value,
|
|
278
|
+
"onUpdate:modelValue": m[0] || (m[0] = (v) => Se(i) ? i.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
|
+
}, O(t)), [
|
|
281
|
+
T(u.$slots, "default")
|
|
282
|
+
], 16, rt), [
|
|
283
|
+
[Ae, O(i)]
|
|
284
284
|
]),
|
|
285
|
-
|
|
285
|
+
V(M, {
|
|
286
286
|
name: "pan-down-symbolic",
|
|
287
287
|
type: "symbol",
|
|
288
288
|
size: 14,
|
|
@@ -291,44 +291,44 @@ const ze = ["src", "alt"], A = /* @__PURE__ */ w({
|
|
|
291
291
|
])
|
|
292
292
|
]));
|
|
293
293
|
}
|
|
294
|
-
}),
|
|
295
|
-
function
|
|
294
|
+
}), ee = /* @__PURE__ */ Symbol("barra de vasak");
|
|
295
|
+
function J(e) {
|
|
296
296
|
return e === "left" || e === "right" ? "vertical" : "horizontal";
|
|
297
297
|
}
|
|
298
|
-
const
|
|
299
|
-
function
|
|
300
|
-
return typeof e == "string" &&
|
|
298
|
+
const ct = ["top", "bottom", "left", "right"];
|
|
299
|
+
function dt(e) {
|
|
300
|
+
return typeof e == "string" && ct.includes(e);
|
|
301
301
|
}
|
|
302
|
-
function
|
|
303
|
-
const e =
|
|
302
|
+
function G() {
|
|
303
|
+
const e = Te(ee, null);
|
|
304
304
|
if (e) return e;
|
|
305
|
-
const
|
|
305
|
+
const s = S("top");
|
|
306
306
|
return {
|
|
307
|
-
posicion:
|
|
308
|
-
orientacion: y(() =>
|
|
309
|
-
vertical: y(() =>
|
|
307
|
+
posicion: s,
|
|
308
|
+
orientacion: y(() => J(s.value)),
|
|
309
|
+
vertical: y(() => J(s.value) === "vertical")
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
const
|
|
313
|
-
function
|
|
314
|
-
const t = e?.[
|
|
315
|
-
return
|
|
312
|
+
const ft = "window", mt = "barPosition";
|
|
313
|
+
function bt(e) {
|
|
314
|
+
const t = e?.[ft]?.[mt];
|
|
315
|
+
return dt(t) ? t : null;
|
|
316
316
|
}
|
|
317
|
-
function
|
|
318
|
-
const
|
|
317
|
+
function vt(e = "top") {
|
|
318
|
+
const s = S(e);
|
|
319
319
|
let t = null, a = !1;
|
|
320
|
-
async function
|
|
320
|
+
async function o() {
|
|
321
321
|
try {
|
|
322
|
-
const { readConfig:
|
|
323
|
-
|
|
322
|
+
const { readConfig: i } = await import("@vasakgroup/plugin-config-manager"), c = await i();
|
|
323
|
+
s.value = bt(c) ?? e;
|
|
324
324
|
} catch {
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
|
-
return
|
|
328
|
-
await
|
|
327
|
+
return Q(async () => {
|
|
328
|
+
await o();
|
|
329
329
|
try {
|
|
330
|
-
const { listen:
|
|
331
|
-
|
|
330
|
+
const { listen: i } = await import("@tauri-apps/api/event"), c = await i("config-changed", () => {
|
|
331
|
+
o();
|
|
332
332
|
});
|
|
333
333
|
if (a) {
|
|
334
334
|
c();
|
|
@@ -337,11 +337,11 @@ function et(e = "top") {
|
|
|
337
337
|
t = c;
|
|
338
338
|
} catch {
|
|
339
339
|
}
|
|
340
|
-
}),
|
|
340
|
+
}), _(() => {
|
|
341
341
|
a = !0, t?.(), t = null;
|
|
342
|
-
}),
|
|
342
|
+
}), s;
|
|
343
343
|
}
|
|
344
|
-
const
|
|
344
|
+
const gt = ["title", "aria-label"], yt = ["title", "aria-label"], ht = ["title", "aria-label"], q = "flex items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 p-1 transition-colors", de = /* @__PURE__ */ L({
|
|
345
345
|
__name: "WindowControls",
|
|
346
346
|
props: {
|
|
347
347
|
minimizeLabel: { default: "Minimize" },
|
|
@@ -349,61 +349,61 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
349
349
|
closeLabel: { default: "Close" }
|
|
350
350
|
},
|
|
351
351
|
setup(e) {
|
|
352
|
-
const { vertical:
|
|
352
|
+
const { vertical: s } = G();
|
|
353
353
|
function t() {
|
|
354
|
-
return
|
|
354
|
+
return Pe();
|
|
355
355
|
}
|
|
356
|
-
return (a,
|
|
357
|
-
class:
|
|
356
|
+
return (a, o) => (l(), n("div", {
|
|
357
|
+
class: d(["flex shrink-0 gap-1", O(s) ? "flex-col" : ""]),
|
|
358
358
|
"data-tauri-drag-region": ""
|
|
359
359
|
}, [
|
|
360
360
|
h("button", {
|
|
361
361
|
type: "button",
|
|
362
|
-
class:
|
|
362
|
+
class: d([q, "hover:bg-status-success"]),
|
|
363
363
|
title: e.minimizeLabel,
|
|
364
364
|
"aria-label": e.minimizeLabel,
|
|
365
|
-
onClick:
|
|
365
|
+
onClick: o[0] || (o[0] = (i) => t().minimize())
|
|
366
366
|
}, [
|
|
367
|
-
|
|
367
|
+
V(M, {
|
|
368
368
|
name: "window-minimize",
|
|
369
369
|
size: 24
|
|
370
370
|
})
|
|
371
|
-
], 10,
|
|
371
|
+
], 10, gt),
|
|
372
372
|
h("button", {
|
|
373
373
|
type: "button",
|
|
374
|
-
class:
|
|
374
|
+
class: d([q, "hover:bg-status-warning"]),
|
|
375
375
|
title: e.maximizeLabel,
|
|
376
376
|
"aria-label": e.maximizeLabel,
|
|
377
|
-
onClick:
|
|
377
|
+
onClick: o[1] || (o[1] = (i) => t().toggleMaximize())
|
|
378
378
|
}, [
|
|
379
|
-
|
|
379
|
+
V(M, {
|
|
380
380
|
name: "window-maximize",
|
|
381
381
|
size: 24
|
|
382
382
|
})
|
|
383
|
-
], 10,
|
|
383
|
+
], 10, yt),
|
|
384
384
|
h("button", {
|
|
385
385
|
type: "button",
|
|
386
|
-
class:
|
|
386
|
+
class: d([q, "hover:bg-status-error"]),
|
|
387
387
|
title: e.closeLabel,
|
|
388
388
|
"aria-label": e.closeLabel,
|
|
389
|
-
onClick:
|
|
389
|
+
onClick: o[2] || (o[2] = (i) => t().close())
|
|
390
390
|
}, [
|
|
391
|
-
|
|
391
|
+
V(M, {
|
|
392
392
|
name: "window-close",
|
|
393
393
|
size: 24
|
|
394
394
|
})
|
|
395
|
-
], 10,
|
|
395
|
+
], 10, ht)
|
|
396
396
|
], 2));
|
|
397
397
|
}
|
|
398
|
-
}),
|
|
398
|
+
}), pt = {
|
|
399
399
|
key: 0,
|
|
400
400
|
class: "flex shrink-0 items-center",
|
|
401
401
|
"data-tauri-drag-region": ""
|
|
402
|
-
},
|
|
402
|
+
}, xt = {
|
|
403
403
|
key: 1,
|
|
404
404
|
class: "min-w-0 shrink truncate text-sm",
|
|
405
405
|
"data-tauri-drag-region": ""
|
|
406
|
-
},
|
|
406
|
+
}, fe = /* @__PURE__ */ L({
|
|
407
407
|
__name: "AppBar",
|
|
408
408
|
props: {
|
|
409
409
|
position: { default: null },
|
|
@@ -414,36 +414,36 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
414
414
|
hideControls: { type: Boolean, default: !1 }
|
|
415
415
|
},
|
|
416
416
|
setup(e) {
|
|
417
|
-
const
|
|
418
|
-
return
|
|
417
|
+
const s = e, t = G(), a = y(() => s.position ?? t.posicion.value), o = y(() => a.value === "left" || a.value === "right");
|
|
418
|
+
return ie(ee, {
|
|
419
419
|
posicion: a,
|
|
420
|
-
orientacion: y(() =>
|
|
421
|
-
vertical:
|
|
422
|
-
}), (
|
|
423
|
-
class:
|
|
420
|
+
orientacion: y(() => o.value ? "vertical" : "horizontal"),
|
|
421
|
+
vertical: o
|
|
422
|
+
}), (i, c) => (l(), n("div", {
|
|
423
|
+
class: d(["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
|
-
|
|
427
|
-
|
|
428
|
-
])) :
|
|
429
|
-
(
|
|
430
|
-
|
|
431
|
-
|
|
426
|
+
i.$slots.identidad ? (l(), n("div", pt, [
|
|
427
|
+
T(i.$slots, "identidad")
|
|
428
|
+
])) : f("", !0),
|
|
429
|
+
(i.$slots.titulo || e.title) && !o.value ? (l(), n("p", xt, [
|
|
430
|
+
T(i.$slots, "titulo", {}, () => [
|
|
431
|
+
De(w(e.title), 1)
|
|
432
432
|
])
|
|
433
|
-
])) :
|
|
433
|
+
])) : f("", !0),
|
|
434
434
|
h("div", {
|
|
435
|
-
class:
|
|
435
|
+
class: d(["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
|
+
T(i.$slots, "default")
|
|
439
439
|
], 2),
|
|
440
|
-
|
|
440
|
+
i.$slots.acciones ? (l(), n("div", {
|
|
441
441
|
key: 2,
|
|
442
|
-
class:
|
|
442
|
+
class: d(["flex shrink-0 items-center gap-1", o.value ? "flex-col" : ""])
|
|
443
443
|
}, [
|
|
444
|
-
|
|
445
|
-
], 2)) :
|
|
446
|
-
e.hideControls ?
|
|
444
|
+
T(i.$slots, "acciones")
|
|
445
|
+
], 2)) : f("", !0),
|
|
446
|
+
e.hideControls ? f("", !0) : (l(), F(de, {
|
|
447
447
|
key: 3,
|
|
448
448
|
"minimize-label": e.minimizeLabel,
|
|
449
449
|
"maximize-label": e.maximizeLabel,
|
|
@@ -451,7 +451,7 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
451
451
|
}, null, 8, ["minimize-label", "maximize-label", "close-label"]))
|
|
452
452
|
], 2));
|
|
453
453
|
}
|
|
454
|
-
}),
|
|
454
|
+
}), kt = { class: "flex min-h-0 min-w-0 flex-1" }, $t = /* @__PURE__ */ L({
|
|
455
455
|
__name: "WindowFrame",
|
|
456
456
|
props: {
|
|
457
457
|
position: { default: null },
|
|
@@ -463,18 +463,18 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
463
463
|
hideBar: { type: Boolean, default: !1 }
|
|
464
464
|
},
|
|
465
465
|
setup(e) {
|
|
466
|
-
const
|
|
467
|
-
|
|
466
|
+
const s = e, t = vt(), a = y(() => s.position ?? t.value), o = y(() => J(a.value)), i = y(() => o.value === "vertical");
|
|
467
|
+
ie(ee, { posicion: a, orientacion: o, vertical: i });
|
|
468
468
|
const c = {
|
|
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 (u,
|
|
475
|
-
class:
|
|
474
|
+
return (u, m) => (l(), n("div", {
|
|
475
|
+
class: d(["flex h-screen w-screen overflow-hidden rounded-corner-window border border-ui-border bg-ui-bg/80", c[a.value]])
|
|
476
476
|
}, [
|
|
477
|
-
e.hideBar ?
|
|
477
|
+
e.hideBar ? f("", !0) : (l(), F(fe, {
|
|
478
478
|
key: 0,
|
|
479
479
|
position: a.value,
|
|
480
480
|
title: e.title,
|
|
@@ -482,44 +482,50 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
482
482
|
"maximize-label": e.maximizeLabel,
|
|
483
483
|
"close-label": e.closeLabel,
|
|
484
484
|
"hide-controls": e.hideControls
|
|
485
|
-
},
|
|
486
|
-
default:
|
|
487
|
-
|
|
485
|
+
}, Ee({
|
|
486
|
+
default: W(() => [
|
|
487
|
+
T(u.$slots, "barra")
|
|
488
488
|
]),
|
|
489
489
|
_: 2
|
|
490
490
|
}, [
|
|
491
491
|
u.$slots.identidad ? {
|
|
492
492
|
name: "identidad",
|
|
493
|
-
fn:
|
|
494
|
-
|
|
493
|
+
fn: W(() => [
|
|
494
|
+
T(u.$slots, "identidad")
|
|
495
495
|
]),
|
|
496
496
|
key: "0"
|
|
497
497
|
} : void 0,
|
|
498
498
|
u.$slots.titulo ? {
|
|
499
499
|
name: "titulo",
|
|
500
|
-
fn:
|
|
501
|
-
|
|
500
|
+
fn: W(() => [
|
|
501
|
+
T(u.$slots, "titulo")
|
|
502
502
|
]),
|
|
503
503
|
key: "1"
|
|
504
504
|
} : void 0,
|
|
505
505
|
u.$slots.acciones ? {
|
|
506
506
|
name: "acciones",
|
|
507
|
-
fn:
|
|
508
|
-
|
|
507
|
+
fn: W(() => [
|
|
508
|
+
T(u.$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
|
-
h("div",
|
|
514
|
-
|
|
513
|
+
h("div", kt, [
|
|
514
|
+
T(u.$slots, "default")
|
|
515
515
|
])
|
|
516
516
|
], 2));
|
|
517
517
|
}
|
|
518
|
-
}),
|
|
518
|
+
}), wt = ["aria-selected", "title", "aria-label", "tabindex"], Ct = {
|
|
519
519
|
key: 1,
|
|
520
|
+
"aria-hidden": "true"
|
|
521
|
+
}, zt = {
|
|
522
|
+
key: 2,
|
|
523
|
+
class: "min-w-0 flex-1 truncate"
|
|
524
|
+
}, Lt = ["title", "aria-label"], Bt = { class: "whitespace-nowrap" }, St = {
|
|
525
|
+
key: 0,
|
|
520
526
|
class: "size-2 shrink-0 rounded-full bg-current",
|
|
521
527
|
"aria-hidden": "true"
|
|
522
|
-
},
|
|
528
|
+
}, At = ["title", "aria-label"], Tt = 500, oe = 8, se = 6, me = /* @__PURE__ */ L({
|
|
523
529
|
__name: "TabItem",
|
|
524
530
|
props: {
|
|
525
531
|
tab: {},
|
|
@@ -529,90 +535,166 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
529
535
|
tabindex: { default: 0 }
|
|
530
536
|
},
|
|
531
537
|
emits: ["select", "close", "menu", "mover", "navegar"],
|
|
532
|
-
setup(e, { emit:
|
|
533
|
-
const t = e, a =
|
|
534
|
-
let
|
|
535
|
-
const
|
|
538
|
+
setup(e, { emit: s }) {
|
|
539
|
+
const t = e, a = s, { vertical: o, posicion: i } = G(), c = S(null), u = S(null), m = S(!1), v = S(!1), I = S(!1), N = S({ top: 0, left: 0, right: 0 });
|
|
540
|
+
let A = null, E = null;
|
|
541
|
+
const P = y(() => t.tab.closable !== !1), k = y(() => t.tab.tooltip ?? t.tab.label), j = y(
|
|
536
542
|
() => t.tab.dirty ? `${t.tab.label} · ${t.dirtyLabel}` : t.tab.label
|
|
537
|
-
),
|
|
538
|
-
() =>
|
|
539
|
-
)
|
|
540
|
-
|
|
541
|
-
|
|
543
|
+
), R = y(() => t.tab.label.trim().charAt(0).toUpperCase()), b = y(() => m.value || I.value), g = y(
|
|
544
|
+
() => !!t.tab.dirty && !(b.value && P.value)
|
|
545
|
+
), p = y(
|
|
546
|
+
() => P.value && (b.value || t.active || !t.tab.dirty)
|
|
547
|
+
), x = y(
|
|
548
|
+
() => o.value && (m.value || v.value || I.value)
|
|
549
|
+
), B = y(() => {
|
|
550
|
+
const $ = { position: "fixed", top: `${N.value.top}px`, zIndex: 50 };
|
|
551
|
+
return i.value === "right" ? { ...$, right: `${N.value.right + se}px` } : { ...$, left: `${N.value.left + se}px` };
|
|
552
|
+
});
|
|
553
|
+
function te() {
|
|
554
|
+
const $ = c.value;
|
|
555
|
+
if (!$) return;
|
|
556
|
+
const r = $.getBoundingClientRect();
|
|
557
|
+
N.value = {
|
|
558
|
+
top: r.top,
|
|
559
|
+
left: r.right,
|
|
560
|
+
right: window.innerWidth - r.left
|
|
561
|
+
};
|
|
562
|
+
}
|
|
563
|
+
function be($) {
|
|
564
|
+
const r = $.relatedTarget;
|
|
565
|
+
r && u.value?.contains(r) || (I.value = !1);
|
|
566
|
+
}
|
|
567
|
+
function ve() {
|
|
568
|
+
m.value = !0, te();
|
|
569
|
+
}
|
|
570
|
+
function ge() {
|
|
571
|
+
v.value = !0, te();
|
|
572
|
+
}
|
|
573
|
+
function U() {
|
|
574
|
+
A !== null && clearTimeout(A), A = null, E = null;
|
|
542
575
|
}
|
|
543
|
-
function
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
},
|
|
576
|
+
function ye($) {
|
|
577
|
+
$.button === 0 && (E = { x: $.clientX, y: $.clientY }, A = setTimeout(() => {
|
|
578
|
+
E && a("menu", E), U();
|
|
579
|
+
}, Tt));
|
|
547
580
|
}
|
|
548
|
-
function
|
|
549
|
-
if (!
|
|
550
|
-
(Math.abs(
|
|
581
|
+
function he($) {
|
|
582
|
+
if (!E) return;
|
|
583
|
+
(Math.abs($.clientX - E.x) > oe || Math.abs($.clientY - E.y) > oe) && U();
|
|
551
584
|
}
|
|
552
|
-
function
|
|
553
|
-
|
|
585
|
+
function pe($) {
|
|
586
|
+
$.button === 1 && P.value && ($.preventDefault(), a("close"));
|
|
554
587
|
}
|
|
555
|
-
function
|
|
556
|
-
|
|
588
|
+
function xe($) {
|
|
589
|
+
$.preventDefault(), a("menu", { x: $.clientX, y: $.clientY });
|
|
557
590
|
}
|
|
558
|
-
return
|
|
559
|
-
|
|
591
|
+
return _(U), ($, r) => (l(), n("div", {
|
|
592
|
+
ref_key: "raiz",
|
|
593
|
+
ref: c,
|
|
594
|
+
class: d(["group relative flex shrink-0 cursor-pointer items-center gap-2 rounded-corner border border-ui-border transition-colors", [
|
|
560
595
|
e.active ? "bg-primary font-bold text-tx-on-primary" : "bg-ui-bg/80 hover:bg-ui-surface/70",
|
|
561
|
-
|
|
596
|
+
O(o) ? "size-8 justify-center p-0 text-sm" : "w-34 max-w-34 px-3 py-1 text-sm"
|
|
562
597
|
]]),
|
|
563
598
|
role: "tab",
|
|
564
599
|
"aria-selected": e.active,
|
|
565
|
-
title:
|
|
566
|
-
"aria-label":
|
|
600
|
+
title: k.value,
|
|
601
|
+
"aria-label": j.value,
|
|
567
602
|
tabindex: e.tabindex,
|
|
568
|
-
onClick:
|
|
603
|
+
onClick: r[5] || (r[5] = z((C) => a("select"), ["stop"])),
|
|
569
604
|
onKeydown: [
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
605
|
+
r[6] || (r[6] = D(z((C) => a("select"), ["stop"]), ["enter"])),
|
|
606
|
+
r[7] || (r[7] = D(z((C) => a("select"), ["prevent", "stop"]), ["space"])),
|
|
607
|
+
r[8] || (r[8] = D(z((C) => a("navegar", "anterior"), ["prevent", "stop"]), ["left"])),
|
|
608
|
+
r[9] || (r[9] = D(z((C) => a("navegar", "anterior"), ["prevent", "stop"]), ["up"])),
|
|
609
|
+
r[10] || (r[10] = D(z((C) => a("navegar", "siguiente"), ["prevent", "stop"]), ["right"])),
|
|
610
|
+
r[11] || (r[11] = D(z((C) => a("navegar", "siguiente"), ["prevent", "stop"]), ["down"])),
|
|
611
|
+
r[12] || (r[12] = D(z((C) => a("navegar", "primera"), ["prevent", "stop"]), ["home"])),
|
|
612
|
+
r[13] || (r[13] = D(z((C) => a("navegar", "ultima"), ["prevent", "stop"]), ["end"])),
|
|
613
|
+
r[14] || (r[14] = D(z((C) => a("mover", -1), ["alt", "prevent", "stop"]), ["left"])),
|
|
614
|
+
r[15] || (r[15] = D(z((C) => a("mover", -1), ["alt", "prevent", "stop"]), ["up"])),
|
|
615
|
+
r[16] || (r[16] = D(z((C) => a("mover", 1), ["alt", "prevent", "stop"]), ["right"])),
|
|
616
|
+
r[17] || (r[17] = D(z((C) => a("mover", 1), ["alt", "prevent", "stop"]), ["down"])),
|
|
617
|
+
r[18] || (r[18] = D(z((C) => P.value && a("close"), ["prevent", "stop"]), ["delete"]))
|
|
582
618
|
],
|
|
583
|
-
onAuxclick:
|
|
584
|
-
onContextmenu:
|
|
585
|
-
onPointerdown:
|
|
586
|
-
onPointermove:
|
|
587
|
-
onPointerup:
|
|
588
|
-
onPointerleave:
|
|
589
|
-
onMouseenter:
|
|
590
|
-
onMouseleave:
|
|
619
|
+
onAuxclick: z(pe, ["stop"]),
|
|
620
|
+
onContextmenu: xe,
|
|
621
|
+
onPointerdown: ye,
|
|
622
|
+
onPointermove: he,
|
|
623
|
+
onPointerup: U,
|
|
624
|
+
onPointerleave: U,
|
|
625
|
+
onMouseenter: ve,
|
|
626
|
+
onMouseleave: r[19] || (r[19] = (C) => m.value = !1),
|
|
627
|
+
onFocus: ge,
|
|
628
|
+
onBlur: r[20] || (r[20] = (C) => v.value = !1)
|
|
591
629
|
}, [
|
|
592
|
-
e.tab.icon ? (l(),
|
|
630
|
+
e.tab.icon ? (l(), F(M, {
|
|
593
631
|
key: 0,
|
|
594
632
|
name: e.tab.icon,
|
|
595
633
|
size: 16,
|
|
596
634
|
class: "shrink-0"
|
|
597
|
-
}, null, 8, ["name"])) :
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
key:
|
|
635
|
+
}, null, 8, ["name"])) : O(o) ? (l(), n("span", Ct, w(R.value), 1)) : f("", !0),
|
|
636
|
+
O(o) ? f("", !0) : (l(), n("span", zt, w(e.tab.label), 1)),
|
|
637
|
+
g.value ? (l(), n("span", {
|
|
638
|
+
key: 3,
|
|
639
|
+
class: d(["size-2 shrink-0 rounded-full bg-current", O(o) ? "absolute right-0.5 top-0.5" : ""]),
|
|
640
|
+
"aria-hidden": "true"
|
|
641
|
+
}, null, 2)) : p.value && !O(o) ? (l(), n("button", {
|
|
642
|
+
key: 4,
|
|
601
643
|
type: "button",
|
|
602
644
|
class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
|
|
603
645
|
title: e.closeLabel,
|
|
604
|
-
"aria-label": `${e.closeLabel}: ${
|
|
605
|
-
onClick:
|
|
646
|
+
"aria-label": `${e.closeLabel}: ${j.value}`,
|
|
647
|
+
onClick: r[0] || (r[0] = z((C) => a("close"), ["stop"]))
|
|
606
648
|
}, [
|
|
607
|
-
|
|
649
|
+
V(M, {
|
|
608
650
|
name: "gtk-close",
|
|
609
651
|
type: "symbol",
|
|
610
652
|
size: 12
|
|
611
653
|
})
|
|
612
|
-
], 8,
|
|
613
|
-
|
|
654
|
+
], 8, Lt)) : f("", !0),
|
|
655
|
+
(l(), F(Me, { to: "body" }, [
|
|
656
|
+
V(Ie, {
|
|
657
|
+
"enter-active-class": "transition duration-150 ease-out",
|
|
658
|
+
"enter-from-class": "opacity-0 scale-95",
|
|
659
|
+
"leave-active-class": "transition duration-100 ease-in",
|
|
660
|
+
"leave-to-class": "opacity-0 scale-95"
|
|
661
|
+
}, {
|
|
662
|
+
default: W(() => [
|
|
663
|
+
x.value ? (l(), n("div", {
|
|
664
|
+
key: 0,
|
|
665
|
+
class: d(["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
|
+
ref_key: "desplegadoRef",
|
|
667
|
+
ref: u,
|
|
668
|
+
style: H(B.value),
|
|
669
|
+
onMouseenter: r[2] || (r[2] = (C) => I.value = !0),
|
|
670
|
+
onMouseleave: r[3] || (r[3] = (C) => I.value = !1),
|
|
671
|
+
onFocusin: r[4] || (r[4] = (C) => I.value = !0),
|
|
672
|
+
onFocusout: be
|
|
673
|
+
}, [
|
|
674
|
+
h("span", Bt, w(e.tab.label), 1),
|
|
675
|
+
e.tab.dirty ? (l(), n("span", St)) : f("", !0),
|
|
676
|
+
P.value ? (l(), n("button", {
|
|
677
|
+
key: 1,
|
|
678
|
+
type: "button",
|
|
679
|
+
class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
|
|
680
|
+
title: e.closeLabel,
|
|
681
|
+
"aria-label": `${e.closeLabel}: ${j.value}`,
|
|
682
|
+
onClick: r[1] || (r[1] = z((C) => a("close"), ["stop"]))
|
|
683
|
+
}, [
|
|
684
|
+
V(M, {
|
|
685
|
+
name: "gtk-close",
|
|
686
|
+
type: "symbol",
|
|
687
|
+
size: 12
|
|
688
|
+
})
|
|
689
|
+
], 8, At)) : f("", !0)
|
|
690
|
+
], 38)) : f("", !0)
|
|
691
|
+
]),
|
|
692
|
+
_: 1
|
|
693
|
+
})
|
|
694
|
+
]))
|
|
695
|
+
], 42, wt));
|
|
614
696
|
}
|
|
615
|
-
}),
|
|
697
|
+
}), Dt = ["aria-orientation"], Et = ["draggable", "onDragstart", "onDragover", "onDrop"], Mt = ["title", "aria-label"], It = /* @__PURE__ */ L({
|
|
616
698
|
__name: "TabBar",
|
|
617
699
|
props: {
|
|
618
700
|
tabs: {},
|
|
@@ -623,102 +705,102 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
623
705
|
fixedOrder: { type: Boolean, default: !1 }
|
|
624
706
|
},
|
|
625
707
|
emits: ["update:modelValue", "select", "close", "new", "reorder", "menu"],
|
|
626
|
-
setup(e, { emit:
|
|
627
|
-
const t = e, a =
|
|
628
|
-
function
|
|
629
|
-
a("update:modelValue",
|
|
708
|
+
setup(e, { emit: s }) {
|
|
709
|
+
const t = e, a = s, { vertical: o } = G(), i = S(null), c = S(0), u = S(null), m = S(null);
|
|
710
|
+
function v(b) {
|
|
711
|
+
a("update:modelValue", b), a("select", b);
|
|
630
712
|
}
|
|
631
|
-
async function
|
|
632
|
-
const
|
|
633
|
-
if (
|
|
634
|
-
const
|
|
635
|
-
c.value =
|
|
713
|
+
async function I(b, g) {
|
|
714
|
+
const p = t.tabs.length - 1;
|
|
715
|
+
if (p < 0) return;
|
|
716
|
+
const x = g === "primera" ? 0 : g === "ultima" ? p : g === "anterior" ? (b - 1 + t.tabs.length) % t.tabs.length : (b + 1) % t.tabs.length;
|
|
717
|
+
c.value = x, await re(), i.value?.querySelectorAll('[role="tab"]')?.[x]?.focus();
|
|
636
718
|
}
|
|
637
|
-
function
|
|
719
|
+
function N(b, g) {
|
|
638
720
|
if (t.fixedOrder) return;
|
|
639
|
-
const
|
|
640
|
-
if (
|
|
641
|
-
const
|
|
642
|
-
|
|
721
|
+
const p = b + g;
|
|
722
|
+
if (p < 0 || p >= t.tabs.length) return;
|
|
723
|
+
const x = [...t.tabs], [B] = x.splice(b, 1);
|
|
724
|
+
B && (x.splice(p, 0, B), c.value = p, a("reorder", x));
|
|
643
725
|
}
|
|
644
|
-
function
|
|
645
|
-
const
|
|
646
|
-
if (!
|
|
647
|
-
const
|
|
648
|
-
|
|
726
|
+
function A(b) {
|
|
727
|
+
const g = i.value;
|
|
728
|
+
if (!g) return;
|
|
729
|
+
const p = b.deltaY || b.deltaX || 0, x = o.value ? g.scrollTop : g.scrollLeft;
|
|
730
|
+
o.value ? g.scrollTop += p : g.scrollLeft += p, (o.value ? g.scrollTop : g.scrollLeft) !== x && b.preventDefault();
|
|
649
731
|
}
|
|
650
|
-
function
|
|
651
|
-
t.fixedOrder || (u.value =
|
|
732
|
+
function E(b, g) {
|
|
733
|
+
t.fixedOrder || (u.value = b, g.dataTransfer?.setData("text/plain", String(b)), g.dataTransfer && (g.dataTransfer.effectAllowed = "move"));
|
|
652
734
|
}
|
|
653
|
-
function
|
|
654
|
-
t.fixedOrder || u.value === null || (
|
|
735
|
+
function P(b, g) {
|
|
736
|
+
t.fixedOrder || u.value === null || (g.preventDefault(), m.value = b, g.dataTransfer && (g.dataTransfer.dropEffect = "move"));
|
|
655
737
|
}
|
|
656
|
-
function
|
|
657
|
-
const
|
|
658
|
-
if (
|
|
659
|
-
const
|
|
660
|
-
|
|
738
|
+
function k(b) {
|
|
739
|
+
const g = u.value;
|
|
740
|
+
if (j(), t.fixedOrder || g === null || g === b) return;
|
|
741
|
+
const p = [...t.tabs], [x] = p.splice(g, 1);
|
|
742
|
+
x && (p.splice(b, 0, x), a("reorder", p));
|
|
661
743
|
}
|
|
662
|
-
function
|
|
663
|
-
u.value = null,
|
|
744
|
+
function j() {
|
|
745
|
+
u.value = null, m.value = null;
|
|
664
746
|
}
|
|
665
|
-
const
|
|
666
|
-
() =>
|
|
747
|
+
const R = y(
|
|
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"
|
|
667
749
|
);
|
|
668
|
-
return (
|
|
669
|
-
class:
|
|
750
|
+
return (b, g) => (l(), n("div", {
|
|
751
|
+
class: d(["flex min-h-0 min-w-0 items-center gap-1", O(o) ? "w-full flex-col" : "h-full"]),
|
|
670
752
|
role: "tablist",
|
|
671
|
-
"aria-orientation":
|
|
753
|
+
"aria-orientation": O(o) ? "vertical" : "horizontal"
|
|
672
754
|
}, [
|
|
673
755
|
h("div", {
|
|
674
756
|
ref_key: "carril",
|
|
675
|
-
ref:
|
|
676
|
-
class:
|
|
677
|
-
onWheel:
|
|
757
|
+
ref: i,
|
|
758
|
+
class: d(R.value),
|
|
759
|
+
onWheel: A
|
|
678
760
|
}, [
|
|
679
|
-
(l(!0),
|
|
680
|
-
key:
|
|
681
|
-
class:
|
|
682
|
-
u.value ===
|
|
683
|
-
|
|
761
|
+
(l(!0), n(X, null, Y(e.tabs, (p, x) => (l(), n("div", {
|
|
762
|
+
key: p.id,
|
|
763
|
+
class: d(["transition-opacity", [
|
|
764
|
+
u.value === x ? "opacity-40" : "",
|
|
765
|
+
m.value === x && u.value !== x ? "ring-2 ring-secondary rounded-corner" : ""
|
|
684
766
|
]]),
|
|
685
767
|
draggable: !e.fixedOrder,
|
|
686
|
-
onDragstart: (
|
|
687
|
-
onDragover: (
|
|
688
|
-
onDrop:
|
|
689
|
-
onDragend:
|
|
768
|
+
onDragstart: (B) => E(x, B),
|
|
769
|
+
onDragover: (B) => P(x, B),
|
|
770
|
+
onDrop: z((B) => k(x), ["prevent"]),
|
|
771
|
+
onDragend: j
|
|
690
772
|
}, [
|
|
691
|
-
|
|
692
|
-
tab:
|
|
693
|
-
active:
|
|
773
|
+
V(me, {
|
|
774
|
+
tab: p,
|
|
775
|
+
active: p.id === e.modelValue,
|
|
694
776
|
"close-label": e.closeLabel,
|
|
695
777
|
"dirty-label": e.dirtyLabel,
|
|
696
|
-
tabindex:
|
|
697
|
-
onSelect: (
|
|
698
|
-
onClose: (
|
|
699
|
-
onMenu: (
|
|
700
|
-
onNavegar: (
|
|
701
|
-
onMover: (
|
|
778
|
+
tabindex: x === c.value ? 0 : -1,
|
|
779
|
+
onSelect: (B) => v(p.id),
|
|
780
|
+
onClose: (B) => a("close", p.id),
|
|
781
|
+
onMenu: (B) => a("menu", { id: p.id, ...B }),
|
|
782
|
+
onNavegar: (B) => I(x, B),
|
|
783
|
+
onMover: (B) => N(x, B)
|
|
702
784
|
}, null, 8, ["tab", "active", "close-label", "dirty-label", "tabindex", "onSelect", "onClose", "onMenu", "onNavegar", "onMover"])
|
|
703
|
-
], 42,
|
|
785
|
+
], 42, Et))), 128))
|
|
704
786
|
], 34),
|
|
705
|
-
e.newLabel ? (l(),
|
|
787
|
+
e.newLabel ? (l(), n("button", {
|
|
706
788
|
key: 0,
|
|
707
789
|
type: "button",
|
|
708
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",
|
|
709
791
|
title: e.newLabel,
|
|
710
792
|
"aria-label": e.newLabel,
|
|
711
|
-
onClick:
|
|
793
|
+
onClick: g[0] || (g[0] = (p) => a("new"))
|
|
712
794
|
}, [
|
|
713
|
-
|
|
795
|
+
V(M, {
|
|
714
796
|
name: "gtk-add",
|
|
715
797
|
type: "symbol",
|
|
716
798
|
size: 14
|
|
717
799
|
})
|
|
718
|
-
], 8,
|
|
719
|
-
], 10,
|
|
800
|
+
], 8, Mt)) : f("", !0)
|
|
801
|
+
], 10, Dt));
|
|
720
802
|
}
|
|
721
|
-
}),
|
|
803
|
+
}), Vt = { class: "relative flex shrink-0 items-center" }, jt = ["title", "aria-label", "aria-expanded"], Ot = ["value", "placeholder", "aria-label"], Pt = /* @__PURE__ */ L({
|
|
722
804
|
__name: "BarSearch",
|
|
723
805
|
props: {
|
|
724
806
|
modelValue: { default: "" },
|
|
@@ -727,68 +809,68 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
727
809
|
collapsed: { type: Boolean, default: !1 }
|
|
728
810
|
},
|
|
729
811
|
emits: ["update:modelValue", "search", "open", "close"],
|
|
730
|
-
setup(e, { emit:
|
|
731
|
-
const t = e, a =
|
|
732
|
-
if (!
|
|
733
|
-
const
|
|
734
|
-
return
|
|
812
|
+
setup(e, { emit: s }) {
|
|
813
|
+
const t = e, a = s, { vertical: o, posicion: i } = G(), c = S(!1), u = S(null), m = y(() => o.value || t.collapsed), v = y(() => !m.value || c.value), I = y(() => {
|
|
814
|
+
if (!m.value) return "";
|
|
815
|
+
const k = "absolute z-40 w-64 rounded-corner border border-ui-border bg-ui-surface/95 p-1 shadow-lg";
|
|
816
|
+
return i.value === "left" ? `${k} left-full top-0 ml-1` : i.value === "right" ? `${k} right-full top-0 mr-1` : i.value === "bottom" ? `${k} bottom-full right-0 mb-1` : `${k} top-full right-0 mt-1`;
|
|
735
817
|
});
|
|
736
|
-
async function
|
|
737
|
-
c.value = !0, a("open"), await
|
|
818
|
+
async function N() {
|
|
819
|
+
c.value = !0, a("open"), await re(), u.value?.focus();
|
|
738
820
|
}
|
|
739
|
-
function
|
|
821
|
+
function A() {
|
|
740
822
|
c.value && (c.value = !1, a("close"));
|
|
741
823
|
}
|
|
742
|
-
function
|
|
743
|
-
a("update:modelValue",
|
|
824
|
+
function E(k) {
|
|
825
|
+
a("update:modelValue", k.target.value);
|
|
744
826
|
}
|
|
745
|
-
function
|
|
827
|
+
function P() {
|
|
746
828
|
a("search", t.modelValue);
|
|
747
829
|
}
|
|
748
|
-
return (
|
|
749
|
-
|
|
830
|
+
return (k, j) => (l(), n("div", Vt, [
|
|
831
|
+
m.value ? (l(), n("button", {
|
|
750
832
|
key: 0,
|
|
751
833
|
type: "button",
|
|
752
834
|
class: "flex size-7 items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 hover:bg-ui-surface/70",
|
|
753
835
|
title: e.label,
|
|
754
836
|
"aria-label": e.label,
|
|
755
837
|
"aria-expanded": c.value,
|
|
756
|
-
onMousedown:
|
|
838
|
+
onMousedown: j[0] || (j[0] = z(() => {
|
|
757
839
|
}, ["prevent"])),
|
|
758
|
-
onClick:
|
|
840
|
+
onClick: j[1] || (j[1] = (R) => c.value ? A() : N())
|
|
759
841
|
}, [
|
|
760
|
-
|
|
842
|
+
V(M, {
|
|
761
843
|
name: "system-search",
|
|
762
844
|
type: "symbol",
|
|
763
845
|
size: 14
|
|
764
846
|
})
|
|
765
|
-
], 40,
|
|
766
|
-
|
|
847
|
+
], 40, jt)) : f("", !0),
|
|
848
|
+
v.value ? (l(), n("div", {
|
|
767
849
|
key: 1,
|
|
768
|
-
class:
|
|
850
|
+
class: d(I.value)
|
|
769
851
|
}, [
|
|
770
852
|
h("input", {
|
|
771
853
|
ref_key: "campo",
|
|
772
854
|
ref: u,
|
|
773
855
|
type: "search",
|
|
774
|
-
class:
|
|
856
|
+
class: d(["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", m.value ? "" : "w-48"]),
|
|
775
857
|
value: e.modelValue,
|
|
776
858
|
placeholder: e.placeholder || e.label,
|
|
777
859
|
"aria-label": e.label,
|
|
778
|
-
onInput:
|
|
860
|
+
onInput: E,
|
|
779
861
|
onKeydown: [
|
|
780
|
-
|
|
781
|
-
|
|
862
|
+
D(P, ["enter"]),
|
|
863
|
+
D(A, ["esc"])
|
|
782
864
|
],
|
|
783
|
-
onBlur:
|
|
784
|
-
}, null, 42,
|
|
785
|
-
], 2)) :
|
|
865
|
+
onBlur: A
|
|
866
|
+
}, null, 42, Ot)
|
|
867
|
+
], 2)) : f("", !0)
|
|
786
868
|
]));
|
|
787
869
|
}
|
|
788
|
-
}),
|
|
870
|
+
}), Nt = ["type", "disabled"], Rt = {
|
|
789
871
|
key: 0,
|
|
790
872
|
class: "w-4 h-4 animate-spin rounded-full border-2 border-current border-t-transparent"
|
|
791
|
-
},
|
|
873
|
+
}, Ft = ["src", "alt"], Wt = { key: 2 }, Ut = ["src", "alt"], Gt = /* @__PURE__ */ L({
|
|
792
874
|
__name: "ActionButton",
|
|
793
875
|
props: {
|
|
794
876
|
label: {},
|
|
@@ -806,52 +888,52 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
806
888
|
preventDefault: { type: Boolean, default: !1 }
|
|
807
889
|
},
|
|
808
890
|
emits: ["click"],
|
|
809
|
-
setup(e, { emit:
|
|
810
|
-
const t = e, a =
|
|
891
|
+
setup(e, { emit: s }) {
|
|
892
|
+
const t = e, a = s, o = {
|
|
811
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",
|
|
812
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",
|
|
813
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"
|
|
814
|
-
},
|
|
896
|
+
}, i = {
|
|
815
897
|
sm: "px-2 py-1 text-xs",
|
|
816
898
|
md: "px-3 py-1 text-sm",
|
|
817
899
|
lg: "px-4 py-2 text-base"
|
|
818
900
|
}, c = (u) => {
|
|
819
901
|
t.stopPropagation && u.stopPropagation(), t.preventDefault && u.preventDefault(), !t.disabled && !t.loading && a("click");
|
|
820
902
|
};
|
|
821
|
-
return (u,
|
|
903
|
+
return (u, m) => (l(), n("button", {
|
|
822
904
|
type: t.type,
|
|
823
905
|
onClick: c,
|
|
824
|
-
class:
|
|
825
|
-
|
|
826
|
-
|
|
906
|
+
class: d(["rounded-corner transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2", [
|
|
907
|
+
o[t.variant],
|
|
908
|
+
i[t.size],
|
|
827
909
|
t.fullWidth ? "w-full" : "",
|
|
828
910
|
t.iconSrc && !t.label ? "px-2 py-2" : "",
|
|
829
911
|
e.customClass
|
|
830
912
|
]]),
|
|
831
913
|
disabled: t.disabled || t.loading
|
|
832
914
|
}, [
|
|
833
|
-
e.loading ? (l(),
|
|
834
|
-
t.iconSrc && !t.iconRight ? (l(),
|
|
915
|
+
e.loading ? (l(), n("span", Rt)) : f("", !0),
|
|
916
|
+
t.iconSrc && !t.iconRight ? (l(), n("img", {
|
|
835
917
|
key: 1,
|
|
836
918
|
src: t.iconSrc,
|
|
837
919
|
alt: t.iconAlt || t.label,
|
|
838
920
|
class: "w-4 h-4"
|
|
839
|
-
}, null, 8,
|
|
840
|
-
t.label ? (l(),
|
|
841
|
-
t.iconSrc && t.iconRight ? (l(),
|
|
921
|
+
}, null, 8, Ft)) : f("", !0),
|
|
922
|
+
t.label ? (l(), n("span", Wt, w(t.label), 1)) : f("", !0),
|
|
923
|
+
t.iconSrc && t.iconRight ? (l(), n("img", {
|
|
842
924
|
key: 3,
|
|
843
925
|
src: t.iconSrc,
|
|
844
926
|
alt: t.iconAlt || t.label,
|
|
845
927
|
class: "w-4 h-4"
|
|
846
|
-
}, null, 8,
|
|
847
|
-
], 10,
|
|
928
|
+
}, null, 8, Ut)) : f("", !0)
|
|
929
|
+
], 10, Nt));
|
|
848
930
|
}
|
|
849
|
-
}),
|
|
931
|
+
}), K = (e, s) => {
|
|
850
932
|
const t = e.__vccOpts || e;
|
|
851
|
-
for (const [a,
|
|
852
|
-
t[a] =
|
|
933
|
+
for (const [a, o] of s)
|
|
934
|
+
t[a] = o;
|
|
853
935
|
return t;
|
|
854
|
-
},
|
|
936
|
+
}, Xt = /* @__PURE__ */ K(Gt, [["__scopeId", "data-v-2eaf6e27"]]), Yt = { class: "text-base font-semibold m-0 text-primary dark:text-primary-dark" }, Kt = /* @__PURE__ */ L({
|
|
855
937
|
__name: "ConfigSection",
|
|
856
938
|
props: {
|
|
857
939
|
title: {},
|
|
@@ -859,26 +941,26 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
859
941
|
customClass: { default: () => ({}) }
|
|
860
942
|
},
|
|
861
943
|
setup(e) {
|
|
862
|
-
return (
|
|
863
|
-
class:
|
|
944
|
+
return (s, t) => (l(), n("div", {
|
|
945
|
+
class: d(["flex flex-col gap-4 p-4 background rounded-corner", e.customClass])
|
|
864
946
|
}, [
|
|
865
|
-
h("h3",
|
|
866
|
-
|
|
947
|
+
h("h3", Yt, w(e.icon ? `${e.icon} ${e.title}` : e.title), 1),
|
|
948
|
+
T(s.$slots, "default", {}, void 0, !0)
|
|
867
949
|
], 2));
|
|
868
950
|
}
|
|
869
|
-
}),
|
|
951
|
+
}), qt = /* @__PURE__ */ K(Kt, [["__scopeId", "data-v-45bd4eab"]]), Ht = { class: "flex items-center gap-3 flex-1 min-w-0" }, Jt = ["src", "alt"], Qt = { class: "min-w-0" }, Zt = { class: "font-semibold truncate" }, _t = {
|
|
870
952
|
key: 0,
|
|
871
953
|
class: "text-xs text-gray-400 truncate"
|
|
872
|
-
},
|
|
954
|
+
}, ea = {
|
|
873
955
|
key: 1,
|
|
874
956
|
class: "text-xs text-gray-400 truncate"
|
|
875
|
-
},
|
|
957
|
+
}, ta = {
|
|
876
958
|
key: 2,
|
|
877
959
|
class: "text-xs text-gray-400 flex gap-2 mt-1"
|
|
878
|
-
},
|
|
960
|
+
}, aa = {
|
|
879
961
|
key: 1,
|
|
880
962
|
class: "w-2 h-2 rounded-full bg-green-500"
|
|
881
|
-
},
|
|
963
|
+
}, la = /* @__PURE__ */ L({
|
|
882
964
|
__name: "DeviceCard",
|
|
883
965
|
props: {
|
|
884
966
|
icon: {},
|
|
@@ -894,40 +976,40 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
894
976
|
clickable: { type: Boolean, default: !1 }
|
|
895
977
|
},
|
|
896
978
|
emits: ["action", "click"],
|
|
897
|
-
setup(e, { emit:
|
|
898
|
-
const t =
|
|
979
|
+
setup(e, { emit: s }) {
|
|
980
|
+
const t = s, a = () => {
|
|
899
981
|
t("action");
|
|
900
|
-
},
|
|
982
|
+
}, o = () => {
|
|
901
983
|
t("click");
|
|
902
984
|
};
|
|
903
|
-
return (
|
|
904
|
-
class:
|
|
905
|
-
onClick:
|
|
985
|
+
return (i, c) => (l(), n("div", {
|
|
986
|
+
class: d(["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
|
+
onClick: o
|
|
906
988
|
}, [
|
|
907
|
-
h("div",
|
|
989
|
+
h("div", Ht, [
|
|
908
990
|
h("img", {
|
|
909
991
|
src: e.icon,
|
|
910
992
|
alt: e.title,
|
|
911
993
|
class: "h-7 w-7 shrink-0"
|
|
912
|
-
}, null, 8,
|
|
913
|
-
h("div",
|
|
914
|
-
h("div",
|
|
915
|
-
e.subtitle ? (l(),
|
|
916
|
-
e.metadata ? (l(),
|
|
917
|
-
e.extraInfo && e.extraInfo.length > 0 ? (l(),
|
|
918
|
-
(l(!0),
|
|
919
|
-
])) :
|
|
994
|
+
}, null, 8, Jt),
|
|
995
|
+
h("div", Qt, [
|
|
996
|
+
h("div", Zt, w(e.title), 1),
|
|
997
|
+
e.subtitle ? (l(), n("div", _t, w(e.subtitle), 1)) : f("", !0),
|
|
998
|
+
e.metadata ? (l(), n("div", ea, w(e.metadata), 1)) : f("", !0),
|
|
999
|
+
e.extraInfo && e.extraInfo.length > 0 ? (l(), n("div", ta, [
|
|
1000
|
+
(l(!0), n(X, null, Y(e.extraInfo, (u, m) => (l(), n("span", { key: m }, w(u), 1))), 128))
|
|
1001
|
+
])) : f("", !0)
|
|
920
1002
|
])
|
|
921
1003
|
]),
|
|
922
|
-
e.showActionButton ? (l(),
|
|
1004
|
+
e.showActionButton ? (l(), n("button", {
|
|
923
1005
|
key: 0,
|
|
924
1006
|
class: "bg-vsk-primary rounded-vsk px-4 py-2 text-sm font-semibold cursor-pointer hover:opacity-70",
|
|
925
|
-
onClick:
|
|
926
|
-
},
|
|
927
|
-
e.showStatusIndicator && e.isConnected ? (l(),
|
|
1007
|
+
onClick: z(a, ["stop"])
|
|
1008
|
+
}, w(e.actionLabel), 1)) : f("", !0),
|
|
1009
|
+
e.showStatusIndicator && e.isConnected ? (l(), n("div", aa)) : f("", !0)
|
|
928
1010
|
], 2));
|
|
929
1011
|
}
|
|
930
|
-
}),
|
|
1012
|
+
}), na = ["for"], oa = /* @__PURE__ */ L({
|
|
931
1013
|
__name: "FormGroup",
|
|
932
1014
|
props: {
|
|
933
1015
|
label: {},
|
|
@@ -936,45 +1018,45 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
936
1018
|
labelClass: { default: () => ({}) }
|
|
937
1019
|
},
|
|
938
1020
|
setup(e) {
|
|
939
|
-
return (
|
|
940
|
-
class:
|
|
1021
|
+
return (s, t) => (l(), n("div", {
|
|
1022
|
+
class: d(["flex flex-col gap-2", e.customClass])
|
|
941
1023
|
}, [
|
|
942
|
-
e.label ? (l(),
|
|
1024
|
+
e.label ? (l(), n("label", {
|
|
943
1025
|
key: 0,
|
|
944
1026
|
for: e.htmlFor,
|
|
945
|
-
class:
|
|
946
|
-
},
|
|
947
|
-
|
|
1027
|
+
class: d(["text-sm font-medium text-primary dark:text-primary-dark", e.labelClass])
|
|
1028
|
+
}, w(e.label), 11, na)) : f("", !0),
|
|
1029
|
+
T(s.$slots, "default", {}, void 0, !0)
|
|
948
1030
|
], 2));
|
|
949
1031
|
}
|
|
950
|
-
}),
|
|
1032
|
+
}), sa = /* @__PURE__ */ K(oa, [["__scopeId", "data-v-c0d9d9cb"]]), ia = /* @__PURE__ */ L({
|
|
951
1033
|
__name: "ListCard",
|
|
952
1034
|
props: {
|
|
953
1035
|
clickable: { type: Boolean, default: !1 },
|
|
954
1036
|
customClass: { default: () => ({}) }
|
|
955
1037
|
},
|
|
956
1038
|
emits: ["click"],
|
|
957
|
-
setup(e, { emit:
|
|
958
|
-
const t = e, a =
|
|
1039
|
+
setup(e, { emit: s }) {
|
|
1040
|
+
const t = e, a = s, o = () => {
|
|
959
1041
|
t.clickable && a("click");
|
|
960
1042
|
};
|
|
961
|
-
return (
|
|
962
|
-
class:
|
|
1043
|
+
return (i, c) => (l(), n("div", {
|
|
1044
|
+
class: d([
|
|
963
1045
|
"flex items-center justify-between background p-3 rounded-vsk border border-vsk-primary/70 transition-colors duration-200",
|
|
964
1046
|
{
|
|
965
1047
|
"hover:bg-vsk-primary/5 cursor-pointer": t.clickable
|
|
966
1048
|
},
|
|
967
1049
|
e.customClass
|
|
968
1050
|
]),
|
|
969
|
-
onClick:
|
|
1051
|
+
onClick: o
|
|
970
1052
|
}, [
|
|
971
|
-
|
|
1053
|
+
T(i.$slots, "default", {}, void 0, !0)
|
|
972
1054
|
], 2));
|
|
973
1055
|
}
|
|
974
|
-
}),
|
|
1056
|
+
}), ra = /* @__PURE__ */ K(ia, [["__scopeId", "data-v-f86d47da"]]), ua = { 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" }, ca = ["src", "alt", "title"], da = {
|
|
975
1057
|
key: 1,
|
|
976
1058
|
class: "w-8 h-8 flex items-center justify-center"
|
|
977
|
-
},
|
|
1059
|
+
}, fa = ["src", "alt"], ma = ["min", "max", "value"], ba = /* @__PURE__ */ L({
|
|
978
1060
|
__name: "SliderControl",
|
|
979
1061
|
props: {
|
|
980
1062
|
icon: {},
|
|
@@ -988,19 +1070,19 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
988
1070
|
getPercentageClass: { type: Function, default: () => "" }
|
|
989
1071
|
},
|
|
990
1072
|
emits: ["update:modelValue", "buttonClick"],
|
|
991
|
-
setup(e, { emit:
|
|
992
|
-
const t = e, a =
|
|
1073
|
+
setup(e, { emit: s }) {
|
|
1074
|
+
const t = e, a = s, o = y(() => {
|
|
993
1075
|
if (t.max <= t.min) return 0;
|
|
994
|
-
const
|
|
995
|
-
return Math.round(
|
|
996
|
-
}),
|
|
997
|
-
const
|
|
998
|
-
a("update:modelValue", Number(
|
|
1076
|
+
const m = t.max - t.min, v = t.modelValue - t.min;
|
|
1077
|
+
return Math.round(v / m * 100);
|
|
1078
|
+
}), i = y(() => t.getPercentageClass ? t.getPercentageClass(o.value) : ""), c = (m) => {
|
|
1079
|
+
const v = m.target;
|
|
1080
|
+
a("update:modelValue", Number(v.value));
|
|
999
1081
|
}, u = () => {
|
|
1000
1082
|
a("buttonClick");
|
|
1001
1083
|
};
|
|
1002
|
-
return (
|
|
1003
|
-
e.showButton ? (l(),
|
|
1084
|
+
return (m, v) => (l(), n("div", ua, [
|
|
1085
|
+
e.showButton ? (l(), n("button", {
|
|
1004
1086
|
key: 0,
|
|
1005
1087
|
onClick: u,
|
|
1006
1088
|
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"
|
|
@@ -1009,14 +1091,14 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
1009
1091
|
src: e.icon,
|
|
1010
1092
|
alt: e.alt,
|
|
1011
1093
|
title: e.tooltip,
|
|
1012
|
-
class:
|
|
1013
|
-
}, null, 10,
|
|
1014
|
-
])) : (l(),
|
|
1094
|
+
class: d(["w-6 h-6 transition-all duration-200", e.iconClass])
|
|
1095
|
+
}, null, 10, ca)
|
|
1096
|
+
])) : (l(), n("div", da, [
|
|
1015
1097
|
h("img", {
|
|
1016
1098
|
src: e.icon,
|
|
1017
1099
|
alt: e.alt,
|
|
1018
1100
|
class: "w-6 h-6 transition-all duration-200"
|
|
1019
|
-
}, null, 8,
|
|
1101
|
+
}, null, 8, fa)
|
|
1020
1102
|
])),
|
|
1021
1103
|
h("input", {
|
|
1022
1104
|
type: "range",
|
|
@@ -1025,13 +1107,13 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
1025
1107
|
value: e.modelValue,
|
|
1026
1108
|
onInput: c,
|
|
1027
1109
|
class: "flex-1 transition-all duration-200 hover:scale-105"
|
|
1028
|
-
}, null, 40,
|
|
1110
|
+
}, null, 40, ma),
|
|
1029
1111
|
h("span", {
|
|
1030
|
-
class:
|
|
1031
|
-
},
|
|
1112
|
+
class: d(["w-12 text-right transition-all duration-200 font-medium", i.value])
|
|
1113
|
+
}, w(o.value) + "% ", 3)
|
|
1032
1114
|
]));
|
|
1033
1115
|
}
|
|
1034
|
-
}),
|
|
1116
|
+
}), va = ["disabled"], ga = /* @__PURE__ */ L({
|
|
1035
1117
|
__name: "SwitchToggle",
|
|
1036
1118
|
props: {
|
|
1037
1119
|
isOn: { type: Boolean },
|
|
@@ -1042,15 +1124,15 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
1042
1124
|
customClass: { default: "" }
|
|
1043
1125
|
},
|
|
1044
1126
|
emits: ["toggle"],
|
|
1045
|
-
setup(e, { emit:
|
|
1046
|
-
const t = e, a =
|
|
1127
|
+
setup(e, { emit: s }) {
|
|
1128
|
+
const t = e, a = s, o = () => {
|
|
1047
1129
|
a("toggle", !t.isOn);
|
|
1048
1130
|
};
|
|
1049
|
-
return (
|
|
1131
|
+
return (i, c) => (l(), n("button", {
|
|
1050
1132
|
type: "button",
|
|
1051
|
-
onClick:
|
|
1133
|
+
onClick: o,
|
|
1052
1134
|
disabled: e.disabled,
|
|
1053
|
-
class:
|
|
1135
|
+
class: d([
|
|
1054
1136
|
"relative inline-flex items-center rounded-full transition-colors",
|
|
1055
1137
|
e.size === "small" ? "h-6 w-11" : "h-7 w-12",
|
|
1056
1138
|
e.isOn ? e.activeClass : e.inactiveClass,
|
|
@@ -1059,15 +1141,15 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
1059
1141
|
])
|
|
1060
1142
|
}, [
|
|
1061
1143
|
h("span", {
|
|
1062
|
-
class:
|
|
1144
|
+
class: d([
|
|
1063
1145
|
"inline-block transform rounded-full bg-white shadow transition-transform",
|
|
1064
1146
|
e.size === "small" ? "h-4 w-4" : "h-6 w-6",
|
|
1065
1147
|
e.isOn ? e.size === "small" ? "translate-x-6" : "translate-x-5" : "translate-x-1"
|
|
1066
1148
|
])
|
|
1067
1149
|
}, null, 2)
|
|
1068
|
-
], 10,
|
|
1150
|
+
], 10, va));
|
|
1069
1151
|
}
|
|
1070
|
-
}),
|
|
1152
|
+
}), ya = ["disabled"], ha = ["src", "alt", "title"], pa = /* @__PURE__ */ L({
|
|
1071
1153
|
__name: "ToggleControl",
|
|
1072
1154
|
props: {
|
|
1073
1155
|
icon: {},
|
|
@@ -1079,13 +1161,13 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
1079
1161
|
customClass: { default: () => ({}) }
|
|
1080
1162
|
},
|
|
1081
1163
|
emits: ["click"],
|
|
1082
|
-
setup(e, { emit:
|
|
1083
|
-
const t =
|
|
1164
|
+
setup(e, { emit: s }) {
|
|
1165
|
+
const t = s, a = () => {
|
|
1084
1166
|
t("click");
|
|
1085
1167
|
};
|
|
1086
|
-
return (
|
|
1168
|
+
return (o, i) => (l(), n("button", {
|
|
1087
1169
|
onClick: a,
|
|
1088
|
-
class:
|
|
1170
|
+
class: d(["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", {
|
|
1089
1171
|
"animate-pulse": e.isLoading,
|
|
1090
1172
|
"ring-2 ring-primary dark:ring-primary-dark": e.isActive,
|
|
1091
1173
|
"opacity-60": !e.isActive,
|
|
@@ -1097,19 +1179,19 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
1097
1179
|
src: e.icon,
|
|
1098
1180
|
alt: e.alt,
|
|
1099
1181
|
title: e.tooltip,
|
|
1100
|
-
class:
|
|
1182
|
+
class: d(["m-auto w-12.5 h-12.5 transition-all duration-300 group-hover:scale-110 relative z-10", {
|
|
1101
1183
|
"animate-spin": e.isLoading,
|
|
1102
1184
|
"filter brightness-75": !e.isActive,
|
|
1103
1185
|
"drop-shadow-lg": e.isActive,
|
|
1104
1186
|
...e.iconClass
|
|
1105
1187
|
}])
|
|
1106
|
-
}, null, 10,
|
|
1107
|
-
], 10,
|
|
1188
|
+
}, null, 10, ha)
|
|
1189
|
+
], 10, ya));
|
|
1108
1190
|
}
|
|
1109
|
-
}),
|
|
1191
|
+
}), xa = ["title"], ka = ["src", "alt"], $a = {
|
|
1110
1192
|
key: 0,
|
|
1111
1193
|
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"
|
|
1112
|
-
},
|
|
1194
|
+
}, wa = /* @__PURE__ */ L({
|
|
1113
1195
|
__name: "TrayIconButton",
|
|
1114
1196
|
props: {
|
|
1115
1197
|
icon: {},
|
|
@@ -1123,91 +1205,91 @@ const tt = ["title", "aria-label"], at = ["title", "aria-label"], lt = ["title",
|
|
|
1123
1205
|
customTooltipText: { default: "" }
|
|
1124
1206
|
},
|
|
1125
1207
|
emits: ["click"],
|
|
1126
|
-
setup(e, { emit:
|
|
1127
|
-
const t =
|
|
1208
|
+
setup(e, { emit: s }) {
|
|
1209
|
+
const t = s, a = S(!1), o = () => {
|
|
1128
1210
|
t("click");
|
|
1129
1211
|
};
|
|
1130
|
-
return (
|
|
1131
|
-
class:
|
|
1212
|
+
return (i, c) => (l(), n("div", {
|
|
1213
|
+
class: d(["p-1 rounded-corner relative hover:bg-primary dark:hover:bg-primary-dark group transition-all duration-300", e.customClass]),
|
|
1132
1214
|
title: e.tooltip,
|
|
1133
|
-
onClick:
|
|
1215
|
+
onClick: o,
|
|
1134
1216
|
onMouseenter: c[0] || (c[0] = (u) => a.value = !0),
|
|
1135
1217
|
onMouseleave: c[1] || (c[1] = (u) => a.value = !1)
|
|
1136
1218
|
}, [
|
|
1137
1219
|
h("img", {
|
|
1138
1220
|
src: e.icon,
|
|
1139
1221
|
alt: e.alt,
|
|
1140
|
-
class:
|
|
1141
|
-
}, null, 10,
|
|
1142
|
-
e.badge !== null && e.badge > 0 ? (l(),
|
|
1143
|
-
e.showCustomTooltip && e.customTooltipText ? (l(),
|
|
1222
|
+
class: d(["m-auto h-5.5 w-auto transition-all duration-300", e.iconClass])
|
|
1223
|
+
}, null, 10, ka),
|
|
1224
|
+
e.badge !== null && e.badge > 0 ? (l(), n("div", $a, w(e.badge), 1)) : f("", !0),
|
|
1225
|
+
e.showCustomTooltip && e.customTooltipText ? (l(), n("div", {
|
|
1144
1226
|
key: 1,
|
|
1145
|
-
class:
|
|
1227
|
+
class: d(["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", [
|
|
1146
1228
|
e.tooltipClass,
|
|
1147
1229
|
{
|
|
1148
1230
|
"opacity-0 -translate-y-2": !a.value,
|
|
1149
1231
|
"opacity-100 translate-y-0": a.value
|
|
1150
1232
|
}
|
|
1151
1233
|
]])
|
|
1152
|
-
},
|
|
1153
|
-
|
|
1154
|
-
], 42,
|
|
1234
|
+
}, w(e.customTooltipText), 3)) : f("", !0),
|
|
1235
|
+
T(i.$slots, "default")
|
|
1236
|
+
], 42, xa));
|
|
1155
1237
|
}
|
|
1156
|
-
}),
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
],
|
|
1238
|
+
}), Ca = [
|
|
1239
|
+
nt,
|
|
1240
|
+
ce,
|
|
1241
|
+
ue,
|
|
1242
|
+
ut,
|
|
1243
|
+
M,
|
|
1244
|
+
$t,
|
|
1245
|
+
fe,
|
|
1246
|
+
de,
|
|
1247
|
+
It,
|
|
1248
|
+
me,
|
|
1249
|
+
Pt,
|
|
1250
|
+
Xt,
|
|
1251
|
+
qt,
|
|
1252
|
+
la,
|
|
1253
|
+
sa,
|
|
1254
|
+
ra,
|
|
1255
|
+
ba,
|
|
1256
|
+
ga,
|
|
1257
|
+
pa,
|
|
1258
|
+
wa
|
|
1259
|
+
], Aa = {
|
|
1178
1260
|
install(e) {
|
|
1179
|
-
|
|
1180
|
-
e.component(
|
|
1261
|
+
Ca.forEach((s) => {
|
|
1262
|
+
e.component(s.name, s);
|
|
1181
1263
|
});
|
|
1182
1264
|
}
|
|
1183
1265
|
};
|
|
1184
1266
|
export {
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1267
|
+
Xt as ActionButton,
|
|
1268
|
+
fe as AppBar,
|
|
1269
|
+
Pt as BarSearch,
|
|
1270
|
+
ee as CLAVE_DE_LA_BARRA,
|
|
1271
|
+
qt as ConfigSection,
|
|
1272
|
+
la as DeviceCard,
|
|
1273
|
+
sa as FormGroup,
|
|
1274
|
+
ra as ListCard,
|
|
1275
|
+
ct as POSICIONES,
|
|
1276
|
+
ut as SelectField,
|
|
1277
|
+
nt as SideBar,
|
|
1278
|
+
ce as SideButton,
|
|
1279
|
+
ue as SideGroup,
|
|
1280
|
+
ba as SliderControl,
|
|
1281
|
+
ga as SwitchToggle,
|
|
1282
|
+
It as TabBar,
|
|
1283
|
+
me as TabItem,
|
|
1284
|
+
M as ThemeIcon,
|
|
1285
|
+
pa as ToggleControl,
|
|
1286
|
+
wa as TrayIconButton,
|
|
1287
|
+
de as WindowControls,
|
|
1288
|
+
$t as WindowFrame,
|
|
1289
|
+
Aa as default,
|
|
1290
|
+
dt as esPosicion,
|
|
1291
|
+
J as orientacionDe,
|
|
1292
|
+
bt as posicionDe,
|
|
1293
|
+
G as usarLaBarra,
|
|
1294
|
+
vt as usarLaPosicionDeLaBarra
|
|
1213
1295
|
};
|