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