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