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