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