@vasakgroup/vue-libvasak 0.7.1 → 0.12.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 +5 -0
- package/dist/types/dialog/Dialog.vue.d.ts +22 -0
- package/dist/types/dialog/DialogContent.vue.d.ts +13 -0
- package/dist/types/dialog/DialogDescription.vue.d.ts +13 -0
- package/dist/types/dialog/DialogFooter.vue.d.ts +13 -0
- package/dist/types/dialog/DialogHeader.vue.d.ts +13 -0
- package/dist/types/dialog/DialogTitle.vue.d.ts +13 -0
- package/dist/types/dialog/tipos.d.ts +28 -0
- package/dist/types/feedback/AlertMessage.vue.d.ts +19 -0
- package/dist/types/feedback/EmptyState.vue.d.ts +24 -0
- package/dist/types/feedback/ToastArea.vue.d.ts +36 -0
- package/dist/types/feedback/tonos.d.ts +21 -0
- package/dist/types/forms/ProgressBar.vue.d.ts +9 -0
- package/dist/types/forms/TextInput.vue.d.ts +38 -0
- package/dist/types/index.d.ts +26 -1
- package/dist/types/internos/iconoDelTema.d.ts +5 -9
- package/dist/types/search/SearchField.vue.d.ts +77 -0
- package/dist/types/search/SearchSelect.vue.d.ts +45 -0
- package/dist/types/search/buscar.d.ts +42 -0
- package/dist/types/search/ids.d.ts +1 -0
- package/dist/types/tooltip/Tooltip.vue.d.ts +22 -0
- package/dist/types/tooltip/TooltipContent.vue.d.ts +22 -0
- package/dist/types/tooltip/TooltipTrigger.vue.d.ts +13 -0
- package/dist/types/tooltip/tipos.d.ts +32 -0
- package/dist/types/window/AppBar.vue.d.ts +0 -3
- package/dist/types/window/WindowControls.vue.d.ts +8 -3
- package/dist/types/window/WindowFrame.vue.d.ts +6 -3
- package/dist/vue-libvasak.es.js +1635 -838
- package/dist/vue-libvasak.umd.js +1 -1
- package/package.json +5 -3
package/dist/vue-libvasak.es.js
CHANGED
|
@@ -1,31 +1,52 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { listen as
|
|
3
|
-
import { getSymbolSource as
|
|
4
|
-
import { getCurrentWindow as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { ref as x, onMounted as _, onUnmounted as ve, watch as K, defineComponent as E, toRef as Te, computed as p, createElementBlock as s, unref as F, openBlock as r, normalizeStyle as se, createCommentVNode as C, createElementVNode as B, createVNode as q, toDisplayString as V, normalizeClass as k, renderSlot as A, createBlock as Q, onBeforeUnmount as ie, Fragment as J, renderList as te, withCtx as W, mergeModels as Be, useAttrs as $e, useId as lt, useModel as ot, withDirectives as Ce, mergeProps as ae, isRef as rt, vModelSelect as st, inject as be, getCurrentInstance as je, provide as ue, createTextVNode as Ee, toHandlers as Fe, createSlots as it, withModifiers as M, withKeys as j, Teleport as ce, Transition as pe, nextTick as Y, TransitionGroup as ut, vShow as qe, cloneVNode as ct, h as dt, Comment as ft, Text as mt } from "vue";
|
|
2
|
+
import { listen as vt } from "@tauri-apps/api/event";
|
|
3
|
+
import { getSymbolSource as bt, getIconSource as pt } from "@vasakgroup/plugin-vicons";
|
|
4
|
+
import { getCurrentWindow as gt } from "@tauri-apps/api/window";
|
|
5
|
+
import { useI18n as yt } from "@vasakgroup/tauri-plugin-i18n";
|
|
6
|
+
const ht = "vicons:theme-changed", ke = /* @__PURE__ */ new Map(), oe = /* @__PURE__ */ new Map(), fe = x(0);
|
|
7
|
+
let re = 0, me = null, le = null;
|
|
8
|
+
function xt() {
|
|
9
|
+
ke.clear(), oe.clear(), fe.value++;
|
|
10
|
+
}
|
|
11
|
+
function kt() {
|
|
12
|
+
return re++, me || le ? le ?? Promise.resolve() : (le = vt(ht, xt).then((e) => {
|
|
13
|
+
re <= 0 ? e() : me = e, le = null;
|
|
14
|
+
}), le);
|
|
15
|
+
}
|
|
16
|
+
function wt() {
|
|
17
|
+
re--, !(re > 0) && (re = 0, me?.(), me = null);
|
|
18
|
+
}
|
|
19
|
+
function $t(e, n) {
|
|
20
|
+
const t = `${n}:${e}`, a = ke.get(t);
|
|
21
|
+
if (a !== void 0)
|
|
22
|
+
return Promise.resolve(a);
|
|
23
|
+
const l = oe.get(t);
|
|
24
|
+
if (l)
|
|
25
|
+
return l;
|
|
26
|
+
const o = fe.value, u = (n === "symbol" ? bt(e) : pt(e)).then((i) => (fe.value === o && ke.set(t, i), i)).finally(() => {
|
|
27
|
+
oe.get(t) === u && oe.delete(t);
|
|
28
|
+
});
|
|
29
|
+
return oe.set(t, u), u;
|
|
30
|
+
}
|
|
31
|
+
function Ct(e, n) {
|
|
32
|
+
const t = x("");
|
|
33
|
+
let a = !1, l = 0;
|
|
34
|
+
async function o() {
|
|
35
|
+
const u = ++l, i = e.value;
|
|
36
|
+
if (!i) {
|
|
11
37
|
t.value = "";
|
|
12
38
|
return;
|
|
13
39
|
}
|
|
14
|
-
const
|
|
15
|
-
u ===
|
|
40
|
+
const m = await $t(i, n.value);
|
|
41
|
+
u === l && !a && (t.value = m);
|
|
16
42
|
}
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
a = u, await c();
|
|
24
|
-
}), je(() => {
|
|
25
|
-
o = !0, a?.();
|
|
26
|
-
}), X(e, c), t;
|
|
43
|
+
return _(async () => {
|
|
44
|
+
await kt(), a || await o();
|
|
45
|
+
}), ve(() => {
|
|
46
|
+
a = !0, wt();
|
|
47
|
+
}), K([e, n], o), K(fe, o), t;
|
|
27
48
|
}
|
|
28
|
-
const
|
|
49
|
+
const Et = ["src", "alt"], H = /* @__PURE__ */ E({
|
|
29
50
|
__name: "ThemeIcon",
|
|
30
51
|
props: {
|
|
31
52
|
name: {},
|
|
@@ -34,23 +55,23 @@ const tt = ["src", "alt"], N = /* @__PURE__ */ E({
|
|
|
34
55
|
alt: { default: "" }
|
|
35
56
|
},
|
|
36
57
|
setup(e) {
|
|
37
|
-
const n = e, t =
|
|
38
|
-
return (
|
|
58
|
+
const n = e, t = Ct(Te(n, "name"), Te(n, "type")), a = p(() => `${n.size}px`);
|
|
59
|
+
return (l, o) => F(t) ? (r(), s("img", {
|
|
39
60
|
key: 0,
|
|
40
|
-
src:
|
|
61
|
+
src: F(t),
|
|
41
62
|
alt: e.alt,
|
|
42
63
|
style: se({ width: a.value, height: a.value }),
|
|
43
64
|
class: "shrink-0 object-contain"
|
|
44
|
-
}, null, 12,
|
|
65
|
+
}, null, 12, Et)) : (r(), s("span", {
|
|
45
66
|
key: 1,
|
|
46
67
|
style: se({ width: a.value, height: a.value }),
|
|
47
68
|
class: "shrink-0"
|
|
48
69
|
}, null, 4));
|
|
49
70
|
}
|
|
50
|
-
}),
|
|
71
|
+
}), Dt = { class: "flex flex-col gap-2" }, zt = ["aria-expanded"], Lt = {
|
|
51
72
|
key: 1,
|
|
52
73
|
class: "flex flex-col gap-1"
|
|
53
|
-
},
|
|
74
|
+
}, Re = /* @__PURE__ */ E({
|
|
54
75
|
__name: "SideGroup",
|
|
55
76
|
props: {
|
|
56
77
|
title: {},
|
|
@@ -58,40 +79,40 @@ const tt = ["src", "alt"], N = /* @__PURE__ */ E({
|
|
|
58
79
|
defaultOpen: { type: Boolean, default: !0 }
|
|
59
80
|
},
|
|
60
81
|
setup(e) {
|
|
61
|
-
const n = e, t =
|
|
62
|
-
return
|
|
82
|
+
const n = e, t = x(n.defaultOpen);
|
|
83
|
+
return K(
|
|
63
84
|
() => n.collapsed,
|
|
64
85
|
(a) => {
|
|
65
86
|
a && (t.value = !0);
|
|
66
87
|
}
|
|
67
|
-
), (a,
|
|
68
|
-
e.collapsed ?
|
|
88
|
+
), (a, l) => (r(), s("section", Dt, [
|
|
89
|
+
e.collapsed ? C("", !0) : (r(), s("button", {
|
|
69
90
|
key: 0,
|
|
70
91
|
type: "button",
|
|
71
92
|
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
93
|
"aria-expanded": t.value,
|
|
73
|
-
onClick:
|
|
94
|
+
onClick: l[0] || (l[0] = (o) => t.value = !t.value)
|
|
74
95
|
}, [
|
|
75
|
-
|
|
76
|
-
|
|
96
|
+
B("span", null, V(e.title), 1),
|
|
97
|
+
q(H, {
|
|
77
98
|
name: "pan-down-symbolic",
|
|
78
99
|
type: "symbol",
|
|
79
100
|
size: 12,
|
|
80
|
-
class:
|
|
101
|
+
class: k(["transition-transform duration-200", t.value ? "" : "-rotate-90"])
|
|
81
102
|
}, null, 8, ["class"])
|
|
82
|
-
], 8,
|
|
83
|
-
t.value || e.collapsed ? (
|
|
84
|
-
|
|
85
|
-
])) :
|
|
103
|
+
], 8, zt)),
|
|
104
|
+
t.value || e.collapsed ? (r(), s("div", Lt, [
|
|
105
|
+
A(a.$slots, "default")
|
|
106
|
+
])) : C("", !0)
|
|
86
107
|
]));
|
|
87
108
|
}
|
|
88
|
-
}),
|
|
109
|
+
}), Tt = ["title", "aria-label", "disabled", "aria-current"], Bt = { key: 1 }, At = {
|
|
89
110
|
key: 0,
|
|
90
111
|
class: "min-w-0 flex-1 truncate font-medium"
|
|
91
|
-
},
|
|
112
|
+
}, St = {
|
|
92
113
|
key: 1,
|
|
93
114
|
class: "rounded-corner bg-ui-surface px-2 py-0.5 font-semibold text-tx-muted text-xs"
|
|
94
|
-
},
|
|
115
|
+
}, Ne = /* @__PURE__ */ E({
|
|
95
116
|
__name: "SideButton",
|
|
96
117
|
props: {
|
|
97
118
|
label: {},
|
|
@@ -103,49 +124,49 @@ const tt = ["src", "alt"], N = /* @__PURE__ */ E({
|
|
|
103
124
|
},
|
|
104
125
|
emits: ["click"],
|
|
105
126
|
setup(e) {
|
|
106
|
-
return (n, t) => (
|
|
127
|
+
return (n, t) => (r(), s("button", {
|
|
107
128
|
type: "button",
|
|
108
129
|
title: e.collapsed ? e.label : void 0,
|
|
109
130
|
"aria-label": e.collapsed ? e.label : void 0,
|
|
110
131
|
disabled: e.disabled,
|
|
111
132
|
"aria-current": e.active ? "page" : void 0,
|
|
112
|
-
class:
|
|
133
|
+
class: k(["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
134
|
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
135
|
e.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer",
|
|
115
136
|
e.collapsed ? "justify-center px-2" : ""
|
|
116
137
|
]]),
|
|
117
138
|
onClick: t[0] || (t[0] = (a) => n.$emit("click"))
|
|
118
139
|
}, [
|
|
119
|
-
|
|
120
|
-
class:
|
|
140
|
+
B("span", {
|
|
141
|
+
class: k(["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
142
|
"aria-hidden": "true"
|
|
122
143
|
}, [
|
|
123
|
-
e.icon ? (
|
|
144
|
+
e.icon ? (r(), Q(H, {
|
|
124
145
|
key: 0,
|
|
125
146
|
name: e.icon,
|
|
126
147
|
size: 20
|
|
127
|
-
}, null, 8, ["name"])) : (
|
|
148
|
+
}, null, 8, ["name"])) : (r(), s("span", Bt, V(e.label.charAt(0).toUpperCase()), 1))
|
|
128
149
|
], 2),
|
|
129
|
-
e.collapsed ?
|
|
130
|
-
!e.collapsed && e.badge !== "" ? (
|
|
131
|
-
], 10,
|
|
150
|
+
e.collapsed ? C("", !0) : (r(), s("span", At, V(e.label), 1)),
|
|
151
|
+
!e.collapsed && e.badge !== "" ? (r(), s("span", St, V(e.badge), 1)) : C("", !0)
|
|
152
|
+
], 10, Tt));
|
|
132
153
|
}
|
|
133
|
-
}),
|
|
154
|
+
}), Mt = {
|
|
134
155
|
key: 0,
|
|
135
156
|
class: "flex flex-col gap-2 border-ui-border border-b p-2"
|
|
136
|
-
},
|
|
157
|
+
}, Vt = { class: "flex items-center gap-2" }, Ot = ["aria-label", "aria-expanded"], It = {
|
|
137
158
|
key: 0,
|
|
138
159
|
class: "min-w-0 flex-1"
|
|
139
|
-
},
|
|
160
|
+
}, Pt = {
|
|
140
161
|
key: 0,
|
|
141
162
|
class: "truncate font-semibold text-sm"
|
|
142
|
-
},
|
|
163
|
+
}, jt = {
|
|
143
164
|
key: 1,
|
|
144
165
|
class: "truncate text-tx-muted text-xs"
|
|
145
|
-
},
|
|
166
|
+
}, Ft = { key: 0 }, qt = {
|
|
146
167
|
key: 1,
|
|
147
168
|
class: "flex border-ui-border border-b p-2"
|
|
148
|
-
},
|
|
169
|
+
}, Rt = ["aria-label", "aria-expanded"], Nt = { class: "flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-2" }, Ae = "hidden h-8 w-8 shrink-0 items-center justify-center rounded-corner border border-ui-border bg-ui-surface/70 transition-colors hover:bg-ui-surface md:inline-flex", Se = 767, Ht = /* @__PURE__ */ E({
|
|
149
170
|
__name: "SideBar",
|
|
150
171
|
props: {
|
|
151
172
|
title: { default: "" },
|
|
@@ -158,100 +179,100 @@ const tt = ["src", "alt"], N = /* @__PURE__ */ E({
|
|
|
158
179
|
},
|
|
159
180
|
emits: ["update:modelValue", "update:collapsed", "change"],
|
|
160
181
|
setup(e, { expose: n, emit: t }) {
|
|
161
|
-
const a = e,
|
|
162
|
-
let
|
|
163
|
-
const v =
|
|
164
|
-
|
|
165
|
-
function
|
|
182
|
+
const a = e, l = t, o = x(a.collapsed ?? !1), u = x(!1);
|
|
183
|
+
let i = null, m = null;
|
|
184
|
+
const v = p(() => u.value || o.value), f = p(() => !!(a.title || a.subtitle));
|
|
185
|
+
p(() => a.categories.length > 0);
|
|
186
|
+
function T() {
|
|
166
187
|
return document.documentElement?.clientWidth || window.innerWidth;
|
|
167
188
|
}
|
|
168
|
-
function
|
|
169
|
-
|
|
189
|
+
function D() {
|
|
190
|
+
u.value = T() <= Se;
|
|
170
191
|
}
|
|
171
|
-
function
|
|
172
|
-
|
|
192
|
+
function z() {
|
|
193
|
+
o.value = !o.value, l("update:collapsed", o.value);
|
|
173
194
|
}
|
|
174
|
-
function
|
|
175
|
-
|
|
195
|
+
function g(d) {
|
|
196
|
+
l("update:modelValue", d), l("change", d);
|
|
176
197
|
}
|
|
177
|
-
return
|
|
198
|
+
return K(
|
|
178
199
|
() => a.collapsed,
|
|
179
|
-
(
|
|
180
|
-
|
|
200
|
+
(d) => {
|
|
201
|
+
d !== void 0 && (o.value = d);
|
|
181
202
|
}
|
|
182
|
-
),
|
|
183
|
-
|
|
184
|
-
}),
|
|
185
|
-
|
|
186
|
-
}), n({ collapsed: v }), (
|
|
187
|
-
class:
|
|
203
|
+
), _(() => {
|
|
204
|
+
i = window.matchMedia(`(max-width: ${Se}px)`), D(), i.addEventListener("change", D), window.addEventListener("resize", D), typeof ResizeObserver < "u" && document.documentElement && (m = new ResizeObserver(D), m.observe(document.documentElement));
|
|
205
|
+
}), ie(() => {
|
|
206
|
+
i?.removeEventListener("change", D), window.removeEventListener("resize", D), m?.disconnect(), m = null;
|
|
207
|
+
}), n({ collapsed: v }), (d, S) => (r(), s("aside", {
|
|
208
|
+
class: k(["relative z-30 flex h-full shrink-0 flex-col rounded-corner border border-ui-border bg-ui-surface/70 transition-all duration-300", ["w-[84px]", v.value ? "md:w-[84px]" : "md:w-72"]])
|
|
188
209
|
}, [
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
210
|
+
f.value || d.$slots.header ? (r(), s("header", Mt, [
|
|
211
|
+
B("div", Vt, [
|
|
212
|
+
B("button", {
|
|
192
213
|
type: "button",
|
|
193
|
-
class:
|
|
214
|
+
class: k(Ae),
|
|
194
215
|
"aria-label": v.value ? e.expandLabel : e.collapseLabel,
|
|
195
216
|
"aria-expanded": !v.value,
|
|
196
|
-
onClick:
|
|
217
|
+
onClick: z
|
|
197
218
|
}, [
|
|
198
|
-
|
|
219
|
+
q(H, {
|
|
199
220
|
name: v.value ? "pan-end-symbolic" : "pan-start-symbolic",
|
|
200
221
|
type: "symbol",
|
|
201
222
|
size: 16
|
|
202
223
|
}, null, 8, ["name"])
|
|
203
|
-
], 8,
|
|
204
|
-
|
|
205
|
-
e.title ? (
|
|
206
|
-
e.subtitle ? (
|
|
207
|
-
])) :
|
|
224
|
+
], 8, Ot),
|
|
225
|
+
f.value && !v.value ? (r(), s("div", It, [
|
|
226
|
+
e.title ? (r(), s("p", Pt, V(e.title), 1)) : C("", !0),
|
|
227
|
+
e.subtitle ? (r(), s("p", jt, V(e.subtitle), 1)) : C("", !0)
|
|
228
|
+
])) : C("", !0)
|
|
208
229
|
]),
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
])) :
|
|
212
|
-
])) : (
|
|
213
|
-
|
|
230
|
+
d.$slots.header && !v.value ? (r(), s("div", Ft, [
|
|
231
|
+
A(d.$slots, "header", { collapsed: v.value })
|
|
232
|
+
])) : C("", !0)
|
|
233
|
+
])) : (r(), s("div", qt, [
|
|
234
|
+
B("button", {
|
|
214
235
|
type: "button",
|
|
215
|
-
class:
|
|
236
|
+
class: k(Ae),
|
|
216
237
|
"aria-label": v.value ? e.expandLabel : e.collapseLabel,
|
|
217
238
|
"aria-expanded": !v.value,
|
|
218
|
-
onClick:
|
|
239
|
+
onClick: z
|
|
219
240
|
}, [
|
|
220
|
-
|
|
241
|
+
q(H, {
|
|
221
242
|
name: v.value ? "pan-end-symbolic" : "pan-start-symbolic",
|
|
222
243
|
type: "symbol",
|
|
223
244
|
size: 16
|
|
224
245
|
}, null, 8, ["name"])
|
|
225
|
-
], 8,
|
|
246
|
+
], 8, Rt)
|
|
226
247
|
])),
|
|
227
|
-
|
|
228
|
-
(
|
|
229
|
-
key:
|
|
230
|
-
title:
|
|
248
|
+
B("div", Nt, [
|
|
249
|
+
(r(!0), s(J, null, te(e.categories, (I) => (r(), Q(Re, {
|
|
250
|
+
key: I.id,
|
|
251
|
+
title: I.title,
|
|
231
252
|
collapsed: v.value
|
|
232
253
|
}, {
|
|
233
|
-
default:
|
|
234
|
-
(
|
|
235
|
-
key:
|
|
236
|
-
label:
|
|
237
|
-
icon:
|
|
238
|
-
badge:
|
|
239
|
-
disabled:
|
|
254
|
+
default: W(() => [
|
|
255
|
+
(r(!0), s(J, null, te(I.items, (w) => (r(), Q(Ne, {
|
|
256
|
+
key: w.id,
|
|
257
|
+
label: w.label,
|
|
258
|
+
icon: w.icon,
|
|
259
|
+
badge: w.badge,
|
|
260
|
+
disabled: w.disabled,
|
|
240
261
|
collapsed: v.value,
|
|
241
|
-
active: e.modelValue ===
|
|
242
|
-
onClick: (
|
|
262
|
+
active: e.modelValue === w.id,
|
|
263
|
+
onClick: (c) => g(w.id)
|
|
243
264
|
}, null, 8, ["label", "icon", "badge", "disabled", "collapsed", "active", "onClick"]))), 128))
|
|
244
265
|
]),
|
|
245
266
|
_: 2
|
|
246
267
|
}, 1032, ["title", "collapsed"]))), 128)),
|
|
247
|
-
|
|
268
|
+
A(d.$slots, "default", { collapsed: v.value })
|
|
248
269
|
])
|
|
249
270
|
], 2));
|
|
250
271
|
}
|
|
251
|
-
}),
|
|
272
|
+
}), Ut = { class: "flex min-w-0 flex-col gap-1" }, Wt = ["for"], Kt = { class: "relative flex min-w-0 items-center" }, Gt = ["id"], Qt = /* @__PURE__ */ E({
|
|
252
273
|
inheritAttrs: !1,
|
|
253
274
|
__name: "SelectField",
|
|
254
|
-
props: /* @__PURE__ */
|
|
275
|
+
props: /* @__PURE__ */ Be({
|
|
255
276
|
label: {}
|
|
256
277
|
}, {
|
|
257
278
|
modelValue: {
|
|
@@ -259,32 +280,32 @@ const tt = ["src", "alt"], N = /* @__PURE__ */ E({
|
|
|
259
280
|
},
|
|
260
281
|
modelModifiers: {}
|
|
261
282
|
}),
|
|
262
|
-
emits: /* @__PURE__ */
|
|
283
|
+
emits: /* @__PURE__ */ Be(["change"], ["update:modelValue"]),
|
|
263
284
|
setup(e, { emit: n }) {
|
|
264
|
-
const t = e, a =
|
|
285
|
+
const t = e, a = $e(), l = lt(), o = p(() => a.id ?? l), u = n, [i, m] = ot(e, "modelValue", {
|
|
265
286
|
set(v) {
|
|
266
|
-
return
|
|
287
|
+
return m.number ? Number(v) : v;
|
|
267
288
|
}
|
|
268
289
|
});
|
|
269
|
-
return (v,
|
|
270
|
-
t.label ? (
|
|
290
|
+
return (v, f) => (r(), s("div", Ut, [
|
|
291
|
+
t.label ? (r(), s("label", {
|
|
271
292
|
key: 0,
|
|
272
|
-
for:
|
|
293
|
+
for: o.value,
|
|
273
294
|
class: "text-tx-muted text-xs"
|
|
274
|
-
},
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
id:
|
|
278
|
-
"onUpdate:modelValue":
|
|
295
|
+
}, V(t.label), 9, Wt)) : C("", !0),
|
|
296
|
+
B("div", Kt, [
|
|
297
|
+
Ce(B("select", ae({
|
|
298
|
+
id: o.value,
|
|
299
|
+
"onUpdate:modelValue": f[0] || (f[0] = (T) => rt(i) ? i.value = T : null),
|
|
279
300
|
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
|
-
onChange:
|
|
301
|
+
}, F(a), {
|
|
302
|
+
onChange: f[1] || (f[1] = (T) => u("change", T))
|
|
282
303
|
}), [
|
|
283
|
-
|
|
284
|
-
], 16,
|
|
285
|
-
[
|
|
304
|
+
A(v.$slots, "default")
|
|
305
|
+
], 16, Gt), [
|
|
306
|
+
[st, F(i)]
|
|
286
307
|
]),
|
|
287
|
-
|
|
308
|
+
q(H, {
|
|
288
309
|
name: "pan-down-symbolic",
|
|
289
310
|
type: "symbol",
|
|
290
311
|
size: 14,
|
|
@@ -293,236 +314,239 @@ const tt = ["src", "alt"], N = /* @__PURE__ */ E({
|
|
|
293
314
|
])
|
|
294
315
|
]));
|
|
295
316
|
}
|
|
296
|
-
}),
|
|
297
|
-
function
|
|
317
|
+
}), De = /* @__PURE__ */ Symbol("barra de vasak");
|
|
318
|
+
function we(e) {
|
|
298
319
|
return e === "left" || e === "right" ? "vertical" : "horizontal";
|
|
299
320
|
}
|
|
300
|
-
const
|
|
301
|
-
function
|
|
302
|
-
return typeof e == "string" &&
|
|
321
|
+
const Yt = ["top", "bottom", "left", "right"];
|
|
322
|
+
function Xt(e) {
|
|
323
|
+
return typeof e == "string" && Yt.includes(e);
|
|
303
324
|
}
|
|
304
|
-
function
|
|
305
|
-
const e =
|
|
325
|
+
function de() {
|
|
326
|
+
const e = be(De, null);
|
|
306
327
|
if (e) return e;
|
|
307
|
-
const n =
|
|
328
|
+
const n = x("top");
|
|
308
329
|
return {
|
|
309
330
|
posicion: n,
|
|
310
|
-
orientacion:
|
|
311
|
-
vertical:
|
|
331
|
+
orientacion: p(() => we(n.value)),
|
|
332
|
+
vertical: p(() => we(n.value) === "vertical")
|
|
312
333
|
};
|
|
313
334
|
}
|
|
314
|
-
const
|
|
315
|
-
function
|
|
316
|
-
const t = e?.[
|
|
317
|
-
return
|
|
335
|
+
const ze = ["minimize", "maximize", "close"], _t = "window", Jt = "barPosition";
|
|
336
|
+
function Zt(e) {
|
|
337
|
+
const t = e?.[_t]?.[Jt];
|
|
338
|
+
return Xt(t) ? t : null;
|
|
318
339
|
}
|
|
319
|
-
function
|
|
320
|
-
const n =
|
|
340
|
+
function ea(e = "top") {
|
|
341
|
+
const n = x(e);
|
|
321
342
|
let t = null, a = !1;
|
|
322
|
-
async function
|
|
343
|
+
async function l() {
|
|
323
344
|
try {
|
|
324
|
-
const { readConfig:
|
|
325
|
-
n.value =
|
|
345
|
+
const { readConfig: o } = await import("@vasakgroup/plugin-config-manager"), u = await o();
|
|
346
|
+
n.value = Zt(u) ?? e;
|
|
326
347
|
} catch {
|
|
327
348
|
}
|
|
328
349
|
}
|
|
329
|
-
return
|
|
330
|
-
await
|
|
350
|
+
return _(async () => {
|
|
351
|
+
await l();
|
|
331
352
|
try {
|
|
332
|
-
const { listen:
|
|
333
|
-
|
|
353
|
+
const { listen: o } = await import("@tauri-apps/api/event"), u = await o("config-changed", () => {
|
|
354
|
+
l();
|
|
334
355
|
});
|
|
335
356
|
if (a) {
|
|
336
|
-
|
|
357
|
+
u();
|
|
337
358
|
return;
|
|
338
359
|
}
|
|
339
|
-
t =
|
|
360
|
+
t = u;
|
|
340
361
|
} catch {
|
|
341
362
|
}
|
|
342
|
-
}),
|
|
363
|
+
}), ie(() => {
|
|
343
364
|
a = !0, t?.(), t = null;
|
|
344
365
|
}), n;
|
|
345
366
|
}
|
|
346
|
-
function
|
|
347
|
-
const n =
|
|
367
|
+
function He(e) {
|
|
368
|
+
const n = je(), t = {};
|
|
348
369
|
for (const a of e) {
|
|
349
|
-
const
|
|
350
|
-
n?.vnode.props?.[
|
|
370
|
+
const l = `on${a[0].toUpperCase()}${a.slice(1)}`;
|
|
371
|
+
n?.vnode.props?.[l] && (t[a] = () => n.emit(a));
|
|
351
372
|
}
|
|
352
373
|
return t;
|
|
353
374
|
}
|
|
354
|
-
const
|
|
375
|
+
const ta = ["title", "aria-label"], aa = ["title", "aria-label"], na = ["title", "aria-label"], he = "flex items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 p-1 transition-colors", Ue = /* @__PURE__ */ E({
|
|
355
376
|
__name: "WindowControls",
|
|
356
377
|
props: {
|
|
357
|
-
controls: { default: () =>
|
|
358
|
-
minimizeLabel: {
|
|
359
|
-
maximizeLabel: {
|
|
360
|
-
closeLabel: {
|
|
378
|
+
controls: { default: () => ze },
|
|
379
|
+
minimizeLabel: {},
|
|
380
|
+
maximizeLabel: {},
|
|
381
|
+
closeLabel: {}
|
|
361
382
|
},
|
|
362
383
|
emits: ["minimize", "maximize", "close"],
|
|
363
384
|
setup(e, { emit: n }) {
|
|
364
|
-
const t = e, a = n, { vertical:
|
|
385
|
+
const t = e, { t: a } = yt(), l = p(() => t.minimizeLabel ?? a("ventana.minimizar")), o = p(() => t.maximizeLabel ?? a("ventana.maximizar")), u = p(() => t.closeLabel ?? a("ventana.cerrar")), i = n, { vertical: m } = de(), v = p(() => ({
|
|
365
386
|
minimize: t.controls.includes("minimize"),
|
|
366
387
|
maximize: t.controls.includes("maximize"),
|
|
367
388
|
close: t.controls.includes("close")
|
|
368
389
|
}));
|
|
369
|
-
function
|
|
370
|
-
return
|
|
390
|
+
function f() {
|
|
391
|
+
return gt();
|
|
371
392
|
}
|
|
372
|
-
const
|
|
373
|
-
function
|
|
374
|
-
return !!
|
|
393
|
+
const T = je();
|
|
394
|
+
function D(S) {
|
|
395
|
+
return !!T?.vnode.props?.[`on${S}`];
|
|
375
396
|
}
|
|
376
|
-
function
|
|
377
|
-
if (
|
|
378
|
-
|
|
397
|
+
function z() {
|
|
398
|
+
if (D("Minimize")) return i("minimize");
|
|
399
|
+
f().minimize();
|
|
379
400
|
}
|
|
380
|
-
function
|
|
381
|
-
if (
|
|
382
|
-
|
|
401
|
+
function g() {
|
|
402
|
+
if (D("Maximize")) return i("maximize");
|
|
403
|
+
f().toggleMaximize();
|
|
383
404
|
}
|
|
384
|
-
function
|
|
385
|
-
if (
|
|
386
|
-
|
|
405
|
+
function d() {
|
|
406
|
+
if (D("Close")) return i("close");
|
|
407
|
+
f().close();
|
|
387
408
|
}
|
|
388
|
-
return (
|
|
409
|
+
return (S, I) => e.controls.length ? (r(), s("div", {
|
|
389
410
|
key: 0,
|
|
390
|
-
class:
|
|
411
|
+
class: k(["flex shrink-0 gap-1", F(m) ? "flex-col" : ""]),
|
|
391
412
|
"data-tauri-drag-region": ""
|
|
392
413
|
}, [
|
|
393
|
-
|
|
414
|
+
v.value.minimize ? (r(), s("button", {
|
|
394
415
|
key: 0,
|
|
395
416
|
type: "button",
|
|
396
|
-
class:
|
|
397
|
-
title:
|
|
398
|
-
"aria-label":
|
|
399
|
-
onClick:
|
|
417
|
+
class: k([he, "hover:bg-status-success"]),
|
|
418
|
+
title: l.value,
|
|
419
|
+
"aria-label": l.value,
|
|
420
|
+
onClick: I[0] || (I[0] = (w) => z())
|
|
400
421
|
}, [
|
|
401
|
-
|
|
422
|
+
q(H, {
|
|
402
423
|
name: "window-minimize",
|
|
424
|
+
type: "symbol",
|
|
403
425
|
size: 24
|
|
404
426
|
})
|
|
405
|
-
], 10,
|
|
406
|
-
|
|
427
|
+
], 10, ta)) : C("", !0),
|
|
428
|
+
v.value.maximize ? (r(), s("button", {
|
|
407
429
|
key: 1,
|
|
408
430
|
type: "button",
|
|
409
|
-
class:
|
|
410
|
-
title:
|
|
411
|
-
"aria-label":
|
|
412
|
-
onClick:
|
|
431
|
+
class: k([he, "hover:bg-status-warning"]),
|
|
432
|
+
title: o.value,
|
|
433
|
+
"aria-label": o.value,
|
|
434
|
+
onClick: I[1] || (I[1] = (w) => g())
|
|
413
435
|
}, [
|
|
414
|
-
|
|
436
|
+
q(H, {
|
|
415
437
|
name: "window-maximize",
|
|
438
|
+
type: "symbol",
|
|
416
439
|
size: 24
|
|
417
440
|
})
|
|
418
|
-
], 10,
|
|
419
|
-
|
|
441
|
+
], 10, aa)) : C("", !0),
|
|
442
|
+
v.value.close ? (r(), s("button", {
|
|
420
443
|
key: 2,
|
|
421
444
|
type: "button",
|
|
422
|
-
class:
|
|
423
|
-
title:
|
|
424
|
-
"aria-label":
|
|
425
|
-
onClick:
|
|
445
|
+
class: k([he, "hover:bg-status-error"]),
|
|
446
|
+
title: u.value,
|
|
447
|
+
"aria-label": u.value,
|
|
448
|
+
onClick: I[2] || (I[2] = (w) => d())
|
|
426
449
|
}, [
|
|
427
|
-
|
|
450
|
+
q(H, {
|
|
428
451
|
name: "window-close",
|
|
452
|
+
type: "symbol",
|
|
429
453
|
size: 24
|
|
430
454
|
})
|
|
431
|
-
], 10,
|
|
432
|
-
], 2)) :
|
|
455
|
+
], 10, na)) : C("", !0)
|
|
456
|
+
], 2)) : C("", !0);
|
|
433
457
|
}
|
|
434
|
-
}),
|
|
458
|
+
}), la = {
|
|
435
459
|
key: 0,
|
|
436
460
|
class: "flex shrink-0 items-center",
|
|
437
461
|
"data-tauri-drag-region": ""
|
|
438
|
-
},
|
|
462
|
+
}, oa = {
|
|
439
463
|
key: 1,
|
|
440
464
|
class: "min-w-0 shrink truncate text-sm",
|
|
441
465
|
"data-tauri-drag-region": ""
|
|
442
|
-
},
|
|
466
|
+
}, We = /* @__PURE__ */ E({
|
|
443
467
|
__name: "AppBar",
|
|
444
468
|
props: {
|
|
445
469
|
position: { default: null },
|
|
446
470
|
title: { default: "" },
|
|
447
|
-
minimizeLabel: {
|
|
448
|
-
maximizeLabel: {
|
|
449
|
-
closeLabel: {
|
|
450
|
-
controls: { default: () =>
|
|
471
|
+
minimizeLabel: {},
|
|
472
|
+
maximizeLabel: {},
|
|
473
|
+
closeLabel: {},
|
|
474
|
+
controls: { default: () => ze }
|
|
451
475
|
},
|
|
452
476
|
emits: ["minimize", "maximize", "close"],
|
|
453
477
|
setup(e) {
|
|
454
|
-
const n = e, t =
|
|
455
|
-
return ue(
|
|
478
|
+
const n = e, t = de(), a = p(() => n.position ?? t.posicion.value), l = p(() => a.value === "left" || a.value === "right");
|
|
479
|
+
return ue(De, {
|
|
456
480
|
posicion: a,
|
|
457
|
-
orientacion:
|
|
458
|
-
vertical:
|
|
459
|
-
}), (
|
|
460
|
-
class:
|
|
481
|
+
orientacion: p(() => l.value ? "vertical" : "horizontal"),
|
|
482
|
+
vertical: l
|
|
483
|
+
}), (o, u) => (r(), s("div", {
|
|
484
|
+
class: k(["relative flex shrink-0 items-center gap-2 p-1 font-title", l.value ? "h-full flex-col" : "w-full"]),
|
|
461
485
|
"data-tauri-drag-region": ""
|
|
462
486
|
}, [
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
])) :
|
|
466
|
-
(
|
|
467
|
-
|
|
468
|
-
|
|
487
|
+
o.$slots.identidad ? (r(), s("div", la, [
|
|
488
|
+
A(o.$slots, "identidad")
|
|
489
|
+
])) : C("", !0),
|
|
490
|
+
(o.$slots.titulo || e.title) && !l.value ? (r(), s("p", oa, [
|
|
491
|
+
A(o.$slots, "titulo", {}, () => [
|
|
492
|
+
Ee(V(e.title), 1)
|
|
469
493
|
])
|
|
470
|
-
])) :
|
|
471
|
-
|
|
472
|
-
class:
|
|
494
|
+
])) : C("", !0),
|
|
495
|
+
B("div", {
|
|
496
|
+
class: k(["flex min-h-0 min-w-0 flex-1 items-center gap-2 overflow-auto", l.value ? "flex-col" : ""]),
|
|
473
497
|
"data-tauri-drag-region": ""
|
|
474
498
|
}, [
|
|
475
|
-
|
|
499
|
+
A(o.$slots, "default")
|
|
476
500
|
], 2),
|
|
477
|
-
|
|
501
|
+
o.$slots.acciones ? (r(), s("div", {
|
|
478
502
|
key: 2,
|
|
479
|
-
class:
|
|
503
|
+
class: k(["flex shrink-0 items-center gap-1", l.value ? "flex-col" : ""])
|
|
480
504
|
}, [
|
|
481
|
-
|
|
482
|
-
], 2)) :
|
|
483
|
-
|
|
505
|
+
A(o.$slots, "acciones")
|
|
506
|
+
], 2)) : C("", !0),
|
|
507
|
+
q(Ue, ae({
|
|
484
508
|
controls: e.controls,
|
|
485
509
|
"minimize-label": e.minimizeLabel,
|
|
486
510
|
"maximize-label": e.maximizeLabel,
|
|
487
511
|
"close-label": e.closeLabel
|
|
488
|
-
},
|
|
489
|
-
|
|
512
|
+
}, Fe(F(He)(["minimize", "maximize", "close"]))), null, 16, ["controls", "minimize-label", "maximize-label", "close-label"]),
|
|
513
|
+
o.$slots.centro ? (r(), s("div", {
|
|
490
514
|
key: 3,
|
|
491
|
-
class:
|
|
515
|
+
class: k(["pointer-events-none absolute flex items-center justify-center", l.value ? "inset-x-0 top-1/2 -translate-y-1/2 flex-col" : "inset-y-0 left-1/2 -translate-x-1/2"])
|
|
492
516
|
}, [
|
|
493
|
-
|
|
494
|
-
class:
|
|
517
|
+
B("div", {
|
|
518
|
+
class: k(["pointer-events-auto flex items-center gap-2", l.value ? "flex-col" : ""])
|
|
495
519
|
}, [
|
|
496
|
-
|
|
520
|
+
A(o.$slots, "centro")
|
|
497
521
|
], 2)
|
|
498
|
-
], 2)) :
|
|
522
|
+
], 2)) : C("", !0)
|
|
499
523
|
], 2));
|
|
500
524
|
}
|
|
501
|
-
}),
|
|
525
|
+
}), ra = { class: "flex min-h-0 min-w-0 flex-1" }, sa = /* @__PURE__ */ E({
|
|
502
526
|
__name: "WindowFrame",
|
|
503
527
|
props: {
|
|
504
528
|
position: { default: null },
|
|
505
529
|
title: { default: "" },
|
|
506
|
-
minimizeLabel: {
|
|
507
|
-
maximizeLabel: {
|
|
508
|
-
closeLabel: {
|
|
509
|
-
controls: { default: () =>
|
|
530
|
+
minimizeLabel: {},
|
|
531
|
+
maximizeLabel: {},
|
|
532
|
+
closeLabel: {},
|
|
533
|
+
controls: { default: () => ze },
|
|
510
534
|
hideBar: { type: Boolean, default: !1 }
|
|
511
535
|
},
|
|
512
536
|
emits: ["minimize", "maximize", "close"],
|
|
513
537
|
setup(e) {
|
|
514
|
-
const n = e, t =
|
|
515
|
-
ue(
|
|
516
|
-
const
|
|
538
|
+
const n = e, t = ea(), a = p(() => n.position ?? t.value), l = p(() => we(a.value)), o = p(() => l.value === "vertical");
|
|
539
|
+
ue(De, { posicion: a, orientacion: l, vertical: o });
|
|
540
|
+
const u = {
|
|
517
541
|
top: "flex-col",
|
|
518
542
|
bottom: "flex-col-reverse",
|
|
519
543
|
left: "flex-row",
|
|
520
544
|
right: "flex-row-reverse"
|
|
521
545
|
};
|
|
522
|
-
return (
|
|
523
|
-
class:
|
|
546
|
+
return (i, m) => (r(), s("div", {
|
|
547
|
+
class: k(["flex h-screen w-screen overflow-hidden rounded-corner-window border border-ui-border bg-ui-bg/80", u[a.value]])
|
|
524
548
|
}, [
|
|
525
|
-
e.hideBar ?
|
|
549
|
+
e.hideBar ? C("", !0) : (r(), Q(We, ae({
|
|
526
550
|
key: 0,
|
|
527
551
|
position: a.value,
|
|
528
552
|
title: e.title,
|
|
@@ -530,57 +554,57 @@ const At = ["title", "aria-label"], St = ["title", "aria-label"], Tt = ["title",
|
|
|
530
554
|
"maximize-label": e.maximizeLabel,
|
|
531
555
|
"close-label": e.closeLabel,
|
|
532
556
|
controls: e.controls
|
|
533
|
-
},
|
|
534
|
-
default:
|
|
535
|
-
|
|
557
|
+
}, Fe(F(He)(["minimize", "maximize", "close"]))), it({
|
|
558
|
+
default: W(() => [
|
|
559
|
+
A(i.$slots, "barra")
|
|
536
560
|
]),
|
|
537
561
|
_: 2
|
|
538
562
|
}, [
|
|
539
|
-
|
|
563
|
+
i.$slots.identidad ? {
|
|
540
564
|
name: "identidad",
|
|
541
|
-
fn:
|
|
542
|
-
|
|
565
|
+
fn: W(() => [
|
|
566
|
+
A(i.$slots, "identidad")
|
|
543
567
|
]),
|
|
544
568
|
key: "0"
|
|
545
569
|
} : void 0,
|
|
546
|
-
|
|
570
|
+
i.$slots.titulo ? {
|
|
547
571
|
name: "titulo",
|
|
548
|
-
fn:
|
|
549
|
-
|
|
572
|
+
fn: W(() => [
|
|
573
|
+
A(i.$slots, "titulo")
|
|
550
574
|
]),
|
|
551
575
|
key: "1"
|
|
552
576
|
} : void 0,
|
|
553
|
-
|
|
577
|
+
i.$slots.centro ? {
|
|
554
578
|
name: "centro",
|
|
555
|
-
fn:
|
|
556
|
-
|
|
579
|
+
fn: W(() => [
|
|
580
|
+
A(i.$slots, "centro")
|
|
557
581
|
]),
|
|
558
582
|
key: "2"
|
|
559
583
|
} : void 0,
|
|
560
|
-
|
|
584
|
+
i.$slots.acciones ? {
|
|
561
585
|
name: "acciones",
|
|
562
|
-
fn:
|
|
563
|
-
|
|
586
|
+
fn: W(() => [
|
|
587
|
+
A(i.$slots, "acciones")
|
|
564
588
|
]),
|
|
565
589
|
key: "3"
|
|
566
590
|
} : void 0
|
|
567
591
|
]), 1040, ["position", "title", "minimize-label", "maximize-label", "close-label", "controls"])),
|
|
568
|
-
|
|
569
|
-
|
|
592
|
+
B("div", ra, [
|
|
593
|
+
A(i.$slots, "default")
|
|
570
594
|
])
|
|
571
595
|
], 2));
|
|
572
596
|
}
|
|
573
|
-
}),
|
|
597
|
+
}), ia = ["aria-selected", "title", "aria-label", "tabindex"], ua = {
|
|
574
598
|
key: 1,
|
|
575
599
|
"aria-hidden": "true"
|
|
576
|
-
},
|
|
600
|
+
}, ca = {
|
|
577
601
|
key: 2,
|
|
578
602
|
class: "min-w-0 flex-1 truncate"
|
|
579
|
-
},
|
|
603
|
+
}, da = ["title", "aria-label"], fa = { class: "whitespace-nowrap" }, ma = {
|
|
580
604
|
key: 0,
|
|
581
605
|
class: "size-2 shrink-0 rounded-full bg-current",
|
|
582
606
|
"aria-hidden": "true"
|
|
583
|
-
},
|
|
607
|
+
}, va = ["title", "aria-label"], ba = 500, Me = 8, Ve = 6, Ke = /* @__PURE__ */ E({
|
|
584
608
|
__name: "TabItem",
|
|
585
609
|
props: {
|
|
586
610
|
tab: {},
|
|
@@ -591,165 +615,165 @@ const At = ["title", "aria-label"], St = ["title", "aria-label"], Tt = ["title",
|
|
|
591
615
|
},
|
|
592
616
|
emits: ["select", "close", "menu", "mover", "navegar"],
|
|
593
617
|
setup(e, { emit: n }) {
|
|
594
|
-
const t = e, a = n, { vertical:
|
|
595
|
-
let
|
|
596
|
-
const
|
|
618
|
+
const t = e, a = n, { vertical: l, posicion: o } = de(), u = x(null), i = x(null), m = x(!1), v = x(!1), f = x(!1), T = x({ top: 0, left: 0, right: 0 });
|
|
619
|
+
let D = null, z = null;
|
|
620
|
+
const g = p(() => t.tab.closable !== !1), d = p(() => t.tab.tooltip ?? t.tab.label), S = p(
|
|
597
621
|
() => t.tab.dirty ? `${t.tab.label} · ${t.dirtyLabel}` : t.tab.label
|
|
598
|
-
),
|
|
599
|
-
() => !!t.tab.dirty && !(
|
|
600
|
-
),
|
|
601
|
-
() =>
|
|
602
|
-
),
|
|
603
|
-
() =>
|
|
604
|
-
),
|
|
605
|
-
const
|
|
606
|
-
return
|
|
622
|
+
), I = p(() => t.tab.label.trim().charAt(0).toUpperCase()), w = p(() => m.value || f.value), c = p(
|
|
623
|
+
() => !!t.tab.dirty && !(w.value && g.value)
|
|
624
|
+
), b = p(
|
|
625
|
+
() => g.value && (w.value || t.active || !t.tab.dirty)
|
|
626
|
+
), y = p(
|
|
627
|
+
() => l.value && (m.value || v.value || f.value)
|
|
628
|
+
), P = p(() => {
|
|
629
|
+
const R = { position: "fixed", top: `${T.value.top}px`, zIndex: 50 };
|
|
630
|
+
return o.value === "right" ? { ...R, right: `${T.value.right + Ve}px` } : { ...R, left: `${T.value.left + Ve}px` };
|
|
607
631
|
});
|
|
608
|
-
function
|
|
609
|
-
const
|
|
610
|
-
if (!
|
|
611
|
-
const
|
|
612
|
-
|
|
613
|
-
top:
|
|
614
|
-
left:
|
|
615
|
-
right: window.innerWidth -
|
|
632
|
+
function Z() {
|
|
633
|
+
const R = u.value;
|
|
634
|
+
if (!R) return;
|
|
635
|
+
const h = R.getBoundingClientRect();
|
|
636
|
+
T.value = {
|
|
637
|
+
top: h.top,
|
|
638
|
+
left: h.right,
|
|
639
|
+
right: window.innerWidth - h.left
|
|
616
640
|
};
|
|
617
641
|
}
|
|
618
|
-
function
|
|
619
|
-
const
|
|
620
|
-
|
|
642
|
+
function U(R) {
|
|
643
|
+
const h = R.relatedTarget;
|
|
644
|
+
h && i.value?.contains(h) || (f.value = !1);
|
|
621
645
|
}
|
|
622
646
|
function ee() {
|
|
623
|
-
|
|
647
|
+
m.value = !0, Z();
|
|
624
648
|
}
|
|
625
|
-
function
|
|
626
|
-
v.value = !0,
|
|
649
|
+
function G() {
|
|
650
|
+
v.value = !0, Z();
|
|
627
651
|
}
|
|
628
|
-
function
|
|
629
|
-
|
|
652
|
+
function L() {
|
|
653
|
+
D !== null && clearTimeout(D), D = null, z = null;
|
|
630
654
|
}
|
|
631
|
-
function
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
},
|
|
655
|
+
function $(R) {
|
|
656
|
+
R.button === 0 && (z = { x: R.clientX, y: R.clientY }, D = setTimeout(() => {
|
|
657
|
+
z && a("menu", z), L();
|
|
658
|
+
}, ba));
|
|
635
659
|
}
|
|
636
|
-
function
|
|
637
|
-
if (!
|
|
638
|
-
(Math.abs(
|
|
660
|
+
function O(R) {
|
|
661
|
+
if (!z) return;
|
|
662
|
+
(Math.abs(R.clientX - z.x) > Me || Math.abs(R.clientY - z.y) > Me) && L();
|
|
639
663
|
}
|
|
640
|
-
function
|
|
641
|
-
|
|
664
|
+
function ne(R) {
|
|
665
|
+
R.button === 1 && g.value && (R.preventDefault(), a("close"));
|
|
642
666
|
}
|
|
643
|
-
function
|
|
644
|
-
|
|
667
|
+
function nt(R) {
|
|
668
|
+
R.preventDefault(), a("menu", { x: R.clientX, y: R.clientY });
|
|
645
669
|
}
|
|
646
|
-
return
|
|
670
|
+
return ie(L), (R, h) => (r(), s("div", {
|
|
647
671
|
ref_key: "raiz",
|
|
648
|
-
ref:
|
|
649
|
-
class:
|
|
672
|
+
ref: u,
|
|
673
|
+
class: k(["group relative flex shrink-0 cursor-pointer items-center gap-2 rounded-corner border border-ui-border transition-colors", [
|
|
650
674
|
e.active ? "bg-primary font-bold text-tx-on-primary" : "bg-ui-bg/80 hover:bg-ui-surface/70",
|
|
651
|
-
|
|
675
|
+
F(l) ? "size-8 justify-center p-0 text-sm" : "w-34 max-w-34 px-3 py-1 text-sm"
|
|
652
676
|
]]),
|
|
653
677
|
role: "tab",
|
|
654
678
|
"aria-selected": e.active,
|
|
655
|
-
title:
|
|
656
|
-
"aria-label":
|
|
679
|
+
title: d.value,
|
|
680
|
+
"aria-label": S.value,
|
|
657
681
|
tabindex: e.tabindex,
|
|
658
|
-
onClick:
|
|
682
|
+
onClick: h[5] || (h[5] = M((N) => a("select"), ["stop"])),
|
|
659
683
|
onKeydown: [
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
684
|
+
h[6] || (h[6] = j(M((N) => a("select"), ["stop"]), ["enter"])),
|
|
685
|
+
h[7] || (h[7] = j(M((N) => a("select"), ["prevent", "stop"]), ["space"])),
|
|
686
|
+
h[8] || (h[8] = j(M((N) => a("navegar", "anterior"), ["prevent", "stop"]), ["left"])),
|
|
687
|
+
h[9] || (h[9] = j(M((N) => a("navegar", "anterior"), ["prevent", "stop"]), ["up"])),
|
|
688
|
+
h[10] || (h[10] = j(M((N) => a("navegar", "siguiente"), ["prevent", "stop"]), ["right"])),
|
|
689
|
+
h[11] || (h[11] = j(M((N) => a("navegar", "siguiente"), ["prevent", "stop"]), ["down"])),
|
|
690
|
+
h[12] || (h[12] = j(M((N) => a("navegar", "primera"), ["prevent", "stop"]), ["home"])),
|
|
691
|
+
h[13] || (h[13] = j(M((N) => a("navegar", "ultima"), ["prevent", "stop"]), ["end"])),
|
|
692
|
+
h[14] || (h[14] = j(M((N) => a("mover", -1), ["alt", "prevent", "stop"]), ["left"])),
|
|
693
|
+
h[15] || (h[15] = j(M((N) => a("mover", -1), ["alt", "prevent", "stop"]), ["up"])),
|
|
694
|
+
h[16] || (h[16] = j(M((N) => a("mover", 1), ["alt", "prevent", "stop"]), ["right"])),
|
|
695
|
+
h[17] || (h[17] = j(M((N) => a("mover", 1), ["alt", "prevent", "stop"]), ["down"])),
|
|
696
|
+
h[18] || (h[18] = j(M((N) => g.value && a("close"), ["prevent", "stop"]), ["delete"]))
|
|
673
697
|
],
|
|
674
|
-
onAuxclick:
|
|
675
|
-
onContextmenu:
|
|
676
|
-
onPointerdown:
|
|
677
|
-
onPointermove:
|
|
678
|
-
onPointerup:
|
|
679
|
-
onPointerleave:
|
|
698
|
+
onAuxclick: M(ne, ["stop"]),
|
|
699
|
+
onContextmenu: nt,
|
|
700
|
+
onPointerdown: $,
|
|
701
|
+
onPointermove: O,
|
|
702
|
+
onPointerup: L,
|
|
703
|
+
onPointerleave: L,
|
|
680
704
|
onMouseenter: ee,
|
|
681
|
-
onMouseleave:
|
|
682
|
-
onFocus:
|
|
683
|
-
onBlur:
|
|
705
|
+
onMouseleave: h[19] || (h[19] = (N) => m.value = !1),
|
|
706
|
+
onFocus: G,
|
|
707
|
+
onBlur: h[20] || (h[20] = (N) => v.value = !1)
|
|
684
708
|
}, [
|
|
685
|
-
e.tab.icon ? (
|
|
709
|
+
e.tab.icon ? (r(), Q(H, {
|
|
686
710
|
key: 0,
|
|
687
711
|
name: e.tab.icon,
|
|
688
712
|
size: 16,
|
|
689
713
|
class: "shrink-0"
|
|
690
|
-
}, null, 8, ["name"])) :
|
|
691
|
-
|
|
692
|
-
|
|
714
|
+
}, null, 8, ["name"])) : F(l) ? (r(), s("span", ua, V(I.value), 1)) : C("", !0),
|
|
715
|
+
F(l) ? C("", !0) : (r(), s("span", ca, V(e.tab.label), 1)),
|
|
716
|
+
c.value ? (r(), s("span", {
|
|
693
717
|
key: 3,
|
|
694
|
-
class:
|
|
718
|
+
class: k(["size-2 shrink-0 rounded-full bg-current", F(l) ? "absolute right-0.5 top-0.5" : ""]),
|
|
695
719
|
"aria-hidden": "true"
|
|
696
|
-
}, null, 2)) :
|
|
720
|
+
}, null, 2)) : b.value && !F(l) ? (r(), s("button", {
|
|
697
721
|
key: 4,
|
|
698
722
|
type: "button",
|
|
699
723
|
class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
|
|
700
724
|
title: e.closeLabel,
|
|
701
|
-
"aria-label": `${e.closeLabel}: ${
|
|
702
|
-
onClick:
|
|
725
|
+
"aria-label": `${e.closeLabel}: ${S.value}`,
|
|
726
|
+
onClick: h[0] || (h[0] = M((N) => a("close"), ["stop"]))
|
|
703
727
|
}, [
|
|
704
|
-
|
|
728
|
+
q(H, {
|
|
705
729
|
name: "gtk-close",
|
|
706
730
|
type: "symbol",
|
|
707
731
|
size: 12
|
|
708
732
|
})
|
|
709
|
-
], 8,
|
|
710
|
-
(
|
|
711
|
-
|
|
733
|
+
], 8, da)) : C("", !0),
|
|
734
|
+
(r(), Q(ce, { to: "body" }, [
|
|
735
|
+
q(pe, {
|
|
712
736
|
"enter-active-class": "transition duration-150 ease-out",
|
|
713
737
|
"enter-from-class": "opacity-0 scale-95",
|
|
714
738
|
"leave-active-class": "transition duration-100 ease-in",
|
|
715
739
|
"leave-to-class": "opacity-0 scale-95"
|
|
716
740
|
}, {
|
|
717
|
-
default:
|
|
718
|
-
|
|
741
|
+
default: W(() => [
|
|
742
|
+
y.value ? (r(), s("div", {
|
|
719
743
|
key: 0,
|
|
720
|
-
class:
|
|
744
|
+
class: k(["flex items-center gap-2 rounded-corner border border-ui-border bg-ui-surface/95 px-3 py-1 text-sm shadow-lg", e.active ? "font-bold" : ""]),
|
|
721
745
|
ref_key: "desplegadoRef",
|
|
722
|
-
ref:
|
|
723
|
-
style: se(
|
|
724
|
-
onMouseenter:
|
|
725
|
-
onMouseleave:
|
|
726
|
-
onFocusin:
|
|
727
|
-
onFocusout:
|
|
746
|
+
ref: i,
|
|
747
|
+
style: se(P.value),
|
|
748
|
+
onMouseenter: h[2] || (h[2] = (N) => f.value = !0),
|
|
749
|
+
onMouseleave: h[3] || (h[3] = (N) => f.value = !1),
|
|
750
|
+
onFocusin: h[4] || (h[4] = (N) => f.value = !0),
|
|
751
|
+
onFocusout: U
|
|
728
752
|
}, [
|
|
729
|
-
|
|
730
|
-
e.tab.dirty ? (
|
|
731
|
-
|
|
753
|
+
B("span", fa, V(e.tab.label), 1),
|
|
754
|
+
e.tab.dirty ? (r(), s("span", ma)) : C("", !0),
|
|
755
|
+
g.value ? (r(), s("button", {
|
|
732
756
|
key: 1,
|
|
733
757
|
type: "button",
|
|
734
758
|
class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
|
|
735
759
|
title: e.closeLabel,
|
|
736
|
-
"aria-label": `${e.closeLabel}: ${
|
|
737
|
-
onClick:
|
|
760
|
+
"aria-label": `${e.closeLabel}: ${S.value}`,
|
|
761
|
+
onClick: h[1] || (h[1] = M((N) => a("close"), ["stop"]))
|
|
738
762
|
}, [
|
|
739
|
-
|
|
763
|
+
q(H, {
|
|
740
764
|
name: "gtk-close",
|
|
741
765
|
type: "symbol",
|
|
742
766
|
size: 12
|
|
743
767
|
})
|
|
744
|
-
], 8,
|
|
745
|
-
], 38)) :
|
|
768
|
+
], 8, va)) : C("", !0)
|
|
769
|
+
], 38)) : C("", !0)
|
|
746
770
|
]),
|
|
747
771
|
_: 1
|
|
748
772
|
})
|
|
749
773
|
]))
|
|
750
|
-
], 42,
|
|
774
|
+
], 42, ia));
|
|
751
775
|
}
|
|
752
|
-
}),
|
|
776
|
+
}), pa = ["aria-orientation"], ga = ["draggable", "onDragstart", "onDragover", "onDrop"], ya = ["title", "aria-label"], ha = /* @__PURE__ */ E({
|
|
753
777
|
__name: "TabBar",
|
|
754
778
|
props: {
|
|
755
779
|
tabs: {},
|
|
@@ -761,171 +785,310 @@ const At = ["title", "aria-label"], St = ["title", "aria-label"], Tt = ["title",
|
|
|
761
785
|
},
|
|
762
786
|
emits: ["update:modelValue", "select", "close", "new", "reorder", "menu"],
|
|
763
787
|
setup(e, { emit: n }) {
|
|
764
|
-
const t = e, a = n, { vertical:
|
|
765
|
-
function v(
|
|
766
|
-
a("update:modelValue",
|
|
788
|
+
const t = e, a = n, { vertical: l } = de(), o = x(null), u = x(0), i = x(null), m = x(null);
|
|
789
|
+
function v(w) {
|
|
790
|
+
a("update:modelValue", w), a("select", w);
|
|
767
791
|
}
|
|
768
|
-
async function
|
|
769
|
-
const
|
|
770
|
-
if (
|
|
771
|
-
const
|
|
772
|
-
|
|
792
|
+
async function f(w, c) {
|
|
793
|
+
const b = t.tabs.length - 1;
|
|
794
|
+
if (b < 0) return;
|
|
795
|
+
const y = c === "primera" ? 0 : c === "ultima" ? b : c === "anterior" ? (w - 1 + t.tabs.length) % t.tabs.length : (w + 1) % t.tabs.length;
|
|
796
|
+
u.value = y, await Y(), o.value?.querySelectorAll('[role="tab"]')?.[y]?.focus();
|
|
773
797
|
}
|
|
774
|
-
function
|
|
798
|
+
function T(w, c) {
|
|
775
799
|
if (t.fixedOrder) return;
|
|
776
|
-
const
|
|
777
|
-
if (
|
|
778
|
-
const
|
|
779
|
-
|
|
780
|
-
}
|
|
781
|
-
function
|
|
782
|
-
const
|
|
783
|
-
if (!
|
|
784
|
-
const
|
|
785
|
-
|
|
786
|
-
}
|
|
787
|
-
function
|
|
788
|
-
t.fixedOrder || (
|
|
789
|
-
}
|
|
790
|
-
function
|
|
791
|
-
t.fixedOrder ||
|
|
792
|
-
}
|
|
793
|
-
function w
|
|
794
|
-
const
|
|
795
|
-
if (
|
|
796
|
-
const
|
|
797
|
-
|
|
798
|
-
}
|
|
799
|
-
function
|
|
800
|
-
|
|
801
|
-
}
|
|
802
|
-
const
|
|
803
|
-
() =>
|
|
800
|
+
const b = w + c;
|
|
801
|
+
if (b < 0 || b >= t.tabs.length) return;
|
|
802
|
+
const y = [...t.tabs], [P] = y.splice(w, 1);
|
|
803
|
+
P && (y.splice(b, 0, P), u.value = b, a("reorder", y));
|
|
804
|
+
}
|
|
805
|
+
function D(w) {
|
|
806
|
+
const c = o.value;
|
|
807
|
+
if (!c) return;
|
|
808
|
+
const b = w.deltaY || w.deltaX || 0, y = l.value ? c.scrollTop : c.scrollLeft;
|
|
809
|
+
l.value ? c.scrollTop += b : c.scrollLeft += b, (l.value ? c.scrollTop : c.scrollLeft) !== y && w.preventDefault();
|
|
810
|
+
}
|
|
811
|
+
function z(w, c) {
|
|
812
|
+
t.fixedOrder || (i.value = w, c.dataTransfer?.setData("text/plain", String(w)), c.dataTransfer && (c.dataTransfer.effectAllowed = "move"));
|
|
813
|
+
}
|
|
814
|
+
function g(w, c) {
|
|
815
|
+
t.fixedOrder || i.value === null || (c.preventDefault(), m.value = w, c.dataTransfer && (c.dataTransfer.dropEffect = "move"));
|
|
816
|
+
}
|
|
817
|
+
function d(w) {
|
|
818
|
+
const c = i.value;
|
|
819
|
+
if (S(), t.fixedOrder || c === null || c === w) return;
|
|
820
|
+
const b = [...t.tabs], [y] = b.splice(c, 1);
|
|
821
|
+
y && (b.splice(w, 0, y), a("reorder", b));
|
|
822
|
+
}
|
|
823
|
+
function S() {
|
|
824
|
+
i.value = null, m.value = null;
|
|
825
|
+
}
|
|
826
|
+
const I = p(
|
|
827
|
+
() => l.value ? "flex h-full flex-col items-center gap-1 overflow-y-auto overflow-x-hidden" : "flex items-center gap-1 overflow-x-auto overflow-y-hidden"
|
|
804
828
|
);
|
|
805
|
-
return (
|
|
806
|
-
class:
|
|
829
|
+
return (w, c) => (r(), s("div", {
|
|
830
|
+
class: k(["flex min-h-0 min-w-0 items-center gap-1", F(l) ? "w-full flex-col" : "h-full"]),
|
|
807
831
|
role: "tablist",
|
|
808
|
-
"aria-orientation":
|
|
832
|
+
"aria-orientation": F(l) ? "vertical" : "horizontal"
|
|
809
833
|
}, [
|
|
810
|
-
|
|
834
|
+
B("div", {
|
|
811
835
|
ref_key: "carril",
|
|
812
|
-
ref:
|
|
813
|
-
class:
|
|
814
|
-
onWheel:
|
|
836
|
+
ref: o,
|
|
837
|
+
class: k(I.value),
|
|
838
|
+
onWheel: D
|
|
815
839
|
}, [
|
|
816
|
-
(
|
|
817
|
-
key:
|
|
818
|
-
class:
|
|
819
|
-
|
|
820
|
-
|
|
840
|
+
(r(!0), s(J, null, te(e.tabs, (b, y) => (r(), s("div", {
|
|
841
|
+
key: b.id,
|
|
842
|
+
class: k(["transition-opacity", [
|
|
843
|
+
i.value === y ? "opacity-40" : "",
|
|
844
|
+
m.value === y && i.value !== y ? "ring-2 ring-secondary rounded-corner" : ""
|
|
821
845
|
]]),
|
|
822
846
|
draggable: !e.fixedOrder,
|
|
823
|
-
onDragstart: (
|
|
824
|
-
onDragover: (
|
|
825
|
-
onDrop:
|
|
826
|
-
onDragend:
|
|
847
|
+
onDragstart: (P) => z(y, P),
|
|
848
|
+
onDragover: (P) => g(y, P),
|
|
849
|
+
onDrop: M((P) => d(y), ["prevent"]),
|
|
850
|
+
onDragend: S
|
|
827
851
|
}, [
|
|
828
|
-
|
|
829
|
-
tab:
|
|
830
|
-
active:
|
|
852
|
+
q(Ke, {
|
|
853
|
+
tab: b,
|
|
854
|
+
active: b.id === e.modelValue,
|
|
831
855
|
"close-label": e.closeLabel,
|
|
832
856
|
"dirty-label": e.dirtyLabel,
|
|
833
|
-
tabindex:
|
|
834
|
-
onSelect: (
|
|
835
|
-
onClose: (
|
|
836
|
-
onMenu: (
|
|
837
|
-
onNavegar: (
|
|
838
|
-
onMover: (
|
|
857
|
+
tabindex: y === u.value ? 0 : -1,
|
|
858
|
+
onSelect: (P) => v(b.id),
|
|
859
|
+
onClose: (P) => a("close", b.id),
|
|
860
|
+
onMenu: (P) => a("menu", { id: b.id, ...P }),
|
|
861
|
+
onNavegar: (P) => f(y, P),
|
|
862
|
+
onMover: (P) => T(y, P)
|
|
839
863
|
}, null, 8, ["tab", "active", "close-label", "dirty-label", "tabindex", "onSelect", "onClose", "onMenu", "onNavegar", "onMover"])
|
|
840
|
-
], 42,
|
|
864
|
+
], 42, ga))), 128))
|
|
841
865
|
], 34),
|
|
842
|
-
e.newLabel ? (
|
|
866
|
+
e.newLabel ? (r(), s("button", {
|
|
843
867
|
key: 0,
|
|
844
868
|
type: "button",
|
|
845
869
|
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",
|
|
846
870
|
title: e.newLabel,
|
|
847
871
|
"aria-label": e.newLabel,
|
|
848
|
-
onClick:
|
|
872
|
+
onClick: c[0] || (c[0] = (b) => a("new"))
|
|
849
873
|
}, [
|
|
850
|
-
|
|
874
|
+
q(H, {
|
|
851
875
|
name: "gtk-add",
|
|
852
876
|
type: "symbol",
|
|
853
877
|
size: 14
|
|
854
878
|
})
|
|
855
|
-
], 8,
|
|
856
|
-
], 10,
|
|
879
|
+
], 8, ya)) : C("", !0)
|
|
880
|
+
], 10, pa));
|
|
857
881
|
}
|
|
858
|
-
}),
|
|
882
|
+
}), xa = ["id", "aria-label", "type", "value", "placeholder", "disabled", "readonly", "required", "aria-invalid"], Ge = /* @__PURE__ */ E({
|
|
883
|
+
__name: "TextInput",
|
|
884
|
+
props: {
|
|
885
|
+
modelValue: {},
|
|
886
|
+
type: { default: "text" },
|
|
887
|
+
id: {},
|
|
888
|
+
ariaLabel: {},
|
|
889
|
+
placeholder: {},
|
|
890
|
+
disabled: { type: Boolean, default: !1 },
|
|
891
|
+
readonly: { type: Boolean, default: !1 },
|
|
892
|
+
invalid: { type: Boolean, default: !1 },
|
|
893
|
+
mono: { type: Boolean, default: !1 },
|
|
894
|
+
required: { type: Boolean, default: !1 },
|
|
895
|
+
lazy: { type: Boolean, default: !1 }
|
|
896
|
+
},
|
|
897
|
+
emits: ["update:modelValue"],
|
|
898
|
+
setup(e, { emit: n }) {
|
|
899
|
+
const t = e, a = n;
|
|
900
|
+
function l(i) {
|
|
901
|
+
t.lazy || a("update:modelValue", i.target.value);
|
|
902
|
+
}
|
|
903
|
+
function o(i) {
|
|
904
|
+
t.lazy && a("update:modelValue", i.target.value);
|
|
905
|
+
}
|
|
906
|
+
const u = p(() => [
|
|
907
|
+
"w-full rounded-corner border bg-ui-surface/70 px-3 py-1.5 text-sm text-tx-main",
|
|
908
|
+
"placeholder:text-tx-muted focus:outline-none focus:ring-1 focus:ring-primary",
|
|
909
|
+
t.invalid ? "border-status-error" : "border-ui-border",
|
|
910
|
+
t.mono ? "font-mono" : "",
|
|
911
|
+
t.disabled ? "cursor-not-allowed opacity-60" : ""
|
|
912
|
+
]);
|
|
913
|
+
return (i, m) => (r(), s("input", {
|
|
914
|
+
id: e.id,
|
|
915
|
+
"aria-label": e.ariaLabel,
|
|
916
|
+
type: e.type,
|
|
917
|
+
value: e.modelValue,
|
|
918
|
+
placeholder: e.placeholder,
|
|
919
|
+
disabled: e.disabled,
|
|
920
|
+
readonly: e.readonly,
|
|
921
|
+
required: e.required,
|
|
922
|
+
"aria-invalid": e.invalid || void 0,
|
|
923
|
+
class: k(u.value),
|
|
924
|
+
onInput: l,
|
|
925
|
+
onChange: o
|
|
926
|
+
}, null, 42, xa));
|
|
927
|
+
}
|
|
928
|
+
}), ka = { class: "pointer-events-none absolute left-2 flex items-center" }, wa = ["aria-label"], Le = /* @__PURE__ */ E({
|
|
929
|
+
__name: "SearchField",
|
|
930
|
+
props: {
|
|
931
|
+
modelValue: { default: "" },
|
|
932
|
+
placeholder: { default: "" },
|
|
933
|
+
label: { default: "" },
|
|
934
|
+
disabled: { type: Boolean, default: !1 },
|
|
935
|
+
autofocus: { type: Boolean, default: !1 },
|
|
936
|
+
debounce: { default: 0 },
|
|
937
|
+
clearable: { type: Boolean, default: !0 },
|
|
938
|
+
busy: { type: Boolean, default: !1 },
|
|
939
|
+
listboxId: {},
|
|
940
|
+
activeOptionId: {},
|
|
941
|
+
expanded: { type: Boolean }
|
|
942
|
+
},
|
|
943
|
+
emits: ["update:modelValue", "search", "clear"],
|
|
944
|
+
setup(e, { expose: n, emit: t }) {
|
|
945
|
+
const a = e, l = t, o = x(null);
|
|
946
|
+
let u;
|
|
947
|
+
const i = p(() => a.modelValue.length > 0), m = p(
|
|
948
|
+
() => a.listboxId ? {
|
|
949
|
+
role: "combobox",
|
|
950
|
+
"aria-autocomplete": "list",
|
|
951
|
+
"aria-controls": a.listboxId,
|
|
952
|
+
"aria-expanded": String(a.expanded),
|
|
953
|
+
"aria-activedescendant": a.activeOptionId || void 0
|
|
954
|
+
} : {}
|
|
955
|
+
), v = p(() => a.clearable && i.value && !a.disabled);
|
|
956
|
+
function f() {
|
|
957
|
+
clearTimeout(u), u = void 0;
|
|
958
|
+
}
|
|
959
|
+
function T(d) {
|
|
960
|
+
l("update:modelValue", d), !(a.debounce <= 0) && (f(), u = setTimeout(() => l("search", d), a.debounce));
|
|
961
|
+
}
|
|
962
|
+
function D() {
|
|
963
|
+
f(), l("search", a.modelValue);
|
|
964
|
+
}
|
|
965
|
+
function z() {
|
|
966
|
+
f(), l("update:modelValue", ""), l("clear"), g();
|
|
967
|
+
}
|
|
968
|
+
function g() {
|
|
969
|
+
o.value?.$el?.focus?.();
|
|
970
|
+
}
|
|
971
|
+
return n({ enfocar: g }), _(async () => {
|
|
972
|
+
a.autofocus && (await Y(), g());
|
|
973
|
+
}), ve(f), K(
|
|
974
|
+
() => a.disabled,
|
|
975
|
+
(d) => {
|
|
976
|
+
d && f();
|
|
977
|
+
}
|
|
978
|
+
), (d, S) => (r(), s("div", {
|
|
979
|
+
class: "relative flex items-center",
|
|
980
|
+
onKeydown: j(D, ["enter"])
|
|
981
|
+
}, [
|
|
982
|
+
B("span", ka, [
|
|
983
|
+
q(H, {
|
|
984
|
+
name: e.busy ? "content-loading" : "system-search",
|
|
985
|
+
type: "symbol",
|
|
986
|
+
size: 14,
|
|
987
|
+
class: k(e.busy ? "animate-spin opacity-70" : "opacity-60")
|
|
988
|
+
}, null, 8, ["name", "class"])
|
|
989
|
+
]),
|
|
990
|
+
q(Ge, ae({
|
|
991
|
+
ref_key: "campo",
|
|
992
|
+
ref: o,
|
|
993
|
+
type: "search",
|
|
994
|
+
"model-value": e.modelValue,
|
|
995
|
+
placeholder: e.placeholder || e.label,
|
|
996
|
+
ariaLabel: e.label || void 0
|
|
997
|
+
}, m.value, {
|
|
998
|
+
disabled: e.disabled,
|
|
999
|
+
class: ["pl-7 [&::-webkit-search-cancel-button]:appearance-none", v.value ? "pr-8" : ""],
|
|
1000
|
+
"onUpdate:modelValue": T
|
|
1001
|
+
}), null, 16, ["model-value", "placeholder", "ariaLabel", "disabled", "class"]),
|
|
1002
|
+
v.value ? (r(), s("button", {
|
|
1003
|
+
key: 0,
|
|
1004
|
+
type: "button",
|
|
1005
|
+
class: "absolute right-1 flex size-6 items-center justify-center rounded-corner text-tx-muted hover:bg-ui-surface",
|
|
1006
|
+
"aria-label": e.label ? `${e.label}: vaciar` : "Vaciar",
|
|
1007
|
+
onMousedown: S[0] || (S[0] = M(() => {
|
|
1008
|
+
}, ["prevent"])),
|
|
1009
|
+
onClick: z
|
|
1010
|
+
}, [
|
|
1011
|
+
q(H, {
|
|
1012
|
+
name: "gtk-close",
|
|
1013
|
+
type: "symbol",
|
|
1014
|
+
size: 12,
|
|
1015
|
+
alt: ""
|
|
1016
|
+
})
|
|
1017
|
+
], 40, wa)) : C("", !0)
|
|
1018
|
+
], 32));
|
|
1019
|
+
}
|
|
1020
|
+
}), $a = ["title", "aria-label", "aria-expanded"], Ca = /* @__PURE__ */ E({
|
|
859
1021
|
__name: "BarSearch",
|
|
860
1022
|
props: {
|
|
861
1023
|
modelValue: { default: "" },
|
|
862
1024
|
placeholder: { default: "" },
|
|
863
1025
|
label: { default: "Search" },
|
|
864
|
-
collapsed: { type: Boolean, default: !1 }
|
|
1026
|
+
collapsed: { type: Boolean, default: !1 },
|
|
1027
|
+
disabled: { type: Boolean, default: !1 },
|
|
1028
|
+
debounce: { default: 0 }
|
|
865
1029
|
},
|
|
866
1030
|
emits: ["update:modelValue", "search", "open", "close"],
|
|
867
1031
|
setup(e, { emit: n }) {
|
|
868
|
-
const t = e, a = n, { vertical:
|
|
869
|
-
if (!
|
|
870
|
-
const
|
|
871
|
-
return
|
|
1032
|
+
const t = e, a = n, { vertical: l, posicion: o } = de(), u = x(!1), i = x(null), m = p(() => l.value || t.collapsed), v = p(() => !m.value || u.value), f = p(() => {
|
|
1033
|
+
if (!m.value) return "";
|
|
1034
|
+
const g = "absolute z-40 w-64 rounded-corner border border-ui-border bg-ui-surface/95 p-1 shadow-lg";
|
|
1035
|
+
return o.value === "left" ? `${g} left-full top-0 ml-1` : o.value === "right" ? `${g} right-full top-0 mr-1` : o.value === "bottom" ? `${g} bottom-full right-0 mb-1` : `${g} top-full right-0 mt-1`;
|
|
872
1036
|
});
|
|
873
|
-
async function
|
|
874
|
-
|
|
875
|
-
}
|
|
876
|
-
function z() {
|
|
877
|
-
c.value && (c.value = !1, a("close"));
|
|
1037
|
+
async function T() {
|
|
1038
|
+
u.value = !0, a("open"), await Y(), i.value?.enfocar();
|
|
878
1039
|
}
|
|
879
|
-
function
|
|
880
|
-
a("
|
|
1040
|
+
function D() {
|
|
1041
|
+
u.value && (u.value = !1, a("close"));
|
|
881
1042
|
}
|
|
882
|
-
function
|
|
883
|
-
|
|
1043
|
+
function z(g) {
|
|
1044
|
+
const d = g.relatedTarget;
|
|
1045
|
+
d && g.currentTarget.contains(d) || D();
|
|
884
1046
|
}
|
|
885
|
-
return (
|
|
886
|
-
|
|
1047
|
+
return (g, d) => (r(), s("div", {
|
|
1048
|
+
class: "relative flex shrink-0 items-center",
|
|
1049
|
+
onFocusout: z
|
|
1050
|
+
}, [
|
|
1051
|
+
m.value ? (r(), s("button", {
|
|
887
1052
|
key: 0,
|
|
888
1053
|
type: "button",
|
|
889
1054
|
class: "flex size-7 items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 hover:bg-ui-surface/70",
|
|
890
1055
|
title: e.label,
|
|
891
1056
|
"aria-label": e.label,
|
|
892
|
-
"aria-expanded":
|
|
893
|
-
onMousedown:
|
|
1057
|
+
"aria-expanded": u.value,
|
|
1058
|
+
onMousedown: d[0] || (d[0] = M(() => {
|
|
894
1059
|
}, ["prevent"])),
|
|
895
|
-
onClick:
|
|
1060
|
+
onClick: d[1] || (d[1] = (S) => u.value ? D() : T())
|
|
896
1061
|
}, [
|
|
897
|
-
|
|
1062
|
+
q(H, {
|
|
898
1063
|
name: "system-search",
|
|
899
1064
|
type: "symbol",
|
|
900
1065
|
size: 14
|
|
901
1066
|
})
|
|
902
|
-
], 40,
|
|
903
|
-
v.value ? (
|
|
1067
|
+
], 40, $a)) : C("", !0),
|
|
1068
|
+
v.value ? (r(), s("div", {
|
|
904
1069
|
key: 1,
|
|
905
|
-
class:
|
|
1070
|
+
class: k(f.value),
|
|
1071
|
+
onKeydown: j(D, ["esc"])
|
|
906
1072
|
}, [
|
|
907
|
-
|
|
1073
|
+
q(Le, {
|
|
908
1074
|
ref_key: "campo",
|
|
909
|
-
ref:
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
}, null, 42, Zt)
|
|
922
|
-
], 2)) : g("", !0)
|
|
923
|
-
]));
|
|
1075
|
+
ref: i,
|
|
1076
|
+
"model-value": e.modelValue,
|
|
1077
|
+
placeholder: e.placeholder,
|
|
1078
|
+
label: e.label,
|
|
1079
|
+
disabled: e.disabled,
|
|
1080
|
+
debounce: e.debounce,
|
|
1081
|
+
class: k(m.value ? "" : "w-48"),
|
|
1082
|
+
"onUpdate:modelValue": d[2] || (d[2] = (S) => a("update:modelValue", S)),
|
|
1083
|
+
onSearch: d[3] || (d[3] = (S) => a("search", S))
|
|
1084
|
+
}, null, 8, ["model-value", "placeholder", "label", "disabled", "debounce", "class"])
|
|
1085
|
+
], 34)) : C("", !0)
|
|
1086
|
+
], 32));
|
|
924
1087
|
}
|
|
925
|
-
}),
|
|
1088
|
+
}), Ea = ["type", "disabled"], Da = {
|
|
926
1089
|
key: 0,
|
|
927
1090
|
class: "w-4 h-4 animate-spin rounded-full border-2 border-current border-t-transparent"
|
|
928
|
-
},
|
|
1091
|
+
}, za = ["src", "alt"], La = { key: 2 }, Ta = ["src", "alt"], Ba = /* @__PURE__ */ E({
|
|
929
1092
|
__name: "ActionButton",
|
|
930
1093
|
props: {
|
|
931
1094
|
label: {},
|
|
@@ -944,51 +1107,356 @@ const At = ["title", "aria-label"], St = ["title", "aria-label"], Tt = ["title",
|
|
|
944
1107
|
},
|
|
945
1108
|
emits: ["click"],
|
|
946
1109
|
setup(e, { emit: n }) {
|
|
947
|
-
const t = e, a = n,
|
|
1110
|
+
const t = e, a = n, l = {
|
|
948
1111
|
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",
|
|
949
1112
|
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",
|
|
950
1113
|
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"
|
|
951
|
-
},
|
|
1114
|
+
}, o = {
|
|
952
1115
|
sm: "px-2 py-1 text-xs",
|
|
953
1116
|
md: "px-3 py-1 text-sm",
|
|
954
1117
|
lg: "px-4 py-2 text-base"
|
|
955
|
-
},
|
|
956
|
-
t.stopPropagation &&
|
|
1118
|
+
}, u = (i) => {
|
|
1119
|
+
t.stopPropagation && i.stopPropagation(), t.preventDefault && i.preventDefault(), !t.disabled && !t.loading && a("click");
|
|
957
1120
|
};
|
|
958
|
-
return (
|
|
1121
|
+
return (i, m) => (r(), s("button", {
|
|
959
1122
|
type: t.type,
|
|
960
|
-
onClick:
|
|
961
|
-
class:
|
|
962
|
-
|
|
963
|
-
|
|
1123
|
+
onClick: u,
|
|
1124
|
+
class: k(["rounded-corner transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2", [
|
|
1125
|
+
l[t.variant],
|
|
1126
|
+
o[t.size],
|
|
964
1127
|
t.fullWidth ? "w-full" : "",
|
|
965
1128
|
t.iconSrc && !t.label ? "px-2 py-2" : "",
|
|
966
1129
|
e.customClass
|
|
967
1130
|
]]),
|
|
968
1131
|
disabled: t.disabled || t.loading
|
|
969
1132
|
}, [
|
|
970
|
-
e.loading ? (
|
|
971
|
-
t.iconSrc && !t.iconRight ? (
|
|
1133
|
+
e.loading ? (r(), s("span", Da)) : C("", !0),
|
|
1134
|
+
t.iconSrc && !t.iconRight ? (r(), s("img", {
|
|
972
1135
|
key: 1,
|
|
973
1136
|
src: t.iconSrc,
|
|
974
1137
|
alt: t.iconAlt || t.label,
|
|
975
1138
|
class: "w-4 h-4"
|
|
976
|
-
}, null, 8,
|
|
977
|
-
t.label ? (
|
|
978
|
-
t.iconSrc && t.iconRight ? (
|
|
1139
|
+
}, null, 8, za)) : C("", !0),
|
|
1140
|
+
t.label ? (r(), s("span", La, V(t.label), 1)) : C("", !0),
|
|
1141
|
+
t.iconSrc && t.iconRight ? (r(), s("img", {
|
|
979
1142
|
key: 3,
|
|
980
1143
|
src: t.iconSrc,
|
|
981
1144
|
alt: t.iconAlt || t.label,
|
|
982
1145
|
class: "w-4 h-4"
|
|
983
|
-
}, null, 8,
|
|
984
|
-
], 10,
|
|
1146
|
+
}, null, 8, Ta)) : C("", !0)
|
|
1147
|
+
], 10, Ea));
|
|
985
1148
|
}
|
|
986
|
-
}),
|
|
1149
|
+
}), ge = (e, n) => {
|
|
987
1150
|
const t = e.__vccOpts || e;
|
|
988
|
-
for (const [a,
|
|
989
|
-
t[a] =
|
|
1151
|
+
for (const [a, l] of n)
|
|
1152
|
+
t[a] = l;
|
|
990
1153
|
return t;
|
|
991
|
-
},
|
|
1154
|
+
}, Aa = /* @__PURE__ */ ge(Ba, [["__scopeId", "data-v-2eaf6e27"]]), Qe = {
|
|
1155
|
+
info: "border-ui-border bg-ui-surface/70 text-tx-main",
|
|
1156
|
+
success: "border-status-success/40 bg-status-success/10 text-tx-main",
|
|
1157
|
+
warning: "border-status-warning/40 bg-status-warning/10 text-tx-main",
|
|
1158
|
+
error: "border-status-error/40 bg-status-error/10 text-tx-main"
|
|
1159
|
+
};
|
|
1160
|
+
function Ye(e) {
|
|
1161
|
+
return e === "error" ? "alert" : "status";
|
|
1162
|
+
}
|
|
1163
|
+
const Sa = ["role"], Ma = /* @__PURE__ */ E({
|
|
1164
|
+
__name: "AlertMessage",
|
|
1165
|
+
props: {
|
|
1166
|
+
tone: { default: "info" }
|
|
1167
|
+
},
|
|
1168
|
+
setup(e) {
|
|
1169
|
+
const n = e, t = p(() => Qe[n.tone]), a = p(() => Ye(n.tone));
|
|
1170
|
+
return (l, o) => (r(), s("div", {
|
|
1171
|
+
role: a.value,
|
|
1172
|
+
"aria-atomic": "true",
|
|
1173
|
+
class: k(["rounded-corner border px-4 py-2 text-sm", t.value])
|
|
1174
|
+
}, [
|
|
1175
|
+
A(l.$slots, "default")
|
|
1176
|
+
], 10, Sa));
|
|
1177
|
+
}
|
|
1178
|
+
}), Va = { class: "font-medium text-sm text-tx-main" }, Oa = {
|
|
1179
|
+
key: 0,
|
|
1180
|
+
class: "text-sm text-tx-muted"
|
|
1181
|
+
}, Ia = /* @__PURE__ */ E({
|
|
1182
|
+
__name: "EmptyState",
|
|
1183
|
+
props: {
|
|
1184
|
+
title: {},
|
|
1185
|
+
note: {},
|
|
1186
|
+
icon: { default: "dialog-information" },
|
|
1187
|
+
bordered: { type: Boolean, default: !1 }
|
|
1188
|
+
},
|
|
1189
|
+
setup(e) {
|
|
1190
|
+
return (n, t) => (r(), s("div", {
|
|
1191
|
+
class: k(["flex flex-col items-center justify-center gap-3 px-8 py-12 text-center", e.bordered ? "rounded-corner border border-ui-border border-dashed bg-ui-surface/20" : ""])
|
|
1192
|
+
}, [
|
|
1193
|
+
q(H, {
|
|
1194
|
+
name: e.icon,
|
|
1195
|
+
size: 48,
|
|
1196
|
+
class: "opacity-60"
|
|
1197
|
+
}, null, 8, ["name"]),
|
|
1198
|
+
B("p", Va, V(e.title), 1),
|
|
1199
|
+
e.note ? (r(), s("p", Oa, V(e.note), 1)) : C("", !0),
|
|
1200
|
+
A(n.$slots, "default")
|
|
1201
|
+
], 2));
|
|
1202
|
+
}
|
|
1203
|
+
}), Pa = ["role"], ja = /* @__PURE__ */ E({
|
|
1204
|
+
__name: "ToastArea",
|
|
1205
|
+
props: {
|
|
1206
|
+
toasts: {},
|
|
1207
|
+
position: { default: "bottom-right" }
|
|
1208
|
+
},
|
|
1209
|
+
setup(e) {
|
|
1210
|
+
const n = e, t = p(
|
|
1211
|
+
() => n.position === "bottom-center" ? "bottom-4 left-1/2 -translate-x-1/2" : "right-4 bottom-4"
|
|
1212
|
+
);
|
|
1213
|
+
return (a, l) => (r(), Q(ce, { to: "body" }, [
|
|
1214
|
+
B("div", {
|
|
1215
|
+
class: k(["pointer-events-none fixed z-50 flex flex-col gap-2", t.value])
|
|
1216
|
+
}, [
|
|
1217
|
+
q(ut, {
|
|
1218
|
+
"enter-active-class": "transition-all duration-300 ease-out",
|
|
1219
|
+
"leave-active-class": "transition-all duration-200 ease-in",
|
|
1220
|
+
"enter-from-class": "translate-y-2 opacity-0",
|
|
1221
|
+
"leave-to-class": "translate-y-2 opacity-0",
|
|
1222
|
+
"move-class": "transition-transform duration-300"
|
|
1223
|
+
}, {
|
|
1224
|
+
default: W(() => [
|
|
1225
|
+
(r(!0), s(J, null, te(e.toasts, (o) => (r(), s("div", {
|
|
1226
|
+
key: o.id,
|
|
1227
|
+
role: F(Ye)(o.tone ?? "info"),
|
|
1228
|
+
"aria-atomic": "true",
|
|
1229
|
+
class: k(["pointer-events-auto rounded-corner border px-4 py-2 text-sm shadow-lg backdrop-blur-sm", F(Qe)[o.tone ?? "info"]])
|
|
1230
|
+
}, [
|
|
1231
|
+
A(a.$slots, "default", { aviso: o }, () => [
|
|
1232
|
+
Ee(V(o.message), 1)
|
|
1233
|
+
])
|
|
1234
|
+
], 10, Pa))), 128))
|
|
1235
|
+
]),
|
|
1236
|
+
_: 3
|
|
1237
|
+
})
|
|
1238
|
+
], 2)
|
|
1239
|
+
]));
|
|
1240
|
+
}
|
|
1241
|
+
}), Fa = ["aria-label", "aria-valuenow"], qa = {
|
|
1242
|
+
key: 1,
|
|
1243
|
+
class: "h-full w-1/3 animate-pulse rounded-corner bg-primary"
|
|
1244
|
+
}, Ra = /* @__PURE__ */ E({
|
|
1245
|
+
__name: "ProgressBar",
|
|
1246
|
+
props: {
|
|
1247
|
+
value: {},
|
|
1248
|
+
label: {}
|
|
1249
|
+
},
|
|
1250
|
+
setup(e) {
|
|
1251
|
+
const n = e, t = p(
|
|
1252
|
+
() => n.value === null ? null : Math.max(0, Math.min(100, n.value))
|
|
1253
|
+
);
|
|
1254
|
+
return (a, l) => (r(), s("div", {
|
|
1255
|
+
role: "progressbar",
|
|
1256
|
+
"aria-label": e.label,
|
|
1257
|
+
"aria-valuenow": t.value ?? void 0,
|
|
1258
|
+
"aria-valuemin": "0",
|
|
1259
|
+
"aria-valuemax": "100",
|
|
1260
|
+
class: "h-2 w-full overflow-hidden rounded-corner bg-ui-surface/70"
|
|
1261
|
+
}, [
|
|
1262
|
+
t.value !== null ? (r(), s("div", {
|
|
1263
|
+
key: 0,
|
|
1264
|
+
class: "h-full rounded-corner bg-primary transition-[width] duration-300 ease-out",
|
|
1265
|
+
style: se({ width: `${t.value}%` })
|
|
1266
|
+
}, null, 4)) : (r(), s("div", qa))
|
|
1267
|
+
], 8, Fa));
|
|
1268
|
+
}
|
|
1269
|
+
}), Na = /[/\-_.]/;
|
|
1270
|
+
function xe(e, n) {
|
|
1271
|
+
if (!n) return 100;
|
|
1272
|
+
const t = n.toLowerCase();
|
|
1273
|
+
return t === e ? 0 : t.startsWith(e) ? 10 : t.split(Na).some((a) => a.startsWith(e)) ? 30 : t.includes(e) ? 40 : 100;
|
|
1274
|
+
}
|
|
1275
|
+
function Ha(e, n) {
|
|
1276
|
+
const t = n.trim().toLowerCase();
|
|
1277
|
+
if (!t) return e;
|
|
1278
|
+
const a = [];
|
|
1279
|
+
for (let l = 0; l < e.length; l++) {
|
|
1280
|
+
const o = e[l], u = xe(t, o.valor), i = xe(t, o.etiqueta), m = i === 10 ? 20 : i, f = xe(t, o.detalle) === 100 ? 100 : 40, T = Math.min(u, m, f);
|
|
1281
|
+
T !== 100 && a.push({ opcion: o, rango: T, orden: l });
|
|
1282
|
+
}
|
|
1283
|
+
return a.sort((l, o) => l.rango - o.rango || l.orden - o.orden), a.map((l) => l.opcion);
|
|
1284
|
+
}
|
|
1285
|
+
let Oe = 0;
|
|
1286
|
+
function Ua() {
|
|
1287
|
+
return Oe += 1, `vsk-lista-${Oe}`;
|
|
1288
|
+
}
|
|
1289
|
+
const Wa = ["disabled", "aria-label", "aria-expanded"], Ka = { class: "min-w-0 flex-1 truncate" }, Ga = {
|
|
1290
|
+
key: 0,
|
|
1291
|
+
class: "ml-2 text-tx-muted text-xs"
|
|
1292
|
+
}, Qa = { class: "border-ui-border border-b p-2" }, Ya = ["id"], Xa = {
|
|
1293
|
+
key: 0,
|
|
1294
|
+
class: "p-3 text-center text-tx-muted text-xs"
|
|
1295
|
+
}, _a = ["id", "data-indice", "aria-selected"], Ja = { class: "min-w-0 flex-1 truncate" }, Za = {
|
|
1296
|
+
key: 0,
|
|
1297
|
+
class: "shrink-0 text-tx-muted text-xs"
|
|
1298
|
+
}, en = {
|
|
1299
|
+
key: 1,
|
|
1300
|
+
class: "px-2 py-1 text-tx-muted text-xs"
|
|
1301
|
+
}, tn = /* @__PURE__ */ E({
|
|
1302
|
+
__name: "SearchSelect",
|
|
1303
|
+
props: {
|
|
1304
|
+
modelValue: {},
|
|
1305
|
+
options: {},
|
|
1306
|
+
label: { default: "" },
|
|
1307
|
+
searchPlaceholder: { default: "" },
|
|
1308
|
+
emptyText: { default: "" },
|
|
1309
|
+
placeholder: { default: "—" },
|
|
1310
|
+
disabled: { type: Boolean, default: !1 },
|
|
1311
|
+
limit: { default: 60 },
|
|
1312
|
+
up: { type: Boolean, default: !1 }
|
|
1313
|
+
},
|
|
1314
|
+
emits: ["update:modelValue"],
|
|
1315
|
+
setup(e, { emit: n }) {
|
|
1316
|
+
const t = e, a = n, l = x(""), o = x(!1), u = x(0), i = x(null), m = x(null), v = x(null), f = Ua(), T = p(
|
|
1317
|
+
() => t.options.find((L) => L.valor === t.modelValue) ?? null
|
|
1318
|
+
), D = p(() => Ha(t.options, l.value)), z = p(() => D.value.slice(0, t.limit)), g = p(() => Math.max(0, D.value.length - t.limit)), d = p(
|
|
1319
|
+
() => z.value.length > 0 ? `${f}-${u.value}` : void 0
|
|
1320
|
+
);
|
|
1321
|
+
function S(L) {
|
|
1322
|
+
a("update:modelValue", L), w();
|
|
1323
|
+
}
|
|
1324
|
+
async function I() {
|
|
1325
|
+
o.value = !0;
|
|
1326
|
+
const L = z.value.findIndex(($) => $.valor === t.modelValue);
|
|
1327
|
+
u.value = L >= 0 ? L : 0, await Y(), v.value?.enfocar(), U();
|
|
1328
|
+
}
|
|
1329
|
+
function w(L = !0) {
|
|
1330
|
+
o.value && (o.value = !1, l.value = "", L && Y(() => m.value?.focus()));
|
|
1331
|
+
}
|
|
1332
|
+
function c(L) {
|
|
1333
|
+
const $ = z.value.length;
|
|
1334
|
+
$ !== 0 && (u.value = (u.value + L + $) % $, U());
|
|
1335
|
+
}
|
|
1336
|
+
function b(L) {
|
|
1337
|
+
u.value = L, U();
|
|
1338
|
+
}
|
|
1339
|
+
function y(L) {
|
|
1340
|
+
const $ = L.target?.closest?.("[data-indice]");
|
|
1341
|
+
if (!$) return null;
|
|
1342
|
+
const O = Number($.getAttribute("data-indice"));
|
|
1343
|
+
return Number.isInteger(O) ? O : null;
|
|
1344
|
+
}
|
|
1345
|
+
function P(L) {
|
|
1346
|
+
const $ = y(L), O = $ === null ? void 0 : z.value[$];
|
|
1347
|
+
O && S(O.valor);
|
|
1348
|
+
}
|
|
1349
|
+
function Z(L) {
|
|
1350
|
+
const $ = y(L);
|
|
1351
|
+
$ !== null && (u.value = $);
|
|
1352
|
+
}
|
|
1353
|
+
function U() {
|
|
1354
|
+
Y(() => {
|
|
1355
|
+
i.value?.querySelector(`[data-indice="${u.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
1356
|
+
});
|
|
1357
|
+
}
|
|
1358
|
+
function ee() {
|
|
1359
|
+
const L = z.value[u.value];
|
|
1360
|
+
L && S(L.valor);
|
|
1361
|
+
}
|
|
1362
|
+
K(
|
|
1363
|
+
() => t.disabled,
|
|
1364
|
+
(L) => {
|
|
1365
|
+
L && w(!1);
|
|
1366
|
+
}
|
|
1367
|
+
), K(l, () => {
|
|
1368
|
+
u.value = 0, U();
|
|
1369
|
+
});
|
|
1370
|
+
function G(L) {
|
|
1371
|
+
const $ = L.relatedTarget;
|
|
1372
|
+
$ && L.currentTarget.contains($) || w(!1);
|
|
1373
|
+
}
|
|
1374
|
+
return (L, $) => (r(), s("div", {
|
|
1375
|
+
class: "relative",
|
|
1376
|
+
onFocusout: G
|
|
1377
|
+
}, [
|
|
1378
|
+
B("button", {
|
|
1379
|
+
ref_key: "boton",
|
|
1380
|
+
ref: m,
|
|
1381
|
+
type: "button",
|
|
1382
|
+
disabled: e.disabled,
|
|
1383
|
+
class: "flex w-full items-center justify-between gap-2 rounded-corner border border-ui-border-strong bg-ui-surface px-2 py-1 text-left text-sm text-tx-main transition-colors hover:bg-ui-bg/60 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1384
|
+
"aria-label": e.label || void 0,
|
|
1385
|
+
"aria-expanded": o.value,
|
|
1386
|
+
"aria-haspopup": "listbox",
|
|
1387
|
+
onClick: $[0] || ($[0] = (O) => o.value ? w() : I()),
|
|
1388
|
+
onKeydown: [
|
|
1389
|
+
$[1] || ($[1] = j(M((O) => o.value ? c(1) : I(), ["prevent"]), ["down"])),
|
|
1390
|
+
$[2] || ($[2] = j(M((O) => o.value ? c(-1) : I(), ["prevent"]), ["up"]))
|
|
1391
|
+
]
|
|
1392
|
+
}, [
|
|
1393
|
+
B("span", Ka, [
|
|
1394
|
+
Ee(V(T.value?.etiqueta ?? e.placeholder) + " ", 1),
|
|
1395
|
+
T.value?.detalle ? (r(), s("span", Ga, V(T.value.detalle), 1)) : C("", !0)
|
|
1396
|
+
]),
|
|
1397
|
+
q(H, {
|
|
1398
|
+
name: "go-down",
|
|
1399
|
+
type: "symbol",
|
|
1400
|
+
size: 12,
|
|
1401
|
+
class: "shrink-0 opacity-60"
|
|
1402
|
+
})
|
|
1403
|
+
], 40, Wa),
|
|
1404
|
+
o.value ? (r(), s("div", {
|
|
1405
|
+
key: 0,
|
|
1406
|
+
class: k(["absolute z-20 w-full min-w-64 rounded-corner border border-ui-border-strong bg-ui-bg shadow-lg", e.up ? "bottom-full mb-1" : "mt-1"]),
|
|
1407
|
+
onKeydown: [
|
|
1408
|
+
$[4] || ($[4] = j(M((O) => w(), ["prevent"]), ["escape"])),
|
|
1409
|
+
$[5] || ($[5] = j(M((O) => c(1), ["prevent"]), ["down"])),
|
|
1410
|
+
$[6] || ($[6] = j(M((O) => c(-1), ["prevent"]), ["up"])),
|
|
1411
|
+
$[7] || ($[7] = j(M((O) => b(0), ["prevent"]), ["home"])),
|
|
1412
|
+
$[8] || ($[8] = j(M((O) => b(z.value.length - 1), ["prevent"]), ["end"])),
|
|
1413
|
+
$[9] || ($[9] = j(M((O) => ee(), ["prevent"]), ["enter"])),
|
|
1414
|
+
$[10] || ($[10] = j((O) => w(!1), ["tab"]))
|
|
1415
|
+
],
|
|
1416
|
+
onClick: P,
|
|
1417
|
+
onMousemove: Z
|
|
1418
|
+
}, [
|
|
1419
|
+
B("div", Qa, [
|
|
1420
|
+
q(Le, {
|
|
1421
|
+
ref_key: "campo",
|
|
1422
|
+
ref: v,
|
|
1423
|
+
modelValue: l.value,
|
|
1424
|
+
"onUpdate:modelValue": $[3] || ($[3] = (O) => l.value = O),
|
|
1425
|
+
label: e.label,
|
|
1426
|
+
placeholder: e.searchPlaceholder,
|
|
1427
|
+
"listbox-id": F(f),
|
|
1428
|
+
"active-option-id": d.value,
|
|
1429
|
+
expanded: o.value
|
|
1430
|
+
}, null, 8, ["modelValue", "label", "placeholder", "listbox-id", "active-option-id", "expanded"])
|
|
1431
|
+
]),
|
|
1432
|
+
B("ul", {
|
|
1433
|
+
id: F(f),
|
|
1434
|
+
ref_key: "lista",
|
|
1435
|
+
ref: i,
|
|
1436
|
+
role: "listbox",
|
|
1437
|
+
class: "max-h-56 overflow-y-auto p-1"
|
|
1438
|
+
}, [
|
|
1439
|
+
z.value.length === 0 ? (r(), s("li", Xa, V(e.emptyText), 1)) : C("", !0),
|
|
1440
|
+
(r(!0), s(J, null, te(z.value, (O, ne) => (r(), s("li", {
|
|
1441
|
+
id: `${F(f)}-${ne}`,
|
|
1442
|
+
key: O.valor,
|
|
1443
|
+
"data-indice": ne,
|
|
1444
|
+
role: "option",
|
|
1445
|
+
"aria-selected": O.valor === e.modelValue,
|
|
1446
|
+
class: k(["flex cursor-pointer items-baseline gap-2 rounded-corner px-2 py-1 text-sm", [
|
|
1447
|
+
ne === u.value ? "bg-ui-surface" : "",
|
|
1448
|
+
O.valor === e.modelValue ? "font-medium text-primary" : "text-tx-main"
|
|
1449
|
+
]])
|
|
1450
|
+
}, [
|
|
1451
|
+
B("span", Ja, V(O.etiqueta), 1),
|
|
1452
|
+
O.detalle ? (r(), s("span", Za, V(O.detalle), 1)) : C("", !0)
|
|
1453
|
+
], 10, _a))), 128)),
|
|
1454
|
+
g.value > 0 ? (r(), s("li", en, "+" + V(g.value), 1)) : C("", !0)
|
|
1455
|
+
], 8, Ya)
|
|
1456
|
+
], 34)) : C("", !0)
|
|
1457
|
+
], 32));
|
|
1458
|
+
}
|
|
1459
|
+
}), an = { class: "text-base font-semibold m-0 text-primary dark:text-primary-dark" }, nn = /* @__PURE__ */ E({
|
|
992
1460
|
__name: "ConfigSection",
|
|
993
1461
|
props: {
|
|
994
1462
|
title: {},
|
|
@@ -996,26 +1464,26 @@ const At = ["title", "aria-label"], St = ["title", "aria-label"], Tt = ["title",
|
|
|
996
1464
|
customClass: { default: () => ({}) }
|
|
997
1465
|
},
|
|
998
1466
|
setup(e) {
|
|
999
|
-
return (n, t) => (
|
|
1000
|
-
class:
|
|
1467
|
+
return (n, t) => (r(), s("div", {
|
|
1468
|
+
class: k(["flex flex-col gap-4 p-4 background rounded-corner", e.customClass])
|
|
1001
1469
|
}, [
|
|
1002
|
-
|
|
1003
|
-
|
|
1470
|
+
B("h3", an, V(e.icon ? `${e.icon} ${e.title}` : e.title), 1),
|
|
1471
|
+
A(n.$slots, "default", {}, void 0, !0)
|
|
1004
1472
|
], 2));
|
|
1005
1473
|
}
|
|
1006
|
-
}),
|
|
1474
|
+
}), ln = /* @__PURE__ */ ge(nn, [["__scopeId", "data-v-45bd4eab"]]), on = { class: "flex items-center gap-3 flex-1 min-w-0" }, rn = ["src", "alt"], sn = { class: "min-w-0" }, un = { class: "font-semibold truncate" }, cn = {
|
|
1007
1475
|
key: 0,
|
|
1008
1476
|
class: "text-xs text-gray-400 truncate"
|
|
1009
|
-
},
|
|
1477
|
+
}, dn = {
|
|
1010
1478
|
key: 1,
|
|
1011
1479
|
class: "text-xs text-gray-400 truncate"
|
|
1012
|
-
},
|
|
1480
|
+
}, fn = {
|
|
1013
1481
|
key: 2,
|
|
1014
1482
|
class: "text-xs text-gray-400 flex gap-2 mt-1"
|
|
1015
|
-
},
|
|
1483
|
+
}, mn = {
|
|
1016
1484
|
key: 1,
|
|
1017
1485
|
class: "w-2 h-2 rounded-full bg-green-500"
|
|
1018
|
-
},
|
|
1486
|
+
}, vn = /* @__PURE__ */ E({
|
|
1019
1487
|
__name: "DeviceCard",
|
|
1020
1488
|
props: {
|
|
1021
1489
|
icon: {},
|
|
@@ -1034,51 +1502,211 @@ const At = ["title", "aria-label"], St = ["title", "aria-label"], Tt = ["title",
|
|
|
1034
1502
|
setup(e, { emit: n }) {
|
|
1035
1503
|
const t = n, a = () => {
|
|
1036
1504
|
t("action");
|
|
1037
|
-
},
|
|
1505
|
+
}, l = () => {
|
|
1038
1506
|
t("click");
|
|
1039
1507
|
};
|
|
1040
|
-
return (
|
|
1041
|
-
class:
|
|
1042
|
-
onClick:
|
|
1508
|
+
return (o, u) => (r(), s("div", {
|
|
1509
|
+
class: k(["flex items-center justify-between background rounded-vsk px-6 py-3 mb-4", [{ "border-l-4 border-green-500": e.isConnected }, e.customClass]]),
|
|
1510
|
+
onClick: l
|
|
1043
1511
|
}, [
|
|
1044
|
-
|
|
1045
|
-
|
|
1512
|
+
B("div", on, [
|
|
1513
|
+
B("img", {
|
|
1046
1514
|
src: e.icon,
|
|
1047
1515
|
alt: e.title,
|
|
1048
1516
|
class: "h-7 w-7 shrink-0"
|
|
1049
|
-
}, null, 8,
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
e.subtitle ? (
|
|
1053
|
-
e.metadata ? (
|
|
1054
|
-
e.extraInfo && e.extraInfo.length > 0 ? (
|
|
1055
|
-
(
|
|
1056
|
-
])) :
|
|
1517
|
+
}, null, 8, rn),
|
|
1518
|
+
B("div", sn, [
|
|
1519
|
+
B("div", un, V(e.title), 1),
|
|
1520
|
+
e.subtitle ? (r(), s("div", cn, V(e.subtitle), 1)) : C("", !0),
|
|
1521
|
+
e.metadata ? (r(), s("div", dn, V(e.metadata), 1)) : C("", !0),
|
|
1522
|
+
e.extraInfo && e.extraInfo.length > 0 ? (r(), s("div", fn, [
|
|
1523
|
+
(r(!0), s(J, null, te(e.extraInfo, (i, m) => (r(), s("span", { key: m }, V(i), 1))), 128))
|
|
1524
|
+
])) : C("", !0)
|
|
1057
1525
|
])
|
|
1058
1526
|
]),
|
|
1059
|
-
e.showActionButton ? (
|
|
1527
|
+
e.showActionButton ? (r(), s("button", {
|
|
1060
1528
|
key: 0,
|
|
1061
1529
|
class: "bg-vsk-primary rounded-vsk px-4 py-2 text-sm font-semibold cursor-pointer hover:opacity-70",
|
|
1062
|
-
onClick:
|
|
1063
|
-
},
|
|
1064
|
-
e.showStatusIndicator && e.isConnected ? (
|
|
1530
|
+
onClick: M(a, ["stop"])
|
|
1531
|
+
}, V(e.actionLabel), 1)) : C("", !0),
|
|
1532
|
+
e.showStatusIndicator && e.isConnected ? (r(), s("div", mn)) : C("", !0)
|
|
1065
1533
|
], 2));
|
|
1066
1534
|
}
|
|
1067
|
-
}),
|
|
1068
|
-
function
|
|
1069
|
-
const e =
|
|
1535
|
+
}), Xe = /* @__PURE__ */ Symbol("diálogo de vasak");
|
|
1536
|
+
function _e() {
|
|
1537
|
+
const e = be(Xe, null);
|
|
1070
1538
|
if (e) return e;
|
|
1071
|
-
const n =
|
|
1539
|
+
const n = x(!1);
|
|
1540
|
+
return {
|
|
1541
|
+
abierto: p(() => n.value),
|
|
1542
|
+
cerrar: () => {
|
|
1543
|
+
n.value = !1;
|
|
1544
|
+
},
|
|
1545
|
+
idDelTitulo: x(null),
|
|
1546
|
+
ponerElTitulo: () => {
|
|
1547
|
+
}
|
|
1548
|
+
};
|
|
1549
|
+
}
|
|
1550
|
+
let Ie = 0;
|
|
1551
|
+
function bn() {
|
|
1552
|
+
return Ie += 1, `vsk-dialogo-titulo-${Ie}`;
|
|
1553
|
+
}
|
|
1554
|
+
const pn = /* @__PURE__ */ E({
|
|
1555
|
+
__name: "Dialog",
|
|
1556
|
+
props: {
|
|
1557
|
+
open: { type: Boolean, default: !1 }
|
|
1558
|
+
},
|
|
1559
|
+
emits: ["update:open"],
|
|
1560
|
+
setup(e, { emit: n }) {
|
|
1561
|
+
const t = e, a = n, l = x(null);
|
|
1562
|
+
return ue(Xe, {
|
|
1563
|
+
abierto: p(() => t.open),
|
|
1564
|
+
cerrar: () => a("update:open", !1),
|
|
1565
|
+
idDelTitulo: l,
|
|
1566
|
+
ponerElTitulo: (o) => {
|
|
1567
|
+
l.value = o;
|
|
1568
|
+
}
|
|
1569
|
+
}), (o, u) => A(o.$slots, "default");
|
|
1570
|
+
}
|
|
1571
|
+
}), gn = ["aria-labelledby"], yn = /* @__PURE__ */ E({
|
|
1572
|
+
inheritAttrs: !1,
|
|
1573
|
+
__name: "DialogContent",
|
|
1574
|
+
setup(e) {
|
|
1575
|
+
const n = $e(), t = p(() => n.class ?? ""), a = p(() => {
|
|
1576
|
+
const { class: d, ...S } = n;
|
|
1577
|
+
return S;
|
|
1578
|
+
}), l = _e(), o = p(() => l.abierto.value), u = x(null), i = x(null);
|
|
1579
|
+
let m = null;
|
|
1580
|
+
function v() {
|
|
1581
|
+
return i.value ? [...i.value.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')] : [];
|
|
1582
|
+
}
|
|
1583
|
+
function f(d) {
|
|
1584
|
+
if (d.key === "Escape") {
|
|
1585
|
+
l.cerrar();
|
|
1586
|
+
return;
|
|
1587
|
+
}
|
|
1588
|
+
if (d.key !== "Tab") return;
|
|
1589
|
+
const S = v();
|
|
1590
|
+
if (S.length === 0) {
|
|
1591
|
+
d.preventDefault(), i.value?.focus();
|
|
1592
|
+
return;
|
|
1593
|
+
}
|
|
1594
|
+
const I = S[0], w = S[S.length - 1], c = document.activeElement;
|
|
1595
|
+
d.shiftKey && (c === I || c === i.value) ? (d.preventDefault(), w.focus()) : !d.shiftKey && c === w && (d.preventDefault(), I.focus());
|
|
1596
|
+
}
|
|
1597
|
+
function T(d) {
|
|
1598
|
+
d.target === d.currentTarget && l.cerrar();
|
|
1599
|
+
}
|
|
1600
|
+
function D(d) {
|
|
1601
|
+
u.value?.contains(d.target) || f(d);
|
|
1602
|
+
}
|
|
1603
|
+
function z() {
|
|
1604
|
+
document.removeEventListener("keydown", D);
|
|
1605
|
+
}
|
|
1606
|
+
function g() {
|
|
1607
|
+
const d = m;
|
|
1608
|
+
m = null, d?.isConnected && d.focus();
|
|
1609
|
+
}
|
|
1610
|
+
return K(
|
|
1611
|
+
o,
|
|
1612
|
+
async (d) => {
|
|
1613
|
+
if (d) {
|
|
1614
|
+
m = document.activeElement, document.addEventListener("keydown", D), await Y(), i.value?.focus();
|
|
1615
|
+
return;
|
|
1616
|
+
}
|
|
1617
|
+
z(), g();
|
|
1618
|
+
},
|
|
1619
|
+
// `watch` no corre para el valor inicial, y un diálogo se puede montar ya
|
|
1620
|
+
// abierto —una vista que arranca preguntando algo—. Sin esto, ése no recibe
|
|
1621
|
+
// el foco y ni Escape ni el Tab hacen nada: el `aria-modal` queda en promesa.
|
|
1622
|
+
{ immediate: !0 }
|
|
1623
|
+
), ve(() => {
|
|
1624
|
+
z(), g();
|
|
1625
|
+
}), (d, S) => (r(), Q(ce, { to: "body" }, [
|
|
1626
|
+
q(pe, {
|
|
1627
|
+
"enter-active-class": "transition-opacity duration-200 ease-out",
|
|
1628
|
+
"leave-active-class": "transition-opacity duration-150 ease-in",
|
|
1629
|
+
"enter-from-class": "opacity-0",
|
|
1630
|
+
"leave-to-class": "opacity-0"
|
|
1631
|
+
}, {
|
|
1632
|
+
default: W(() => [
|
|
1633
|
+
o.value ? (r(), s("div", {
|
|
1634
|
+
key: 0,
|
|
1635
|
+
ref_key: "velo",
|
|
1636
|
+
ref: u,
|
|
1637
|
+
class: "fixed inset-0 z-50 flex items-center justify-center",
|
|
1638
|
+
onClick: T,
|
|
1639
|
+
onKeydown: f
|
|
1640
|
+
}, [
|
|
1641
|
+
S[0] || (S[0] = B("div", { class: "absolute inset-0 bg-ui-border-dark/40" }, null, -1)),
|
|
1642
|
+
B("div", ae({
|
|
1643
|
+
ref_key: "panel",
|
|
1644
|
+
ref: i,
|
|
1645
|
+
tabindex: "-1",
|
|
1646
|
+
role: "dialog",
|
|
1647
|
+
"aria-modal": "true",
|
|
1648
|
+
"aria-labelledby": F(l).idDelTitulo.value ?? void 0
|
|
1649
|
+
}, a.value, {
|
|
1650
|
+
class: [
|
|
1651
|
+
t.value,
|
|
1652
|
+
"relative z-10 w-full max-w-lg rounded-corner border border-ui-border bg-ui-bg/80 p-6 text-tx-main shadow-lg"
|
|
1653
|
+
]
|
|
1654
|
+
}), [
|
|
1655
|
+
A(d.$slots, "default")
|
|
1656
|
+
], 16, gn)
|
|
1657
|
+
], 544)) : C("", !0)
|
|
1658
|
+
]),
|
|
1659
|
+
_: 3
|
|
1660
|
+
})
|
|
1661
|
+
]));
|
|
1662
|
+
}
|
|
1663
|
+
}), hn = { class: "text-sm text-tx-muted" }, xn = /* @__PURE__ */ E({
|
|
1664
|
+
__name: "DialogDescription",
|
|
1665
|
+
setup(e) {
|
|
1666
|
+
return (n, t) => (r(), s("p", hn, [
|
|
1667
|
+
A(n.$slots, "default")
|
|
1668
|
+
]));
|
|
1669
|
+
}
|
|
1670
|
+
}), kn = { class: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end" }, wn = /* @__PURE__ */ E({
|
|
1671
|
+
__name: "DialogFooter",
|
|
1672
|
+
setup(e) {
|
|
1673
|
+
return (n, t) => (r(), s("div", kn, [
|
|
1674
|
+
A(n.$slots, "default")
|
|
1675
|
+
]));
|
|
1676
|
+
}
|
|
1677
|
+
}), $n = { class: "flex flex-col gap-1.5 text-center sm:text-left" }, Cn = /* @__PURE__ */ E({
|
|
1678
|
+
__name: "DialogHeader",
|
|
1679
|
+
setup(e) {
|
|
1680
|
+
return (n, t) => (r(), s("div", $n, [
|
|
1681
|
+
A(n.$slots, "default")
|
|
1682
|
+
]));
|
|
1683
|
+
}
|
|
1684
|
+
}), En = ["id"], Dn = /* @__PURE__ */ E({
|
|
1685
|
+
__name: "DialogTitle",
|
|
1686
|
+
setup(e) {
|
|
1687
|
+
const n = _e(), t = bn();
|
|
1688
|
+
return _(() => n.ponerElTitulo(t)), ve(() => n.ponerElTitulo(null)), (a, l) => (r(), s("h2", {
|
|
1689
|
+
id: F(t),
|
|
1690
|
+
class: "font-semibold text-lg leading-none tracking-tight"
|
|
1691
|
+
}, [
|
|
1692
|
+
A(a.$slots, "default")
|
|
1693
|
+
], 8, En));
|
|
1694
|
+
}
|
|
1695
|
+
}), Je = /* @__PURE__ */ Symbol("menú de vasak");
|
|
1696
|
+
function ye() {
|
|
1697
|
+
const e = be(Je, null);
|
|
1698
|
+
if (e) return e;
|
|
1699
|
+
const n = x(!1);
|
|
1072
1700
|
return {
|
|
1073
1701
|
abierto: n,
|
|
1074
1702
|
idDelMenu: "vsk-menu-suelto",
|
|
1075
|
-
idDeLaEtiqueta:
|
|
1703
|
+
idDeLaEtiqueta: x(null),
|
|
1076
1704
|
ponerLaEtiqueta: () => {
|
|
1077
1705
|
},
|
|
1078
|
-
disparador:
|
|
1706
|
+
disparador: x(null),
|
|
1079
1707
|
ponerElDisparador: () => {
|
|
1080
1708
|
},
|
|
1081
|
-
focoAlAbrir:
|
|
1709
|
+
focoAlAbrir: x("ninguno"),
|
|
1082
1710
|
abrir: () => {
|
|
1083
1711
|
n.value = !0;
|
|
1084
1712
|
},
|
|
@@ -1090,70 +1718,70 @@ function oe() {
|
|
|
1090
1718
|
}
|
|
1091
1719
|
};
|
|
1092
1720
|
}
|
|
1093
|
-
let
|
|
1094
|
-
function
|
|
1095
|
-
return
|
|
1721
|
+
let Pe = 0;
|
|
1722
|
+
function Ze() {
|
|
1723
|
+
return Pe += 1, `vsk-menu-${Pe}`;
|
|
1096
1724
|
}
|
|
1097
|
-
const
|
|
1725
|
+
const zn = { class: "relative inline-block" }, Ln = /* @__PURE__ */ E({
|
|
1098
1726
|
__name: "DropdownMenu",
|
|
1099
1727
|
props: {
|
|
1100
1728
|
open: { type: Boolean, default: void 0 }
|
|
1101
1729
|
},
|
|
1102
1730
|
emits: ["update:open"],
|
|
1103
1731
|
setup(e, { emit: n }) {
|
|
1104
|
-
const t = e, a = n,
|
|
1732
|
+
const t = e, a = n, l = x(!1), o = x(null), u = x(null), i = x("ninguno"), m = Ze();
|
|
1105
1733
|
let v = null;
|
|
1106
|
-
const
|
|
1107
|
-
get: () => t.open ??
|
|
1108
|
-
set: (
|
|
1109
|
-
t.open === void 0 && (
|
|
1734
|
+
const f = p({
|
|
1735
|
+
get: () => t.open ?? l.value,
|
|
1736
|
+
set: (g) => {
|
|
1737
|
+
t.open === void 0 && (l.value = g), a("update:open", g);
|
|
1110
1738
|
}
|
|
1111
1739
|
});
|
|
1112
|
-
|
|
1113
|
-
if (
|
|
1114
|
-
const
|
|
1115
|
-
v =
|
|
1740
|
+
K(f, (g) => {
|
|
1741
|
+
if (g) {
|
|
1742
|
+
const d = document.activeElement;
|
|
1743
|
+
v = d instanceof HTMLElement ? d : null;
|
|
1116
1744
|
} else
|
|
1117
|
-
|
|
1745
|
+
i.value = "ninguno";
|
|
1118
1746
|
});
|
|
1119
|
-
function
|
|
1120
|
-
|
|
1747
|
+
function T(g = "ninguno") {
|
|
1748
|
+
i.value = g, f.value = !0;
|
|
1121
1749
|
}
|
|
1122
|
-
function
|
|
1123
|
-
if (
|
|
1124
|
-
const
|
|
1125
|
-
|
|
1750
|
+
function D(g = {}) {
|
|
1751
|
+
if (f.value = !1, !g.devolverElFoco) return;
|
|
1752
|
+
const d = v ?? o.value;
|
|
1753
|
+
d?.isConnected && d.focus();
|
|
1126
1754
|
}
|
|
1127
|
-
function
|
|
1128
|
-
if (
|
|
1129
|
-
|
|
1755
|
+
function z(g = "ninguno") {
|
|
1756
|
+
if (f.value) {
|
|
1757
|
+
D({ devolverElFoco: !0 });
|
|
1130
1758
|
return;
|
|
1131
1759
|
}
|
|
1132
|
-
|
|
1133
|
-
}
|
|
1134
|
-
return ue(
|
|
1135
|
-
abierto:
|
|
1136
|
-
idDelMenu:
|
|
1137
|
-
idDeLaEtiqueta:
|
|
1138
|
-
ponerLaEtiqueta: (
|
|
1139
|
-
|
|
1760
|
+
T(g);
|
|
1761
|
+
}
|
|
1762
|
+
return ue(Je, {
|
|
1763
|
+
abierto: f,
|
|
1764
|
+
idDelMenu: m,
|
|
1765
|
+
idDeLaEtiqueta: u,
|
|
1766
|
+
ponerLaEtiqueta: (g) => {
|
|
1767
|
+
u.value = g;
|
|
1140
1768
|
},
|
|
1141
|
-
disparador:
|
|
1142
|
-
ponerElDisparador: (
|
|
1143
|
-
|
|
1769
|
+
disparador: o,
|
|
1770
|
+
ponerElDisparador: (g) => {
|
|
1771
|
+
o.value = g;
|
|
1144
1772
|
},
|
|
1145
|
-
focoAlAbrir:
|
|
1146
|
-
abrir:
|
|
1147
|
-
cerrar:
|
|
1148
|
-
alternar:
|
|
1149
|
-
}), (
|
|
1150
|
-
|
|
1773
|
+
focoAlAbrir: i,
|
|
1774
|
+
abrir: T,
|
|
1775
|
+
cerrar: D,
|
|
1776
|
+
alternar: z
|
|
1777
|
+
}), (g, d) => (r(), s("div", zn, [
|
|
1778
|
+
A(g.$slots, "default")
|
|
1151
1779
|
]));
|
|
1152
1780
|
}
|
|
1153
|
-
}),
|
|
1781
|
+
}), Tn = ["id", "aria-labelledby", "inert"], Bn = {
|
|
1154
1782
|
role: "none",
|
|
1155
1783
|
class: "py-1"
|
|
1156
|
-
},
|
|
1784
|
+
}, X = 8, An = /* @__PURE__ */ E({
|
|
1157
1785
|
inheritAttrs: !1,
|
|
1158
1786
|
__name: "DropdownMenuContent",
|
|
1159
1787
|
props: {
|
|
@@ -1162,7 +1790,7 @@ const ya = { class: "relative inline-block" }, xa = /* @__PURE__ */ E({
|
|
|
1162
1790
|
sideOffset: { default: 4 }
|
|
1163
1791
|
},
|
|
1164
1792
|
setup(e) {
|
|
1165
|
-
const n = e, t =
|
|
1793
|
+
const n = e, t = ye(), { idDelMenu: a, idDeLaEtiqueta: l } = t, o = p(() => t.disparador.value), u = p(() => t.abierto.value), i = x(null), m = x({
|
|
1166
1794
|
top: 0,
|
|
1167
1795
|
left: 0,
|
|
1168
1796
|
techo: null
|
|
@@ -1172,241 +1800,241 @@ const ya = { class: "relative inline-block" }, xa = /* @__PURE__ */ E({
|
|
|
1172
1800
|
left: "right",
|
|
1173
1801
|
right: "left"
|
|
1174
1802
|
};
|
|
1175
|
-
function
|
|
1176
|
-
const
|
|
1177
|
-
switch (
|
|
1803
|
+
function f(c, b) {
|
|
1804
|
+
const y = n.sideOffset + X;
|
|
1805
|
+
switch (c) {
|
|
1178
1806
|
case "bottom":
|
|
1179
|
-
return window.innerHeight -
|
|
1807
|
+
return window.innerHeight - b.bottom - y;
|
|
1180
1808
|
case "top":
|
|
1181
|
-
return
|
|
1809
|
+
return b.top - y;
|
|
1182
1810
|
case "right":
|
|
1183
|
-
return window.innerWidth -
|
|
1811
|
+
return window.innerWidth - b.right - y;
|
|
1184
1812
|
case "left":
|
|
1185
|
-
return
|
|
1813
|
+
return b.left - y;
|
|
1186
1814
|
}
|
|
1187
1815
|
}
|
|
1188
|
-
function
|
|
1189
|
-
return
|
|
1816
|
+
function T(c, b, y) {
|
|
1817
|
+
return y < b ? b : Math.min(Math.max(c, b), y);
|
|
1190
1818
|
}
|
|
1191
|
-
function
|
|
1192
|
-
if (!
|
|
1193
|
-
const
|
|
1194
|
-
let
|
|
1195
|
-
const ee =
|
|
1196
|
-
ee <
|
|
1197
|
-
let
|
|
1198
|
-
switch (
|
|
1819
|
+
function D() {
|
|
1820
|
+
if (!o.value || !i.value) return;
|
|
1821
|
+
const c = o.value.getBoundingClientRect(), b = i.value.scrollHeight, y = i.value.offsetWidth, P = n.side === "top" || n.side === "bottom", Z = P ? b : y;
|
|
1822
|
+
let U = n.side;
|
|
1823
|
+
const ee = f(U, c);
|
|
1824
|
+
ee < Z && f(v[U], c) > ee && (U = v[U]);
|
|
1825
|
+
let G = 0, L = 0, $ = null;
|
|
1826
|
+
switch (U) {
|
|
1199
1827
|
case "bottom": {
|
|
1200
|
-
|
|
1828
|
+
G = c.bottom + n.sideOffset, $ = Math.max(window.innerHeight - G - X, 0);
|
|
1201
1829
|
break;
|
|
1202
1830
|
}
|
|
1203
1831
|
case "top": {
|
|
1204
|
-
|
|
1832
|
+
$ = Math.max(f("top", c), 0), G = c.top - n.sideOffset - Math.min(b, $);
|
|
1205
1833
|
break;
|
|
1206
1834
|
}
|
|
1207
1835
|
case "left":
|
|
1208
1836
|
case "right": {
|
|
1209
|
-
|
|
1210
|
-
const
|
|
1211
|
-
|
|
1837
|
+
L = U === "right" ? c.right + n.sideOffset : c.left - y - n.sideOffset;
|
|
1838
|
+
const O = window.innerHeight - 2 * X;
|
|
1839
|
+
G = T(c.top, X, window.innerHeight - Math.min(b, O) - X), $ = Math.max(window.innerHeight - G - X, 0);
|
|
1212
1840
|
break;
|
|
1213
1841
|
}
|
|
1214
1842
|
}
|
|
1215
|
-
if (
|
|
1843
|
+
if (P)
|
|
1216
1844
|
switch (n.align) {
|
|
1217
1845
|
case "start":
|
|
1218
|
-
|
|
1846
|
+
L = c.left;
|
|
1219
1847
|
break;
|
|
1220
1848
|
case "center":
|
|
1221
|
-
|
|
1849
|
+
L = c.left + c.width / 2 - y / 2;
|
|
1222
1850
|
break;
|
|
1223
1851
|
case "end":
|
|
1224
|
-
|
|
1852
|
+
L = c.right - y;
|
|
1225
1853
|
break;
|
|
1226
1854
|
}
|
|
1227
|
-
|
|
1855
|
+
L = T(L, X, window.innerWidth - y - X), m.value = { top: G, left: L, techo: $ };
|
|
1228
1856
|
}
|
|
1229
|
-
function
|
|
1230
|
-
return
|
|
1857
|
+
function z() {
|
|
1858
|
+
return i.value ? Array.from(i.value.querySelectorAll('[role="menuitem"]')) : [];
|
|
1231
1859
|
}
|
|
1232
|
-
function
|
|
1233
|
-
const
|
|
1234
|
-
if (!
|
|
1235
|
-
const
|
|
1236
|
-
|
|
1860
|
+
function g(c) {
|
|
1861
|
+
const b = z();
|
|
1862
|
+
if (!b.length) return;
|
|
1863
|
+
const y = b.length;
|
|
1864
|
+
b[(c % y + y) % y]?.focus();
|
|
1237
1865
|
}
|
|
1238
|
-
function
|
|
1239
|
-
const
|
|
1240
|
-
return
|
|
1866
|
+
function d() {
|
|
1867
|
+
const c = document.activeElement;
|
|
1868
|
+
return c instanceof HTMLElement ? z().indexOf(c) : -1;
|
|
1241
1869
|
}
|
|
1242
|
-
function
|
|
1243
|
-
const
|
|
1244
|
-
switch (
|
|
1870
|
+
function S(c) {
|
|
1871
|
+
const b = d();
|
|
1872
|
+
switch (c.key) {
|
|
1245
1873
|
case "ArrowDown":
|
|
1246
|
-
|
|
1874
|
+
c.preventDefault(), g(b + 1);
|
|
1247
1875
|
break;
|
|
1248
1876
|
case "ArrowUp":
|
|
1249
|
-
|
|
1877
|
+
c.preventDefault(), g(b <= 0 ? -1 : b - 1);
|
|
1250
1878
|
break;
|
|
1251
1879
|
case "Home":
|
|
1252
|
-
|
|
1880
|
+
c.preventDefault(), g(0);
|
|
1253
1881
|
break;
|
|
1254
1882
|
case "End":
|
|
1255
|
-
|
|
1883
|
+
c.preventDefault(), g(-1);
|
|
1256
1884
|
break;
|
|
1257
1885
|
case "Escape":
|
|
1258
|
-
|
|
1886
|
+
c.preventDefault(), c.stopPropagation(), t.cerrar({ devolverElFoco: !0 });
|
|
1259
1887
|
break;
|
|
1260
1888
|
case "Tab":
|
|
1261
|
-
|
|
1889
|
+
c.preventDefault(), t.cerrar({ devolverElFoco: !0 });
|
|
1262
1890
|
break;
|
|
1263
1891
|
}
|
|
1264
1892
|
}
|
|
1265
|
-
|
|
1266
|
-
if (
|
|
1267
|
-
switch (await
|
|
1268
|
-
|
|
1893
|
+
K(u, async (c) => {
|
|
1894
|
+
if (c)
|
|
1895
|
+
switch (await Y(), requestAnimationFrame(() => {
|
|
1896
|
+
D();
|
|
1269
1897
|
}), t.focoAlAbrir.value) {
|
|
1270
1898
|
case "primero":
|
|
1271
|
-
|
|
1899
|
+
g(0);
|
|
1272
1900
|
break;
|
|
1273
1901
|
case "ultimo":
|
|
1274
|
-
|
|
1902
|
+
g(-1);
|
|
1275
1903
|
break;
|
|
1276
1904
|
// Abierto con el ratón: el foco va al menú y no a un ítem —no hay
|
|
1277
1905
|
// ninguno elegido todavía—, que es lo que deja andar las flechas y el
|
|
1278
1906
|
// Escape sin haber tocado nada.
|
|
1279
1907
|
default:
|
|
1280
|
-
|
|
1908
|
+
i.value?.focus();
|
|
1281
1909
|
}
|
|
1282
1910
|
});
|
|
1283
|
-
function
|
|
1284
|
-
|
|
1285
|
-
}
|
|
1286
|
-
function
|
|
1287
|
-
const
|
|
1288
|
-
!
|
|
1289
|
-
}
|
|
1290
|
-
return
|
|
1291
|
-
document.addEventListener("click",
|
|
1292
|
-
}),
|
|
1293
|
-
document.removeEventListener("click",
|
|
1294
|
-
}), (
|
|
1295
|
-
|
|
1911
|
+
function I(c) {
|
|
1912
|
+
u.value && (c && i.value?.contains(c.target) || D());
|
|
1913
|
+
}
|
|
1914
|
+
function w(c) {
|
|
1915
|
+
const b = c.target, y = !!b.closest("[data-dropdown-content]"), P = !!o.value?.contains(b);
|
|
1916
|
+
!y && !P && t.cerrar();
|
|
1917
|
+
}
|
|
1918
|
+
return _(() => {
|
|
1919
|
+
document.addEventListener("click", w), window.addEventListener("resize", I), window.addEventListener("scroll", I, !0);
|
|
1920
|
+
}), ie(() => {
|
|
1921
|
+
document.removeEventListener("click", w), window.removeEventListener("resize", I), window.removeEventListener("scroll", I, !0);
|
|
1922
|
+
}), (c, b) => (r(), Q(ce, { to: "body" }, [
|
|
1923
|
+
q(pe, {
|
|
1296
1924
|
"enter-active-class": "transition-all duration-150 ease-in-out",
|
|
1297
1925
|
"leave-active-class": "transition-all duration-150 ease-in-out",
|
|
1298
1926
|
"enter-from-class": "opacity-0 scale-95",
|
|
1299
1927
|
"leave-to-class": "opacity-0 scale-95",
|
|
1300
|
-
onEnter:
|
|
1301
|
-
onLeave:
|
|
1928
|
+
onEnter: b[1] || (b[1] = (y) => y.offsetHeight),
|
|
1929
|
+
onLeave: b[2] || (b[2] = (y) => y.offsetHeight)
|
|
1302
1930
|
}, {
|
|
1303
|
-
default:
|
|
1304
|
-
|
|
1931
|
+
default: W(() => [
|
|
1932
|
+
Ce(B("div", ae({
|
|
1305
1933
|
ref_key: "contenido",
|
|
1306
|
-
ref:
|
|
1307
|
-
},
|
|
1308
|
-
id:
|
|
1934
|
+
ref: i
|
|
1935
|
+
}, c.$attrs, {
|
|
1936
|
+
id: F(a),
|
|
1309
1937
|
role: "menu",
|
|
1310
1938
|
tabindex: "-1",
|
|
1311
1939
|
"aria-orientation": "vertical",
|
|
1312
|
-
"aria-labelledby":
|
|
1313
|
-
inert: !
|
|
1940
|
+
"aria-labelledby": F(l) ?? void 0,
|
|
1941
|
+
inert: !u.value,
|
|
1314
1942
|
style: {
|
|
1315
1943
|
position: "fixed",
|
|
1316
|
-
top: `${
|
|
1317
|
-
left: `${
|
|
1318
|
-
maxHeight:
|
|
1944
|
+
top: `${m.value.top}px`,
|
|
1945
|
+
left: `${m.value.left}px`,
|
|
1946
|
+
maxHeight: m.value.techo === null ? void 0 : `${m.value.techo}px`,
|
|
1319
1947
|
overflowY: "auto",
|
|
1320
1948
|
overscrollBehavior: "contain",
|
|
1321
1949
|
zIndex: 50
|
|
1322
1950
|
},
|
|
1323
1951
|
"data-dropdown-content": "",
|
|
1324
1952
|
class: "min-w-30 rounded-corner border border-primary bg-ui-bg/80 shadow-lg focus:outline-none",
|
|
1325
|
-
onClick:
|
|
1326
|
-
onKeydown:
|
|
1953
|
+
onClick: b[0] || (b[0] = (y) => y.stopPropagation()),
|
|
1954
|
+
onKeydown: S
|
|
1327
1955
|
}), [
|
|
1328
|
-
|
|
1329
|
-
|
|
1956
|
+
B("div", Bn, [
|
|
1957
|
+
A(c.$slots, "default")
|
|
1330
1958
|
])
|
|
1331
|
-
], 16,
|
|
1332
|
-
[
|
|
1959
|
+
], 16, Tn), [
|
|
1960
|
+
[qe, u.value]
|
|
1333
1961
|
])
|
|
1334
1962
|
]),
|
|
1335
1963
|
_: 3
|
|
1336
1964
|
})
|
|
1337
1965
|
]));
|
|
1338
1966
|
}
|
|
1339
|
-
}),
|
|
1967
|
+
}), Sn = ["aria-disabled", "onKeydown"], Mn = /* @__PURE__ */ E({
|
|
1340
1968
|
__name: "DropdownMenuItem",
|
|
1341
1969
|
props: {
|
|
1342
1970
|
disabled: { type: Boolean, default: !1 }
|
|
1343
1971
|
},
|
|
1344
1972
|
emits: ["select", "click"],
|
|
1345
1973
|
setup(e, { emit: n }) {
|
|
1346
|
-
const t = e, a = n,
|
|
1347
|
-
function
|
|
1348
|
-
t.disabled || (a("select"), a("click",
|
|
1974
|
+
const t = e, a = n, l = ye();
|
|
1975
|
+
function o(u) {
|
|
1976
|
+
t.disabled || (a("select"), a("click", u), l.cerrar({ devolverElFoco: !0 }));
|
|
1349
1977
|
}
|
|
1350
|
-
return (
|
|
1978
|
+
return (u, i) => (r(), s("div", {
|
|
1351
1979
|
role: "menuitem",
|
|
1352
1980
|
tabindex: "0",
|
|
1353
1981
|
"aria-disabled": e.disabled || void 0,
|
|
1354
|
-
class:
|
|
1982
|
+
class: k([
|
|
1355
1983
|
"px-3 py-2 text-sm transition-colors outline-none",
|
|
1356
1984
|
{
|
|
1357
1985
|
"opacity-50 cursor-not-allowed": e.disabled,
|
|
1358
1986
|
"cursor-pointer hover:bg-primary hover:text-tx-on-primary focus-visible:bg-primary focus-visible:text-tx-on-primary": !e.disabled
|
|
1359
1987
|
}
|
|
1360
1988
|
]),
|
|
1361
|
-
onClick:
|
|
1989
|
+
onClick: o,
|
|
1362
1990
|
onKeydown: [
|
|
1363
|
-
|
|
1364
|
-
|
|
1991
|
+
j(M(o, ["prevent"]), ["enter"]),
|
|
1992
|
+
j(M(o, ["prevent"]), ["space"])
|
|
1365
1993
|
]
|
|
1366
1994
|
}, [
|
|
1367
|
-
|
|
1368
|
-
], 42,
|
|
1995
|
+
A(u.$slots, "default")
|
|
1996
|
+
], 42, Sn));
|
|
1369
1997
|
}
|
|
1370
|
-
}),
|
|
1998
|
+
}), Vn = /* @__PURE__ */ E({
|
|
1371
1999
|
__name: "DropdownMenuLabel",
|
|
1372
2000
|
setup(e) {
|
|
1373
|
-
const n =
|
|
1374
|
-
return
|
|
2001
|
+
const n = ye(), t = `${Ze()}-titulo`;
|
|
2002
|
+
return _(() => {
|
|
1375
2003
|
n.ponerLaEtiqueta(t);
|
|
1376
|
-
}),
|
|
2004
|
+
}), ie(() => {
|
|
1377
2005
|
n.ponerLaEtiqueta(null);
|
|
1378
|
-
}), (a,
|
|
2006
|
+
}), (a, l) => (r(), s("div", {
|
|
1379
2007
|
id: t,
|
|
1380
2008
|
role: "presentation",
|
|
1381
2009
|
class: "px-3 py-2 text-sm font-semibold text-tx-main"
|
|
1382
2010
|
}, [
|
|
1383
|
-
|
|
2011
|
+
A(a.$slots, "default")
|
|
1384
2012
|
]));
|
|
1385
2013
|
}
|
|
1386
|
-
}),
|
|
2014
|
+
}), On = {
|
|
1387
2015
|
role: "separator",
|
|
1388
2016
|
"aria-orientation": "horizontal",
|
|
1389
2017
|
class: "bg-ui-bg/80 my-4 h-0.5"
|
|
1390
|
-
},
|
|
2018
|
+
}, In = /* @__PURE__ */ E({
|
|
1391
2019
|
__name: "DropdownMenuSeparator",
|
|
1392
2020
|
setup(e) {
|
|
1393
|
-
return (n, t) => (
|
|
2021
|
+
return (n, t) => (r(), s("div", On));
|
|
1394
2022
|
}
|
|
1395
2023
|
});
|
|
1396
|
-
function
|
|
2024
|
+
function et(e) {
|
|
1397
2025
|
const n = e.filter(
|
|
1398
|
-
(a) => a.type !==
|
|
2026
|
+
(a) => a.type !== ft && !(a.type === mt && typeof a.children == "string" && !a.children.trim())
|
|
1399
2027
|
);
|
|
1400
2028
|
if (n.length !== 1) return null;
|
|
1401
2029
|
const t = n[0];
|
|
1402
|
-
return t.type ===
|
|
2030
|
+
return t.type === J && Array.isArray(t.children) ? et(t.children) : t;
|
|
1403
2031
|
}
|
|
1404
|
-
function
|
|
2032
|
+
function Pn(e) {
|
|
1405
2033
|
if (e instanceof HTMLElement) return e;
|
|
1406
2034
|
const n = e?.$el;
|
|
1407
2035
|
return n instanceof HTMLElement ? n : null;
|
|
1408
2036
|
}
|
|
1409
|
-
const
|
|
2037
|
+
const jn = E({
|
|
1410
2038
|
name: "DropdownMenuTrigger",
|
|
1411
2039
|
inheritAttrs: !1,
|
|
1412
2040
|
props: {
|
|
@@ -1416,35 +2044,35 @@ const Ma = E({
|
|
|
1416
2044
|
disabled: { type: Boolean, default: !1 }
|
|
1417
2045
|
},
|
|
1418
2046
|
setup(e, { slots: n, attrs: t }) {
|
|
1419
|
-
const a =
|
|
1420
|
-
function
|
|
1421
|
-
a.ponerElDisparador(
|
|
2047
|
+
const a = ye(), l = x(null);
|
|
2048
|
+
function o() {
|
|
2049
|
+
a.ponerElDisparador(Pn(l.value));
|
|
1422
2050
|
}
|
|
1423
|
-
function
|
|
1424
|
-
e.disabled || (
|
|
2051
|
+
function u() {
|
|
2052
|
+
e.disabled || (o(), a.alternar());
|
|
1425
2053
|
}
|
|
1426
|
-
function
|
|
2054
|
+
function i(m) {
|
|
1427
2055
|
if (!e.disabled)
|
|
1428
|
-
switch (
|
|
2056
|
+
switch (m.key) {
|
|
1429
2057
|
case "Enter":
|
|
1430
2058
|
case " ":
|
|
1431
|
-
|
|
2059
|
+
m.preventDefault(), o(), a.alternar("primero");
|
|
1432
2060
|
break;
|
|
1433
2061
|
case "ArrowDown":
|
|
1434
|
-
|
|
2062
|
+
m.preventDefault(), o(), a.abrir("primero");
|
|
1435
2063
|
break;
|
|
1436
2064
|
case "ArrowUp":
|
|
1437
|
-
|
|
2065
|
+
m.preventDefault(), o(), a.abrir("ultimo");
|
|
1438
2066
|
break;
|
|
1439
2067
|
case "Escape":
|
|
1440
|
-
a.abierto.value && (
|
|
2068
|
+
a.abierto.value && (m.preventDefault(), a.cerrar({ devolverElFoco: !0 }));
|
|
1441
2069
|
break;
|
|
1442
2070
|
}
|
|
1443
2071
|
}
|
|
1444
2072
|
return () => {
|
|
1445
|
-
const
|
|
1446
|
-
ref: (
|
|
1447
|
-
|
|
2073
|
+
const m = {
|
|
2074
|
+
ref: (f) => {
|
|
2075
|
+
l.value = f, o();
|
|
1448
2076
|
},
|
|
1449
2077
|
"aria-haspopup": "menu",
|
|
1450
2078
|
"aria-expanded": a.abierto.value ? "true" : "false",
|
|
@@ -1452,21 +2080,21 @@ const Ma = E({
|
|
|
1452
2080
|
// a un elemento que el lector no expone —el menú cerrado está
|
|
1453
2081
|
// `inert`— es una referencia rota.
|
|
1454
2082
|
"aria-controls": a.abierto.value ? a.idDelMenu : void 0,
|
|
1455
|
-
onClick:
|
|
1456
|
-
onKeydown:
|
|
2083
|
+
onClick: u,
|
|
2084
|
+
onKeydown: i
|
|
1457
2085
|
}, v = n.default?.() ?? [];
|
|
1458
2086
|
if (e.asChild) {
|
|
1459
|
-
const
|
|
1460
|
-
if (
|
|
2087
|
+
const f = et(v);
|
|
2088
|
+
if (f) return ct(f, { ...t, ...m });
|
|
1461
2089
|
}
|
|
1462
|
-
return
|
|
2090
|
+
return dt(
|
|
1463
2091
|
"div",
|
|
1464
|
-
{ ...t, class: ["dropdown-menu-trigger inline-block", t.class], ...
|
|
2092
|
+
{ ...t, class: ["dropdown-menu-trigger inline-block", t.class], ...m },
|
|
1465
2093
|
v
|
|
1466
2094
|
);
|
|
1467
2095
|
};
|
|
1468
2096
|
}
|
|
1469
|
-
}),
|
|
2097
|
+
}), Fn = ["for"], qn = /* @__PURE__ */ E({
|
|
1470
2098
|
__name: "FormGroup",
|
|
1471
2099
|
props: {
|
|
1472
2100
|
label: {},
|
|
@@ -1475,18 +2103,18 @@ const Ma = E({
|
|
|
1475
2103
|
labelClass: { default: () => ({}) }
|
|
1476
2104
|
},
|
|
1477
2105
|
setup(e) {
|
|
1478
|
-
return (n, t) => (
|
|
1479
|
-
class:
|
|
2106
|
+
return (n, t) => (r(), s("div", {
|
|
2107
|
+
class: k(["flex flex-col gap-2", e.customClass])
|
|
1480
2108
|
}, [
|
|
1481
|
-
e.label ? (
|
|
2109
|
+
e.label ? (r(), s("label", {
|
|
1482
2110
|
key: 0,
|
|
1483
2111
|
for: e.htmlFor,
|
|
1484
|
-
class:
|
|
1485
|
-
},
|
|
1486
|
-
|
|
2112
|
+
class: k(["text-sm font-medium text-primary dark:text-primary-dark", e.labelClass])
|
|
2113
|
+
}, V(e.label), 11, Fn)) : C("", !0),
|
|
2114
|
+
A(n.$slots, "default", {}, void 0, !0)
|
|
1487
2115
|
], 2));
|
|
1488
2116
|
}
|
|
1489
|
-
}),
|
|
2117
|
+
}), Rn = /* @__PURE__ */ ge(qn, [["__scopeId", "data-v-c0d9d9cb"]]), Nn = /* @__PURE__ */ E({
|
|
1490
2118
|
__name: "ListCard",
|
|
1491
2119
|
props: {
|
|
1492
2120
|
clickable: { type: Boolean, default: !1 },
|
|
@@ -1494,26 +2122,26 @@ const Ma = E({
|
|
|
1494
2122
|
},
|
|
1495
2123
|
emits: ["click"],
|
|
1496
2124
|
setup(e, { emit: n }) {
|
|
1497
|
-
const t = e, a = n,
|
|
2125
|
+
const t = e, a = n, l = () => {
|
|
1498
2126
|
t.clickable && a("click");
|
|
1499
2127
|
};
|
|
1500
|
-
return (
|
|
1501
|
-
class:
|
|
2128
|
+
return (o, u) => (r(), s("div", {
|
|
2129
|
+
class: k([
|
|
1502
2130
|
"flex items-center justify-between background p-3 rounded-vsk border border-vsk-primary/70 transition-colors duration-200",
|
|
1503
2131
|
{
|
|
1504
2132
|
"hover:bg-vsk-primary/5 cursor-pointer": t.clickable
|
|
1505
2133
|
},
|
|
1506
2134
|
e.customClass
|
|
1507
2135
|
]),
|
|
1508
|
-
onClick:
|
|
2136
|
+
onClick: l
|
|
1509
2137
|
}, [
|
|
1510
|
-
|
|
2138
|
+
A(o.$slots, "default", {}, void 0, !0)
|
|
1511
2139
|
], 2));
|
|
1512
2140
|
}
|
|
1513
|
-
}),
|
|
2141
|
+
}), Hn = /* @__PURE__ */ ge(Nn, [["__scopeId", "data-v-f86d47da"]]), Un = { 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" }, Wn = ["src", "alt", "title"], Kn = {
|
|
1514
2142
|
key: 1,
|
|
1515
2143
|
class: "w-8 h-8 flex items-center justify-center"
|
|
1516
|
-
},
|
|
2144
|
+
}, Gn = ["src", "alt"], Qn = ["min", "max", "value"], Yn = /* @__PURE__ */ E({
|
|
1517
2145
|
__name: "SliderControl",
|
|
1518
2146
|
props: {
|
|
1519
2147
|
icon: {},
|
|
@@ -1528,49 +2156,49 @@ const Ma = E({
|
|
|
1528
2156
|
},
|
|
1529
2157
|
emits: ["update:modelValue", "buttonClick"],
|
|
1530
2158
|
setup(e, { emit: n }) {
|
|
1531
|
-
const t = e, a = n,
|
|
2159
|
+
const t = e, a = n, l = p(() => {
|
|
1532
2160
|
if (t.max <= t.min) return 0;
|
|
1533
|
-
const
|
|
1534
|
-
return Math.round(v /
|
|
1535
|
-
}),
|
|
1536
|
-
const v =
|
|
2161
|
+
const m = t.max - t.min, v = t.modelValue - t.min;
|
|
2162
|
+
return Math.round(v / m * 100);
|
|
2163
|
+
}), o = p(() => t.getPercentageClass ? t.getPercentageClass(l.value) : ""), u = (m) => {
|
|
2164
|
+
const v = m.target;
|
|
1537
2165
|
a("update:modelValue", Number(v.value));
|
|
1538
|
-
},
|
|
2166
|
+
}, i = () => {
|
|
1539
2167
|
a("buttonClick");
|
|
1540
2168
|
};
|
|
1541
|
-
return (
|
|
1542
|
-
e.showButton ? (
|
|
2169
|
+
return (m, v) => (r(), s("div", Un, [
|
|
2170
|
+
e.showButton ? (r(), s("button", {
|
|
1543
2171
|
key: 0,
|
|
1544
|
-
onClick:
|
|
2172
|
+
onClick: i,
|
|
1545
2173
|
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"
|
|
1546
2174
|
}, [
|
|
1547
|
-
|
|
2175
|
+
B("img", {
|
|
1548
2176
|
src: e.icon,
|
|
1549
2177
|
alt: e.alt,
|
|
1550
2178
|
title: e.tooltip,
|
|
1551
|
-
class:
|
|
1552
|
-
}, null, 10,
|
|
1553
|
-
])) : (
|
|
1554
|
-
|
|
2179
|
+
class: k(["w-6 h-6 transition-all duration-200", e.iconClass])
|
|
2180
|
+
}, null, 10, Wn)
|
|
2181
|
+
])) : (r(), s("div", Kn, [
|
|
2182
|
+
B("img", {
|
|
1555
2183
|
src: e.icon,
|
|
1556
2184
|
alt: e.alt,
|
|
1557
2185
|
class: "w-6 h-6 transition-all duration-200"
|
|
1558
|
-
}, null, 8,
|
|
2186
|
+
}, null, 8, Gn)
|
|
1559
2187
|
])),
|
|
1560
|
-
|
|
2188
|
+
B("input", {
|
|
1561
2189
|
type: "range",
|
|
1562
2190
|
min: e.min,
|
|
1563
2191
|
max: e.max,
|
|
1564
2192
|
value: e.modelValue,
|
|
1565
|
-
onInput:
|
|
2193
|
+
onInput: u,
|
|
1566
2194
|
class: "flex-1 transition-all duration-200 hover:scale-105"
|
|
1567
|
-
}, null, 40,
|
|
1568
|
-
|
|
1569
|
-
class:
|
|
1570
|
-
},
|
|
2195
|
+
}, null, 40, Qn),
|
|
2196
|
+
B("span", {
|
|
2197
|
+
class: k(["w-12 text-right transition-all duration-200 font-medium", o.value])
|
|
2198
|
+
}, V(l.value) + "% ", 3)
|
|
1571
2199
|
]));
|
|
1572
2200
|
}
|
|
1573
|
-
}),
|
|
2201
|
+
}), Xn = ["disabled"], _n = /* @__PURE__ */ E({
|
|
1574
2202
|
__name: "SwitchToggle",
|
|
1575
2203
|
props: {
|
|
1576
2204
|
isOn: { type: Boolean },
|
|
@@ -1582,14 +2210,14 @@ const Ma = E({
|
|
|
1582
2210
|
},
|
|
1583
2211
|
emits: ["toggle"],
|
|
1584
2212
|
setup(e, { emit: n }) {
|
|
1585
|
-
const t = e, a = n,
|
|
2213
|
+
const t = e, a = n, l = () => {
|
|
1586
2214
|
a("toggle", !t.isOn);
|
|
1587
2215
|
};
|
|
1588
|
-
return (
|
|
2216
|
+
return (o, u) => (r(), s("button", {
|
|
1589
2217
|
type: "button",
|
|
1590
|
-
onClick:
|
|
2218
|
+
onClick: l,
|
|
1591
2219
|
disabled: e.disabled,
|
|
1592
|
-
class:
|
|
2220
|
+
class: k([
|
|
1593
2221
|
"relative inline-flex items-center rounded-full transition-colors",
|
|
1594
2222
|
e.size === "small" ? "h-6 w-11" : "h-7 w-12",
|
|
1595
2223
|
e.isOn ? e.activeClass : e.inactiveClass,
|
|
@@ -1597,16 +2225,16 @@ const Ma = E({
|
|
|
1597
2225
|
e.customClass
|
|
1598
2226
|
])
|
|
1599
2227
|
}, [
|
|
1600
|
-
|
|
1601
|
-
class:
|
|
2228
|
+
B("span", {
|
|
2229
|
+
class: k([
|
|
1602
2230
|
"inline-block transform rounded-full bg-white shadow transition-transform",
|
|
1603
2231
|
e.size === "small" ? "h-4 w-4" : "h-6 w-6",
|
|
1604
2232
|
e.isOn ? e.size === "small" ? "translate-x-6" : "translate-x-5" : "translate-x-1"
|
|
1605
2233
|
])
|
|
1606
2234
|
}, null, 2)
|
|
1607
|
-
], 10,
|
|
2235
|
+
], 10, Xn));
|
|
1608
2236
|
}
|
|
1609
|
-
}),
|
|
2237
|
+
}), Jn = ["disabled"], Zn = ["src", "alt", "title"], el = /* @__PURE__ */ E({
|
|
1610
2238
|
__name: "ToggleControl",
|
|
1611
2239
|
props: {
|
|
1612
2240
|
icon: {},
|
|
@@ -1622,9 +2250,9 @@ const Ma = E({
|
|
|
1622
2250
|
const t = n, a = () => {
|
|
1623
2251
|
t("click");
|
|
1624
2252
|
};
|
|
1625
|
-
return (
|
|
2253
|
+
return (l, o) => (r(), s("button", {
|
|
1626
2254
|
onClick: a,
|
|
1627
|
-
class:
|
|
2255
|
+
class: k(["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", {
|
|
1628
2256
|
"animate-pulse": e.isLoading,
|
|
1629
2257
|
"ring-2 ring-primary dark:ring-primary-dark": e.isActive,
|
|
1630
2258
|
"opacity-60": !e.isActive,
|
|
@@ -1632,23 +2260,153 @@ const Ma = E({
|
|
|
1632
2260
|
}]),
|
|
1633
2261
|
disabled: e.isLoading
|
|
1634
2262
|
}, [
|
|
1635
|
-
|
|
2263
|
+
B("img", {
|
|
1636
2264
|
src: e.icon,
|
|
1637
2265
|
alt: e.alt,
|
|
1638
2266
|
title: e.tooltip,
|
|
1639
|
-
class:
|
|
2267
|
+
class: k(["m-auto w-12.5 h-12.5 transition-all duration-300 group-hover:scale-110 relative z-10", {
|
|
1640
2268
|
"animate-spin": e.isLoading,
|
|
1641
2269
|
"filter brightness-75": !e.isActive,
|
|
1642
2270
|
"drop-shadow-lg": e.isActive,
|
|
1643
2271
|
...e.iconClass
|
|
1644
2272
|
}])
|
|
1645
|
-
}, null, 10,
|
|
1646
|
-
], 10,
|
|
2273
|
+
}, null, 10, Zn)
|
|
2274
|
+
], 10, Jn));
|
|
2275
|
+
}
|
|
2276
|
+
}), tt = /* @__PURE__ */ Symbol("tooltip de vasak");
|
|
2277
|
+
function at() {
|
|
2278
|
+
const e = be(tt, null);
|
|
2279
|
+
if (e) return e;
|
|
2280
|
+
const n = x(!1);
|
|
2281
|
+
return {
|
|
2282
|
+
abierto: p(() => n.value),
|
|
2283
|
+
disparador: x(null),
|
|
2284
|
+
ponerElDisparador: () => {
|
|
2285
|
+
},
|
|
2286
|
+
abrir: () => {
|
|
2287
|
+
n.value = !0;
|
|
2288
|
+
},
|
|
2289
|
+
cerrar: () => {
|
|
2290
|
+
n.value = !1;
|
|
2291
|
+
}
|
|
2292
|
+
};
|
|
2293
|
+
}
|
|
2294
|
+
const tl = { class: "inline-block" }, al = /* @__PURE__ */ E({
|
|
2295
|
+
__name: "Tooltip",
|
|
2296
|
+
props: {
|
|
2297
|
+
disabled: { type: Boolean, default: !1 },
|
|
2298
|
+
delayDuration: { default: 200 }
|
|
2299
|
+
},
|
|
2300
|
+
setup(e) {
|
|
2301
|
+
const n = e, t = x(!1), a = x(null);
|
|
2302
|
+
let l = null;
|
|
2303
|
+
function o() {
|
|
2304
|
+
n.disabled || (l = setTimeout(() => {
|
|
2305
|
+
t.value = !0;
|
|
2306
|
+
}, n.delayDuration));
|
|
2307
|
+
}
|
|
2308
|
+
function u() {
|
|
2309
|
+
l && clearTimeout(l), t.value = !1;
|
|
2310
|
+
}
|
|
2311
|
+
return ue(tt, {
|
|
2312
|
+
abierto: p(() => t.value && !n.disabled),
|
|
2313
|
+
disparador: a,
|
|
2314
|
+
ponerElDisparador: (i) => {
|
|
2315
|
+
a.value = i;
|
|
2316
|
+
},
|
|
2317
|
+
abrir: o,
|
|
2318
|
+
cerrar: u
|
|
2319
|
+
}), (i, m) => (r(), s("div", tl, [
|
|
2320
|
+
A(i.$slots, "default")
|
|
2321
|
+
]));
|
|
2322
|
+
}
|
|
2323
|
+
}), nl = /* @__PURE__ */ E({
|
|
2324
|
+
inheritAttrs: !1,
|
|
2325
|
+
__name: "TooltipContent",
|
|
2326
|
+
props: {
|
|
2327
|
+
side: { default: "bottom" },
|
|
2328
|
+
align: { default: "center" },
|
|
2329
|
+
sideOffset: { default: 4 }
|
|
2330
|
+
},
|
|
2331
|
+
setup(e) {
|
|
2332
|
+
const n = $e(), t = p(() => n.class ?? ""), a = e, l = at(), o = p(() => l.abierto.value), u = x(null), i = x({ top: 0, left: 0 });
|
|
2333
|
+
function m() {
|
|
2334
|
+
const v = l.disparador.value;
|
|
2335
|
+
if (!v || !u.value) return;
|
|
2336
|
+
const f = v.getBoundingClientRect(), T = u.value.getBoundingClientRect();
|
|
2337
|
+
let D = 0, z = 0;
|
|
2338
|
+
switch (a.side) {
|
|
2339
|
+
case "bottom":
|
|
2340
|
+
D = f.bottom + a.sideOffset, z = f.left + f.width / 2 - T.width / 2;
|
|
2341
|
+
break;
|
|
2342
|
+
case "top":
|
|
2343
|
+
D = f.top - T.height - a.sideOffset, z = f.left + f.width / 2 - T.width / 2;
|
|
2344
|
+
break;
|
|
2345
|
+
case "left":
|
|
2346
|
+
z = f.left - T.width - a.sideOffset, D = f.top + f.height / 2 - T.height / 2;
|
|
2347
|
+
break;
|
|
2348
|
+
case "right":
|
|
2349
|
+
z = f.right + a.sideOffset, D = f.top + f.height / 2 - T.height / 2;
|
|
2350
|
+
break;
|
|
2351
|
+
}
|
|
2352
|
+
i.value = { top: D, left: z };
|
|
2353
|
+
}
|
|
2354
|
+
return K(o, async (v) => {
|
|
2355
|
+
v && (await Y(), requestAnimationFrame(m));
|
|
2356
|
+
}), (v, f) => (r(), Q(ce, { to: "body" }, [
|
|
2357
|
+
q(pe, {
|
|
2358
|
+
"enter-active-class": "transition-all duration-200 ease-in-out",
|
|
2359
|
+
"leave-active-class": "transition-all duration-200 ease-in-out",
|
|
2360
|
+
"enter-from-class": "opacity-0 scale-95",
|
|
2361
|
+
"leave-to-class": "opacity-0 scale-95"
|
|
2362
|
+
}, {
|
|
2363
|
+
default: W(() => [
|
|
2364
|
+
Ce(B("div", {
|
|
2365
|
+
ref_key: "globo",
|
|
2366
|
+
ref: u,
|
|
2367
|
+
style: se({ position: "fixed", top: `${i.value.top}px`, left: `${i.value.left}px`, zIndex: 50 }),
|
|
2368
|
+
class: k([
|
|
2369
|
+
t.value,
|
|
2370
|
+
"pointer-events-none rounded-corner border border-secondary bg-ui-bg/80 px-2 py-1 text-sm shadow-md"
|
|
2371
|
+
])
|
|
2372
|
+
}, [
|
|
2373
|
+
A(v.$slots, "default")
|
|
2374
|
+
], 6), [
|
|
2375
|
+
[qe, o.value]
|
|
2376
|
+
])
|
|
2377
|
+
]),
|
|
2378
|
+
_: 3
|
|
2379
|
+
})
|
|
2380
|
+
]));
|
|
1647
2381
|
}
|
|
1648
|
-
}),
|
|
2382
|
+
}), ll = /* @__PURE__ */ E({
|
|
2383
|
+
__name: "TooltipTrigger",
|
|
2384
|
+
setup(e) {
|
|
2385
|
+
const n = at(), t = x(null);
|
|
2386
|
+
function a() {
|
|
2387
|
+
return t.value ? t.value.firstElementChild ?? t.value : null;
|
|
2388
|
+
}
|
|
2389
|
+
function l() {
|
|
2390
|
+
n.ponerElDisparador(a()), n.abrir();
|
|
2391
|
+
}
|
|
2392
|
+
return _(() => {
|
|
2393
|
+
n.ponerElDisparador(a());
|
|
2394
|
+
}), (o, u) => (r(), s("div", {
|
|
2395
|
+
ref_key: "envoltorio",
|
|
2396
|
+
ref: t,
|
|
2397
|
+
class: "inline-block",
|
|
2398
|
+
onMouseenter: l,
|
|
2399
|
+
onMouseleave: u[0] || (u[0] = (i) => F(n).cerrar()),
|
|
2400
|
+
onFocus: l,
|
|
2401
|
+
onBlur: u[1] || (u[1] = (i) => F(n).cerrar())
|
|
2402
|
+
}, [
|
|
2403
|
+
A(o.$slots, "default")
|
|
2404
|
+
], 544));
|
|
2405
|
+
}
|
|
2406
|
+
}), ol = ["title"], rl = ["src", "alt"], sl = {
|
|
1649
2407
|
key: 0,
|
|
1650
2408
|
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"
|
|
1651
|
-
},
|
|
2409
|
+
}, il = /* @__PURE__ */ E({
|
|
1652
2410
|
__name: "TrayIconButton",
|
|
1653
2411
|
props: {
|
|
1654
2412
|
icon: {},
|
|
@@ -1663,105 +2421,144 @@ const Ma = E({
|
|
|
1663
2421
|
},
|
|
1664
2422
|
emits: ["click"],
|
|
1665
2423
|
setup(e, { emit: n }) {
|
|
1666
|
-
const t = n, a =
|
|
2424
|
+
const t = n, a = x(!1), l = () => {
|
|
1667
2425
|
t("click");
|
|
1668
2426
|
};
|
|
1669
|
-
return (
|
|
1670
|
-
class:
|
|
2427
|
+
return (o, u) => (r(), s("div", {
|
|
2428
|
+
class: k(["p-1 rounded-corner relative hover:bg-primary dark:hover:bg-primary-dark group transition-all duration-300", e.customClass]),
|
|
1671
2429
|
title: e.tooltip,
|
|
1672
|
-
onClick:
|
|
1673
|
-
onMouseenter:
|
|
1674
|
-
onMouseleave:
|
|
2430
|
+
onClick: l,
|
|
2431
|
+
onMouseenter: u[0] || (u[0] = (i) => a.value = !0),
|
|
2432
|
+
onMouseleave: u[1] || (u[1] = (i) => a.value = !1)
|
|
1675
2433
|
}, [
|
|
1676
|
-
|
|
2434
|
+
B("img", {
|
|
1677
2435
|
src: e.icon,
|
|
1678
2436
|
alt: e.alt,
|
|
1679
|
-
class:
|
|
1680
|
-
}, null, 10,
|
|
1681
|
-
e.badge !== null && e.badge > 0 ? (
|
|
1682
|
-
e.showCustomTooltip && e.customTooltipText ? (
|
|
2437
|
+
class: k(["m-auto h-5.5 w-auto transition-all duration-300", e.iconClass])
|
|
2438
|
+
}, null, 10, rl),
|
|
2439
|
+
e.badge !== null && e.badge > 0 ? (r(), s("div", sl, V(e.badge), 1)) : C("", !0),
|
|
2440
|
+
e.showCustomTooltip && e.customTooltipText ? (r(), s("div", {
|
|
1683
2441
|
key: 1,
|
|
1684
|
-
class:
|
|
2442
|
+
class: k(["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", [
|
|
1685
2443
|
e.tooltipClass,
|
|
1686
2444
|
{
|
|
1687
2445
|
"opacity-0 -translate-y-2": !a.value,
|
|
1688
2446
|
"opacity-100 translate-y-0": a.value
|
|
1689
2447
|
}
|
|
1690
2448
|
]])
|
|
1691
|
-
},
|
|
1692
|
-
|
|
1693
|
-
], 42,
|
|
2449
|
+
}, V(e.customTooltipText), 3)) : C("", !0),
|
|
2450
|
+
A(o.$slots, "default")
|
|
2451
|
+
], 42, ol));
|
|
1694
2452
|
}
|
|
1695
|
-
}),
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
Ct,
|
|
1700
|
-
N,
|
|
1701
|
-
jt,
|
|
1702
|
-
Me,
|
|
1703
|
-
Be,
|
|
2453
|
+
}), ul = [
|
|
2454
|
+
Ht,
|
|
2455
|
+
Ne,
|
|
2456
|
+
Re,
|
|
1704
2457
|
Qt,
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
2458
|
+
H,
|
|
2459
|
+
sa,
|
|
2460
|
+
We,
|
|
2461
|
+
Ue,
|
|
1709
2462
|
ha,
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
La,
|
|
1714
|
-
Da,
|
|
2463
|
+
Ke,
|
|
2464
|
+
Ca,
|
|
2465
|
+
Aa,
|
|
1715
2466
|
Ma,
|
|
1716
|
-
|
|
1717
|
-
Oa,
|
|
2467
|
+
Ia,
|
|
1718
2468
|
Ra,
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
2469
|
+
Le,
|
|
2470
|
+
tn,
|
|
2471
|
+
Ge,
|
|
2472
|
+
ja,
|
|
2473
|
+
ln,
|
|
2474
|
+
vn,
|
|
2475
|
+
pn,
|
|
2476
|
+
yn,
|
|
2477
|
+
xn,
|
|
2478
|
+
wn,
|
|
2479
|
+
Cn,
|
|
2480
|
+
Dn,
|
|
2481
|
+
Ln,
|
|
2482
|
+
An,
|
|
2483
|
+
Mn,
|
|
2484
|
+
Vn,
|
|
2485
|
+
In,
|
|
2486
|
+
jn,
|
|
2487
|
+
Rn,
|
|
2488
|
+
Hn,
|
|
2489
|
+
Yn,
|
|
2490
|
+
_n,
|
|
2491
|
+
el,
|
|
2492
|
+
al,
|
|
2493
|
+
nl,
|
|
2494
|
+
ll,
|
|
2495
|
+
il
|
|
2496
|
+
], bl = {
|
|
1723
2497
|
install(e) {
|
|
1724
|
-
|
|
2498
|
+
ul.forEach((n) => {
|
|
1725
2499
|
e.component(n.name, n);
|
|
1726
2500
|
});
|
|
1727
2501
|
}
|
|
1728
2502
|
};
|
|
1729
2503
|
export {
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
2504
|
+
Aa as ActionButton,
|
|
2505
|
+
Ma as AlertMessage,
|
|
2506
|
+
We as AppBar,
|
|
2507
|
+
Ca as BarSearch,
|
|
2508
|
+
Qe as CLASES_POR_TONO,
|
|
2509
|
+
Xe as CLAVE_DEL_DIALOGO,
|
|
2510
|
+
Je as CLAVE_DEL_MENU,
|
|
2511
|
+
tt as CLAVE_DEL_TOOLTIP,
|
|
2512
|
+
De as CLAVE_DE_LA_BARRA,
|
|
2513
|
+
ln as ConfigSection,
|
|
2514
|
+
vn as DeviceCard,
|
|
2515
|
+
pn as Dialog,
|
|
2516
|
+
yn as DialogContent,
|
|
2517
|
+
xn as DialogDescription,
|
|
2518
|
+
wn as DialogFooter,
|
|
2519
|
+
Cn as DialogHeader,
|
|
2520
|
+
Dn as DialogTitle,
|
|
2521
|
+
Ln as DropdownMenu,
|
|
2522
|
+
An as DropdownMenuContent,
|
|
2523
|
+
Mn as DropdownMenuItem,
|
|
2524
|
+
Vn as DropdownMenuLabel,
|
|
2525
|
+
In as DropdownMenuSeparator,
|
|
2526
|
+
jn as DropdownMenuTrigger,
|
|
2527
|
+
Ia as EmptyState,
|
|
2528
|
+
Rn as FormGroup,
|
|
2529
|
+
ze as LOS_TRES_CONTROLES,
|
|
2530
|
+
Hn as ListCard,
|
|
2531
|
+
Yt as POSICIONES,
|
|
2532
|
+
Ra as ProgressBar,
|
|
2533
|
+
Le as SearchField,
|
|
2534
|
+
tn as SearchSelect,
|
|
2535
|
+
Qt as SelectField,
|
|
2536
|
+
Ht as SideBar,
|
|
2537
|
+
Ne as SideButton,
|
|
2538
|
+
Re as SideGroup,
|
|
2539
|
+
Yn as SliderControl,
|
|
2540
|
+
_n as SwitchToggle,
|
|
2541
|
+
ha as TabBar,
|
|
2542
|
+
Ke as TabItem,
|
|
2543
|
+
Ge as TextInput,
|
|
2544
|
+
H as ThemeIcon,
|
|
2545
|
+
ja as ToastArea,
|
|
2546
|
+
el as ToggleControl,
|
|
2547
|
+
al as Tooltip,
|
|
2548
|
+
nl as TooltipContent,
|
|
2549
|
+
ll as TooltipTrigger,
|
|
2550
|
+
il as TrayIconButton,
|
|
2551
|
+
Ue as WindowControls,
|
|
2552
|
+
sa as WindowFrame,
|
|
2553
|
+
Ha as buscarOpciones,
|
|
2554
|
+
bl as default,
|
|
2555
|
+
Xt as esPosicion,
|
|
2556
|
+
we as orientacionDe,
|
|
2557
|
+
Zt as posicionDe,
|
|
2558
|
+
Ye as rolDelTono,
|
|
2559
|
+
_e as usarElDialogo,
|
|
2560
|
+
ye as usarElMenu,
|
|
2561
|
+
at as usarElTooltip,
|
|
2562
|
+
de as usarLaBarra,
|
|
2563
|
+
ea as usarLaPosicionDeLaBarra
|
|
1767
2564
|
};
|