@vasakgroup/vue-libvasak 1.3.0 → 1.5.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/cards/DeviceCard.vue.d.ts +9 -1
- package/dist/types/controls/ToggleControl.vue.d.ts +9 -15
- package/dist/types/forms/SliderControl.vue.d.ts +9 -1
- package/dist/types/icons/ThemeIcon.vue.d.ts +2 -2
- package/dist/types/tray/TrayIconButton.vue.d.ts +11 -3
- package/dist/vue-libvasak.es.js +684 -612
- package/dist/vue-libvasak.umd.js +1 -1
- package/package.json +10 -5
package/dist/vue-libvasak.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { listen as
|
|
1
|
+
import { ref as k, onMounted as W, onUnmounted as ve, readonly as vt, watch as Q, defineComponent as D, toRef as Pe, useTemplateRef as pt, computed as v, createElementBlock as r, unref as F, openBlock as i, normalizeStyle as fe, createCommentVNode as x, createElementVNode as B, createVNode as O, toDisplayString as M, normalizeClass as y, renderSlot as S, createBlock as U, onBeforeUnmount as pe, Fragment as te, renderList as ue, withCtx as G, mergeModels as Re, useAttrs as Be, useId as yt, useModel as gt, withDirectives as Se, mergeProps as ce, isRef as ht, vModelSelect as xt, inject as ke, getCurrentInstance as Ge, provide as ye, createTextVNode as Me, toHandlers as Qe, createSlots as kt, withModifiers as V, withKeys as R, Teleport as ge, Transition as we, nextTick as J, TransitionGroup as wt, vShow as Ye, cloneVNode as $t, h as Ct, Comment as zt, Text as Et } from "vue";
|
|
2
|
+
import { listen as Lt } from "@tauri-apps/api/event";
|
|
3
3
|
import { getSymbolSource as Dt, getIconSource as Tt } from "@vasakgroup/plugin-vicons";
|
|
4
4
|
import { getCurrentWindow as At } from "@tauri-apps/api/window";
|
|
5
5
|
import { useI18n as Bt } from "@vasakgroup/tauri-plugin-i18n";
|
|
6
|
-
const St = "vicons:theme-changed", xe = /* @__PURE__ */ new Map(),
|
|
7
|
-
let se = 0, be = null,
|
|
6
|
+
const St = "vicons:theme-changed", xe = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ new Map(), me = k(0);
|
|
7
|
+
let se = 0, be = null, ie = null;
|
|
8
8
|
function Ql() {
|
|
9
|
-
xe.clear(),
|
|
9
|
+
xe.clear(), re.clear(), se = 0, be = null, ie = null, me.value = 0, ae.clear(), ne.clear(), Xe = 0, ee?.disconnect(), ee = null, De = !1, X !== null && (clearTimeout(X), X = null), _ && (_.cancelado = !0), _ = null;
|
|
10
10
|
}
|
|
11
|
-
const Mt = 100,
|
|
11
|
+
const Mt = 100, ze = 10, Vt = 16, ae = /* @__PURE__ */ new Map(), ne = /* @__PURE__ */ new Set();
|
|
12
12
|
let Xe = 0, ee = null, De = !1;
|
|
13
13
|
function It() {
|
|
14
14
|
return De ? ee : (De = !0, typeof IntersectionObserver > "u" ? null : (ee = new IntersectionObserver(
|
|
@@ -37,37 +37,37 @@ function Pt(e) {
|
|
|
37
37
|
const n = ae.get(e);
|
|
38
38
|
n?.elemento && (ee?.unobserve(n.elemento), delete n.elemento.dataset.iconoId), ne.delete(e), ae.delete(e);
|
|
39
39
|
}
|
|
40
|
-
let
|
|
40
|
+
let X = null, _ = null;
|
|
41
41
|
function Rt(e) {
|
|
42
42
|
return new Promise((n) => setTimeout(n, e));
|
|
43
43
|
}
|
|
44
44
|
async function Ft(e) {
|
|
45
45
|
const n = [...ae.keys()], t = n.filter((l) => ne.has(l)), a = n.filter((l) => !ne.has(l));
|
|
46
46
|
for (const l of [t, a])
|
|
47
|
-
for (let o = 0; o < l.length; o +=
|
|
47
|
+
for (let o = 0; o < l.length; o += ze) {
|
|
48
48
|
if (e.cancelado) return;
|
|
49
|
-
const s = l.slice(o, o +
|
|
49
|
+
const s = l.slice(o, o + ze);
|
|
50
50
|
if (await Promise.allSettled(
|
|
51
51
|
s.map((u) => ae.get(u)?.recargar() ?? Promise.resolve())
|
|
52
52
|
), e.cancelado) return;
|
|
53
|
-
(o +
|
|
53
|
+
(o + ze < l.length || l === t) && await Rt(Vt);
|
|
54
54
|
}
|
|
55
55
|
_ === e && (_ = null);
|
|
56
56
|
}
|
|
57
57
|
function Nt() {
|
|
58
|
-
|
|
58
|
+
X !== null && (clearTimeout(X), X = null), _ && (_.cancelado = !0);
|
|
59
59
|
const e = { cancelado: !1 };
|
|
60
60
|
_ = e, Ft(e);
|
|
61
61
|
}
|
|
62
62
|
function qt() {
|
|
63
|
-
xe.clear(),
|
|
64
|
-
|
|
63
|
+
xe.clear(), re.clear(), me.value++, X !== null && clearTimeout(X), X = setTimeout(() => {
|
|
64
|
+
X = null, Nt();
|
|
65
65
|
}, Mt);
|
|
66
66
|
}
|
|
67
67
|
function Je() {
|
|
68
|
-
return se++, be ||
|
|
69
|
-
se <= 0 ? e() : be = e,
|
|
70
|
-
}),
|
|
68
|
+
return se++, be || ie ? ie ?? Promise.resolve() : (ie = Lt(St, qt).then((e) => {
|
|
69
|
+
se <= 0 ? e() : be = e, ie = null;
|
|
70
|
+
}), ie);
|
|
71
71
|
}
|
|
72
72
|
function Te() {
|
|
73
73
|
se--, !(se > 0) && (se = 0, be?.(), be = null);
|
|
@@ -76,24 +76,24 @@ function Ht(e, n) {
|
|
|
76
76
|
const t = `${n}:${e}`, a = xe.get(t);
|
|
77
77
|
if (a !== void 0)
|
|
78
78
|
return Promise.resolve(a);
|
|
79
|
-
const l =
|
|
79
|
+
const l = re.get(t);
|
|
80
80
|
if (l)
|
|
81
81
|
return l;
|
|
82
82
|
const o = me.value, s = (n === "symbol" ? Dt(e) : Tt(e)).then((u) => (me.value === o && xe.set(t, u), u)).finally(() => {
|
|
83
|
-
|
|
83
|
+
re.get(t) === s && re.delete(t);
|
|
84
84
|
});
|
|
85
|
-
return
|
|
85
|
+
return re.set(t, s), s;
|
|
86
86
|
}
|
|
87
87
|
function Yl() {
|
|
88
88
|
let e = !1;
|
|
89
|
-
return
|
|
89
|
+
return W(async () => {
|
|
90
90
|
await Je(), e && Te();
|
|
91
91
|
}), ve(() => {
|
|
92
92
|
e || (e = !0, Te());
|
|
93
93
|
}), vt(me);
|
|
94
94
|
}
|
|
95
95
|
function Ut(e, n) {
|
|
96
|
-
const t =
|
|
96
|
+
const t = k("");
|
|
97
97
|
let a = !1, l = 0;
|
|
98
98
|
const o = Ot(async () => {
|
|
99
99
|
await s();
|
|
@@ -107,13 +107,13 @@ function Ut(e, n) {
|
|
|
107
107
|
const f = await Ht(m, n.value);
|
|
108
108
|
u === l && !a && (t.value = f);
|
|
109
109
|
}
|
|
110
|
-
return
|
|
110
|
+
return W(async () => {
|
|
111
111
|
await Je(), a || await s();
|
|
112
112
|
}), ve(() => {
|
|
113
113
|
a = !0, Pt(o), Te();
|
|
114
|
-
}),
|
|
114
|
+
}), Q([e, n], s), { fuente: t, mirarElemento: (u) => jt(o, u) };
|
|
115
115
|
}
|
|
116
|
-
const Kt = ["src", "alt"],
|
|
116
|
+
const Kt = ["src", "alt"], N = /* @__PURE__ */ D({
|
|
117
117
|
__name: "ThemeIcon",
|
|
118
118
|
props: {
|
|
119
119
|
name: {},
|
|
@@ -123,22 +123,24 @@ const Kt = ["src", "alt"], H = /* @__PURE__ */ D({
|
|
|
123
123
|
},
|
|
124
124
|
setup(e) {
|
|
125
125
|
const n = e, { fuente: t, mirarElemento: a } = Ut(Pe(n, "name"), Pe(n, "type")), l = pt("dibujo");
|
|
126
|
-
|
|
127
|
-
const o = v(
|
|
128
|
-
|
|
126
|
+
Q(l, (s) => a(s), { immediate: !0 });
|
|
127
|
+
const o = v(
|
|
128
|
+
() => n.size === "auto" ? void 0 : { width: `${n.size}px`, height: `${n.size}px` }
|
|
129
|
+
);
|
|
130
|
+
return (s, u) => F(t) ? (i(), r("img", {
|
|
129
131
|
key: 0,
|
|
130
132
|
ref_key: "dibujo",
|
|
131
133
|
ref: l,
|
|
132
134
|
src: F(t),
|
|
133
135
|
alt: e.alt,
|
|
134
|
-
style: fe(
|
|
136
|
+
style: fe(o.value),
|
|
135
137
|
class: "shrink-0 object-contain"
|
|
136
|
-
}, null, 12, Kt)) : (
|
|
138
|
+
}, null, 12, Kt)) : (i(), r("span", {
|
|
137
139
|
key: 1,
|
|
138
140
|
ref_key: "dibujo",
|
|
139
141
|
ref: l,
|
|
140
|
-
style: fe(
|
|
141
|
-
class: "shrink-0"
|
|
142
|
+
style: fe(o.value),
|
|
143
|
+
class: "inline-block shrink-0"
|
|
142
144
|
}, null, 4));
|
|
143
145
|
}
|
|
144
146
|
}), Wt = { class: "flex flex-col gap-2" }, Gt = ["aria-expanded"], Qt = {
|
|
@@ -152,29 +154,29 @@ const Kt = ["src", "alt"], H = /* @__PURE__ */ D({
|
|
|
152
154
|
defaultOpen: { type: Boolean, default: !0 }
|
|
153
155
|
},
|
|
154
156
|
setup(e) {
|
|
155
|
-
const n = e, t =
|
|
156
|
-
return
|
|
157
|
+
const n = e, t = k(n.defaultOpen);
|
|
158
|
+
return Q(
|
|
157
159
|
() => n.collapsed,
|
|
158
160
|
(a) => {
|
|
159
161
|
a && (t.value = !0);
|
|
160
162
|
}
|
|
161
|
-
), (a, l) => (
|
|
162
|
-
e.collapsed ? x("", !0) : (
|
|
163
|
+
), (a, l) => (i(), r("section", Wt, [
|
|
164
|
+
e.collapsed ? x("", !0) : (i(), r("button", {
|
|
163
165
|
key: 0,
|
|
164
166
|
type: "button",
|
|
165
167
|
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",
|
|
166
168
|
"aria-expanded": t.value,
|
|
167
169
|
onClick: l[0] || (l[0] = (o) => t.value = !t.value)
|
|
168
170
|
}, [
|
|
169
|
-
|
|
170
|
-
O(
|
|
171
|
+
B("span", null, M(e.title), 1),
|
|
172
|
+
O(N, {
|
|
171
173
|
name: "pan-down-symbolic",
|
|
172
174
|
type: "symbol",
|
|
173
175
|
size: 12,
|
|
174
|
-
class:
|
|
176
|
+
class: y(["transition-transform duration-200", t.value ? "" : "-rotate-90"])
|
|
175
177
|
}, null, 8, ["class"])
|
|
176
178
|
], 8, Gt)),
|
|
177
|
-
t.value || e.collapsed ? (
|
|
179
|
+
t.value || e.collapsed ? (i(), r("div", Qt, [
|
|
178
180
|
S(a.$slots, "default")
|
|
179
181
|
])) : x("", !0)
|
|
180
182
|
]));
|
|
@@ -197,31 +199,31 @@ const Kt = ["src", "alt"], H = /* @__PURE__ */ D({
|
|
|
197
199
|
},
|
|
198
200
|
emits: ["click"],
|
|
199
201
|
setup(e) {
|
|
200
|
-
return (n, t) => (
|
|
202
|
+
return (n, t) => (i(), r("button", {
|
|
201
203
|
type: "button",
|
|
202
204
|
title: e.collapsed ? e.label : void 0,
|
|
203
205
|
"aria-label": e.collapsed ? e.label : void 0,
|
|
204
206
|
disabled: e.disabled,
|
|
205
207
|
"aria-current": e.active ? "page" : void 0,
|
|
206
|
-
class:
|
|
208
|
+
class: y(["group relative flex w-full items-center gap-3 rounded-corner border px-3 py-2 text-left text-sm transition-[color,background-color,border-color,scale] duration-200 active:scale-[0.98]", [
|
|
207
209
|
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",
|
|
208
210
|
e.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer",
|
|
209
211
|
e.collapsed ? "justify-center px-2" : ""
|
|
210
212
|
]]),
|
|
211
213
|
onClick: t[0] || (t[0] = (a) => n.$emit("click"))
|
|
212
214
|
}, [
|
|
213
|
-
|
|
214
|
-
class:
|
|
215
|
+
B("span", {
|
|
216
|
+
class: y(["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" : ""]),
|
|
215
217
|
"aria-hidden": "true"
|
|
216
218
|
}, [
|
|
217
|
-
e.icon ? (
|
|
219
|
+
e.icon ? (i(), U(N, {
|
|
218
220
|
key: 0,
|
|
219
221
|
name: e.icon,
|
|
220
222
|
size: 20
|
|
221
|
-
}, null, 8, ["name"])) : (
|
|
223
|
+
}, null, 8, ["name"])) : (i(), r("span", Xt, M(e.label.charAt(0).toUpperCase()), 1))
|
|
222
224
|
], 2),
|
|
223
|
-
e.collapsed ? x("", !0) : (
|
|
224
|
-
!e.collapsed && e.badge !== "" ? (
|
|
225
|
+
e.collapsed ? x("", !0) : (i(), r("span", Jt, M(e.label), 1)),
|
|
226
|
+
!e.collapsed && e.badge !== "" ? (i(), r("span", Zt, M(e.badge), 1)) : x("", !0)
|
|
225
227
|
], 10, Yt));
|
|
226
228
|
}
|
|
227
229
|
}), _t = {
|
|
@@ -236,10 +238,10 @@ const Kt = ["src", "alt"], H = /* @__PURE__ */ D({
|
|
|
236
238
|
}, la = {
|
|
237
239
|
key: 1,
|
|
238
240
|
class: "truncate text-tx-muted text-xs"
|
|
239
|
-
}, oa = { key: 0 },
|
|
241
|
+
}, oa = { key: 0 }, ia = {
|
|
240
242
|
key: 1,
|
|
241
243
|
class: "flex border-ui-border border-b p-2"
|
|
242
|
-
},
|
|
244
|
+
}, ra = ["aria-label", "aria-expanded"], sa = { class: "flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-2" }, Fe = "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", Ne = 767, ua = /* @__PURE__ */ D({
|
|
243
245
|
__name: "SideBar",
|
|
244
246
|
props: {
|
|
245
247
|
title: { default: "" },
|
|
@@ -252,88 +254,88 @@ const Kt = ["src", "alt"], H = /* @__PURE__ */ D({
|
|
|
252
254
|
},
|
|
253
255
|
emits: ["update:modelValue", "update:collapsed", "change"],
|
|
254
256
|
setup(e, { expose: n, emit: t }) {
|
|
255
|
-
const a = e, l = t, o =
|
|
257
|
+
const a = e, l = t, o = k(a.collapsed ?? !1), s = k(!1);
|
|
256
258
|
let u = null, m = null;
|
|
257
259
|
const f = v(() => s.value || o.value), d = v(() => !!(a.title || a.subtitle));
|
|
258
260
|
v(() => a.categories.length > 0);
|
|
259
|
-
function
|
|
261
|
+
function E() {
|
|
260
262
|
return document.documentElement?.clientWidth || window.innerWidth;
|
|
261
263
|
}
|
|
262
|
-
function
|
|
263
|
-
s.value =
|
|
264
|
+
function L() {
|
|
265
|
+
s.value = E() <= Ne;
|
|
264
266
|
}
|
|
265
|
-
function
|
|
267
|
+
function A() {
|
|
266
268
|
o.value = !o.value, l("update:collapsed", o.value);
|
|
267
269
|
}
|
|
268
270
|
function g($) {
|
|
269
271
|
l("update:modelValue", $), l("change", $);
|
|
270
272
|
}
|
|
271
|
-
return
|
|
273
|
+
return Q(
|
|
272
274
|
() => a.collapsed,
|
|
273
275
|
($) => {
|
|
274
276
|
$ !== void 0 && (o.value = $);
|
|
275
277
|
}
|
|
276
|
-
),
|
|
277
|
-
u = window.matchMedia(`(max-width: ${Ne}px)`),
|
|
278
|
+
), W(() => {
|
|
279
|
+
u = window.matchMedia(`(max-width: ${Ne}px)`), L(), u.addEventListener("change", L), window.addEventListener("resize", L), typeof ResizeObserver < "u" && document.documentElement && (m = new ResizeObserver(L), m.observe(document.documentElement));
|
|
278
280
|
}), pe(() => {
|
|
279
|
-
u?.removeEventListener("change",
|
|
280
|
-
}), n({ collapsed: f }), ($, j) => (
|
|
281
|
-
class:
|
|
281
|
+
u?.removeEventListener("change", L), window.removeEventListener("resize", L), m?.disconnect(), m = null;
|
|
282
|
+
}), n({ collapsed: f }), ($, j) => (i(), r("aside", {
|
|
283
|
+
class: y(["relative z-30 flex h-full shrink-0 flex-col rounded-corner border border-ui-border bg-ui-surface/70 transition-[width] duration-300", ["w-[84px]", f.value ? "md:w-[84px]" : "md:w-72"]])
|
|
282
284
|
}, [
|
|
283
|
-
d.value || $.$slots.header ? (
|
|
284
|
-
|
|
285
|
-
|
|
285
|
+
d.value || $.$slots.header ? (i(), r("header", _t, [
|
|
286
|
+
B("div", ea, [
|
|
287
|
+
B("button", {
|
|
286
288
|
type: "button",
|
|
287
|
-
class:
|
|
289
|
+
class: y(Fe),
|
|
288
290
|
"aria-label": f.value ? e.expandLabel : e.collapseLabel,
|
|
289
291
|
"aria-expanded": !f.value,
|
|
290
|
-
onClick:
|
|
292
|
+
onClick: A
|
|
291
293
|
}, [
|
|
292
|
-
O(
|
|
294
|
+
O(N, {
|
|
293
295
|
name: f.value ? "pan-end-symbolic" : "pan-start-symbolic",
|
|
294
296
|
type: "symbol",
|
|
295
297
|
size: 16
|
|
296
298
|
}, null, 8, ["name"])
|
|
297
299
|
], 8, ta),
|
|
298
|
-
d.value && !f.value ? (
|
|
299
|
-
e.title ? (
|
|
300
|
-
e.subtitle ? (
|
|
300
|
+
d.value && !f.value ? (i(), r("div", aa, [
|
|
301
|
+
e.title ? (i(), r("p", na, M(e.title), 1)) : x("", !0),
|
|
302
|
+
e.subtitle ? (i(), r("p", la, M(e.subtitle), 1)) : x("", !0)
|
|
301
303
|
])) : x("", !0)
|
|
302
304
|
]),
|
|
303
|
-
$.$slots.header && !f.value ? (
|
|
305
|
+
$.$slots.header && !f.value ? (i(), r("div", oa, [
|
|
304
306
|
S($.$slots, "header", { collapsed: f.value })
|
|
305
307
|
])) : x("", !0)
|
|
306
|
-
])) : (
|
|
307
|
-
|
|
308
|
+
])) : (i(), r("div", ia, [
|
|
309
|
+
B("button", {
|
|
308
310
|
type: "button",
|
|
309
|
-
class:
|
|
311
|
+
class: y(Fe),
|
|
310
312
|
"aria-label": f.value ? e.expandLabel : e.collapseLabel,
|
|
311
313
|
"aria-expanded": !f.value,
|
|
312
|
-
onClick:
|
|
314
|
+
onClick: A
|
|
313
315
|
}, [
|
|
314
|
-
O(
|
|
316
|
+
O(N, {
|
|
315
317
|
name: f.value ? "pan-end-symbolic" : "pan-start-symbolic",
|
|
316
318
|
type: "symbol",
|
|
317
319
|
size: 16
|
|
318
320
|
}, null, 8, ["name"])
|
|
319
|
-
], 8,
|
|
321
|
+
], 8, ra)
|
|
320
322
|
])),
|
|
321
|
-
|
|
322
|
-
(
|
|
323
|
+
B("div", sa, [
|
|
324
|
+
(i(!0), r(te, null, ue(e.categories, (C) => (i(), U(Ze, {
|
|
323
325
|
key: C.id,
|
|
324
326
|
title: C.title,
|
|
325
327
|
collapsed: f.value
|
|
326
328
|
}, {
|
|
327
|
-
default:
|
|
328
|
-
(
|
|
329
|
-
key:
|
|
330
|
-
label:
|
|
331
|
-
icon:
|
|
332
|
-
badge:
|
|
333
|
-
disabled:
|
|
329
|
+
default: G(() => [
|
|
330
|
+
(i(!0), r(te, null, ue(C.items, (h) => (i(), U(_e, {
|
|
331
|
+
key: h.id,
|
|
332
|
+
label: h.label,
|
|
333
|
+
icon: h.icon,
|
|
334
|
+
badge: h.badge,
|
|
335
|
+
disabled: h.disabled,
|
|
334
336
|
collapsed: f.value,
|
|
335
|
-
active: e.modelValue ===
|
|
336
|
-
onClick: (c) => g(
|
|
337
|
+
active: e.modelValue === h.id,
|
|
338
|
+
onClick: (c) => g(h.id)
|
|
337
339
|
}, null, 8, ["label", "icon", "badge", "disabled", "collapsed", "active", "onClick"]))), 128))
|
|
338
340
|
]),
|
|
339
341
|
_: 2
|
|
@@ -355,30 +357,30 @@ const Kt = ["src", "alt"], H = /* @__PURE__ */ D({
|
|
|
355
357
|
}),
|
|
356
358
|
emits: /* @__PURE__ */ Re(["change"], ["update:modelValue"]),
|
|
357
359
|
setup(e, { emit: n }) {
|
|
358
|
-
const t = e, a = Be(), l =
|
|
360
|
+
const t = e, a = Be(), l = yt(), o = v(() => a.id ?? l), s = n, [u, m] = gt(e, "modelValue", {
|
|
359
361
|
set(f) {
|
|
360
362
|
return m.number ? Number(f) : f;
|
|
361
363
|
}
|
|
362
364
|
});
|
|
363
|
-
return (f, d) => (
|
|
364
|
-
t.label ? (
|
|
365
|
+
return (f, d) => (i(), r("div", ca, [
|
|
366
|
+
t.label ? (i(), r("label", {
|
|
365
367
|
key: 0,
|
|
366
368
|
for: o.value,
|
|
367
369
|
class: "text-tx-muted text-xs"
|
|
368
370
|
}, M(t.label), 9, da)) : x("", !0),
|
|
369
|
-
|
|
370
|
-
Se(
|
|
371
|
+
B("div", fa, [
|
|
372
|
+
Se(B("select", ce({
|
|
371
373
|
id: o.value,
|
|
372
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
374
|
+
"onUpdate:modelValue": d[0] || (d[0] = (E) => ht(u) ? u.value = E : null),
|
|
373
375
|
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"
|
|
374
376
|
}, F(a), {
|
|
375
|
-
onChange: d[1] || (d[1] = (
|
|
377
|
+
onChange: d[1] || (d[1] = (E) => s("change", E))
|
|
376
378
|
}), [
|
|
377
379
|
S(f.$slots, "default")
|
|
378
380
|
], 16, ma), [
|
|
379
381
|
[xt, F(u)]
|
|
380
382
|
]),
|
|
381
|
-
O(
|
|
383
|
+
O(N, {
|
|
382
384
|
name: "pan-down-symbolic",
|
|
383
385
|
type: "symbol",
|
|
384
386
|
size: 14,
|
|
@@ -396,22 +398,22 @@ function pa(e) {
|
|
|
396
398
|
return typeof e == "string" && va.includes(e);
|
|
397
399
|
}
|
|
398
400
|
function he() {
|
|
399
|
-
const e =
|
|
401
|
+
const e = ke(Ve, null);
|
|
400
402
|
if (e) return e;
|
|
401
|
-
const n =
|
|
403
|
+
const n = k("top");
|
|
402
404
|
return {
|
|
403
405
|
posicion: n,
|
|
404
406
|
orientacion: v(() => Ae(n.value)),
|
|
405
407
|
vertical: v(() => Ae(n.value) === "vertical")
|
|
406
408
|
};
|
|
407
409
|
}
|
|
408
|
-
const Ie = ["minimize", "maximize", "close"],
|
|
410
|
+
const Ie = ["minimize", "maximize", "close"], ya = "window", ga = "barPosition";
|
|
409
411
|
function ha(e) {
|
|
410
|
-
const t = e?.[
|
|
412
|
+
const t = e?.[ya]?.[ga];
|
|
411
413
|
return pa(t) ? t : null;
|
|
412
414
|
}
|
|
413
415
|
function xa(e = "top") {
|
|
414
|
-
const n =
|
|
416
|
+
const n = k(e);
|
|
415
417
|
let t = null, a = !1;
|
|
416
418
|
async function l() {
|
|
417
419
|
try {
|
|
@@ -420,7 +422,7 @@ function xa(e = "top") {
|
|
|
420
422
|
} catch {
|
|
421
423
|
}
|
|
422
424
|
}
|
|
423
|
-
return
|
|
425
|
+
return W(async () => {
|
|
424
426
|
await l();
|
|
425
427
|
try {
|
|
426
428
|
const { listen: o } = await import("@tauri-apps/api/event"), s = await o("config-changed", () => {
|
|
@@ -445,7 +447,7 @@ function et(e) {
|
|
|
445
447
|
}
|
|
446
448
|
return t;
|
|
447
449
|
}
|
|
448
|
-
const
|
|
450
|
+
const ka = ["title", "aria-label"], wa = ["title", "aria-label"], $a = ["title", "aria-label"], Ee = "flex items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 p-1 transition-colors", tt = /* @__PURE__ */ D({
|
|
449
451
|
__name: "WindowControls",
|
|
450
452
|
props: {
|
|
451
453
|
controls: { default: () => Ie },
|
|
@@ -463,64 +465,64 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
463
465
|
function d() {
|
|
464
466
|
return At();
|
|
465
467
|
}
|
|
466
|
-
const
|
|
467
|
-
function
|
|
468
|
-
return !!
|
|
468
|
+
const E = Ge();
|
|
469
|
+
function L(j) {
|
|
470
|
+
return !!E?.vnode.props?.[`on${j}`];
|
|
469
471
|
}
|
|
470
|
-
function
|
|
471
|
-
if (
|
|
472
|
+
function A() {
|
|
473
|
+
if (L("Minimize")) return u("minimize");
|
|
472
474
|
d().minimize();
|
|
473
475
|
}
|
|
474
476
|
function g() {
|
|
475
|
-
if (
|
|
477
|
+
if (L("Maximize")) return u("maximize");
|
|
476
478
|
d().toggleMaximize();
|
|
477
479
|
}
|
|
478
480
|
function $() {
|
|
479
|
-
if (
|
|
481
|
+
if (L("Close")) return u("close");
|
|
480
482
|
d().close();
|
|
481
483
|
}
|
|
482
|
-
return (j, C) => e.controls.length ? (
|
|
484
|
+
return (j, C) => e.controls.length ? (i(), r("div", {
|
|
483
485
|
key: 0,
|
|
484
|
-
class:
|
|
486
|
+
class: y(["flex shrink-0 gap-1", F(m) ? "flex-col" : ""]),
|
|
485
487
|
"data-tauri-drag-region": ""
|
|
486
488
|
}, [
|
|
487
|
-
f.value.minimize ? (
|
|
489
|
+
f.value.minimize ? (i(), r("button", {
|
|
488
490
|
key: 0,
|
|
489
491
|
type: "button",
|
|
490
|
-
class:
|
|
492
|
+
class: y([Ee, "hover:bg-status-success"]),
|
|
491
493
|
title: l.value,
|
|
492
494
|
"aria-label": l.value,
|
|
493
|
-
onClick: C[0] || (C[0] = (
|
|
495
|
+
onClick: C[0] || (C[0] = (h) => A())
|
|
494
496
|
}, [
|
|
495
|
-
O(
|
|
497
|
+
O(N, {
|
|
496
498
|
name: "window-minimize",
|
|
497
499
|
type: "symbol",
|
|
498
500
|
size: 24
|
|
499
501
|
})
|
|
500
|
-
], 10,
|
|
501
|
-
f.value.maximize ? (
|
|
502
|
+
], 10, ka)) : x("", !0),
|
|
503
|
+
f.value.maximize ? (i(), r("button", {
|
|
502
504
|
key: 1,
|
|
503
505
|
type: "button",
|
|
504
|
-
class:
|
|
506
|
+
class: y([Ee, "hover:bg-status-warning"]),
|
|
505
507
|
title: o.value,
|
|
506
508
|
"aria-label": o.value,
|
|
507
|
-
onClick: C[1] || (C[1] = (
|
|
509
|
+
onClick: C[1] || (C[1] = (h) => g())
|
|
508
510
|
}, [
|
|
509
|
-
O(
|
|
511
|
+
O(N, {
|
|
510
512
|
name: "window-maximize",
|
|
511
513
|
type: "symbol",
|
|
512
514
|
size: 24
|
|
513
515
|
})
|
|
514
|
-
], 10,
|
|
515
|
-
f.value.close ? (
|
|
516
|
+
], 10, wa)) : x("", !0),
|
|
517
|
+
f.value.close ? (i(), r("button", {
|
|
516
518
|
key: 2,
|
|
517
519
|
type: "button",
|
|
518
|
-
class:
|
|
520
|
+
class: y([Ee, "hover:bg-status-error"]),
|
|
519
521
|
title: s.value,
|
|
520
522
|
"aria-label": s.value,
|
|
521
|
-
onClick: C[2] || (C[2] = (
|
|
523
|
+
onClick: C[2] || (C[2] = (h) => $())
|
|
522
524
|
}, [
|
|
523
|
-
O(
|
|
525
|
+
O(N, {
|
|
524
526
|
name: "window-close",
|
|
525
527
|
type: "symbol",
|
|
526
528
|
size: 24
|
|
@@ -532,7 +534,7 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
532
534
|
key: 0,
|
|
533
535
|
class: "flex shrink-0 items-center",
|
|
534
536
|
"data-tauri-drag-region": ""
|
|
535
|
-
},
|
|
537
|
+
}, za = {
|
|
536
538
|
key: 1,
|
|
537
539
|
class: "min-w-0 shrink truncate text-sm",
|
|
538
540
|
"data-tauri-drag-region": ""
|
|
@@ -549,31 +551,31 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
549
551
|
emits: ["minimize", "maximize", "close"],
|
|
550
552
|
setup(e) {
|
|
551
553
|
const n = e, t = he(), a = v(() => n.position ?? t.posicion.value), l = v(() => a.value === "left" || a.value === "right");
|
|
552
|
-
return
|
|
554
|
+
return ye(Ve, {
|
|
553
555
|
posicion: a,
|
|
554
556
|
orientacion: v(() => l.value ? "vertical" : "horizontal"),
|
|
555
557
|
vertical: l
|
|
556
|
-
}), (o, s) => (
|
|
557
|
-
class:
|
|
558
|
+
}), (o, s) => (i(), r("div", {
|
|
559
|
+
class: y(["relative flex shrink-0 items-center gap-2 p-1 font-title", l.value ? "h-full flex-col" : "w-full"]),
|
|
558
560
|
"data-tauri-drag-region": ""
|
|
559
561
|
}, [
|
|
560
|
-
o.$slots.identidad ? (
|
|
562
|
+
o.$slots.identidad ? (i(), r("div", Ca, [
|
|
561
563
|
S(o.$slots, "identidad")
|
|
562
564
|
])) : x("", !0),
|
|
563
|
-
(o.$slots.titulo || e.title) && !l.value ? (
|
|
565
|
+
(o.$slots.titulo || e.title) && !l.value ? (i(), r("p", za, [
|
|
564
566
|
S(o.$slots, "titulo", {}, () => [
|
|
565
567
|
Me(M(e.title), 1)
|
|
566
568
|
])
|
|
567
569
|
])) : x("", !0),
|
|
568
|
-
|
|
569
|
-
class:
|
|
570
|
+
B("div", {
|
|
571
|
+
class: y(["flex min-h-0 min-w-0 flex-1 items-center gap-2 overflow-auto", l.value ? "flex-col" : ""]),
|
|
570
572
|
"data-tauri-drag-region": ""
|
|
571
573
|
}, [
|
|
572
574
|
S(o.$slots, "default")
|
|
573
575
|
], 2),
|
|
574
|
-
o.$slots.acciones ? (
|
|
576
|
+
o.$slots.acciones ? (i(), r("div", {
|
|
575
577
|
key: 2,
|
|
576
|
-
class:
|
|
578
|
+
class: y(["flex shrink-0 items-center gap-1", l.value ? "flex-col" : ""])
|
|
577
579
|
}, [
|
|
578
580
|
S(o.$slots, "acciones")
|
|
579
581
|
], 2)) : x("", !0),
|
|
@@ -583,19 +585,19 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
583
585
|
"maximize-label": e.maximizeLabel,
|
|
584
586
|
"close-label": e.closeLabel
|
|
585
587
|
}, Qe(F(et)(["minimize", "maximize", "close"]))), null, 16, ["controls", "minimize-label", "maximize-label", "close-label"]),
|
|
586
|
-
o.$slots.centro ? (
|
|
588
|
+
o.$slots.centro ? (i(), r("div", {
|
|
587
589
|
key: 3,
|
|
588
|
-
class:
|
|
590
|
+
class: y(["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"])
|
|
589
591
|
}, [
|
|
590
|
-
|
|
591
|
-
class:
|
|
592
|
+
B("div", {
|
|
593
|
+
class: y(["pointer-events-auto flex items-center gap-2", l.value ? "flex-col" : ""])
|
|
592
594
|
}, [
|
|
593
595
|
S(o.$slots, "centro")
|
|
594
596
|
], 2)
|
|
595
597
|
], 2)) : x("", !0)
|
|
596
598
|
], 2));
|
|
597
599
|
}
|
|
598
|
-
}),
|
|
600
|
+
}), Ea = { class: "flex min-h-0 min-w-0 flex-1" }, La = /* @__PURE__ */ D({
|
|
599
601
|
__name: "WindowFrame",
|
|
600
602
|
props: {
|
|
601
603
|
position: { default: null },
|
|
@@ -609,17 +611,17 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
609
611
|
emits: ["minimize", "maximize", "close"],
|
|
610
612
|
setup(e) {
|
|
611
613
|
const n = e, t = xa(), a = v(() => n.position ?? t.value), l = v(() => Ae(a.value)), o = v(() => l.value === "vertical");
|
|
612
|
-
|
|
614
|
+
ye(Ve, { posicion: a, orientacion: l, vertical: o });
|
|
613
615
|
const s = {
|
|
614
616
|
top: "flex-col",
|
|
615
617
|
bottom: "flex-col-reverse",
|
|
616
618
|
left: "flex-row",
|
|
617
619
|
right: "flex-row-reverse"
|
|
618
620
|
};
|
|
619
|
-
return (u, m) => (
|
|
620
|
-
class:
|
|
621
|
+
return (u, m) => (i(), r("div", {
|
|
622
|
+
class: y(["flex h-screen w-screen overflow-hidden rounded-corner-window border border-ui-border bg-ui-bg/80", s[a.value]])
|
|
621
623
|
}, [
|
|
622
|
-
e.hideBar ? x("", !0) : (
|
|
624
|
+
e.hideBar ? x("", !0) : (i(), U(at, ce({
|
|
623
625
|
key: 0,
|
|
624
626
|
position: a.value,
|
|
625
627
|
title: e.title,
|
|
@@ -627,42 +629,42 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
627
629
|
"maximize-label": e.maximizeLabel,
|
|
628
630
|
"close-label": e.closeLabel,
|
|
629
631
|
controls: e.controls
|
|
630
|
-
}, Qe(F(et)(["minimize", "maximize", "close"]))),
|
|
631
|
-
default:
|
|
632
|
+
}, Qe(F(et)(["minimize", "maximize", "close"]))), kt({
|
|
633
|
+
default: G(() => [
|
|
632
634
|
S(u.$slots, "barra")
|
|
633
635
|
]),
|
|
634
636
|
_: 2
|
|
635
637
|
}, [
|
|
636
638
|
u.$slots.identidad ? {
|
|
637
639
|
name: "identidad",
|
|
638
|
-
fn:
|
|
640
|
+
fn: G(() => [
|
|
639
641
|
S(u.$slots, "identidad")
|
|
640
642
|
]),
|
|
641
643
|
key: "0"
|
|
642
644
|
} : void 0,
|
|
643
645
|
u.$slots.titulo ? {
|
|
644
646
|
name: "titulo",
|
|
645
|
-
fn:
|
|
647
|
+
fn: G(() => [
|
|
646
648
|
S(u.$slots, "titulo")
|
|
647
649
|
]),
|
|
648
650
|
key: "1"
|
|
649
651
|
} : void 0,
|
|
650
652
|
u.$slots.centro ? {
|
|
651
653
|
name: "centro",
|
|
652
|
-
fn:
|
|
654
|
+
fn: G(() => [
|
|
653
655
|
S(u.$slots, "centro")
|
|
654
656
|
]),
|
|
655
657
|
key: "2"
|
|
656
658
|
} : void 0,
|
|
657
659
|
u.$slots.acciones ? {
|
|
658
660
|
name: "acciones",
|
|
659
|
-
fn:
|
|
661
|
+
fn: G(() => [
|
|
660
662
|
S(u.$slots, "acciones")
|
|
661
663
|
]),
|
|
662
664
|
key: "3"
|
|
663
665
|
} : void 0
|
|
664
666
|
]), 1040, ["position", "title", "minimize-label", "maximize-label", "close-label", "controls"])),
|
|
665
|
-
|
|
667
|
+
B("div", Ea, [
|
|
666
668
|
S(u.$slots, "default")
|
|
667
669
|
])
|
|
668
670
|
], 2));
|
|
@@ -688,62 +690,62 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
688
690
|
},
|
|
689
691
|
emits: ["select", "close", "menu", "mover", "navegar"],
|
|
690
692
|
setup(e, { emit: n }) {
|
|
691
|
-
const t = e, a = n, { vertical: l, posicion: o } = he(), s =
|
|
692
|
-
let
|
|
693
|
+
const t = e, a = n, { vertical: l, posicion: o } = he(), s = k(null), u = k(null), m = k(!1), f = k(!1), d = k(!1), E = k({ top: 0, left: 0, right: 0 });
|
|
694
|
+
let L = null, A = null;
|
|
693
695
|
const g = v(() => t.tab.closable !== !1), $ = v(() => t.tab.tooltip ?? t.tab.label), j = v(
|
|
694
696
|
() => t.tab.dirty ? `${t.tab.label} · ${t.dirtyLabel}` : t.tab.label
|
|
695
|
-
), C = v(() => t.tab.label.trim().charAt(0).toUpperCase()),
|
|
696
|
-
() => !!t.tab.dirty && !(
|
|
697
|
+
), C = v(() => t.tab.label.trim().charAt(0).toUpperCase()), h = v(() => m.value || d.value), c = v(
|
|
698
|
+
() => !!t.tab.dirty && !(h.value && g.value)
|
|
697
699
|
), b = v(
|
|
698
|
-
() => g.value && (
|
|
700
|
+
() => g.value && (h.value || t.active || !t.tab.dirty)
|
|
699
701
|
), p = v(
|
|
700
702
|
() => l.value && (m.value || f.value || d.value)
|
|
701
703
|
), P = v(() => {
|
|
702
|
-
const
|
|
703
|
-
return o.value === "right" ? { ...
|
|
704
|
+
const q = { position: "fixed", top: `${E.value.top}px`, zIndex: 50 };
|
|
705
|
+
return o.value === "right" ? { ...q, right: `${E.value.right + He}px` } : { ...q, left: `${E.value.left + He}px` };
|
|
704
706
|
});
|
|
705
707
|
function le() {
|
|
706
|
-
const
|
|
707
|
-
if (!
|
|
708
|
-
const
|
|
709
|
-
|
|
710
|
-
top:
|
|
711
|
-
left:
|
|
712
|
-
right: window.innerWidth -
|
|
708
|
+
const q = s.value;
|
|
709
|
+
if (!q) return;
|
|
710
|
+
const w = q.getBoundingClientRect();
|
|
711
|
+
E.value = {
|
|
712
|
+
top: w.top,
|
|
713
|
+
left: w.right,
|
|
714
|
+
right: window.innerWidth - w.left
|
|
713
715
|
};
|
|
714
716
|
}
|
|
715
|
-
function
|
|
716
|
-
const
|
|
717
|
-
|
|
717
|
+
function K(q) {
|
|
718
|
+
const w = q.relatedTarget;
|
|
719
|
+
w && u.value?.contains(w) || (d.value = !1);
|
|
718
720
|
}
|
|
719
721
|
function oe() {
|
|
720
722
|
m.value = !0, le();
|
|
721
723
|
}
|
|
722
|
-
function
|
|
724
|
+
function Y() {
|
|
723
725
|
f.value = !0, le();
|
|
724
726
|
}
|
|
725
|
-
function
|
|
726
|
-
|
|
727
|
+
function T() {
|
|
728
|
+
L !== null && clearTimeout(L), L = null, A = null;
|
|
727
729
|
}
|
|
728
|
-
function
|
|
729
|
-
|
|
730
|
-
|
|
730
|
+
function z(q) {
|
|
731
|
+
q.button === 0 && (A = { x: q.clientX, y: q.clientY }, L = setTimeout(() => {
|
|
732
|
+
A && a("menu", A), T();
|
|
731
733
|
}, Ia));
|
|
732
734
|
}
|
|
733
|
-
function I(
|
|
734
|
-
if (!
|
|
735
|
-
(Math.abs(
|
|
735
|
+
function I(q) {
|
|
736
|
+
if (!A) return;
|
|
737
|
+
(Math.abs(q.clientX - A.x) > qe || Math.abs(q.clientY - A.y) > qe) && T();
|
|
736
738
|
}
|
|
737
|
-
function de(
|
|
738
|
-
|
|
739
|
+
function de(q) {
|
|
740
|
+
q.button === 1 && g.value && (q.preventDefault(), a("close"));
|
|
739
741
|
}
|
|
740
|
-
function bt(
|
|
741
|
-
|
|
742
|
+
function bt(q) {
|
|
743
|
+
q.preventDefault(), a("menu", { x: q.clientX, y: q.clientY });
|
|
742
744
|
}
|
|
743
|
-
return pe(
|
|
745
|
+
return pe(T), (q, w) => (i(), r("div", {
|
|
744
746
|
ref_key: "raiz",
|
|
745
747
|
ref: s,
|
|
746
|
-
class:
|
|
748
|
+
class: y(["group relative flex shrink-0 cursor-pointer items-center gap-2 rounded-corner border border-ui-border transition-colors", [
|
|
747
749
|
e.active ? "bg-primary font-bold text-tx-on-primary" : "bg-ui-bg/80 hover:bg-ui-surface/70",
|
|
748
750
|
F(l) ? "size-8 justify-center p-0 text-sm" : "w-34 max-w-34 px-3 py-1 text-sm"
|
|
749
751
|
]]),
|
|
@@ -752,88 +754,88 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
752
754
|
title: $.value,
|
|
753
755
|
"aria-label": j.value,
|
|
754
756
|
tabindex: e.tabindex,
|
|
755
|
-
onClick:
|
|
757
|
+
onClick: w[5] || (w[5] = V((H) => a("select"), ["stop"])),
|
|
756
758
|
onKeydown: [
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
759
|
+
w[6] || (w[6] = R(V((H) => a("select"), ["stop"]), ["enter"])),
|
|
760
|
+
w[7] || (w[7] = R(V((H) => a("select"), ["prevent", "stop"]), ["space"])),
|
|
761
|
+
w[8] || (w[8] = R(V((H) => a("navegar", "anterior"), ["prevent", "stop"]), ["left"])),
|
|
762
|
+
w[9] || (w[9] = R(V((H) => a("navegar", "anterior"), ["prevent", "stop"]), ["up"])),
|
|
763
|
+
w[10] || (w[10] = R(V((H) => a("navegar", "siguiente"), ["prevent", "stop"]), ["right"])),
|
|
764
|
+
w[11] || (w[11] = R(V((H) => a("navegar", "siguiente"), ["prevent", "stop"]), ["down"])),
|
|
765
|
+
w[12] || (w[12] = R(V((H) => a("navegar", "primera"), ["prevent", "stop"]), ["home"])),
|
|
766
|
+
w[13] || (w[13] = R(V((H) => a("navegar", "ultima"), ["prevent", "stop"]), ["end"])),
|
|
767
|
+
w[14] || (w[14] = R(V((H) => a("mover", -1), ["alt", "prevent", "stop"]), ["left"])),
|
|
768
|
+
w[15] || (w[15] = R(V((H) => a("mover", -1), ["alt", "prevent", "stop"]), ["up"])),
|
|
769
|
+
w[16] || (w[16] = R(V((H) => a("mover", 1), ["alt", "prevent", "stop"]), ["right"])),
|
|
770
|
+
w[17] || (w[17] = R(V((H) => a("mover", 1), ["alt", "prevent", "stop"]), ["down"])),
|
|
771
|
+
w[18] || (w[18] = R(V((H) => g.value && a("close"), ["prevent", "stop"]), ["delete"]))
|
|
770
772
|
],
|
|
771
773
|
onAuxclick: V(de, ["stop"]),
|
|
772
774
|
onContextmenu: bt,
|
|
773
|
-
onPointerdown:
|
|
775
|
+
onPointerdown: z,
|
|
774
776
|
onPointermove: I,
|
|
775
|
-
onPointerup:
|
|
776
|
-
onPointerleave:
|
|
777
|
+
onPointerup: T,
|
|
778
|
+
onPointerleave: T,
|
|
777
779
|
onMouseenter: oe,
|
|
778
|
-
onMouseleave:
|
|
779
|
-
onFocus:
|
|
780
|
-
onBlur:
|
|
780
|
+
onMouseleave: w[19] || (w[19] = (H) => m.value = !1),
|
|
781
|
+
onFocus: Y,
|
|
782
|
+
onBlur: w[20] || (w[20] = (H) => f.value = !1)
|
|
781
783
|
}, [
|
|
782
|
-
e.tab.icon ? (
|
|
784
|
+
e.tab.icon ? (i(), U(N, {
|
|
783
785
|
key: 0,
|
|
784
786
|
name: e.tab.icon,
|
|
785
787
|
size: 16,
|
|
786
788
|
class: "shrink-0"
|
|
787
|
-
}, null, 8, ["name"])) : F(l) ? (
|
|
788
|
-
F(l) ? x("", !0) : (
|
|
789
|
-
c.value ? (
|
|
789
|
+
}, null, 8, ["name"])) : F(l) ? (i(), r("span", Ta, M(C.value), 1)) : x("", !0),
|
|
790
|
+
F(l) ? x("", !0) : (i(), r("span", Aa, M(e.tab.label), 1)),
|
|
791
|
+
c.value ? (i(), r("span", {
|
|
790
792
|
key: 3,
|
|
791
|
-
class:
|
|
793
|
+
class: y(["size-2 shrink-0 rounded-full bg-current", F(l) ? "absolute right-0.5 top-0.5" : ""]),
|
|
792
794
|
"aria-hidden": "true"
|
|
793
|
-
}, null, 2)) : b.value && !F(l) ? (
|
|
795
|
+
}, null, 2)) : b.value && !F(l) ? (i(), r("button", {
|
|
794
796
|
key: 4,
|
|
795
797
|
type: "button",
|
|
796
798
|
class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
|
|
797
799
|
title: e.closeLabel,
|
|
798
800
|
"aria-label": `${e.closeLabel}: ${j.value}`,
|
|
799
|
-
onClick:
|
|
801
|
+
onClick: w[0] || (w[0] = V((H) => a("close"), ["stop"]))
|
|
800
802
|
}, [
|
|
801
|
-
O(
|
|
803
|
+
O(N, {
|
|
802
804
|
name: "gtk-close",
|
|
803
805
|
type: "symbol",
|
|
804
806
|
size: 12
|
|
805
807
|
})
|
|
806
808
|
], 8, Ba)) : x("", !0),
|
|
807
|
-
(
|
|
808
|
-
O(
|
|
809
|
+
(i(), U(ge, { to: "body" }, [
|
|
810
|
+
O(we, {
|
|
809
811
|
"enter-active-class": "transition duration-150 ease-out",
|
|
810
812
|
"enter-from-class": "opacity-0 scale-95",
|
|
811
813
|
"leave-active-class": "transition duration-100 ease-in",
|
|
812
814
|
"leave-to-class": "opacity-0 scale-95"
|
|
813
815
|
}, {
|
|
814
|
-
default:
|
|
815
|
-
p.value ? (
|
|
816
|
+
default: G(() => [
|
|
817
|
+
p.value ? (i(), r("div", {
|
|
816
818
|
key: 0,
|
|
817
|
-
class:
|
|
819
|
+
class: y(["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" : ""]),
|
|
818
820
|
ref_key: "desplegadoRef",
|
|
819
821
|
ref: u,
|
|
820
822
|
style: fe(P.value),
|
|
821
|
-
onMouseenter:
|
|
822
|
-
onMouseleave:
|
|
823
|
-
onFocusin:
|
|
824
|
-
onFocusout:
|
|
823
|
+
onMouseenter: w[2] || (w[2] = (H) => d.value = !0),
|
|
824
|
+
onMouseleave: w[3] || (w[3] = (H) => d.value = !1),
|
|
825
|
+
onFocusin: w[4] || (w[4] = (H) => d.value = !0),
|
|
826
|
+
onFocusout: K
|
|
825
827
|
}, [
|
|
826
|
-
|
|
827
|
-
e.tab.dirty ? (
|
|
828
|
-
g.value ? (
|
|
828
|
+
B("span", Sa, M(e.tab.label), 1),
|
|
829
|
+
e.tab.dirty ? (i(), r("span", Ma)) : x("", !0),
|
|
830
|
+
g.value ? (i(), r("button", {
|
|
829
831
|
key: 1,
|
|
830
832
|
type: "button",
|
|
831
833
|
class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
|
|
832
834
|
title: e.closeLabel,
|
|
833
835
|
"aria-label": `${e.closeLabel}: ${j.value}`,
|
|
834
|
-
onClick:
|
|
836
|
+
onClick: w[1] || (w[1] = V((H) => a("close"), ["stop"]))
|
|
835
837
|
}, [
|
|
836
|
-
O(
|
|
838
|
+
O(N, {
|
|
837
839
|
name: "gtk-close",
|
|
838
840
|
type: "symbol",
|
|
839
841
|
size: 12
|
|
@@ -858,40 +860,40 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
858
860
|
},
|
|
859
861
|
emits: ["update:modelValue", "select", "close", "new", "reorder", "menu"],
|
|
860
862
|
setup(e, { emit: n }) {
|
|
861
|
-
const t = e, a = n, { vertical: l } = he(), o =
|
|
862
|
-
function f(
|
|
863
|
-
a("update:modelValue",
|
|
863
|
+
const t = e, a = n, { vertical: l } = he(), o = k(null), s = k(0), u = k(null), m = k(null);
|
|
864
|
+
function f(h) {
|
|
865
|
+
a("update:modelValue", h), a("select", h);
|
|
864
866
|
}
|
|
865
|
-
async function d(
|
|
867
|
+
async function d(h, c) {
|
|
866
868
|
const b = t.tabs.length - 1;
|
|
867
869
|
if (b < 0) return;
|
|
868
|
-
const p = c === "primera" ? 0 : c === "ultima" ? b : c === "anterior" ? (
|
|
869
|
-
s.value = p, await
|
|
870
|
+
const p = c === "primera" ? 0 : c === "ultima" ? b : c === "anterior" ? (h - 1 + t.tabs.length) % t.tabs.length : (h + 1) % t.tabs.length;
|
|
871
|
+
s.value = p, await J(), o.value?.querySelectorAll('[role="tab"]')?.[p]?.focus();
|
|
870
872
|
}
|
|
871
|
-
function
|
|
873
|
+
function E(h, c) {
|
|
872
874
|
if (t.fixedOrder) return;
|
|
873
|
-
const b =
|
|
875
|
+
const b = h + c;
|
|
874
876
|
if (b < 0 || b >= t.tabs.length) return;
|
|
875
|
-
const p = [...t.tabs], [P] = p.splice(
|
|
877
|
+
const p = [...t.tabs], [P] = p.splice(h, 1);
|
|
876
878
|
P && (p.splice(b, 0, P), s.value = b, a("reorder", p));
|
|
877
879
|
}
|
|
878
|
-
function
|
|
880
|
+
function L(h) {
|
|
879
881
|
const c = o.value;
|
|
880
882
|
if (!c) return;
|
|
881
|
-
const b =
|
|
882
|
-
l.value ? c.scrollTop += b : c.scrollLeft += b, (l.value ? c.scrollTop : c.scrollLeft) !== p &&
|
|
883
|
+
const b = h.deltaY || h.deltaX || 0, p = l.value ? c.scrollTop : c.scrollLeft;
|
|
884
|
+
l.value ? c.scrollTop += b : c.scrollLeft += b, (l.value ? c.scrollTop : c.scrollLeft) !== p && h.preventDefault();
|
|
883
885
|
}
|
|
884
|
-
function
|
|
885
|
-
t.fixedOrder || (u.value =
|
|
886
|
+
function A(h, c) {
|
|
887
|
+
t.fixedOrder || (u.value = h, c.dataTransfer?.setData("text/plain", String(h)), c.dataTransfer && (c.dataTransfer.effectAllowed = "move"));
|
|
886
888
|
}
|
|
887
|
-
function g(
|
|
888
|
-
t.fixedOrder || u.value === null || (c.preventDefault(), m.value =
|
|
889
|
+
function g(h, c) {
|
|
890
|
+
t.fixedOrder || u.value === null || (c.preventDefault(), m.value = h, c.dataTransfer && (c.dataTransfer.dropEffect = "move"));
|
|
889
891
|
}
|
|
890
|
-
function $(
|
|
892
|
+
function $(h) {
|
|
891
893
|
const c = u.value;
|
|
892
|
-
if (j(), t.fixedOrder || c === null || c ===
|
|
894
|
+
if (j(), t.fixedOrder || c === null || c === h) return;
|
|
893
895
|
const b = [...t.tabs], [p] = b.splice(c, 1);
|
|
894
|
-
p && (b.splice(
|
|
896
|
+
p && (b.splice(h, 0, p), a("reorder", b));
|
|
895
897
|
}
|
|
896
898
|
function j() {
|
|
897
899
|
u.value = null, m.value = null;
|
|
@@ -899,25 +901,25 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
899
901
|
const C = v(
|
|
900
902
|
() => 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"
|
|
901
903
|
);
|
|
902
|
-
return (
|
|
903
|
-
class:
|
|
904
|
+
return (h, c) => (i(), r("div", {
|
|
905
|
+
class: y(["flex min-h-0 min-w-0 items-center gap-1", F(l) ? "w-full flex-col" : "h-full"]),
|
|
904
906
|
role: "tablist",
|
|
905
907
|
"aria-orientation": F(l) ? "vertical" : "horizontal"
|
|
906
908
|
}, [
|
|
907
|
-
|
|
909
|
+
B("div", {
|
|
908
910
|
ref_key: "carril",
|
|
909
911
|
ref: o,
|
|
910
|
-
class:
|
|
911
|
-
onWheel:
|
|
912
|
+
class: y(C.value),
|
|
913
|
+
onWheel: L
|
|
912
914
|
}, [
|
|
913
|
-
(
|
|
915
|
+
(i(!0), r(te, null, ue(e.tabs, (b, p) => (i(), r("div", {
|
|
914
916
|
key: b.id,
|
|
915
|
-
class:
|
|
917
|
+
class: y(["transition-opacity", [
|
|
916
918
|
u.value === p ? "opacity-40" : "",
|
|
917
919
|
m.value === p && u.value !== p ? "ring-2 ring-secondary rounded-corner" : ""
|
|
918
920
|
]]),
|
|
919
921
|
draggable: !e.fixedOrder,
|
|
920
|
-
onDragstart: (P) =>
|
|
922
|
+
onDragstart: (P) => A(p, P),
|
|
921
923
|
onDragover: (P) => g(p, P),
|
|
922
924
|
onDrop: V((P) => $(p), ["prevent"]),
|
|
923
925
|
onDragend: j
|
|
@@ -932,11 +934,11 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
932
934
|
onClose: (P) => a("close", b.id),
|
|
933
935
|
onMenu: (P) => a("menu", { id: b.id, ...P }),
|
|
934
936
|
onNavegar: (P) => d(p, P),
|
|
935
|
-
onMover: (P) =>
|
|
937
|
+
onMover: (P) => E(p, P)
|
|
936
938
|
}, null, 8, ["tab", "active", "close-label", "dirty-label", "tabindex", "onSelect", "onClose", "onMenu", "onNavegar", "onMover"])
|
|
937
939
|
], 42, ja))), 128))
|
|
938
940
|
], 34),
|
|
939
|
-
e.newLabel ? (
|
|
941
|
+
e.newLabel ? (i(), r("button", {
|
|
940
942
|
key: 0,
|
|
941
943
|
type: "button",
|
|
942
944
|
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",
|
|
@@ -944,7 +946,7 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
944
946
|
"aria-label": e.newLabel,
|
|
945
947
|
onClick: c[0] || (c[0] = (b) => a("new"))
|
|
946
948
|
}, [
|
|
947
|
-
O(
|
|
949
|
+
O(N, {
|
|
948
950
|
name: "gtk-add",
|
|
949
951
|
type: "symbol",
|
|
950
952
|
size: 14
|
|
@@ -978,7 +980,7 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
978
980
|
function s(d) {
|
|
979
981
|
a.lazy && l("update:modelValue", d.target.value);
|
|
980
982
|
}
|
|
981
|
-
const u =
|
|
983
|
+
const u = k(null);
|
|
982
984
|
function m() {
|
|
983
985
|
return u.value?.focus(), u.value !== null && document.activeElement === u.value;
|
|
984
986
|
}
|
|
@@ -990,7 +992,7 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
990
992
|
a.mono ? "font-mono" : "",
|
|
991
993
|
a.disabled ? "cursor-not-allowed opacity-60" : ""
|
|
992
994
|
]);
|
|
993
|
-
return (d,
|
|
995
|
+
return (d, E) => (i(), r("input", {
|
|
994
996
|
ref_key: "campo",
|
|
995
997
|
ref: u,
|
|
996
998
|
id: e.id,
|
|
@@ -1004,11 +1006,11 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1004
1006
|
"aria-describedby": e.describedBy,
|
|
1005
1007
|
autocomplete: e.autocomplete,
|
|
1006
1008
|
"aria-invalid": e.invalid || void 0,
|
|
1007
|
-
class:
|
|
1009
|
+
class: y(f.value),
|
|
1008
1010
|
onInput: o,
|
|
1009
1011
|
onChange: s,
|
|
1010
|
-
onKeyup:
|
|
1011
|
-
onKeydown:
|
|
1012
|
+
onKeyup: E[0] || (E[0] = (L) => l("keyup", L)),
|
|
1013
|
+
onKeydown: E[1] || (E[1] = (L) => l("keydown", L))
|
|
1012
1014
|
}, null, 42, Fa));
|
|
1013
1015
|
}
|
|
1014
1016
|
}), Na = { class: "pointer-events-none absolute left-2 flex items-center" }, qa = ["aria-label"], Oe = /* @__PURE__ */ D({
|
|
@@ -1028,7 +1030,7 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1028
1030
|
},
|
|
1029
1031
|
emits: ["update:modelValue", "search", "clear", "keydown"],
|
|
1030
1032
|
setup(e, { expose: n, emit: t }) {
|
|
1031
|
-
const a = e, l = t, o =
|
|
1033
|
+
const a = e, l = t, o = k(null);
|
|
1032
1034
|
let s;
|
|
1033
1035
|
const u = v(() => a.modelValue.length > 0), m = v(
|
|
1034
1036
|
() => a.listboxId ? {
|
|
@@ -1042,35 +1044,35 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1042
1044
|
function d() {
|
|
1043
1045
|
clearTimeout(s), s = void 0;
|
|
1044
1046
|
}
|
|
1045
|
-
function
|
|
1047
|
+
function E($) {
|
|
1046
1048
|
l("update:modelValue", $), !(a.debounce <= 0) && (d(), s = setTimeout(() => l("search", $), a.debounce));
|
|
1047
1049
|
}
|
|
1048
|
-
function
|
|
1050
|
+
function L() {
|
|
1049
1051
|
d(), l("search", a.modelValue);
|
|
1050
1052
|
}
|
|
1051
|
-
function
|
|
1053
|
+
function A() {
|
|
1052
1054
|
d(), l("update:modelValue", ""), l("clear"), g();
|
|
1053
1055
|
}
|
|
1054
1056
|
function g() {
|
|
1055
1057
|
return o.value?.enfocar() ?? !1;
|
|
1056
1058
|
}
|
|
1057
|
-
return n({ enfocar: g }),
|
|
1058
|
-
a.autofocus && (await
|
|
1059
|
-
}), ve(d),
|
|
1059
|
+
return n({ enfocar: g }), W(async () => {
|
|
1060
|
+
a.autofocus && (await J(), g());
|
|
1061
|
+
}), ve(d), Q(
|
|
1060
1062
|
() => a.disabled,
|
|
1061
1063
|
($) => {
|
|
1062
1064
|
$ && d();
|
|
1063
1065
|
}
|
|
1064
|
-
), ($, j) => (
|
|
1066
|
+
), ($, j) => (i(), r("div", {
|
|
1065
1067
|
class: "relative flex items-center",
|
|
1066
|
-
onKeydown: R(
|
|
1068
|
+
onKeydown: R(L, ["enter"])
|
|
1067
1069
|
}, [
|
|
1068
|
-
|
|
1069
|
-
O(
|
|
1070
|
+
B("span", Na, [
|
|
1071
|
+
O(N, {
|
|
1070
1072
|
name: e.busy ? "content-loading" : "system-search",
|
|
1071
1073
|
type: "symbol",
|
|
1072
1074
|
size: 14,
|
|
1073
|
-
class:
|
|
1075
|
+
class: y(e.busy ? "animate-spin opacity-70" : "opacity-60")
|
|
1074
1076
|
}, null, 8, ["name", "class"])
|
|
1075
1077
|
]),
|
|
1076
1078
|
O(lt, ce({
|
|
@@ -1083,19 +1085,19 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1083
1085
|
}, m.value, {
|
|
1084
1086
|
disabled: e.disabled,
|
|
1085
1087
|
class: ["pl-7 [&::-webkit-search-cancel-button]:appearance-none", f.value ? "pr-8" : ""],
|
|
1086
|
-
"onUpdate:modelValue":
|
|
1088
|
+
"onUpdate:modelValue": E,
|
|
1087
1089
|
onKeydown: j[0] || (j[0] = (C) => l("keydown", C))
|
|
1088
1090
|
}), null, 16, ["model-value", "placeholder", "ariaLabel", "disabled", "class"]),
|
|
1089
|
-
f.value ? (
|
|
1091
|
+
f.value ? (i(), r("button", {
|
|
1090
1092
|
key: 0,
|
|
1091
1093
|
type: "button",
|
|
1092
1094
|
class: "absolute right-1 flex size-6 items-center justify-center rounded-corner text-tx-muted hover:bg-ui-surface",
|
|
1093
1095
|
"aria-label": e.label ? `${e.label}: vaciar` : "Vaciar",
|
|
1094
1096
|
onMousedown: j[1] || (j[1] = V(() => {
|
|
1095
1097
|
}, ["prevent"])),
|
|
1096
|
-
onClick:
|
|
1098
|
+
onClick: A
|
|
1097
1099
|
}, [
|
|
1098
|
-
O(
|
|
1100
|
+
O(N, {
|
|
1099
1101
|
name: "gtk-close",
|
|
1100
1102
|
type: "symbol",
|
|
1101
1103
|
size: 12,
|
|
@@ -1116,26 +1118,26 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1116
1118
|
},
|
|
1117
1119
|
emits: ["update:modelValue", "search", "open", "close"],
|
|
1118
1120
|
setup(e, { emit: n }) {
|
|
1119
|
-
const t = e, a = n, { vertical: l, posicion: o } = he(), s =
|
|
1121
|
+
const t = e, a = n, { vertical: l, posicion: o } = he(), s = k(!1), u = k(null), m = v(() => l.value || t.collapsed), f = v(() => !m.value || s.value), d = v(() => {
|
|
1120
1122
|
if (!m.value) return "";
|
|
1121
1123
|
const g = "absolute z-40 w-64 rounded-corner border border-ui-border bg-ui-surface/95 p-1 shadow-lg";
|
|
1122
1124
|
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`;
|
|
1123
1125
|
});
|
|
1124
|
-
async function
|
|
1125
|
-
s.value = !0, a("open"), await
|
|
1126
|
+
async function E() {
|
|
1127
|
+
s.value = !0, a("open"), await J(), u.value?.enfocar();
|
|
1126
1128
|
}
|
|
1127
|
-
function
|
|
1129
|
+
function L() {
|
|
1128
1130
|
s.value && (s.value = !1, a("close"));
|
|
1129
1131
|
}
|
|
1130
|
-
function
|
|
1132
|
+
function A(g) {
|
|
1131
1133
|
const $ = g.relatedTarget;
|
|
1132
|
-
$ && g.currentTarget.contains($) ||
|
|
1134
|
+
$ && g.currentTarget.contains($) || L();
|
|
1133
1135
|
}
|
|
1134
|
-
return (g, $) => (
|
|
1136
|
+
return (g, $) => (i(), r("div", {
|
|
1135
1137
|
class: "relative flex shrink-0 items-center",
|
|
1136
|
-
onFocusout:
|
|
1138
|
+
onFocusout: A
|
|
1137
1139
|
}, [
|
|
1138
|
-
m.value ? (
|
|
1140
|
+
m.value ? (i(), r("button", {
|
|
1139
1141
|
key: 0,
|
|
1140
1142
|
type: "button",
|
|
1141
1143
|
class: "flex size-7 items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 hover:bg-ui-surface/70",
|
|
@@ -1144,18 +1146,18 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1144
1146
|
"aria-expanded": s.value,
|
|
1145
1147
|
onMousedown: $[0] || ($[0] = V(() => {
|
|
1146
1148
|
}, ["prevent"])),
|
|
1147
|
-
onClick: $[1] || ($[1] = (j) => s.value ?
|
|
1149
|
+
onClick: $[1] || ($[1] = (j) => s.value ? L() : E())
|
|
1148
1150
|
}, [
|
|
1149
|
-
O(
|
|
1151
|
+
O(N, {
|
|
1150
1152
|
name: "system-search",
|
|
1151
1153
|
type: "symbol",
|
|
1152
1154
|
size: 14
|
|
1153
1155
|
})
|
|
1154
1156
|
], 40, Ha)) : x("", !0),
|
|
1155
|
-
f.value ? (
|
|
1157
|
+
f.value ? (i(), r("div", {
|
|
1156
1158
|
key: 1,
|
|
1157
|
-
class:
|
|
1158
|
-
onKeydown: R(
|
|
1159
|
+
class: y(d.value),
|
|
1160
|
+
onKeydown: R(L, ["esc"])
|
|
1159
1161
|
}, [
|
|
1160
1162
|
O(Oe, {
|
|
1161
1163
|
ref_key: "campo",
|
|
@@ -1165,7 +1167,7 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1165
1167
|
label: e.label,
|
|
1166
1168
|
disabled: e.disabled,
|
|
1167
1169
|
debounce: e.debounce,
|
|
1168
|
-
class:
|
|
1170
|
+
class: y(m.value ? "" : "w-48"),
|
|
1169
1171
|
"onUpdate:modelValue": $[2] || ($[2] = (j) => a("update:modelValue", j)),
|
|
1170
1172
|
onSearch: $[3] || ($[3] = (j) => a("search", j))
|
|
1171
1173
|
}, null, 8, ["model-value", "placeholder", "label", "disabled", "debounce", "class"])
|
|
@@ -1205,10 +1207,10 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1205
1207
|
}, s = (u) => {
|
|
1206
1208
|
t.stopPropagation && u.stopPropagation(), t.preventDefault && u.preventDefault(), !t.disabled && !t.loading && a("click");
|
|
1207
1209
|
};
|
|
1208
|
-
return (u, m) => (
|
|
1210
|
+
return (u, m) => (i(), r("button", {
|
|
1209
1211
|
type: t.type,
|
|
1210
1212
|
onClick: s,
|
|
1211
|
-
class:
|
|
1213
|
+
class: y(["rounded-corner transition-[background-color,opacity] duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2", [
|
|
1212
1214
|
l[t.variant],
|
|
1213
1215
|
o[t.size],
|
|
1214
1216
|
t.fullWidth ? "w-full" : "",
|
|
@@ -1217,15 +1219,15 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1217
1219
|
]]),
|
|
1218
1220
|
disabled: t.disabled || t.loading
|
|
1219
1221
|
}, [
|
|
1220
|
-
e.loading ? (
|
|
1221
|
-
t.iconSrc && !t.iconRight ? (
|
|
1222
|
+
e.loading ? (i(), r("span", Wa)) : x("", !0),
|
|
1223
|
+
t.iconSrc && !t.iconRight ? (i(), r("img", {
|
|
1222
1224
|
key: 1,
|
|
1223
1225
|
src: t.iconSrc,
|
|
1224
1226
|
alt: t.iconAlt || t.label,
|
|
1225
1227
|
class: "w-4 h-4"
|
|
1226
1228
|
}, null, 8, Ga)) : x("", !0),
|
|
1227
|
-
t.label ? (
|
|
1228
|
-
t.iconSrc && t.iconRight ? (
|
|
1229
|
+
t.label ? (i(), r("span", Qa, M(t.label), 1)) : x("", !0),
|
|
1230
|
+
t.iconSrc && t.iconRight ? (i(), r("img", {
|
|
1229
1231
|
key: 3,
|
|
1230
1232
|
src: t.iconSrc,
|
|
1231
1233
|
alt: t.iconAlt || t.label,
|
|
@@ -1244,7 +1246,7 @@ const wa = ["title", "aria-label"], ka = ["title", "aria-label"], $a = ["title",
|
|
|
1244
1246
|
warning: "border-status-warning/40 bg-status-warning/10 text-tx-main",
|
|
1245
1247
|
error: "border-status-error/40 bg-status-error/10 text-tx-main"
|
|
1246
1248
|
};
|
|
1247
|
-
function
|
|
1249
|
+
function it(e) {
|
|
1248
1250
|
return e === "error" ? "alert" : "status";
|
|
1249
1251
|
}
|
|
1250
1252
|
const Za = ["role"], _a = {
|
|
@@ -1262,24 +1264,24 @@ const Za = ["role"], _a = {
|
|
|
1262
1264
|
iconType: { default: "symbol" }
|
|
1263
1265
|
},
|
|
1264
1266
|
setup(e) {
|
|
1265
|
-
const n = e, t = v(() => ot[n.tone]), a = v(() =>
|
|
1266
|
-
return (l, o) => (
|
|
1267
|
+
const n = e, t = v(() => ot[n.tone]), a = v(() => it(n.tone));
|
|
1268
|
+
return (l, o) => (i(), r("div", {
|
|
1267
1269
|
role: a.value,
|
|
1268
1270
|
"aria-atomic": "true",
|
|
1269
|
-
class:
|
|
1271
|
+
class: y(["flex gap-3 rounded-corner border px-4 py-2 text-sm", t.value])
|
|
1270
1272
|
}, [
|
|
1271
|
-
e.icon ? (
|
|
1272
|
-
O(
|
|
1273
|
+
e.icon ? (i(), r("span", _a, [
|
|
1274
|
+
O(N, {
|
|
1273
1275
|
name: e.icon,
|
|
1274
1276
|
type: e.iconType,
|
|
1275
1277
|
size: 18,
|
|
1276
1278
|
alt: ""
|
|
1277
1279
|
}, null, 8, ["name", "type"])
|
|
1278
1280
|
])) : x("", !0),
|
|
1279
|
-
|
|
1280
|
-
e.title ? (
|
|
1281
|
-
|
|
1282
|
-
class:
|
|
1281
|
+
B("div", en, [
|
|
1282
|
+
e.title ? (i(), r("p", tn, M(e.title), 1)) : x("", !0),
|
|
1283
|
+
B("div", {
|
|
1284
|
+
class: y(e.title ? "mt-1" : "")
|
|
1283
1285
|
}, [
|
|
1284
1286
|
S(l.$slots, "default")
|
|
1285
1287
|
], 2)
|
|
@@ -1299,17 +1301,17 @@ const Za = ["role"], _a = {
|
|
|
1299
1301
|
bordered: { type: Boolean, default: !1 }
|
|
1300
1302
|
},
|
|
1301
1303
|
setup(e) {
|
|
1302
|
-
return (n, t) => (
|
|
1303
|
-
class:
|
|
1304
|
+
return (n, t) => (i(), r("div", {
|
|
1305
|
+
class: y(["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" : ""])
|
|
1304
1306
|
}, [
|
|
1305
|
-
O(
|
|
1307
|
+
O(N, {
|
|
1306
1308
|
name: e.icon,
|
|
1307
1309
|
type: e.iconType,
|
|
1308
1310
|
size: 48,
|
|
1309
1311
|
class: "opacity-60"
|
|
1310
1312
|
}, null, 8, ["name", "type"]),
|
|
1311
|
-
|
|
1312
|
-
e.note ? (
|
|
1313
|
+
B("p", nn, M(e.title), 1),
|
|
1314
|
+
e.note ? (i(), r("p", ln, M(e.note), 1)) : x("", !0),
|
|
1313
1315
|
S(n.$slots, "default")
|
|
1314
1316
|
], 2));
|
|
1315
1317
|
}
|
|
@@ -1320,13 +1322,13 @@ const Za = ["role"], _a = {
|
|
|
1320
1322
|
bordered: { type: Boolean, default: !1 }
|
|
1321
1323
|
},
|
|
1322
1324
|
setup(e) {
|
|
1323
|
-
return (n, t) => (
|
|
1325
|
+
return (n, t) => (i(), r("div", {
|
|
1324
1326
|
role: "status",
|
|
1325
1327
|
"aria-atomic": "true",
|
|
1326
|
-
class:
|
|
1328
|
+
class: y(["flex flex-col items-center justify-center gap-4 px-8 py-12 text-center", e.bordered ? "rounded-corner border border-ui-border border-dashed bg-ui-surface/20" : ""])
|
|
1327
1329
|
}, [
|
|
1328
|
-
t[0] || (t[0] =
|
|
1329
|
-
|
|
1330
|
+
t[0] || (t[0] = B("span", { class: "h-10 w-10 animate-spin rounded-full border-4 border-ui-border border-t-primary motion-reduce:animate-none" }, null, -1)),
|
|
1331
|
+
B("p", rn, M(e.label), 1)
|
|
1330
1332
|
], 2));
|
|
1331
1333
|
}
|
|
1332
1334
|
}), un = ["role"], cn = /* @__PURE__ */ D({
|
|
@@ -1339,23 +1341,23 @@ const Za = ["role"], _a = {
|
|
|
1339
1341
|
const n = e, t = v(
|
|
1340
1342
|
() => n.position === "bottom-center" ? "bottom-4 left-1/2 -translate-x-1/2" : "right-4 bottom-4"
|
|
1341
1343
|
);
|
|
1342
|
-
return (a, l) => (
|
|
1343
|
-
|
|
1344
|
-
class:
|
|
1344
|
+
return (a, l) => (i(), U(ge, { to: "body" }, [
|
|
1345
|
+
B("div", {
|
|
1346
|
+
class: y(["pointer-events-none fixed z-60 flex flex-col gap-2", t.value])
|
|
1345
1347
|
}, [
|
|
1346
|
-
O(
|
|
1348
|
+
O(wt, {
|
|
1347
1349
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
1348
1350
|
"leave-active-class": "transition-all duration-200 ease-in",
|
|
1349
1351
|
"enter-from-class": "translate-y-2 opacity-0",
|
|
1350
1352
|
"leave-to-class": "translate-y-2 opacity-0",
|
|
1351
1353
|
"move-class": "transition-transform duration-300"
|
|
1352
1354
|
}, {
|
|
1353
|
-
default:
|
|
1354
|
-
(
|
|
1355
|
+
default: G(() => [
|
|
1356
|
+
(i(!0), r(te, null, ue(e.toasts, (o) => (i(), r("div", {
|
|
1355
1357
|
key: o.id,
|
|
1356
|
-
role: F(
|
|
1358
|
+
role: F(it)(o.tone ?? "info"),
|
|
1357
1359
|
"aria-atomic": "true",
|
|
1358
|
-
class:
|
|
1360
|
+
class: y(["pointer-events-auto rounded-corner border px-4 py-2 text-sm shadow-lg backdrop-blur-sm", F(ot)[o.tone ?? "info"]])
|
|
1359
1361
|
}, [
|
|
1360
1362
|
S(a.$slots, "default", { aviso: o }, () => [
|
|
1361
1363
|
Me(M(o.message), 1)
|
|
@@ -1385,7 +1387,7 @@ const Za = ["role"], _a = {
|
|
|
1385
1387
|
}, a = v(
|
|
1386
1388
|
() => n.value === null ? null : Math.max(0, Math.min(100, n.value))
|
|
1387
1389
|
);
|
|
1388
|
-
return (l, o) => (
|
|
1390
|
+
return (l, o) => (i(), r("div", {
|
|
1389
1391
|
role: "progressbar",
|
|
1390
1392
|
"aria-label": e.label,
|
|
1391
1393
|
"aria-valuenow": a.value ?? void 0,
|
|
@@ -1393,15 +1395,15 @@ const Za = ["role"], _a = {
|
|
|
1393
1395
|
"aria-valuemax": "100",
|
|
1394
1396
|
class: "h-2 w-full overflow-hidden rounded-corner bg-ui-surface/70"
|
|
1395
1397
|
}, [
|
|
1396
|
-
a.value !== null ? (
|
|
1398
|
+
a.value !== null ? (i(), r("div", {
|
|
1397
1399
|
key: 0,
|
|
1398
|
-
class:
|
|
1400
|
+
class: y(["h-full rounded-corner transition-[width] duration-300 ease-out", t[e.tone]]),
|
|
1399
1401
|
style: fe({ width: `${a.value}%` })
|
|
1400
|
-
}, null, 6)) : (
|
|
1402
|
+
}, null, 6)) : (i(), r("div", fn))
|
|
1401
1403
|
], 8, dn));
|
|
1402
1404
|
}
|
|
1403
1405
|
}), bn = /[/\-_.]/;
|
|
1404
|
-
function
|
|
1406
|
+
function Le(e, n) {
|
|
1405
1407
|
if (!n) return 100;
|
|
1406
1408
|
const t = n.toLowerCase();
|
|
1407
1409
|
return t === e ? 0 : t.startsWith(e) ? 10 : t.split(bn).some((a) => a.startsWith(e)) ? 30 : t.includes(e) ? 40 : 100;
|
|
@@ -1411,8 +1413,8 @@ function vn(e, n) {
|
|
|
1411
1413
|
if (!t) return e;
|
|
1412
1414
|
const a = [];
|
|
1413
1415
|
for (let l = 0; l < e.length; l++) {
|
|
1414
|
-
const o = e[l], s =
|
|
1415
|
-
|
|
1416
|
+
const o = e[l], s = Le(t, o.valor), u = Le(t, o.etiqueta), m = u === 10 ? 20 : u, d = Le(t, o.detalle) === 100 ? 100 : 40, E = Math.min(s, m, d);
|
|
1417
|
+
E !== 100 && a.push({ opcion: o, rango: E, orden: l });
|
|
1416
1418
|
}
|
|
1417
1419
|
return a.sort((l, o) => l.rango - o.rango || l.orden - o.orden), a.map((l) => l.opcion);
|
|
1418
1420
|
}
|
|
@@ -1420,19 +1422,19 @@ let Ue = 0;
|
|
|
1420
1422
|
function pn() {
|
|
1421
1423
|
return Ue += 1, `vsk-lista-${Ue}`;
|
|
1422
1424
|
}
|
|
1423
|
-
const
|
|
1425
|
+
const yn = ["disabled", "aria-label", "aria-expanded"], gn = { class: "min-w-0 flex-1 truncate" }, hn = {
|
|
1424
1426
|
key: 0,
|
|
1425
1427
|
class: "ml-2 text-tx-muted text-xs"
|
|
1426
|
-
}, xn = { class: "border-ui-border border-b p-2" },
|
|
1428
|
+
}, xn = { class: "border-ui-border border-b p-2" }, kn = ["id"], wn = {
|
|
1427
1429
|
key: 0,
|
|
1428
1430
|
class: "p-3 text-center text-tx-muted text-xs"
|
|
1429
|
-
}, $n = ["id", "data-indice", "aria-selected"], Cn = { class: "min-w-0 flex-1 truncate" },
|
|
1431
|
+
}, $n = ["id", "data-indice", "aria-selected"], Cn = { class: "min-w-0 flex-1 truncate" }, zn = {
|
|
1430
1432
|
key: 0,
|
|
1431
1433
|
class: "shrink-0 text-tx-muted text-xs"
|
|
1432
|
-
},
|
|
1434
|
+
}, En = {
|
|
1433
1435
|
key: 1,
|
|
1434
1436
|
class: "px-2 py-1 text-tx-muted text-xs"
|
|
1435
|
-
},
|
|
1437
|
+
}, Ln = /* @__PURE__ */ D({
|
|
1436
1438
|
__name: "SearchSelect",
|
|
1437
1439
|
props: {
|
|
1438
1440
|
modelValue: {},
|
|
@@ -1447,69 +1449,69 @@ const gn = ["disabled", "aria-label", "aria-expanded"], yn = { class: "min-w-0 f
|
|
|
1447
1449
|
},
|
|
1448
1450
|
emits: ["update:modelValue"],
|
|
1449
1451
|
setup(e, { emit: n }) {
|
|
1450
|
-
const t = e, a = n, l =
|
|
1451
|
-
() => t.options.find((
|
|
1452
|
-
),
|
|
1453
|
-
() =>
|
|
1452
|
+
const t = e, a = n, l = k(""), o = k(!1), s = k(0), u = k(null), m = k(null), f = k(null), d = pn(), E = v(
|
|
1453
|
+
() => t.options.find((T) => T.valor === t.modelValue) ?? null
|
|
1454
|
+
), L = v(() => vn(t.options, l.value)), A = v(() => L.value.slice(0, t.limit)), g = v(() => Math.max(0, L.value.length - t.limit)), $ = v(
|
|
1455
|
+
() => A.value.length > 0 ? `${d}-${s.value}` : void 0
|
|
1454
1456
|
);
|
|
1455
|
-
function j(
|
|
1456
|
-
a("update:modelValue",
|
|
1457
|
+
function j(T) {
|
|
1458
|
+
a("update:modelValue", T), h();
|
|
1457
1459
|
}
|
|
1458
1460
|
async function C() {
|
|
1459
1461
|
o.value = !0;
|
|
1460
|
-
const
|
|
1461
|
-
s.value =
|
|
1462
|
+
const T = A.value.findIndex((z) => z.valor === t.modelValue);
|
|
1463
|
+
s.value = T >= 0 ? T : 0, await J(), f.value?.enfocar(), K();
|
|
1462
1464
|
}
|
|
1463
|
-
function
|
|
1464
|
-
o.value && (o.value = !1, l.value = "",
|
|
1465
|
+
function h(T = !0) {
|
|
1466
|
+
o.value && (o.value = !1, l.value = "", T && J(() => m.value?.focus()));
|
|
1465
1467
|
}
|
|
1466
|
-
function c(
|
|
1467
|
-
const
|
|
1468
|
-
|
|
1468
|
+
function c(T) {
|
|
1469
|
+
const z = A.value.length;
|
|
1470
|
+
z !== 0 && (s.value = (s.value + T + z) % z, K());
|
|
1469
1471
|
}
|
|
1470
|
-
function b(
|
|
1471
|
-
s.value =
|
|
1472
|
+
function b(T) {
|
|
1473
|
+
s.value = T, K();
|
|
1472
1474
|
}
|
|
1473
|
-
function p(
|
|
1474
|
-
const
|
|
1475
|
-
if (!
|
|
1476
|
-
const I = Number(
|
|
1475
|
+
function p(T) {
|
|
1476
|
+
const z = T.target?.closest?.("[data-indice]");
|
|
1477
|
+
if (!z) return null;
|
|
1478
|
+
const I = Number(z.getAttribute("data-indice"));
|
|
1477
1479
|
return Number.isInteger(I) ? I : null;
|
|
1478
1480
|
}
|
|
1479
|
-
function P(
|
|
1480
|
-
const
|
|
1481
|
+
function P(T) {
|
|
1482
|
+
const z = p(T), I = z === null ? void 0 : A.value[z];
|
|
1481
1483
|
I && j(I.valor);
|
|
1482
1484
|
}
|
|
1483
|
-
function le(
|
|
1484
|
-
const
|
|
1485
|
-
|
|
1485
|
+
function le(T) {
|
|
1486
|
+
const z = p(T);
|
|
1487
|
+
z !== null && (s.value = z);
|
|
1486
1488
|
}
|
|
1487
|
-
function
|
|
1488
|
-
|
|
1489
|
+
function K() {
|
|
1490
|
+
J(() => {
|
|
1489
1491
|
u.value?.querySelector(`[data-indice="${s.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
1490
1492
|
});
|
|
1491
1493
|
}
|
|
1492
1494
|
function oe() {
|
|
1493
|
-
const
|
|
1494
|
-
|
|
1495
|
+
const T = A.value[s.value];
|
|
1496
|
+
T && j(T.valor);
|
|
1495
1497
|
}
|
|
1496
|
-
|
|
1498
|
+
Q(
|
|
1497
1499
|
() => t.disabled,
|
|
1498
|
-
(
|
|
1499
|
-
|
|
1500
|
+
(T) => {
|
|
1501
|
+
T && h(!1);
|
|
1500
1502
|
}
|
|
1501
|
-
),
|
|
1502
|
-
s.value = 0,
|
|
1503
|
+
), Q(l, () => {
|
|
1504
|
+
s.value = 0, K();
|
|
1503
1505
|
});
|
|
1504
|
-
function
|
|
1505
|
-
const
|
|
1506
|
-
|
|
1506
|
+
function Y(T) {
|
|
1507
|
+
const z = T.relatedTarget;
|
|
1508
|
+
z && T.currentTarget.contains(z) || h(!1);
|
|
1507
1509
|
}
|
|
1508
|
-
return (
|
|
1510
|
+
return (T, z) => (i(), r("div", {
|
|
1509
1511
|
class: "relative",
|
|
1510
|
-
onFocusout:
|
|
1512
|
+
onFocusout: Y
|
|
1511
1513
|
}, [
|
|
1512
|
-
|
|
1514
|
+
B("button", {
|
|
1513
1515
|
ref_key: "boton",
|
|
1514
1516
|
ref: m,
|
|
1515
1517
|
type: "button",
|
|
@@ -1518,44 +1520,44 @@ const gn = ["disabled", "aria-label", "aria-expanded"], yn = { class: "min-w-0 f
|
|
|
1518
1520
|
"aria-label": e.label || void 0,
|
|
1519
1521
|
"aria-expanded": o.value,
|
|
1520
1522
|
"aria-haspopup": "listbox",
|
|
1521
|
-
onClick:
|
|
1523
|
+
onClick: z[0] || (z[0] = (I) => o.value ? h() : C()),
|
|
1522
1524
|
onKeydown: [
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
+
z[1] || (z[1] = R(V((I) => o.value ? c(1) : C(), ["prevent"]), ["down"])),
|
|
1526
|
+
z[2] || (z[2] = R(V((I) => o.value ? c(-1) : C(), ["prevent"]), ["up"]))
|
|
1525
1527
|
]
|
|
1526
1528
|
}, [
|
|
1527
|
-
|
|
1528
|
-
Me(M(
|
|
1529
|
-
|
|
1529
|
+
B("span", gn, [
|
|
1530
|
+
Me(M(E.value?.etiqueta ?? e.placeholder) + " ", 1),
|
|
1531
|
+
E.value?.detalle ? (i(), r("span", hn, M(E.value.detalle), 1)) : x("", !0)
|
|
1530
1532
|
]),
|
|
1531
|
-
O(
|
|
1533
|
+
O(N, {
|
|
1532
1534
|
name: "go-down",
|
|
1533
1535
|
type: "symbol",
|
|
1534
1536
|
size: 12,
|
|
1535
1537
|
class: "shrink-0 opacity-60"
|
|
1536
1538
|
})
|
|
1537
|
-
], 40,
|
|
1538
|
-
o.value ? (
|
|
1539
|
+
], 40, yn),
|
|
1540
|
+
o.value ? (i(), r("div", {
|
|
1539
1541
|
key: 0,
|
|
1540
|
-
class:
|
|
1542
|
+
class: y(["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"]),
|
|
1541
1543
|
onKeydown: [
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1544
|
+
z[4] || (z[4] = R(V((I) => h(), ["prevent"]), ["escape"])),
|
|
1545
|
+
z[5] || (z[5] = R(V((I) => c(1), ["prevent"]), ["down"])),
|
|
1546
|
+
z[6] || (z[6] = R(V((I) => c(-1), ["prevent"]), ["up"])),
|
|
1547
|
+
z[7] || (z[7] = R(V((I) => b(0), ["prevent"]), ["home"])),
|
|
1548
|
+
z[8] || (z[8] = R(V((I) => b(A.value.length - 1), ["prevent"]), ["end"])),
|
|
1549
|
+
z[9] || (z[9] = R(V((I) => oe(), ["prevent"]), ["enter"])),
|
|
1550
|
+
z[10] || (z[10] = R((I) => h(!1), ["tab"]))
|
|
1549
1551
|
],
|
|
1550
1552
|
onClick: P,
|
|
1551
1553
|
onMousemove: le
|
|
1552
1554
|
}, [
|
|
1553
|
-
|
|
1555
|
+
B("div", xn, [
|
|
1554
1556
|
O(Oe, {
|
|
1555
1557
|
ref_key: "campo",
|
|
1556
1558
|
ref: f,
|
|
1557
1559
|
modelValue: l.value,
|
|
1558
|
-
"onUpdate:modelValue":
|
|
1560
|
+
"onUpdate:modelValue": z[3] || (z[3] = (I) => l.value = I),
|
|
1559
1561
|
label: e.label,
|
|
1560
1562
|
placeholder: e.searchPlaceholder,
|
|
1561
1563
|
"listbox-id": F(d),
|
|
@@ -1563,30 +1565,30 @@ const gn = ["disabled", "aria-label", "aria-expanded"], yn = { class: "min-w-0 f
|
|
|
1563
1565
|
expanded: o.value
|
|
1564
1566
|
}, null, 8, ["modelValue", "label", "placeholder", "listbox-id", "active-option-id", "expanded"])
|
|
1565
1567
|
]),
|
|
1566
|
-
|
|
1568
|
+
B("ul", {
|
|
1567
1569
|
id: F(d),
|
|
1568
1570
|
ref_key: "lista",
|
|
1569
1571
|
ref: u,
|
|
1570
1572
|
role: "listbox",
|
|
1571
1573
|
class: "max-h-56 overflow-y-auto p-1"
|
|
1572
1574
|
}, [
|
|
1573
|
-
|
|
1574
|
-
(
|
|
1575
|
+
A.value.length === 0 ? (i(), r("li", wn, M(e.emptyText), 1)) : x("", !0),
|
|
1576
|
+
(i(!0), r(te, null, ue(A.value, (I, de) => (i(), r("li", {
|
|
1575
1577
|
id: `${F(d)}-${de}`,
|
|
1576
1578
|
key: I.valor,
|
|
1577
1579
|
"data-indice": de,
|
|
1578
1580
|
role: "option",
|
|
1579
1581
|
"aria-selected": I.valor === e.modelValue,
|
|
1580
|
-
class:
|
|
1582
|
+
class: y(["flex cursor-pointer items-baseline gap-2 rounded-corner px-2 py-1 text-sm", [
|
|
1581
1583
|
de === s.value ? "bg-ui-surface" : "",
|
|
1582
1584
|
I.valor === e.modelValue ? "font-medium text-primary" : "text-tx-main"
|
|
1583
1585
|
]])
|
|
1584
1586
|
}, [
|
|
1585
|
-
|
|
1586
|
-
I.detalle ? (
|
|
1587
|
+
B("span", Cn, M(I.etiqueta), 1),
|
|
1588
|
+
I.detalle ? (i(), r("span", zn, M(I.detalle), 1)) : x("", !0)
|
|
1587
1589
|
], 10, $n))), 128)),
|
|
1588
|
-
g.value > 0 ? (
|
|
1589
|
-
], 8,
|
|
1590
|
+
g.value > 0 ? (i(), r("li", En, "+" + M(g.value), 1)) : x("", !0)
|
|
1591
|
+
], 8, kn)
|
|
1590
1592
|
], 34)) : x("", !0)
|
|
1591
1593
|
], 32));
|
|
1592
1594
|
}
|
|
@@ -1598,10 +1600,10 @@ const gn = ["disabled", "aria-label", "aria-expanded"], yn = { class: "min-w-0 f
|
|
|
1598
1600
|
customClass: { default: () => ({}) }
|
|
1599
1601
|
},
|
|
1600
1602
|
setup(e) {
|
|
1601
|
-
return (n, t) => (
|
|
1602
|
-
class:
|
|
1603
|
+
return (n, t) => (i(), r("div", {
|
|
1604
|
+
class: y(["flex flex-col gap-4 p-4 background rounded-corner", e.customClass])
|
|
1603
1605
|
}, [
|
|
1604
|
-
|
|
1606
|
+
B("h3", Dn, M(e.icon ? `${e.icon} ${e.title}` : e.title), 1),
|
|
1605
1607
|
S(n.$slots, "default", {}, void 0, !0)
|
|
1606
1608
|
], 2));
|
|
1607
1609
|
}
|
|
@@ -1620,7 +1622,9 @@ const gn = ["disabled", "aria-label", "aria-expanded"], yn = { class: "min-w-0 f
|
|
|
1620
1622
|
}, Rn = /* @__PURE__ */ D({
|
|
1621
1623
|
__name: "DeviceCard",
|
|
1622
1624
|
props: {
|
|
1623
|
-
|
|
1625
|
+
name: { default: "" },
|
|
1626
|
+
type: { default: "icon" },
|
|
1627
|
+
icon: { default: "" },
|
|
1624
1628
|
title: {},
|
|
1625
1629
|
subtitle: { default: "" },
|
|
1626
1630
|
metadata: { default: "" },
|
|
@@ -1634,49 +1638,60 @@ const gn = ["disabled", "aria-label", "aria-expanded"], yn = { class: "min-w-0 f
|
|
|
1634
1638
|
},
|
|
1635
1639
|
emits: ["action", "click"],
|
|
1636
1640
|
setup(e, { emit: n }) {
|
|
1637
|
-
const t =
|
|
1638
|
-
|
|
1639
|
-
},
|
|
1640
|
-
|
|
1641
|
+
const t = e, a = n, l = () => {
|
|
1642
|
+
a("action");
|
|
1643
|
+
}, o = () => {
|
|
1644
|
+
a("click");
|
|
1641
1645
|
};
|
|
1642
|
-
return (
|
|
1643
|
-
|
|
1644
|
-
|
|
1646
|
+
return W(() => {
|
|
1647
|
+
t.icon && !t.name && console.warn(
|
|
1648
|
+
"[DeviceCard] «icon» está obsoleto y se va en la próxima mayor: recibe una ruta ya resuelta. Usá «name» con el nombre del icono del tema, y «type» si hace falta el símbolo."
|
|
1649
|
+
);
|
|
1650
|
+
}), (s, u) => (i(), r("div", {
|
|
1651
|
+
class: y(["flex items-center justify-between background rounded-vsk px-6 py-3 mb-4", [{ "border-l-4 border-green-500": e.isConnected }, e.customClass]]),
|
|
1652
|
+
onClick: o
|
|
1645
1653
|
}, [
|
|
1646
|
-
|
|
1647
|
-
|
|
1654
|
+
B("div", Bn, [
|
|
1655
|
+
e.name ? (i(), U(N, {
|
|
1656
|
+
key: 0,
|
|
1657
|
+
name: e.name,
|
|
1658
|
+
type: e.type,
|
|
1659
|
+
size: 28,
|
|
1660
|
+
alt: e.title
|
|
1661
|
+
}, null, 8, ["name", "type", "alt"])) : (i(), r("img", {
|
|
1662
|
+
key: 1,
|
|
1648
1663
|
src: e.icon,
|
|
1649
1664
|
alt: e.title,
|
|
1650
1665
|
class: "h-7 w-7 shrink-0"
|
|
1651
|
-
}, null, 8, Sn),
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
e.subtitle ? (
|
|
1655
|
-
e.metadata ? (
|
|
1656
|
-
e.extraInfo && e.extraInfo.length > 0 ? (
|
|
1657
|
-
(
|
|
1666
|
+
}, null, 8, Sn)),
|
|
1667
|
+
B("div", Mn, [
|
|
1668
|
+
B("div", Vn, M(e.title), 1),
|
|
1669
|
+
e.subtitle ? (i(), r("div", In, M(e.subtitle), 1)) : x("", !0),
|
|
1670
|
+
e.metadata ? (i(), r("div", On, M(e.metadata), 1)) : x("", !0),
|
|
1671
|
+
e.extraInfo && e.extraInfo.length > 0 ? (i(), r("div", jn, [
|
|
1672
|
+
(i(!0), r(te, null, ue(e.extraInfo, (m, f) => (i(), r("span", { key: f }, M(m), 1))), 128))
|
|
1658
1673
|
])) : x("", !0)
|
|
1659
1674
|
])
|
|
1660
1675
|
]),
|
|
1661
|
-
e.showActionButton ? (
|
|
1676
|
+
e.showActionButton ? (i(), r("button", {
|
|
1662
1677
|
key: 0,
|
|
1663
1678
|
class: "bg-vsk-primary rounded-vsk px-4 py-2 text-sm font-semibold cursor-pointer hover:opacity-70",
|
|
1664
|
-
onClick: V(
|
|
1679
|
+
onClick: V(l, ["stop"])
|
|
1665
1680
|
}, M(e.actionLabel), 1)) : x("", !0),
|
|
1666
|
-
e.showStatusIndicator && e.isConnected ? (
|
|
1681
|
+
e.showStatusIndicator && e.isConnected ? (i(), r("div", Pn)) : x("", !0)
|
|
1667
1682
|
], 2));
|
|
1668
1683
|
}
|
|
1669
|
-
}),
|
|
1684
|
+
}), rt = /* @__PURE__ */ Symbol("diálogo de vasak");
|
|
1670
1685
|
function st() {
|
|
1671
|
-
const e =
|
|
1686
|
+
const e = ke(rt, null);
|
|
1672
1687
|
if (e) return e;
|
|
1673
|
-
const n =
|
|
1688
|
+
const n = k(!1);
|
|
1674
1689
|
return {
|
|
1675
1690
|
abierto: v(() => n.value),
|
|
1676
1691
|
cerrar: () => {
|
|
1677
1692
|
n.value = !1;
|
|
1678
1693
|
},
|
|
1679
|
-
idDelTitulo:
|
|
1694
|
+
idDelTitulo: k(null),
|
|
1680
1695
|
ponerElTitulo: () => {
|
|
1681
1696
|
}
|
|
1682
1697
|
};
|
|
@@ -1692,8 +1707,8 @@ const Nn = /* @__PURE__ */ D({
|
|
|
1692
1707
|
},
|
|
1693
1708
|
emits: ["update:open"],
|
|
1694
1709
|
setup(e, { emit: n }) {
|
|
1695
|
-
const t = e, a = n, l =
|
|
1696
|
-
return
|
|
1710
|
+
const t = e, a = n, l = k(null);
|
|
1711
|
+
return ye(rt, {
|
|
1697
1712
|
abierto: v(() => t.open),
|
|
1698
1713
|
cerrar: () => a("update:open", !1),
|
|
1699
1714
|
idDelTitulo: l,
|
|
@@ -1714,32 +1729,32 @@ const Nn = /* @__PURE__ */ D({
|
|
|
1714
1729
|
},
|
|
1715
1730
|
setup(e) {
|
|
1716
1731
|
const n = e, t = Be(), a = v(() => t.class ?? ""), l = v(() => {
|
|
1717
|
-
const { class: C, ...
|
|
1718
|
-
return
|
|
1719
|
-
}), o = v(() => n.size === "full" ? "relative z-10 h-full w-full overflow-hidden rounded-corner-window text-tx-main" : `${Un} ${n.size === "lg" ? "max-w-2xl" : "max-w-lg"}`), s = st(), u = v(() => s.abierto.value), m =
|
|
1732
|
+
const { class: C, ...h } = t;
|
|
1733
|
+
return h;
|
|
1734
|
+
}), o = v(() => n.size === "full" ? "relative z-10 h-full w-full overflow-hidden rounded-corner-window text-tx-main" : `${Un} ${n.size === "lg" ? "max-w-2xl" : "max-w-lg"}`), s = st(), u = v(() => s.abierto.value), m = k(null), f = k(null);
|
|
1720
1735
|
let d = null;
|
|
1721
|
-
function
|
|
1736
|
+
function E() {
|
|
1722
1737
|
return f.value ? [...f.value.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')] : [];
|
|
1723
1738
|
}
|
|
1724
|
-
function
|
|
1739
|
+
function L(C) {
|
|
1725
1740
|
if (C.key === "Escape") {
|
|
1726
1741
|
s.cerrar();
|
|
1727
1742
|
return;
|
|
1728
1743
|
}
|
|
1729
1744
|
if (C.key !== "Tab") return;
|
|
1730
|
-
const
|
|
1731
|
-
if (
|
|
1745
|
+
const h = E();
|
|
1746
|
+
if (h.length === 0) {
|
|
1732
1747
|
C.preventDefault(), f.value?.focus();
|
|
1733
1748
|
return;
|
|
1734
1749
|
}
|
|
1735
|
-
const c =
|
|
1750
|
+
const c = h[0], b = h[h.length - 1], p = document.activeElement;
|
|
1736
1751
|
C.shiftKey && (p === c || p === f.value) ? (C.preventDefault(), b.focus()) : !C.shiftKey && p === b && (C.preventDefault(), c.focus());
|
|
1737
1752
|
}
|
|
1738
|
-
function
|
|
1753
|
+
function A(C) {
|
|
1739
1754
|
C.target === C.currentTarget && s.cerrar();
|
|
1740
1755
|
}
|
|
1741
1756
|
function g(C) {
|
|
1742
|
-
m.value?.contains(C.target) ||
|
|
1757
|
+
m.value?.contains(C.target) || L(C);
|
|
1743
1758
|
}
|
|
1744
1759
|
function $() {
|
|
1745
1760
|
document.removeEventListener("keydown", g);
|
|
@@ -1748,11 +1763,11 @@ const Nn = /* @__PURE__ */ D({
|
|
|
1748
1763
|
const C = d;
|
|
1749
1764
|
d = null, C?.isConnected && C.focus();
|
|
1750
1765
|
}
|
|
1751
|
-
return
|
|
1766
|
+
return Q(
|
|
1752
1767
|
u,
|
|
1753
1768
|
async (C) => {
|
|
1754
1769
|
if (C) {
|
|
1755
|
-
d = document.activeElement, document.addEventListener("keydown", g), await
|
|
1770
|
+
d = document.activeElement, document.addEventListener("keydown", g), await J(), f.value?.focus();
|
|
1756
1771
|
return;
|
|
1757
1772
|
}
|
|
1758
1773
|
$(), j();
|
|
@@ -1763,24 +1778,24 @@ const Nn = /* @__PURE__ */ D({
|
|
|
1763
1778
|
{ immediate: !0 }
|
|
1764
1779
|
), ve(() => {
|
|
1765
1780
|
$(), j();
|
|
1766
|
-
}), (C,
|
|
1767
|
-
O(
|
|
1781
|
+
}), (C, h) => (i(), U(ge, { to: "body" }, [
|
|
1782
|
+
O(we, {
|
|
1768
1783
|
"enter-active-class": "transition-opacity duration-200 ease-out",
|
|
1769
1784
|
"leave-active-class": "transition-opacity duration-150 ease-in",
|
|
1770
1785
|
"enter-from-class": "opacity-0",
|
|
1771
1786
|
"leave-to-class": "opacity-0"
|
|
1772
1787
|
}, {
|
|
1773
|
-
default:
|
|
1774
|
-
u.value ? (
|
|
1788
|
+
default: G(() => [
|
|
1789
|
+
u.value ? (i(), r("div", {
|
|
1775
1790
|
key: 0,
|
|
1776
1791
|
ref_key: "velo",
|
|
1777
1792
|
ref: m,
|
|
1778
1793
|
class: "fixed inset-0 z-50 flex items-center justify-center",
|
|
1779
|
-
onClick:
|
|
1780
|
-
onKeydown:
|
|
1794
|
+
onClick: A,
|
|
1795
|
+
onKeydown: L
|
|
1781
1796
|
}, [
|
|
1782
|
-
n.size === "md" ? (
|
|
1783
|
-
|
|
1797
|
+
n.size === "md" ? (i(), r("div", qn)) : x("", !0),
|
|
1798
|
+
B("div", ce({
|
|
1784
1799
|
ref_key: "panel",
|
|
1785
1800
|
ref: f,
|
|
1786
1801
|
tabindex: "-1",
|
|
@@ -1802,21 +1817,21 @@ const Nn = /* @__PURE__ */ D({
|
|
|
1802
1817
|
}), Wn = { class: "text-sm text-tx-muted" }, Gn = /* @__PURE__ */ D({
|
|
1803
1818
|
__name: "DialogDescription",
|
|
1804
1819
|
setup(e) {
|
|
1805
|
-
return (n, t) => (
|
|
1820
|
+
return (n, t) => (i(), r("p", Wn, [
|
|
1806
1821
|
S(n.$slots, "default")
|
|
1807
1822
|
]));
|
|
1808
1823
|
}
|
|
1809
1824
|
}), Qn = { class: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end" }, Yn = /* @__PURE__ */ D({
|
|
1810
1825
|
__name: "DialogFooter",
|
|
1811
1826
|
setup(e) {
|
|
1812
|
-
return (n, t) => (
|
|
1827
|
+
return (n, t) => (i(), r("div", Qn, [
|
|
1813
1828
|
S(n.$slots, "default")
|
|
1814
1829
|
]));
|
|
1815
1830
|
}
|
|
1816
1831
|
}), Xn = { class: "flex flex-col gap-1.5 text-center sm:text-left" }, Jn = /* @__PURE__ */ D({
|
|
1817
1832
|
__name: "DialogHeader",
|
|
1818
1833
|
setup(e) {
|
|
1819
|
-
return (n, t) => (
|
|
1834
|
+
return (n, t) => (i(), r("div", Xn, [
|
|
1820
1835
|
S(n.$slots, "default")
|
|
1821
1836
|
]));
|
|
1822
1837
|
}
|
|
@@ -1824,7 +1839,7 @@ const Nn = /* @__PURE__ */ D({
|
|
|
1824
1839
|
__name: "DialogTitle",
|
|
1825
1840
|
setup(e) {
|
|
1826
1841
|
const n = st(), t = Fn();
|
|
1827
|
-
return
|
|
1842
|
+
return W(() => n.ponerElTitulo(t)), ve(() => n.ponerElTitulo(null)), (a, l) => (i(), r("h2", {
|
|
1828
1843
|
id: F(t),
|
|
1829
1844
|
class: "font-semibold text-lg leading-none tracking-tight"
|
|
1830
1845
|
}, [
|
|
@@ -1833,19 +1848,19 @@ const Nn = /* @__PURE__ */ D({
|
|
|
1833
1848
|
}
|
|
1834
1849
|
}), ut = /* @__PURE__ */ Symbol("menú de vasak");
|
|
1835
1850
|
function Ce() {
|
|
1836
|
-
const e =
|
|
1851
|
+
const e = ke(ut, null);
|
|
1837
1852
|
if (e) return e;
|
|
1838
|
-
const n =
|
|
1853
|
+
const n = k(!1);
|
|
1839
1854
|
return {
|
|
1840
1855
|
abierto: n,
|
|
1841
1856
|
idDelMenu: "vsk-menu-suelto",
|
|
1842
|
-
idDeLaEtiqueta:
|
|
1857
|
+
idDeLaEtiqueta: k(null),
|
|
1843
1858
|
ponerLaEtiqueta: () => {
|
|
1844
1859
|
},
|
|
1845
|
-
disparador:
|
|
1860
|
+
disparador: k(null),
|
|
1846
1861
|
ponerElDisparador: () => {
|
|
1847
1862
|
},
|
|
1848
|
-
focoAlAbrir:
|
|
1863
|
+
focoAlAbrir: k("ninguno"),
|
|
1849
1864
|
abrir: () => {
|
|
1850
1865
|
n.value = !0;
|
|
1851
1866
|
},
|
|
@@ -1868,7 +1883,7 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
1868
1883
|
},
|
|
1869
1884
|
emits: ["update:open"],
|
|
1870
1885
|
setup(e, { emit: n }) {
|
|
1871
|
-
const t = e, a = n, l =
|
|
1886
|
+
const t = e, a = n, l = k(!1), o = k(null), s = k(null), u = k("ninguno"), m = ct();
|
|
1872
1887
|
let f = null;
|
|
1873
1888
|
const d = v({
|
|
1874
1889
|
get: () => t.open ?? l.value,
|
|
@@ -1876,29 +1891,29 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
1876
1891
|
t.open === void 0 && (l.value = g), a("update:open", g);
|
|
1877
1892
|
}
|
|
1878
1893
|
});
|
|
1879
|
-
|
|
1894
|
+
Q(d, (g) => {
|
|
1880
1895
|
if (g) {
|
|
1881
1896
|
const $ = document.activeElement;
|
|
1882
1897
|
f = $ instanceof HTMLElement ? $ : null;
|
|
1883
1898
|
} else
|
|
1884
1899
|
u.value = "ninguno";
|
|
1885
1900
|
});
|
|
1886
|
-
function
|
|
1901
|
+
function E(g = "ninguno") {
|
|
1887
1902
|
u.value = g, d.value = !0;
|
|
1888
1903
|
}
|
|
1889
|
-
function
|
|
1904
|
+
function L(g = {}) {
|
|
1890
1905
|
if (d.value = !1, !g.devolverElFoco) return;
|
|
1891
1906
|
const $ = f ?? o.value;
|
|
1892
1907
|
$?.isConnected && $.focus();
|
|
1893
1908
|
}
|
|
1894
|
-
function
|
|
1909
|
+
function A(g = "ninguno") {
|
|
1895
1910
|
if (d.value) {
|
|
1896
|
-
|
|
1911
|
+
L({ devolverElFoco: !0 });
|
|
1897
1912
|
return;
|
|
1898
1913
|
}
|
|
1899
|
-
|
|
1914
|
+
E(g);
|
|
1900
1915
|
}
|
|
1901
|
-
return
|
|
1916
|
+
return ye(ut, {
|
|
1902
1917
|
abierto: d,
|
|
1903
1918
|
idDelMenu: m,
|
|
1904
1919
|
idDeLaEtiqueta: s,
|
|
@@ -1910,10 +1925,10 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
1910
1925
|
o.value = g;
|
|
1911
1926
|
},
|
|
1912
1927
|
focoAlAbrir: u,
|
|
1913
|
-
abrir:
|
|
1914
|
-
cerrar:
|
|
1915
|
-
alternar:
|
|
1916
|
-
}), (g, $) => (
|
|
1928
|
+
abrir: E,
|
|
1929
|
+
cerrar: L,
|
|
1930
|
+
alternar: A
|
|
1931
|
+
}), (g, $) => (i(), r("div", el, [
|
|
1917
1932
|
S(g.$slots, "default")
|
|
1918
1933
|
]));
|
|
1919
1934
|
}
|
|
@@ -1929,7 +1944,7 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
1929
1944
|
sideOffset: { default: 4 }
|
|
1930
1945
|
},
|
|
1931
1946
|
setup(e) {
|
|
1932
|
-
const n = e, t = Ce(), { idDelMenu: a, idDeLaEtiqueta: l } = t, o = v(() => t.disparador.value), s = v(() => t.abierto.value), u =
|
|
1947
|
+
const n = e, t = Ce(), { idDelMenu: a, idDeLaEtiqueta: l } = t, o = v(() => t.disparador.value), s = v(() => t.abierto.value), u = k(null), m = k({
|
|
1933
1948
|
top: 0,
|
|
1934
1949
|
left: 0,
|
|
1935
1950
|
techo: null
|
|
@@ -1952,59 +1967,59 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
1952
1967
|
return b.left - p;
|
|
1953
1968
|
}
|
|
1954
1969
|
}
|
|
1955
|
-
function
|
|
1970
|
+
function E(c, b, p) {
|
|
1956
1971
|
return p < b ? b : Math.min(Math.max(c, b), p);
|
|
1957
1972
|
}
|
|
1958
|
-
function
|
|
1973
|
+
function L() {
|
|
1959
1974
|
if (!o.value || !u.value) return;
|
|
1960
1975
|
const c = o.value.getBoundingClientRect(), b = u.value.scrollHeight, p = u.value.offsetWidth, P = n.side === "top" || n.side === "bottom", le = P ? b : p;
|
|
1961
|
-
let
|
|
1962
|
-
const oe = d(
|
|
1963
|
-
oe < le && d(f[
|
|
1964
|
-
let
|
|
1965
|
-
switch (
|
|
1976
|
+
let K = n.side;
|
|
1977
|
+
const oe = d(K, c);
|
|
1978
|
+
oe < le && d(f[K], c) > oe && (K = f[K]);
|
|
1979
|
+
let Y = 0, T = 0, z = null;
|
|
1980
|
+
switch (K) {
|
|
1966
1981
|
case "bottom": {
|
|
1967
|
-
|
|
1982
|
+
Y = c.bottom + n.sideOffset, z = Math.max(window.innerHeight - Y - Z, 0);
|
|
1968
1983
|
break;
|
|
1969
1984
|
}
|
|
1970
1985
|
case "top": {
|
|
1971
|
-
|
|
1986
|
+
z = Math.max(d("top", c), 0), Y = c.top - n.sideOffset - Math.min(b, z);
|
|
1972
1987
|
break;
|
|
1973
1988
|
}
|
|
1974
1989
|
case "left":
|
|
1975
1990
|
case "right": {
|
|
1976
|
-
|
|
1991
|
+
T = K === "right" ? c.right + n.sideOffset : c.left - p - n.sideOffset;
|
|
1977
1992
|
const I = window.innerHeight - 2 * Z;
|
|
1978
|
-
|
|
1993
|
+
Y = E(c.top, Z, window.innerHeight - Math.min(b, I) - Z), z = Math.max(window.innerHeight - Y - Z, 0);
|
|
1979
1994
|
break;
|
|
1980
1995
|
}
|
|
1981
1996
|
}
|
|
1982
1997
|
if (P)
|
|
1983
1998
|
switch (n.align) {
|
|
1984
1999
|
case "start":
|
|
1985
|
-
|
|
2000
|
+
T = c.left;
|
|
1986
2001
|
break;
|
|
1987
2002
|
case "center":
|
|
1988
|
-
|
|
2003
|
+
T = c.left + c.width / 2 - p / 2;
|
|
1989
2004
|
break;
|
|
1990
2005
|
case "end":
|
|
1991
|
-
|
|
2006
|
+
T = c.right - p;
|
|
1992
2007
|
break;
|
|
1993
2008
|
}
|
|
1994
|
-
|
|
2009
|
+
T = E(T, Z, window.innerWidth - p - Z), m.value = { top: Y, left: T, techo: z };
|
|
1995
2010
|
}
|
|
1996
|
-
function
|
|
2011
|
+
function A() {
|
|
1997
2012
|
return u.value ? Array.from(u.value.querySelectorAll('[role="menuitem"]')) : [];
|
|
1998
2013
|
}
|
|
1999
2014
|
function g(c) {
|
|
2000
|
-
const b =
|
|
2015
|
+
const b = A();
|
|
2001
2016
|
if (!b.length) return;
|
|
2002
2017
|
const p = b.length;
|
|
2003
2018
|
b[(c % p + p) % p]?.focus();
|
|
2004
2019
|
}
|
|
2005
2020
|
function $() {
|
|
2006
2021
|
const c = document.activeElement;
|
|
2007
|
-
return c instanceof HTMLElement ?
|
|
2022
|
+
return c instanceof HTMLElement ? A().indexOf(c) : -1;
|
|
2008
2023
|
}
|
|
2009
2024
|
function j(c) {
|
|
2010
2025
|
const b = $();
|
|
@@ -2029,10 +2044,10 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
2029
2044
|
break;
|
|
2030
2045
|
}
|
|
2031
2046
|
}
|
|
2032
|
-
|
|
2047
|
+
Q(s, async (c) => {
|
|
2033
2048
|
if (c)
|
|
2034
|
-
switch (await
|
|
2035
|
-
|
|
2049
|
+
switch (await J(), requestAnimationFrame(() => {
|
|
2050
|
+
L();
|
|
2036
2051
|
}), t.focoAlAbrir.value) {
|
|
2037
2052
|
case "primero":
|
|
2038
2053
|
g(0);
|
|
@@ -2048,18 +2063,18 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
2048
2063
|
}
|
|
2049
2064
|
});
|
|
2050
2065
|
function C(c) {
|
|
2051
|
-
s.value && (c && u.value?.contains(c.target) ||
|
|
2066
|
+
s.value && (c && u.value?.contains(c.target) || L());
|
|
2052
2067
|
}
|
|
2053
|
-
function
|
|
2068
|
+
function h(c) {
|
|
2054
2069
|
const b = c.target, p = !!b.closest("[data-dropdown-content]"), P = !!o.value?.contains(b);
|
|
2055
2070
|
!p && !P && t.cerrar();
|
|
2056
2071
|
}
|
|
2057
|
-
return
|
|
2058
|
-
document.addEventListener("click",
|
|
2072
|
+
return W(() => {
|
|
2073
|
+
document.addEventListener("click", h), window.addEventListener("resize", C), window.addEventListener("scroll", C, !0);
|
|
2059
2074
|
}), pe(() => {
|
|
2060
|
-
document.removeEventListener("click",
|
|
2061
|
-
}), (c, b) => (
|
|
2062
|
-
O(
|
|
2075
|
+
document.removeEventListener("click", h), window.removeEventListener("resize", C), window.removeEventListener("scroll", C, !0);
|
|
2076
|
+
}), (c, b) => (i(), U(ge, { to: "body" }, [
|
|
2077
|
+
O(we, {
|
|
2063
2078
|
"enter-active-class": "transition-all duration-150 ease-in-out",
|
|
2064
2079
|
"leave-active-class": "transition-all duration-150 ease-in-out",
|
|
2065
2080
|
"enter-from-class": "opacity-0 scale-95",
|
|
@@ -2067,8 +2082,8 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
2067
2082
|
onEnter: b[1] || (b[1] = (p) => p.offsetHeight),
|
|
2068
2083
|
onLeave: b[2] || (b[2] = (p) => p.offsetHeight)
|
|
2069
2084
|
}, {
|
|
2070
|
-
default:
|
|
2071
|
-
Se(
|
|
2085
|
+
default: G(() => [
|
|
2086
|
+
Se(B("div", ce({
|
|
2072
2087
|
ref_key: "contenido",
|
|
2073
2088
|
ref: u
|
|
2074
2089
|
}, c.$attrs, {
|
|
@@ -2092,7 +2107,7 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
2092
2107
|
onClick: b[0] || (b[0] = (p) => p.stopPropagation()),
|
|
2093
2108
|
onKeydown: j
|
|
2094
2109
|
}), [
|
|
2095
|
-
|
|
2110
|
+
B("div", nl, [
|
|
2096
2111
|
S(c.$slots, "default")
|
|
2097
2112
|
])
|
|
2098
2113
|
], 16, al), [
|
|
@@ -2103,7 +2118,7 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
2103
2118
|
})
|
|
2104
2119
|
]));
|
|
2105
2120
|
}
|
|
2106
|
-
}), ol = ["aria-disabled", "onKeydown"],
|
|
2121
|
+
}), ol = ["aria-disabled", "onKeydown"], il = /* @__PURE__ */ D({
|
|
2107
2122
|
__name: "DropdownMenuItem",
|
|
2108
2123
|
props: {
|
|
2109
2124
|
disabled: { type: Boolean, default: !1 }
|
|
@@ -2114,11 +2129,11 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
2114
2129
|
function o(s) {
|
|
2115
2130
|
t.disabled || (a("select"), a("click", s), l.cerrar({ devolverElFoco: !0 }));
|
|
2116
2131
|
}
|
|
2117
|
-
return (s, u) => (
|
|
2132
|
+
return (s, u) => (i(), r("div", {
|
|
2118
2133
|
role: "menuitem",
|
|
2119
2134
|
tabindex: "0",
|
|
2120
2135
|
"aria-disabled": e.disabled || void 0,
|
|
2121
|
-
class:
|
|
2136
|
+
class: y([
|
|
2122
2137
|
"px-3 py-2 text-sm transition-colors outline-none",
|
|
2123
2138
|
{
|
|
2124
2139
|
"opacity-50 cursor-not-allowed": e.disabled,
|
|
@@ -2134,15 +2149,15 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
2134
2149
|
S(s.$slots, "default")
|
|
2135
2150
|
], 42, ol));
|
|
2136
2151
|
}
|
|
2137
|
-
}),
|
|
2152
|
+
}), rl = /* @__PURE__ */ D({
|
|
2138
2153
|
__name: "DropdownMenuLabel",
|
|
2139
2154
|
setup(e) {
|
|
2140
2155
|
const n = Ce(), t = `${ct()}-titulo`;
|
|
2141
|
-
return
|
|
2156
|
+
return W(() => {
|
|
2142
2157
|
n.ponerLaEtiqueta(t);
|
|
2143
2158
|
}), pe(() => {
|
|
2144
2159
|
n.ponerLaEtiqueta(null);
|
|
2145
|
-
}), (a, l) => (
|
|
2160
|
+
}), (a, l) => (i(), r("div", {
|
|
2146
2161
|
id: t,
|
|
2147
2162
|
role: "presentation",
|
|
2148
2163
|
class: "px-3 py-2 text-sm font-semibold text-tx-main"
|
|
@@ -2157,12 +2172,12 @@ const el = { class: "relative inline-block" }, tl = /* @__PURE__ */ D({
|
|
|
2157
2172
|
}, ul = /* @__PURE__ */ D({
|
|
2158
2173
|
__name: "DropdownMenuSeparator",
|
|
2159
2174
|
setup(e) {
|
|
2160
|
-
return (n, t) => (
|
|
2175
|
+
return (n, t) => (i(), r("div", sl));
|
|
2161
2176
|
}
|
|
2162
2177
|
});
|
|
2163
2178
|
function dt(e) {
|
|
2164
2179
|
const n = e.filter(
|
|
2165
|
-
(a) => a.type !==
|
|
2180
|
+
(a) => a.type !== zt && !(a.type === Et && typeof a.children == "string" && !a.children.trim())
|
|
2166
2181
|
);
|
|
2167
2182
|
if (n.length !== 1) return null;
|
|
2168
2183
|
const t = n[0];
|
|
@@ -2183,7 +2198,7 @@ const dl = D({
|
|
|
2183
2198
|
disabled: { type: Boolean, default: !1 }
|
|
2184
2199
|
},
|
|
2185
2200
|
setup(e, { slots: n, attrs: t }) {
|
|
2186
|
-
const a = Ce(), l =
|
|
2201
|
+
const a = Ce(), l = k(null);
|
|
2187
2202
|
function o() {
|
|
2188
2203
|
a.ponerElDisparador(cl(l.value));
|
|
2189
2204
|
}
|
|
@@ -2242,13 +2257,13 @@ const dl = D({
|
|
|
2242
2257
|
labelClass: { default: () => ({}) }
|
|
2243
2258
|
},
|
|
2244
2259
|
setup(e) {
|
|
2245
|
-
return (n, t) => (
|
|
2246
|
-
class:
|
|
2260
|
+
return (n, t) => (i(), r("div", {
|
|
2261
|
+
class: y(["flex flex-col gap-2", e.customClass])
|
|
2247
2262
|
}, [
|
|
2248
|
-
e.label ? (
|
|
2263
|
+
e.label ? (i(), r("label", {
|
|
2249
2264
|
key: 0,
|
|
2250
2265
|
for: e.htmlFor,
|
|
2251
|
-
class:
|
|
2266
|
+
class: y(["text-sm font-medium text-primary dark:text-primary-dark", e.labelClass])
|
|
2252
2267
|
}, M(e.label), 11, fl)) : x("", !0),
|
|
2253
2268
|
S(n.$slots, "default", {}, void 0, !0)
|
|
2254
2269
|
], 2));
|
|
@@ -2264,8 +2279,8 @@ const dl = D({
|
|
|
2264
2279
|
const t = e, a = n, l = () => {
|
|
2265
2280
|
t.clickable && a("click");
|
|
2266
2281
|
};
|
|
2267
|
-
return (o, s) => (
|
|
2268
|
-
class:
|
|
2282
|
+
return (o, s) => (i(), r("div", {
|
|
2283
|
+
class: y([
|
|
2269
2284
|
"flex items-center justify-between background p-3 rounded-vsk border border-vsk-primary/70 transition-colors duration-200",
|
|
2270
2285
|
{
|
|
2271
2286
|
"hover:bg-vsk-primary/5 cursor-pointer": t.clickable
|
|
@@ -2277,13 +2292,15 @@ const dl = D({
|
|
|
2277
2292
|
S(o.$slots, "default", {}, void 0, !0)
|
|
2278
2293
|
], 2));
|
|
2279
2294
|
}
|
|
2280
|
-
}), pl = /* @__PURE__ */ $e(vl, [["__scopeId", "data-v-f86d47da"]]),
|
|
2295
|
+
}), pl = /* @__PURE__ */ $e(vl, [["__scopeId", "data-v-f86d47da"]]), yl = { class: "background rounded-corner flex flex-row items-center gap-2 justify-between w-full h-auto p-4 transition-[background-color] duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80" }, gl = ["title", "aria-label"], hl = ["src"], xl = {
|
|
2281
2296
|
key: 1,
|
|
2282
2297
|
class: "w-8 h-8 flex items-center justify-center"
|
|
2283
|
-
},
|
|
2298
|
+
}, kl = ["src"], wl = ["min", "max", "value", "aria-label", "aria-valuetext"], $l = /* @__PURE__ */ D({
|
|
2284
2299
|
__name: "SliderControl",
|
|
2285
2300
|
props: {
|
|
2286
|
-
|
|
2301
|
+
name: { default: "" },
|
|
2302
|
+
type: { default: "icon" },
|
|
2303
|
+
icon: { default: "" },
|
|
2287
2304
|
label: {},
|
|
2288
2305
|
buttonLabel: {},
|
|
2289
2306
|
modelValue: {},
|
|
@@ -2295,7 +2312,13 @@ const dl = D({
|
|
|
2295
2312
|
},
|
|
2296
2313
|
emits: ["update:modelValue", "buttonClick"],
|
|
2297
2314
|
setup(e, { emit: n }) {
|
|
2298
|
-
const t = e
|
|
2315
|
+
const t = e;
|
|
2316
|
+
W(() => {
|
|
2317
|
+
t.icon && !t.name && console.warn(
|
|
2318
|
+
"[SliderControl] «icon» está obsoleto y se va en la próxima mayor: recibe una ruta ya resuelta. Usá «name» con el nombre del icono del tema, y «type» si hace falta el símbolo."
|
|
2319
|
+
);
|
|
2320
|
+
});
|
|
2321
|
+
const a = n, l = v(() => {
|
|
2299
2322
|
if (t.max <= t.min) return 0;
|
|
2300
2323
|
const m = t.max - t.min, f = t.modelValue - t.min;
|
|
2301
2324
|
return Math.round(f / m * 100);
|
|
@@ -2305,8 +2328,8 @@ const dl = D({
|
|
|
2305
2328
|
}, u = () => {
|
|
2306
2329
|
a("buttonClick");
|
|
2307
2330
|
};
|
|
2308
|
-
return (m, f) => (
|
|
2309
|
-
e.showButton ? (
|
|
2331
|
+
return (m, f) => (i(), r("div", yl, [
|
|
2332
|
+
e.showButton ? (i(), r("button", {
|
|
2310
2333
|
key: 0,
|
|
2311
2334
|
onClick: u,
|
|
2312
2335
|
type: "button",
|
|
@@ -2314,19 +2337,32 @@ const dl = D({
|
|
|
2314
2337
|
"aria-label": e.buttonLabel ?? e.label,
|
|
2315
2338
|
class: "w-8 h-8 flex items-center justify-center rounded-corner transition-[background-color,scale] duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80 hover:scale-110 active:scale-95"
|
|
2316
2339
|
}, [
|
|
2317
|
-
|
|
2340
|
+
e.name ? (i(), U(N, {
|
|
2341
|
+
key: 0,
|
|
2342
|
+
name: e.name,
|
|
2343
|
+
type: e.type,
|
|
2344
|
+
size: 24,
|
|
2345
|
+
class: y(e.iconClass)
|
|
2346
|
+
}, null, 8, ["name", "type", "class"])) : (i(), r("img", {
|
|
2347
|
+
key: 1,
|
|
2318
2348
|
src: e.icon,
|
|
2319
2349
|
alt: "",
|
|
2320
|
-
class:
|
|
2321
|
-
}, null, 10, hl)
|
|
2322
|
-
], 8,
|
|
2323
|
-
|
|
2350
|
+
class: y(["w-6 h-6", e.iconClass])
|
|
2351
|
+
}, null, 10, hl))
|
|
2352
|
+
], 8, gl)) : (i(), r("div", xl, [
|
|
2353
|
+
e.name ? (i(), U(N, {
|
|
2354
|
+
key: 0,
|
|
2355
|
+
name: e.name,
|
|
2356
|
+
type: e.type,
|
|
2357
|
+
size: 24
|
|
2358
|
+
}, null, 8, ["name", "type"])) : (i(), r("img", {
|
|
2359
|
+
key: 1,
|
|
2324
2360
|
src: e.icon,
|
|
2325
2361
|
alt: "",
|
|
2326
2362
|
class: "w-6 h-6"
|
|
2327
|
-
}, null, 8,
|
|
2363
|
+
}, null, 8, kl))
|
|
2328
2364
|
])),
|
|
2329
|
-
|
|
2365
|
+
B("input", {
|
|
2330
2366
|
type: "range",
|
|
2331
2367
|
min: e.min,
|
|
2332
2368
|
max: e.max,
|
|
@@ -2335,9 +2371,9 @@ const dl = D({
|
|
|
2335
2371
|
"aria-label": e.label,
|
|
2336
2372
|
"aria-valuetext": `${l.value}%`,
|
|
2337
2373
|
class: "flex-1 transition-[scale] duration-200 hover:scale-105"
|
|
2338
|
-
}, null, 40,
|
|
2339
|
-
|
|
2340
|
-
class:
|
|
2374
|
+
}, null, 40, wl),
|
|
2375
|
+
B("span", {
|
|
2376
|
+
class: y(["w-12 text-right transition-[color] duration-200 font-medium", o.value])
|
|
2341
2377
|
}, M(l.value) + "% ", 3)
|
|
2342
2378
|
]));
|
|
2343
2379
|
}
|
|
@@ -2349,15 +2385,15 @@ const dl = D({
|
|
|
2349
2385
|
},
|
|
2350
2386
|
setup(e) {
|
|
2351
2387
|
const n = e, t = v(() => n.size === "small");
|
|
2352
|
-
return (a, l) => (
|
|
2388
|
+
return (a, l) => (i(), r("span", {
|
|
2353
2389
|
"aria-hidden": "true",
|
|
2354
|
-
class:
|
|
2390
|
+
class: y(["inline-flex shrink-0 items-center rounded-full border transition-colors", [
|
|
2355
2391
|
t.value ? "h-6 w-11" : "h-7 w-12",
|
|
2356
2392
|
e.on ? "border-transparent bg-primary" : "border-ui-border-strong bg-ui-surface"
|
|
2357
2393
|
]])
|
|
2358
2394
|
}, [
|
|
2359
|
-
|
|
2360
|
-
class:
|
|
2395
|
+
B("span", {
|
|
2396
|
+
class: y(["inline-block transform rounded-full shadow transition-transform", [
|
|
2361
2397
|
t.value ? "h-4 w-4" : "h-5 w-5",
|
|
2362
2398
|
e.on ? "bg-tx-on-primary" : "bg-tx-main",
|
|
2363
2399
|
e.on ? "translate-x-6" : "translate-x-1"
|
|
@@ -2365,7 +2401,7 @@ const dl = D({
|
|
|
2365
2401
|
}, null, 2)
|
|
2366
2402
|
], 2));
|
|
2367
2403
|
}
|
|
2368
|
-
}), Cl = ["aria-checked", "disabled"],
|
|
2404
|
+
}), Cl = ["aria-checked", "disabled"], zl = { class: "min-w-0 flex-1" }, El = { class: "block font-medium text-sm text-tx-main" }, Ll = {
|
|
2369
2405
|
key: 0,
|
|
2370
2406
|
class: "mt-0.5 block text-tx-muted text-xs"
|
|
2371
2407
|
}, Dl = /* @__PURE__ */ D({
|
|
@@ -2381,7 +2417,7 @@ const dl = D({
|
|
|
2381
2417
|
emits: ["update:modelValue"],
|
|
2382
2418
|
setup(e, { emit: n }) {
|
|
2383
2419
|
const t = e, a = n;
|
|
2384
|
-
return (l, o) => (
|
|
2420
|
+
return (l, o) => (i(), r("button", {
|
|
2385
2421
|
type: "button",
|
|
2386
2422
|
role: "switch",
|
|
2387
2423
|
"aria-checked": e.modelValue,
|
|
@@ -2393,21 +2429,21 @@ const dl = D({
|
|
|
2393
2429
|
on: e.modelValue,
|
|
2394
2430
|
class: "mt-0.5"
|
|
2395
2431
|
}, null, 8, ["on"]),
|
|
2396
|
-
e.icon ? (
|
|
2432
|
+
e.icon ? (i(), r("span", {
|
|
2397
2433
|
key: 0,
|
|
2398
|
-
class:
|
|
2434
|
+
class: y(["flex size-10 shrink-0 items-center justify-center rounded-corner border", e.modelValue ? "border-secondary bg-primary/20" : "border-ui-border bg-ui-surface/40"]),
|
|
2399
2435
|
"aria-hidden": "true"
|
|
2400
2436
|
}, [
|
|
2401
|
-
O(
|
|
2437
|
+
O(N, {
|
|
2402
2438
|
name: e.icon,
|
|
2403
2439
|
type: e.iconType,
|
|
2404
2440
|
size: 24,
|
|
2405
2441
|
alt: ""
|
|
2406
2442
|
}, null, 8, ["name", "type"])
|
|
2407
2443
|
], 2)) : x("", !0),
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
e.description ? (
|
|
2444
|
+
B("span", zl, [
|
|
2445
|
+
B("span", El, M(e.label), 1),
|
|
2446
|
+
e.description ? (i(), r("span", Ll, M(e.description), 1)) : x("", !0),
|
|
2411
2447
|
S(l.$slots, "pie")
|
|
2412
2448
|
])
|
|
2413
2449
|
], 8, Cl));
|
|
@@ -2426,7 +2462,7 @@ const dl = D({
|
|
|
2426
2462
|
function l() {
|
|
2427
2463
|
a("update:modelValue", !t.modelValue);
|
|
2428
2464
|
}
|
|
2429
|
-
return (o, s) => (
|
|
2465
|
+
return (o, s) => (i(), r("button", {
|
|
2430
2466
|
type: "button",
|
|
2431
2467
|
role: "switch",
|
|
2432
2468
|
"aria-checked": e.modelValue,
|
|
@@ -2444,7 +2480,9 @@ const dl = D({
|
|
|
2444
2480
|
}), Bl = ["disabled", "title", "aria-label", "aria-pressed", "aria-busy"], Sl = ["src"], Ml = /* @__PURE__ */ D({
|
|
2445
2481
|
__name: "ToggleControl",
|
|
2446
2482
|
props: {
|
|
2447
|
-
|
|
2483
|
+
name: { default: "" },
|
|
2484
|
+
type: { default: "icon" },
|
|
2485
|
+
icon: { default: "" },
|
|
2448
2486
|
label: {},
|
|
2449
2487
|
pressed: { type: [Boolean, null], default: null },
|
|
2450
2488
|
isActive: { type: Boolean, default: !1 },
|
|
@@ -2454,13 +2492,19 @@ const dl = D({
|
|
|
2454
2492
|
},
|
|
2455
2493
|
emits: ["click"],
|
|
2456
2494
|
setup(e, { emit: n }) {
|
|
2457
|
-
const t =
|
|
2458
|
-
|
|
2459
|
-
t(
|
|
2495
|
+
const t = e;
|
|
2496
|
+
W(() => {
|
|
2497
|
+
t.icon && !t.name && console.warn(
|
|
2498
|
+
"[ToggleControl] «icon» está obsoleto y se va en la próxima mayor: recibe una ruta ya resuelta. Usá «name» con el nombre del icono del tema, y «type» si hace falta el símbolo."
|
|
2499
|
+
);
|
|
2500
|
+
});
|
|
2501
|
+
const a = n;
|
|
2502
|
+
function l() {
|
|
2503
|
+
a("click");
|
|
2460
2504
|
}
|
|
2461
|
-
return (
|
|
2505
|
+
return (o, s) => (i(), r("button", {
|
|
2462
2506
|
type: "button",
|
|
2463
|
-
class:
|
|
2507
|
+
class: y(["p-2 rounded-corner bg-ui-bg/80 hover:opacity-50 transition-[opacity,scale,box-shadow] duration-300 h-17.5 w-17.5 group relative overflow-hidden hover:scale-105 hover:shadow-lg active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2", {
|
|
2464
2508
|
"animate-pulse": e.isLoading,
|
|
2465
2509
|
"ring-2 ring-primary": e.isActive,
|
|
2466
2510
|
"opacity-60": !e.isActive,
|
|
@@ -2471,28 +2515,40 @@ const dl = D({
|
|
|
2471
2515
|
"aria-label": e.label,
|
|
2472
2516
|
"aria-pressed": e.pressed ?? void 0,
|
|
2473
2517
|
"aria-busy": e.isLoading || void 0,
|
|
2474
|
-
onClick:
|
|
2518
|
+
onClick: l
|
|
2475
2519
|
}, [
|
|
2476
|
-
|
|
2520
|
+
e.name ? (i(), U(N, {
|
|
2521
|
+
key: 0,
|
|
2522
|
+
name: e.name,
|
|
2523
|
+
type: e.type,
|
|
2524
|
+
size: 50,
|
|
2525
|
+
class: y(["m-auto transition-[scale,filter] duration-300 group-hover:scale-110 relative z-10", {
|
|
2526
|
+
"animate-spin": e.isLoading,
|
|
2527
|
+
"filter brightness-75": !e.isActive,
|
|
2528
|
+
"drop-shadow-lg": e.isActive,
|
|
2529
|
+
...e.iconClass
|
|
2530
|
+
}])
|
|
2531
|
+
}, null, 8, ["name", "type", "class"])) : (i(), r("img", {
|
|
2532
|
+
key: 1,
|
|
2477
2533
|
src: e.icon,
|
|
2478
2534
|
alt: "",
|
|
2479
|
-
class:
|
|
2535
|
+
class: y(["m-auto w-12.5 h-12.5 transition-[scale,filter] duration-300 group-hover:scale-110 relative z-10", {
|
|
2480
2536
|
"animate-spin": e.isLoading,
|
|
2481
2537
|
"filter brightness-75": !e.isActive,
|
|
2482
2538
|
"drop-shadow-lg": e.isActive,
|
|
2483
2539
|
...e.iconClass
|
|
2484
2540
|
}])
|
|
2485
|
-
}, null, 10, Sl)
|
|
2541
|
+
}, null, 10, Sl))
|
|
2486
2542
|
], 10, Bl));
|
|
2487
2543
|
}
|
|
2488
2544
|
}), ft = /* @__PURE__ */ Symbol("tooltip de vasak");
|
|
2489
2545
|
function mt() {
|
|
2490
|
-
const e =
|
|
2546
|
+
const e = ke(ft, null);
|
|
2491
2547
|
if (e) return e;
|
|
2492
|
-
const n =
|
|
2548
|
+
const n = k(!1);
|
|
2493
2549
|
return {
|
|
2494
2550
|
abierto: v(() => n.value),
|
|
2495
|
-
disparador:
|
|
2551
|
+
disparador: k(null),
|
|
2496
2552
|
ponerElDisparador: () => {
|
|
2497
2553
|
},
|
|
2498
2554
|
abrir: () => {
|
|
@@ -2510,7 +2566,7 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2510
2566
|
delayDuration: { default: 200 }
|
|
2511
2567
|
},
|
|
2512
2568
|
setup(e) {
|
|
2513
|
-
const n = e, t =
|
|
2569
|
+
const n = e, t = k(!1), a = k(null);
|
|
2514
2570
|
let l = null;
|
|
2515
2571
|
function o() {
|
|
2516
2572
|
n.disabled || (l = setTimeout(() => {
|
|
@@ -2520,7 +2576,7 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2520
2576
|
function s() {
|
|
2521
2577
|
l && clearTimeout(l), t.value = !1;
|
|
2522
2578
|
}
|
|
2523
|
-
return
|
|
2579
|
+
return ye(ft, {
|
|
2524
2580
|
abierto: v(() => t.value && !n.disabled),
|
|
2525
2581
|
disparador: a,
|
|
2526
2582
|
ponerElDisparador: (u) => {
|
|
@@ -2528,7 +2584,7 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2528
2584
|
},
|
|
2529
2585
|
abrir: o,
|
|
2530
2586
|
cerrar: s
|
|
2531
|
-
}), (u, m) => (
|
|
2587
|
+
}), (u, m) => (i(), r("div", Vl, [
|
|
2532
2588
|
S(u.$slots, "default")
|
|
2533
2589
|
]));
|
|
2534
2590
|
}
|
|
@@ -2541,43 +2597,43 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2541
2597
|
sideOffset: { default: 4 }
|
|
2542
2598
|
},
|
|
2543
2599
|
setup(e) {
|
|
2544
|
-
const n = Be(), t = v(() => n.class ?? ""), a = e, l = mt(), o = v(() => l.abierto.value), s =
|
|
2600
|
+
const n = Be(), t = v(() => n.class ?? ""), a = e, l = mt(), o = v(() => l.abierto.value), s = k(null), u = k({ top: 0, left: 0 });
|
|
2545
2601
|
function m() {
|
|
2546
2602
|
const f = l.disparador.value;
|
|
2547
2603
|
if (!f || !s.value) return;
|
|
2548
|
-
const d = f.getBoundingClientRect(),
|
|
2549
|
-
let
|
|
2604
|
+
const d = f.getBoundingClientRect(), E = s.value.getBoundingClientRect();
|
|
2605
|
+
let L = 0, A = 0;
|
|
2550
2606
|
switch (a.side) {
|
|
2551
2607
|
case "bottom":
|
|
2552
|
-
|
|
2608
|
+
L = d.bottom + a.sideOffset, A = d.left + d.width / 2 - E.width / 2;
|
|
2553
2609
|
break;
|
|
2554
2610
|
case "top":
|
|
2555
|
-
|
|
2611
|
+
L = d.top - E.height - a.sideOffset, A = d.left + d.width / 2 - E.width / 2;
|
|
2556
2612
|
break;
|
|
2557
2613
|
case "left":
|
|
2558
|
-
|
|
2614
|
+
A = d.left - E.width - a.sideOffset, L = d.top + d.height / 2 - E.height / 2;
|
|
2559
2615
|
break;
|
|
2560
2616
|
case "right":
|
|
2561
|
-
|
|
2617
|
+
A = d.right + a.sideOffset, L = d.top + d.height / 2 - E.height / 2;
|
|
2562
2618
|
break;
|
|
2563
2619
|
}
|
|
2564
|
-
u.value = { top:
|
|
2620
|
+
u.value = { top: L, left: A };
|
|
2565
2621
|
}
|
|
2566
|
-
return
|
|
2567
|
-
f && (await
|
|
2568
|
-
}), (f, d) => (
|
|
2569
|
-
O(
|
|
2622
|
+
return Q(o, async (f) => {
|
|
2623
|
+
f && (await J(), requestAnimationFrame(m));
|
|
2624
|
+
}), (f, d) => (i(), U(ge, { to: "body" }, [
|
|
2625
|
+
O(we, {
|
|
2570
2626
|
"enter-active-class": "transition-all duration-200 ease-in-out",
|
|
2571
2627
|
"leave-active-class": "transition-all duration-200 ease-in-out",
|
|
2572
2628
|
"enter-from-class": "opacity-0 scale-95",
|
|
2573
2629
|
"leave-to-class": "opacity-0 scale-95"
|
|
2574
2630
|
}, {
|
|
2575
|
-
default:
|
|
2576
|
-
Se(
|
|
2631
|
+
default: G(() => [
|
|
2632
|
+
Se(B("div", {
|
|
2577
2633
|
ref_key: "globo",
|
|
2578
2634
|
ref: s,
|
|
2579
2635
|
style: fe({ position: "fixed", top: `${u.value.top}px`, left: `${u.value.left}px`, zIndex: 50 }),
|
|
2580
|
-
class:
|
|
2636
|
+
class: y([
|
|
2581
2637
|
t.value,
|
|
2582
2638
|
"pointer-events-none rounded-corner border border-secondary bg-ui-bg/80 px-2 py-1 text-sm shadow-md"
|
|
2583
2639
|
])
|
|
@@ -2594,16 +2650,16 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2594
2650
|
}), jl = /* @__PURE__ */ D({
|
|
2595
2651
|
__name: "TooltipTrigger",
|
|
2596
2652
|
setup(e) {
|
|
2597
|
-
const n = mt(), t =
|
|
2653
|
+
const n = mt(), t = k(null);
|
|
2598
2654
|
function a() {
|
|
2599
2655
|
return t.value ? t.value.firstElementChild ?? t.value : null;
|
|
2600
2656
|
}
|
|
2601
2657
|
function l() {
|
|
2602
2658
|
n.ponerElDisparador(a()), n.abrir();
|
|
2603
2659
|
}
|
|
2604
|
-
return
|
|
2660
|
+
return W(() => {
|
|
2605
2661
|
n.ponerElDisparador(a());
|
|
2606
|
-
}), (o, s) => (
|
|
2662
|
+
}), (o, s) => (i(), r("div", {
|
|
2607
2663
|
ref_key: "envoltorio",
|
|
2608
2664
|
ref: t,
|
|
2609
2665
|
class: "inline-block",
|
|
@@ -2616,12 +2672,14 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2616
2672
|
], 544));
|
|
2617
2673
|
}
|
|
2618
2674
|
}), Pl = ["title"], Rl = ["src", "alt"], Fl = {
|
|
2619
|
-
key:
|
|
2675
|
+
key: 2,
|
|
2620
2676
|
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"
|
|
2621
2677
|
}, Nl = /* @__PURE__ */ D({
|
|
2622
2678
|
__name: "TrayIconButton",
|
|
2623
2679
|
props: {
|
|
2624
|
-
|
|
2680
|
+
name: { default: "" },
|
|
2681
|
+
type: { default: "icon" },
|
|
2682
|
+
icon: { default: "" },
|
|
2625
2683
|
alt: { default: "" },
|
|
2626
2684
|
tooltip: { default: "" },
|
|
2627
2685
|
badge: { default: null },
|
|
@@ -2633,33 +2691,47 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2633
2691
|
},
|
|
2634
2692
|
emits: ["click"],
|
|
2635
2693
|
setup(e, { emit: n }) {
|
|
2636
|
-
const t =
|
|
2637
|
-
|
|
2694
|
+
const t = e, a = n, l = k(!1);
|
|
2695
|
+
W(() => {
|
|
2696
|
+
t.icon && !t.name && console.warn(
|
|
2697
|
+
"[TrayIconButton] «icon» está obsoleto y se va en la próxima mayor: recibe una ruta ya resuelta. Usá «name» con el nombre del icono del tema, y «type» si hace falta el símbolo."
|
|
2698
|
+
);
|
|
2699
|
+
});
|
|
2700
|
+
const o = () => {
|
|
2701
|
+
a("click");
|
|
2638
2702
|
};
|
|
2639
|
-
return (
|
|
2640
|
-
class:
|
|
2703
|
+
return (s, u) => (i(), r("div", {
|
|
2704
|
+
class: y(["p-1 rounded-corner relative hover:bg-primary dark:hover:bg-primary-dark group transition-[background-color] duration-300", e.customClass]),
|
|
2641
2705
|
title: e.tooltip,
|
|
2642
|
-
onClick:
|
|
2643
|
-
onMouseenter:
|
|
2644
|
-
onMouseleave:
|
|
2706
|
+
onClick: o,
|
|
2707
|
+
onMouseenter: u[0] || (u[0] = (m) => l.value = !0),
|
|
2708
|
+
onMouseleave: u[1] || (u[1] = (m) => l.value = !1)
|
|
2645
2709
|
}, [
|
|
2646
|
-
|
|
2647
|
-
|
|
2710
|
+
e.name ? (i(), U(N, {
|
|
2711
|
+
key: 0,
|
|
2712
|
+
name: e.name,
|
|
2713
|
+
type: e.type,
|
|
2714
|
+
size: 22,
|
|
2648
2715
|
alt: e.alt,
|
|
2649
|
-
class:
|
|
2650
|
-
}, null,
|
|
2651
|
-
e.badge !== null && e.badge > 0 ? (r(), i("div", Fl, M(e.badge), 1)) : x("", !0),
|
|
2652
|
-
e.showCustomTooltip && e.customTooltipText ? (r(), i("div", {
|
|
2716
|
+
class: y(["m-auto", e.iconClass])
|
|
2717
|
+
}, null, 8, ["name", "type", "alt", "class"])) : (i(), r("img", {
|
|
2653
2718
|
key: 1,
|
|
2654
|
-
|
|
2719
|
+
src: e.icon,
|
|
2720
|
+
alt: e.alt,
|
|
2721
|
+
class: y(["m-auto h-5.5 w-auto", e.iconClass])
|
|
2722
|
+
}, null, 10, Rl)),
|
|
2723
|
+
e.badge !== null && e.badge > 0 ? (i(), r("div", Fl, M(e.badge), 1)) : x("", !0),
|
|
2724
|
+
e.showCustomTooltip && e.customTooltipText ? (i(), r("div", {
|
|
2725
|
+
key: 3,
|
|
2726
|
+
class: y(["absolute top-1 left-1/2 transform -translate-x-1/2 text-xs font-semibold p-1 rounded-corner transition-[opacity,translate] duration-300 pointer-events-none background", [
|
|
2655
2727
|
e.tooltipClass,
|
|
2656
2728
|
{
|
|
2657
|
-
"opacity-0 -translate-y-2": !
|
|
2658
|
-
"opacity-100 translate-y-0":
|
|
2729
|
+
"opacity-0 -translate-y-2": !l.value,
|
|
2730
|
+
"opacity-100 translate-y-0": l.value
|
|
2659
2731
|
}
|
|
2660
2732
|
]])
|
|
2661
2733
|
}, M(e.customTooltipText), 3)) : x("", !0),
|
|
2662
|
-
S(
|
|
2734
|
+
S(s.$slots, "default")
|
|
2663
2735
|
], 42, Pl));
|
|
2664
2736
|
}
|
|
2665
2737
|
}), ql = [
|
|
@@ -2667,8 +2739,8 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2667
2739
|
_e,
|
|
2668
2740
|
Ze,
|
|
2669
2741
|
ba,
|
|
2670
|
-
|
|
2671
|
-
|
|
2742
|
+
N,
|
|
2743
|
+
La,
|
|
2672
2744
|
at,
|
|
2673
2745
|
tt,
|
|
2674
2746
|
Ra,
|
|
@@ -2680,7 +2752,7 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2680
2752
|
sn,
|
|
2681
2753
|
mn,
|
|
2682
2754
|
Oe,
|
|
2683
|
-
|
|
2755
|
+
Ln,
|
|
2684
2756
|
lt,
|
|
2685
2757
|
cn,
|
|
2686
2758
|
An,
|
|
@@ -2693,8 +2765,8 @@ const Vl = { class: "inline-block" }, Il = /* @__PURE__ */ D({
|
|
|
2693
2765
|
_n,
|
|
2694
2766
|
tl,
|
|
2695
2767
|
ll,
|
|
2696
|
-
rl,
|
|
2697
2768
|
il,
|
|
2769
|
+
rl,
|
|
2698
2770
|
ul,
|
|
2699
2771
|
dl,
|
|
2700
2772
|
bl,
|
|
@@ -2721,7 +2793,7 @@ export {
|
|
|
2721
2793
|
at as AppBar,
|
|
2722
2794
|
Ua as BarSearch,
|
|
2723
2795
|
ot as CLASES_POR_TONO,
|
|
2724
|
-
|
|
2796
|
+
rt as CLAVE_DEL_DIALOGO,
|
|
2725
2797
|
ut as CLAVE_DEL_MENU,
|
|
2726
2798
|
ft as CLAVE_DEL_TOOLTIP,
|
|
2727
2799
|
Ve as CLAVE_DE_LA_BARRA,
|
|
@@ -2735,8 +2807,8 @@ export {
|
|
|
2735
2807
|
_n as DialogTitle,
|
|
2736
2808
|
tl as DropdownMenu,
|
|
2737
2809
|
ll as DropdownMenuContent,
|
|
2738
|
-
|
|
2739
|
-
|
|
2810
|
+
il as DropdownMenuItem,
|
|
2811
|
+
rl as DropdownMenuLabel,
|
|
2740
2812
|
ul as DropdownMenuSeparator,
|
|
2741
2813
|
dl as DropdownMenuTrigger,
|
|
2742
2814
|
on as EmptyState,
|
|
@@ -2747,7 +2819,7 @@ export {
|
|
|
2747
2819
|
va as POSICIONES,
|
|
2748
2820
|
mn as ProgressBar,
|
|
2749
2821
|
Oe as SearchField,
|
|
2750
|
-
|
|
2822
|
+
Ln as SearchSelect,
|
|
2751
2823
|
ba as SelectField,
|
|
2752
2824
|
ua as SideBar,
|
|
2753
2825
|
_e as SideButton,
|
|
@@ -2759,7 +2831,7 @@ export {
|
|
|
2759
2831
|
Ra as TabBar,
|
|
2760
2832
|
nt as TabItem,
|
|
2761
2833
|
lt as TextInput,
|
|
2762
|
-
|
|
2834
|
+
N as ThemeIcon,
|
|
2763
2835
|
cn as ToastArea,
|
|
2764
2836
|
Ml as ToggleControl,
|
|
2765
2837
|
Il as Tooltip,
|
|
@@ -2767,14 +2839,14 @@ export {
|
|
|
2767
2839
|
jl as TooltipTrigger,
|
|
2768
2840
|
Nl as TrayIconButton,
|
|
2769
2841
|
tt as WindowControls,
|
|
2770
|
-
|
|
2842
|
+
La as WindowFrame,
|
|
2771
2843
|
vn as buscarOpciones,
|
|
2772
2844
|
Xl as default,
|
|
2773
2845
|
pa as esPosicion,
|
|
2774
2846
|
Ql as olvidarLosIconosDelTema,
|
|
2775
2847
|
Ae as orientacionDe,
|
|
2776
2848
|
ha as posicionDe,
|
|
2777
|
-
|
|
2849
|
+
it as rolDelTono,
|
|
2778
2850
|
st as usarElDialogo,
|
|
2779
2851
|
Ce as usarElMenu,
|
|
2780
2852
|
mt as usarElTooltip,
|