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