@vasakgroup/vue-libvasak 0.3.5 → 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 +811 -372
- 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 u = ++
|
|
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
|
-
u ===
|
|
14
|
+
const g = i.value === "symbol" ? await ke(b) : await we(b);
|
|
15
|
+
u === r && (t.value = g);
|
|
16
16
|
}
|
|
17
|
-
return
|
|
18
|
-
const u = await
|
|
19
|
-
if (
|
|
17
|
+
return Y(async () => {
|
|
18
|
+
const u = await pe("vicons:theme-changed", c);
|
|
19
|
+
if (s) {
|
|
20
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 ne = ["src", "alt"], C = /* @__PURE__ */ g({
|
|
|
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 ne = ["src", "alt"], C = /* @__PURE__ */ g({
|
|
|
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 ne = ["src", "alt"], C = /* @__PURE__ */ g({
|
|
|
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,98 +157,101 @@ const ne = ["src", "alt"], C = /* @__PURE__ */ g({
|
|
|
157
157
|
expandLabel: { default: "Expand" }
|
|
158
158
|
},
|
|
159
159
|
emits: ["update:modelValue", "update:collapsed", "change"],
|
|
160
|
-
setup(e, { expose:
|
|
161
|
-
const
|
|
162
|
-
let u = null;
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
function
|
|
166
|
-
|
|
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
|
+
return document.documentElement?.clientWidth || window.innerWidth;
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
c.value =
|
|
168
|
+
function L() {
|
|
169
|
+
c.value = O() <= _;
|
|
170
|
+
}
|
|
171
|
+
function T() {
|
|
172
|
+
r.value = !r.value, s("update:collapsed", r.value);
|
|
170
173
|
}
|
|
171
|
-
function
|
|
172
|
-
|
|
174
|
+
function j(x) {
|
|
175
|
+
s("update:modelValue", x), s("change", x);
|
|
173
176
|
}
|
|
174
|
-
return
|
|
175
|
-
() =>
|
|
176
|
-
(
|
|
177
|
-
|
|
177
|
+
return K(
|
|
178
|
+
() => a.collapsed,
|
|
179
|
+
(x) => {
|
|
180
|
+
x !== void 0 && (r.value = x);
|
|
178
181
|
}
|
|
179
|
-
),
|
|
180
|
-
u = window.matchMedia(`(max-width: ${
|
|
181
|
-
}),
|
|
182
|
-
u?.removeEventListener("change",
|
|
183
|
-
}),
|
|
184
|
-
class:
|
|
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
|
+
}), q(() => {
|
|
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"]])
|
|
185
188
|
}, [
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
+
E.value || x.$slots.header ? (l(), o("header", Ee, [
|
|
190
|
+
h("div", Ie, [
|
|
191
|
+
h("button", {
|
|
189
192
|
type: "button",
|
|
190
|
-
class:
|
|
191
|
-
"aria-label":
|
|
192
|
-
"aria-expanded": !
|
|
193
|
-
onClick:
|
|
193
|
+
class: m(Z),
|
|
194
|
+
"aria-label": g.value ? e.expandLabel : e.collapseLabel,
|
|
195
|
+
"aria-expanded": !g.value,
|
|
196
|
+
onClick: T
|
|
194
197
|
}, [
|
|
195
|
-
|
|
196
|
-
name:
|
|
198
|
+
D(A, {
|
|
199
|
+
name: g.value ? "pan-end-symbolic" : "pan-start-symbolic",
|
|
197
200
|
type: "symbol",
|
|
198
201
|
size: 16
|
|
199
202
|
}, null, 8, ["name"])
|
|
200
|
-
], 8,
|
|
201
|
-
|
|
202
|
-
e.title ? (
|
|
203
|
-
e.subtitle ? (
|
|
204
|
-
])) :
|
|
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)
|
|
205
208
|
]),
|
|
206
|
-
|
|
207
|
-
x
|
|
208
|
-
])) :
|
|
209
|
-
])) : (
|
|
210
|
-
|
|
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", {
|
|
211
214
|
type: "button",
|
|
212
|
-
class:
|
|
213
|
-
"aria-label":
|
|
214
|
-
"aria-expanded": !
|
|
215
|
-
onClick:
|
|
215
|
+
class: m(Z),
|
|
216
|
+
"aria-label": g.value ? e.expandLabel : e.collapseLabel,
|
|
217
|
+
"aria-expanded": !g.value,
|
|
218
|
+
onClick: T
|
|
216
219
|
}, [
|
|
217
|
-
|
|
218
|
-
name:
|
|
220
|
+
D(A, {
|
|
221
|
+
name: g.value ? "pan-end-symbolic" : "pan-start-symbolic",
|
|
219
222
|
type: "symbol",
|
|
220
223
|
size: 16
|
|
221
224
|
}, null, 8, ["name"])
|
|
222
|
-
], 8,
|
|
225
|
+
], 8, Fe)
|
|
223
226
|
])),
|
|
224
|
-
|
|
225
|
-
(
|
|
226
|
-
key:
|
|
227
|
-
title:
|
|
228
|
-
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
|
|
229
232
|
}, {
|
|
230
|
-
default:
|
|
231
|
-
(
|
|
232
|
-
key:
|
|
233
|
-
label:
|
|
234
|
-
icon:
|
|
235
|
-
badge:
|
|
236
|
-
disabled:
|
|
237
|
-
collapsed:
|
|
238
|
-
active: e.modelValue ===
|
|
239
|
-
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)
|
|
240
243
|
}, null, 8, ["label", "icon", "badge", "disabled", "collapsed", "active", "onClick"]))), 128))
|
|
241
244
|
]),
|
|
242
245
|
_: 2
|
|
243
246
|
}, 1032, ["title", "collapsed"]))), 128)),
|
|
244
|
-
x
|
|
247
|
+
z(x.$slots, "default", { collapsed: g.value })
|
|
245
248
|
])
|
|
246
249
|
], 2));
|
|
247
250
|
}
|
|
248
|
-
}),
|
|
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({
|
|
249
252
|
inheritAttrs: !1,
|
|
250
253
|
__name: "SelectField",
|
|
251
|
-
props: /* @__PURE__ */
|
|
254
|
+
props: /* @__PURE__ */ ue({
|
|
252
255
|
label: {}
|
|
253
256
|
}, {
|
|
254
257
|
modelValue: {
|
|
@@ -258,28 +261,28 @@ const ne = ["src", "alt"], C = /* @__PURE__ */ g({
|
|
|
258
261
|
}),
|
|
259
262
|
emits: ["update:modelValue"],
|
|
260
263
|
setup(e) {
|
|
261
|
-
const
|
|
264
|
+
const i = e, t = ce(), a = de(), s = y(() => t.id ?? a), [r, c] = fe(e, "modelValue", {
|
|
262
265
|
set(u) {
|
|
263
|
-
return
|
|
266
|
+
return c.number ? Number(u) : u;
|
|
264
267
|
}
|
|
265
268
|
});
|
|
266
|
-
return (u,
|
|
267
|
-
|
|
269
|
+
return (u, b) => (l(), o("div", Ge, [
|
|
270
|
+
i.label ? (l(), o("label", {
|
|
268
271
|
key: 0,
|
|
269
|
-
for:
|
|
272
|
+
for: s.value,
|
|
270
273
|
class: "text-tx-muted text-xs"
|
|
271
|
-
},
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
id:
|
|
275
|
-
"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),
|
|
276
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"
|
|
277
|
-
},
|
|
278
|
-
|
|
279
|
-
], 16,
|
|
280
|
-
[
|
|
280
|
+
}, V(t)), [
|
|
281
|
+
z(u.$slots, "default")
|
|
282
|
+
], 16, Ke), [
|
|
283
|
+
[ge, V(r)]
|
|
281
284
|
]),
|
|
282
|
-
|
|
285
|
+
D(A, {
|
|
283
286
|
name: "pan-down-symbolic",
|
|
284
287
|
type: "symbol",
|
|
285
288
|
size: 14,
|
|
@@ -288,85 +291,504 @@ const ne = ["src", "alt"], C = /* @__PURE__ */ g({
|
|
|
288
291
|
])
|
|
289
292
|
]));
|
|
290
293
|
}
|
|
291
|
-
}),
|
|
292
|
-
|
|
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",
|
|
293
346
|
props: {
|
|
294
|
-
|
|
295
|
-
|
|
347
|
+
minimizeLabel: { default: "Minimize" },
|
|
348
|
+
maximizeLabel: { default: "Maximize" },
|
|
349
|
+
closeLabel: { default: "Close" }
|
|
296
350
|
},
|
|
297
351
|
setup(e) {
|
|
298
|
-
const
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
class: "flex
|
|
304
|
-
|
|
305
|
-
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": ""
|
|
306
359
|
}, [
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
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
|
-
|
|
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)
|
|
346
432
|
])
|
|
347
|
-
])
|
|
348
|
-
|
|
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));
|
|
349
453
|
}
|
|
350
|
-
}),
|
|
454
|
+
}), st = { class: "flex min-h-0 min-w-0 flex-1" }, it = /* @__PURE__ */ w({
|
|
351
455
|
__name: "WindowFrame",
|
|
352
456
|
props: {
|
|
353
|
-
|
|
354
|
-
|
|
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 }
|
|
355
464
|
},
|
|
356
465
|
setup(e) {
|
|
357
|
-
const s =
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
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
|
+
]));
|
|
365
787
|
}
|
|
366
|
-
}),
|
|
788
|
+
}), kt = ["type", "disabled"], wt = {
|
|
367
789
|
key: 0,
|
|
368
790
|
class: "w-4 h-4 animate-spin rounded-full border-2 border-current border-t-transparent"
|
|
369
|
-
},
|
|
791
|
+
}, $t = ["src", "alt"], Ct = { key: 2 }, zt = ["src", "alt"], Lt = /* @__PURE__ */ w({
|
|
370
792
|
__name: "ActionButton",
|
|
371
793
|
props: {
|
|
372
794
|
label: {},
|
|
@@ -384,52 +806,52 @@ const ne = ["src", "alt"], C = /* @__PURE__ */ g({
|
|
|
384
806
|
preventDefault: { type: Boolean, default: !1 }
|
|
385
807
|
},
|
|
386
808
|
emits: ["click"],
|
|
387
|
-
setup(e, { emit:
|
|
388
|
-
const t = e,
|
|
809
|
+
setup(e, { emit: i }) {
|
|
810
|
+
const t = e, a = i, s = {
|
|
389
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",
|
|
390
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",
|
|
391
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"
|
|
392
|
-
},
|
|
814
|
+
}, r = {
|
|
393
815
|
sm: "px-2 py-1 text-xs",
|
|
394
816
|
md: "px-3 py-1 text-sm",
|
|
395
817
|
lg: "px-4 py-2 text-base"
|
|
396
|
-
},
|
|
397
|
-
t.stopPropagation && u.stopPropagation(), t.preventDefault && u.preventDefault(), !t.disabled && !t.loading &&
|
|
818
|
+
}, c = (u) => {
|
|
819
|
+
t.stopPropagation && u.stopPropagation(), t.preventDefault && u.preventDefault(), !t.disabled && !t.loading && a("click");
|
|
398
820
|
};
|
|
399
|
-
return (u,
|
|
821
|
+
return (u, b) => (l(), o("button", {
|
|
400
822
|
type: t.type,
|
|
401
|
-
onClick:
|
|
402
|
-
class:
|
|
403
|
-
|
|
404
|
-
|
|
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],
|
|
826
|
+
r[t.size],
|
|
405
827
|
t.fullWidth ? "w-full" : "",
|
|
406
828
|
t.iconSrc && !t.label ? "px-2 py-2" : "",
|
|
407
829
|
e.customClass
|
|
408
830
|
]]),
|
|
409
831
|
disabled: t.disabled || t.loading
|
|
410
832
|
}, [
|
|
411
|
-
e.loading ? (
|
|
412
|
-
t.iconSrc && !t.iconRight ? (
|
|
833
|
+
e.loading ? (l(), o("span", wt)) : v("", !0),
|
|
834
|
+
t.iconSrc && !t.iconRight ? (l(), o("img", {
|
|
413
835
|
key: 1,
|
|
414
836
|
src: t.iconSrc,
|
|
415
837
|
alt: t.iconAlt || t.label,
|
|
416
838
|
class: "w-4 h-4"
|
|
417
|
-
}, null, 8,
|
|
418
|
-
t.label ? (
|
|
419
|
-
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", {
|
|
420
842
|
key: 3,
|
|
421
843
|
src: t.iconSrc,
|
|
422
844
|
alt: t.iconAlt || t.label,
|
|
423
845
|
class: "w-4 h-4"
|
|
424
|
-
}, null, 8,
|
|
425
|
-
], 10,
|
|
846
|
+
}, null, 8, zt)) : v("", !0)
|
|
847
|
+
], 10, kt));
|
|
426
848
|
}
|
|
427
|
-
}),
|
|
849
|
+
}), U = (e, i) => {
|
|
428
850
|
const t = e.__vccOpts || e;
|
|
429
|
-
for (const [
|
|
430
|
-
t[
|
|
851
|
+
for (const [a, s] of i)
|
|
852
|
+
t[a] = s;
|
|
431
853
|
return t;
|
|
432
|
-
},
|
|
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({
|
|
433
855
|
__name: "ConfigSection",
|
|
434
856
|
props: {
|
|
435
857
|
title: {},
|
|
@@ -437,26 +859,26 @@ const ne = ["src", "alt"], C = /* @__PURE__ */ g({
|
|
|
437
859
|
customClass: { default: () => ({}) }
|
|
438
860
|
},
|
|
439
861
|
setup(e) {
|
|
440
|
-
return (
|
|
441
|
-
class:
|
|
862
|
+
return (i, t) => (l(), o("div", {
|
|
863
|
+
class: m(["flex flex-col gap-4 p-4 background rounded-corner", e.customClass])
|
|
442
864
|
}, [
|
|
443
|
-
|
|
444
|
-
|
|
865
|
+
h("h3", St, k(e.icon ? `${e.icon} ${e.title}` : e.title), 1),
|
|
866
|
+
z(i.$slots, "default", {}, void 0, !0)
|
|
445
867
|
], 2));
|
|
446
868
|
}
|
|
447
|
-
}),
|
|
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 = {
|
|
448
870
|
key: 0,
|
|
449
871
|
class: "text-xs text-gray-400 truncate"
|
|
450
|
-
},
|
|
872
|
+
}, Ot = {
|
|
451
873
|
key: 1,
|
|
452
874
|
class: "text-xs text-gray-400 truncate"
|
|
453
|
-
},
|
|
875
|
+
}, jt = {
|
|
454
876
|
key: 2,
|
|
455
877
|
class: "text-xs text-gray-400 flex gap-2 mt-1"
|
|
456
|
-
},
|
|
878
|
+
}, Pt = {
|
|
457
879
|
key: 1,
|
|
458
880
|
class: "w-2 h-2 rounded-full bg-green-500"
|
|
459
|
-
},
|
|
881
|
+
}, Nt = /* @__PURE__ */ w({
|
|
460
882
|
__name: "DeviceCard",
|
|
461
883
|
props: {
|
|
462
884
|
icon: {},
|
|
@@ -472,40 +894,40 @@ const ne = ["src", "alt"], C = /* @__PURE__ */ g({
|
|
|
472
894
|
clickable: { type: Boolean, default: !1 }
|
|
473
895
|
},
|
|
474
896
|
emits: ["action", "click"],
|
|
475
|
-
setup(e, { emit:
|
|
476
|
-
const t =
|
|
897
|
+
setup(e, { emit: i }) {
|
|
898
|
+
const t = i, a = () => {
|
|
477
899
|
t("action");
|
|
478
|
-
},
|
|
900
|
+
}, s = () => {
|
|
479
901
|
t("click");
|
|
480
902
|
};
|
|
481
|
-
return (
|
|
482
|
-
class:
|
|
483
|
-
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
|
|
484
906
|
}, [
|
|
485
|
-
|
|
486
|
-
|
|
907
|
+
h("div", Dt, [
|
|
908
|
+
h("img", {
|
|
487
909
|
src: e.icon,
|
|
488
910
|
alt: e.title,
|
|
489
911
|
class: "h-7 w-7 shrink-0"
|
|
490
|
-
}, null, 8,
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
e.subtitle ? (
|
|
494
|
-
e.metadata ? (
|
|
495
|
-
e.extraInfo && e.extraInfo.length > 0 ? (
|
|
496
|
-
(
|
|
497
|
-
])) :
|
|
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)
|
|
498
920
|
])
|
|
499
921
|
]),
|
|
500
|
-
e.showActionButton ? (
|
|
922
|
+
e.showActionButton ? (l(), o("button", {
|
|
501
923
|
key: 0,
|
|
502
924
|
class: "bg-vsk-primary rounded-vsk px-4 py-2 text-sm font-semibold cursor-pointer hover:opacity-70",
|
|
503
|
-
onClick:
|
|
504
|
-
},
|
|
505
|
-
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)
|
|
506
928
|
], 2));
|
|
507
929
|
}
|
|
508
|
-
}),
|
|
930
|
+
}), Rt = ["for"], Ft = /* @__PURE__ */ w({
|
|
509
931
|
__name: "FormGroup",
|
|
510
932
|
props: {
|
|
511
933
|
label: {},
|
|
@@ -514,45 +936,45 @@ const ne = ["src", "alt"], C = /* @__PURE__ */ g({
|
|
|
514
936
|
labelClass: { default: () => ({}) }
|
|
515
937
|
},
|
|
516
938
|
setup(e) {
|
|
517
|
-
return (
|
|
518
|
-
class:
|
|
939
|
+
return (i, t) => (l(), o("div", {
|
|
940
|
+
class: m(["flex flex-col gap-2", e.customClass])
|
|
519
941
|
}, [
|
|
520
|
-
e.label ? (
|
|
942
|
+
e.label ? (l(), o("label", {
|
|
521
943
|
key: 0,
|
|
522
944
|
for: e.htmlFor,
|
|
523
|
-
class:
|
|
524
|
-
},
|
|
525
|
-
|
|
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)
|
|
526
948
|
], 2));
|
|
527
949
|
}
|
|
528
|
-
}),
|
|
950
|
+
}), Wt = /* @__PURE__ */ U(Ft, [["__scopeId", "data-v-c0d9d9cb"]]), Ut = /* @__PURE__ */ w({
|
|
529
951
|
__name: "ListCard",
|
|
530
952
|
props: {
|
|
531
953
|
clickable: { type: Boolean, default: !1 },
|
|
532
954
|
customClass: { default: () => ({}) }
|
|
533
955
|
},
|
|
534
956
|
emits: ["click"],
|
|
535
|
-
setup(e, { emit:
|
|
536
|
-
const t = e,
|
|
537
|
-
t.clickable &&
|
|
957
|
+
setup(e, { emit: i }) {
|
|
958
|
+
const t = e, a = i, s = () => {
|
|
959
|
+
t.clickable && a("click");
|
|
538
960
|
};
|
|
539
|
-
return (
|
|
540
|
-
class:
|
|
961
|
+
return (r, c) => (l(), o("div", {
|
|
962
|
+
class: m([
|
|
541
963
|
"flex items-center justify-between background p-3 rounded-vsk border border-vsk-primary/70 transition-colors duration-200",
|
|
542
964
|
{
|
|
543
965
|
"hover:bg-vsk-primary/5 cursor-pointer": t.clickable
|
|
544
966
|
},
|
|
545
967
|
e.customClass
|
|
546
968
|
]),
|
|
547
|
-
onClick:
|
|
969
|
+
onClick: s
|
|
548
970
|
}, [
|
|
549
|
-
|
|
971
|
+
z(r.$slots, "default", {}, void 0, !0)
|
|
550
972
|
], 2));
|
|
551
973
|
}
|
|
552
|
-
}),
|
|
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 = {
|
|
553
975
|
key: 1,
|
|
554
976
|
class: "w-8 h-8 flex items-center justify-center"
|
|
555
|
-
},
|
|
977
|
+
}, qt = ["src", "alt"], Ht = ["min", "max", "value"], Jt = /* @__PURE__ */ w({
|
|
556
978
|
__name: "SliderControl",
|
|
557
979
|
props: {
|
|
558
980
|
icon: {},
|
|
@@ -566,50 +988,50 @@ const ne = ["src", "alt"], C = /* @__PURE__ */ g({
|
|
|
566
988
|
getPercentageClass: { type: Function, default: () => "" }
|
|
567
989
|
},
|
|
568
990
|
emits: ["update:modelValue", "buttonClick"],
|
|
569
|
-
setup(e, { emit:
|
|
570
|
-
const t = e,
|
|
991
|
+
setup(e, { emit: i }) {
|
|
992
|
+
const t = e, a = i, s = y(() => {
|
|
571
993
|
if (t.max <= t.min) return 0;
|
|
572
|
-
const
|
|
573
|
-
return Math.round(
|
|
574
|
-
}),
|
|
575
|
-
const
|
|
576
|
-
|
|
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));
|
|
577
999
|
}, u = () => {
|
|
578
|
-
|
|
1000
|
+
a("buttonClick");
|
|
579
1001
|
};
|
|
580
|
-
return (
|
|
581
|
-
e.showButton ? (
|
|
1002
|
+
return (b, g) => (l(), o("div", Xt, [
|
|
1003
|
+
e.showButton ? (l(), o("button", {
|
|
582
1004
|
key: 0,
|
|
583
1005
|
onClick: u,
|
|
584
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"
|
|
585
1007
|
}, [
|
|
586
|
-
|
|
1008
|
+
h("img", {
|
|
587
1009
|
src: e.icon,
|
|
588
1010
|
alt: e.alt,
|
|
589
1011
|
title: e.tooltip,
|
|
590
|
-
class:
|
|
591
|
-
}, null, 10,
|
|
592
|
-
])) : (
|
|
593
|
-
|
|
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", {
|
|
594
1016
|
src: e.icon,
|
|
595
1017
|
alt: e.alt,
|
|
596
1018
|
class: "w-6 h-6 transition-all duration-200"
|
|
597
|
-
}, null, 8,
|
|
1019
|
+
}, null, 8, qt)
|
|
598
1020
|
])),
|
|
599
|
-
|
|
1021
|
+
h("input", {
|
|
600
1022
|
type: "range",
|
|
601
1023
|
min: e.min,
|
|
602
1024
|
max: e.max,
|
|
603
1025
|
value: e.modelValue,
|
|
604
|
-
onInput:
|
|
1026
|
+
onInput: c,
|
|
605
1027
|
class: "flex-1 transition-all duration-200 hover:scale-105"
|
|
606
|
-
}, null, 40,
|
|
607
|
-
|
|
608
|
-
class:
|
|
609
|
-
},
|
|
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)
|
|
610
1032
|
]));
|
|
611
1033
|
}
|
|
612
|
-
}),
|
|
1034
|
+
}), Qt = ["disabled"], Zt = /* @__PURE__ */ w({
|
|
613
1035
|
__name: "SwitchToggle",
|
|
614
1036
|
props: {
|
|
615
1037
|
isOn: { type: Boolean },
|
|
@@ -620,15 +1042,15 @@ const ne = ["src", "alt"], C = /* @__PURE__ */ g({
|
|
|
620
1042
|
customClass: { default: "" }
|
|
621
1043
|
},
|
|
622
1044
|
emits: ["toggle"],
|
|
623
|
-
setup(e, { emit:
|
|
624
|
-
const t = e,
|
|
625
|
-
|
|
1045
|
+
setup(e, { emit: i }) {
|
|
1046
|
+
const t = e, a = i, s = () => {
|
|
1047
|
+
a("toggle", !t.isOn);
|
|
626
1048
|
};
|
|
627
|
-
return (
|
|
1049
|
+
return (r, c) => (l(), o("button", {
|
|
628
1050
|
type: "button",
|
|
629
|
-
onClick:
|
|
1051
|
+
onClick: s,
|
|
630
1052
|
disabled: e.disabled,
|
|
631
|
-
class:
|
|
1053
|
+
class: m([
|
|
632
1054
|
"relative inline-flex items-center rounded-full transition-colors",
|
|
633
1055
|
e.size === "small" ? "h-6 w-11" : "h-7 w-12",
|
|
634
1056
|
e.isOn ? e.activeClass : e.inactiveClass,
|
|
@@ -636,16 +1058,16 @@ const ne = ["src", "alt"], C = /* @__PURE__ */ g({
|
|
|
636
1058
|
e.customClass
|
|
637
1059
|
])
|
|
638
1060
|
}, [
|
|
639
|
-
|
|
640
|
-
class:
|
|
1061
|
+
h("span", {
|
|
1062
|
+
class: m([
|
|
641
1063
|
"inline-block transform rounded-full bg-white shadow transition-transform",
|
|
642
1064
|
e.size === "small" ? "h-4 w-4" : "h-6 w-6",
|
|
643
1065
|
e.isOn ? e.size === "small" ? "translate-x-6" : "translate-x-5" : "translate-x-1"
|
|
644
1066
|
])
|
|
645
1067
|
}, null, 2)
|
|
646
|
-
], 10,
|
|
1068
|
+
], 10, Qt));
|
|
647
1069
|
}
|
|
648
|
-
}),
|
|
1070
|
+
}), _t = ["disabled"], ea = ["src", "alt", "title"], ta = /* @__PURE__ */ w({
|
|
649
1071
|
__name: "ToggleControl",
|
|
650
1072
|
props: {
|
|
651
1073
|
icon: {},
|
|
@@ -657,13 +1079,13 @@ const ne = ["src", "alt"], C = /* @__PURE__ */ g({
|
|
|
657
1079
|
customClass: { default: () => ({}) }
|
|
658
1080
|
},
|
|
659
1081
|
emits: ["click"],
|
|
660
|
-
setup(e, { emit:
|
|
661
|
-
const t =
|
|
1082
|
+
setup(e, { emit: i }) {
|
|
1083
|
+
const t = i, a = () => {
|
|
662
1084
|
t("click");
|
|
663
1085
|
};
|
|
664
|
-
return (
|
|
665
|
-
onClick:
|
|
666
|
-
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", {
|
|
667
1089
|
"animate-pulse": e.isLoading,
|
|
668
1090
|
"ring-2 ring-primary dark:ring-primary-dark": e.isActive,
|
|
669
1091
|
"opacity-60": !e.isActive,
|
|
@@ -671,23 +1093,23 @@ const ne = ["src", "alt"], C = /* @__PURE__ */ g({
|
|
|
671
1093
|
}]),
|
|
672
1094
|
disabled: e.isLoading
|
|
673
1095
|
}, [
|
|
674
|
-
|
|
1096
|
+
h("img", {
|
|
675
1097
|
src: e.icon,
|
|
676
1098
|
alt: e.alt,
|
|
677
1099
|
title: e.tooltip,
|
|
678
|
-
class:
|
|
1100
|
+
class: m(["m-auto w-12.5 h-12.5 transition-all duration-300 group-hover:scale-110 relative z-10", {
|
|
679
1101
|
"animate-spin": e.isLoading,
|
|
680
1102
|
"filter brightness-75": !e.isActive,
|
|
681
1103
|
"drop-shadow-lg": e.isActive,
|
|
682
1104
|
...e.iconClass
|
|
683
1105
|
}])
|
|
684
|
-
}, null, 10,
|
|
685
|
-
], 10,
|
|
1106
|
+
}, null, 10, ea)
|
|
1107
|
+
], 10, _t));
|
|
686
1108
|
}
|
|
687
|
-
}),
|
|
1109
|
+
}), aa = ["title"], la = ["src", "alt"], na = {
|
|
688
1110
|
key: 0,
|
|
689
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"
|
|
690
|
-
},
|
|
1112
|
+
}, oa = /* @__PURE__ */ w({
|
|
691
1113
|
__name: "TrayIconButton",
|
|
692
1114
|
props: {
|
|
693
1115
|
icon: {},
|
|
@@ -701,74 +1123,91 @@ const ne = ["src", "alt"], C = /* @__PURE__ */ g({
|
|
|
701
1123
|
customTooltipText: { default: "" }
|
|
702
1124
|
},
|
|
703
1125
|
emits: ["click"],
|
|
704
|
-
setup(e, { emit:
|
|
705
|
-
const t =
|
|
1126
|
+
setup(e, { emit: i }) {
|
|
1127
|
+
const t = i, a = S(!1), s = () => {
|
|
706
1128
|
t("click");
|
|
707
1129
|
};
|
|
708
|
-
return (
|
|
709
|
-
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]),
|
|
710
1132
|
title: e.tooltip,
|
|
711
|
-
onClick:
|
|
712
|
-
onMouseenter:
|
|
713
|
-
onMouseleave:
|
|
1133
|
+
onClick: s,
|
|
1134
|
+
onMouseenter: c[0] || (c[0] = (u) => a.value = !0),
|
|
1135
|
+
onMouseleave: c[1] || (c[1] = (u) => a.value = !1)
|
|
714
1136
|
}, [
|
|
715
|
-
|
|
1137
|
+
h("img", {
|
|
716
1138
|
src: e.icon,
|
|
717
1139
|
alt: e.alt,
|
|
718
|
-
class:
|
|
719
|
-
}, null, 10,
|
|
720
|
-
e.badge !== null && e.badge > 0 ? (
|
|
721
|
-
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", {
|
|
722
1144
|
key: 1,
|
|
723
|
-
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", [
|
|
724
1146
|
e.tooltipClass,
|
|
725
1147
|
{
|
|
726
|
-
"opacity-0 -translate-y-2": !
|
|
727
|
-
"opacity-100 translate-y-0":
|
|
1148
|
+
"opacity-0 -translate-y-2": !a.value,
|
|
1149
|
+
"opacity-100 translate-y-0": a.value
|
|
728
1150
|
}
|
|
729
1151
|
]])
|
|
730
|
-
},
|
|
731
|
-
|
|
732
|
-
], 42,
|
|
1152
|
+
}, k(e.customTooltipText), 3)) : v("", !0),
|
|
1153
|
+
z(r.$slots, "default")
|
|
1154
|
+
], 42, aa));
|
|
733
1155
|
}
|
|
734
|
-
}),
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
1156
|
+
}), sa = [
|
|
1157
|
+
Ue,
|
|
1158
|
+
ne,
|
|
1159
|
+
le,
|
|
1160
|
+
qe,
|
|
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 = {
|
|
751
1178
|
install(e) {
|
|
752
|
-
|
|
753
|
-
e.component(
|
|
1179
|
+
sa.forEach((i) => {
|
|
1180
|
+
e.component(i.name, i);
|
|
754
1181
|
});
|
|
755
1182
|
}
|
|
756
1183
|
};
|
|
757
1184
|
export {
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
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
|
|
774
1213
|
};
|