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