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