@codemonster-ru/vueforge-core 1.6.0 → 1.7.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/README.md +72 -1
- package/dist/components/heading/VfHeading.vue.d.ts +26 -0
- package/dist/components/heading/VfHeading.vue.d.ts.map +1 -0
- package/dist/components/heading/index.d.ts +2 -0
- package/dist/components/heading/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/prose/VfProse.vue.d.ts +23 -0
- package/dist/components/prose/VfProse.vue.d.ts.map +1 -0
- package/dist/components/prose/index.d.ts +2 -0
- package/dist/components/prose/index.d.ts.map +1 -0
- package/dist/components/switch/VfSwitch.vue.d.ts.map +1 -1
- package/dist/components/text/VfText.vue.d.ts +28 -0
- package/dist/components/text/VfText.vue.d.ts.map +1 -0
- package/dist/components/text/index.d.ts +2 -0
- package/dist/components/text/index.d.ts.map +1 -0
- package/dist/composables/useTheme.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme/default-preset-source.d.ts +68 -0
- package/dist/theme/default-preset-source.d.ts.map +1 -1
- package/dist/theme/public.d.ts +1 -1
- package/dist/theme/public.d.ts.map +1 -1
- package/dist/theme/utils.d.ts +7 -2
- package/dist/theme/utils.d.ts.map +1 -1
- package/dist/theme-api.js +3 -232
- package/dist/tokens.css +85 -17
- package/dist/types/components.d.ts +3 -0
- package/dist/types/components.d.ts.map +1 -1
- package/dist/types/theme.d.ts +91 -2
- package/dist/types/theme.d.ts.map +1 -1
- package/dist/utils-T2JkaeUr.js +315 -0
- package/dist/vueforge-core.js +900 -843
- package/package.json +1 -1
package/dist/vueforge-core.js
CHANGED
|
@@ -1,25 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { d as
|
|
6
|
-
import { t as
|
|
7
|
-
import { VueIconify as ee, icons as
|
|
8
|
-
import { autoUpdate as
|
|
1
|
+
import { r as Se, a as De } from "./utils-T2JkaeUr.js";
|
|
2
|
+
import { c as oa, d as la } from "./utils-T2JkaeUr.js";
|
|
3
|
+
import { defineComponent as S, inject as Te, computed as l, ref as I, watch as J, onMounted as re, onBeforeUnmount as te, provide as ze, renderSlot as C, toValue as K, nextTick as ne, onUnmounted as Me, openBlock as c, createElementBlock as _, createElementVNode as x, unref as h, toDisplayString as F, normalizeClass as R, createVNode as q, Transition as oe, withCtx as U, createCommentVNode as O, useAttrs as N, mergeProps as H, createTextVNode as le, normalizeStyle as Y, useSlots as fe, createBlock as j, Teleport as ue, resolveDynamicComponent as ae, normalizeProps as Ve, guardReactiveProps as xe, resolveComponent as Pe, Fragment as se, renderList as ie, Comment as Ne, Text as He } from "vue";
|
|
4
|
+
import { resolveTheme as Re, DEFAULT_STORAGE_KEY as Fe, DEFAULT_ATTRIBUTE as Ke, isThemeMode as je, vfMotionDurationsMs as X } from "@codemonster-ru/vueforge-theme";
|
|
5
|
+
import { d as Ce } from "./useScrollLock-FYdn9vRp.js";
|
|
6
|
+
import { t as ia, a as ra, u as ua, b as ca, c as da, v as fa } from "./useScrollLock-FYdn9vRp.js";
|
|
7
|
+
import { VueIconify as ee, icons as W } from "@codemonster-ru/vueiconify";
|
|
8
|
+
import { autoUpdate as qe, computePosition as Ue, offset as pe, flip as me, shift as he, arrow as _e } from "@codemonster-ru/floater.js";
|
|
9
9
|
const Be = Symbol("VueForgeConfig");
|
|
10
|
-
function
|
|
11
|
-
return De({
|
|
12
|
-
...t,
|
|
13
|
-
preset: t.preset ?? Re
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
function We(t, n) {
|
|
17
|
-
return Se(t, n);
|
|
18
|
-
}
|
|
19
|
-
function Ye() {
|
|
10
|
+
function We() {
|
|
20
11
|
return {
|
|
21
12
|
install(n, e = {}) {
|
|
22
|
-
const i =
|
|
13
|
+
const i = Se(e.theme);
|
|
23
14
|
n.provide(Be, {
|
|
24
15
|
theme: i,
|
|
25
16
|
themeMode: {
|
|
@@ -27,11 +18,11 @@ function Ye() {
|
|
|
27
18
|
storageKey: e.themeStorageKey,
|
|
28
19
|
attribute: e.themeAttribute
|
|
29
20
|
}
|
|
30
|
-
}), typeof document < "u" &&
|
|
21
|
+
}), typeof document < "u" && De(i);
|
|
31
22
|
}
|
|
32
23
|
};
|
|
33
24
|
}
|
|
34
|
-
const
|
|
25
|
+
const Bn = We(), Ee = Symbol("VfThemeContext"), En = /* @__PURE__ */ S({
|
|
35
26
|
__name: "VfThemeProvider",
|
|
36
27
|
props: {
|
|
37
28
|
defaultTheme: {},
|
|
@@ -39,31 +30,31 @@ const En = Ye(), Ee = Symbol("VfThemeContext"), On = /* @__PURE__ */ A({
|
|
|
39
30
|
attribute: {}
|
|
40
31
|
},
|
|
41
32
|
setup(t) {
|
|
42
|
-
const n = t, e = Te(Be, null), i =
|
|
33
|
+
const n = t, e = Te(Be, null), i = l(
|
|
43
34
|
() => n.defaultTheme ?? (e == null ? void 0 : e.themeMode.defaultTheme) ?? "system"
|
|
44
|
-
), a = I(i.value), r = I("light"), u = I(null), v =
|
|
45
|
-
() =>
|
|
46
|
-
), f =
|
|
47
|
-
() => n.storageKey ?? (e == null ? void 0 : e.themeMode.storageKey) ?? (e == null ? void 0 : e.theme.options.storageKey) ??
|
|
48
|
-
),
|
|
49
|
-
() => n.attribute ?? (e == null ? void 0 : e.themeMode.attribute) ?? (e == null ? void 0 : e.theme.options.attribute) ??
|
|
35
|
+
), a = I(i.value), r = I("light"), u = I(null), v = l(
|
|
36
|
+
() => Re(a.value, r.value)
|
|
37
|
+
), f = l(
|
|
38
|
+
() => n.storageKey ?? (e == null ? void 0 : e.themeMode.storageKey) ?? (e == null ? void 0 : e.theme.options.storageKey) ?? Fe
|
|
39
|
+
), b = l(
|
|
40
|
+
() => n.attribute ?? (e == null ? void 0 : e.themeMode.attribute) ?? (e == null ? void 0 : e.theme.options.attribute) ?? Ke
|
|
50
41
|
), d = I(!1);
|
|
51
|
-
let
|
|
52
|
-
function
|
|
42
|
+
let T = null;
|
|
43
|
+
function g() {
|
|
53
44
|
if (typeof window > "u")
|
|
54
45
|
return;
|
|
55
46
|
const m = window.localStorage.getItem(f.value);
|
|
56
|
-
|
|
47
|
+
je(m) && (a.value = m);
|
|
57
48
|
}
|
|
58
|
-
function
|
|
59
|
-
|
|
49
|
+
function V() {
|
|
50
|
+
T !== null && (window.clearTimeout(T), T = null);
|
|
60
51
|
}
|
|
61
|
-
function
|
|
52
|
+
function A(m, o = {}) {
|
|
62
53
|
if (typeof document > "u")
|
|
63
54
|
return;
|
|
64
|
-
const
|
|
65
|
-
o.animate && (
|
|
66
|
-
|
|
55
|
+
const y = document.documentElement;
|
|
56
|
+
o.animate && (V(), y.classList.add("vf-theme-transitioning")), y.setAttribute(b.value, m), o.animate && (T = window.setTimeout(() => {
|
|
57
|
+
y.classList.remove("vf-theme-transitioning"), T = null;
|
|
67
58
|
}, 320));
|
|
68
59
|
}
|
|
69
60
|
function D(m) {
|
|
@@ -77,7 +68,7 @@ const En = Ye(), Ee = Symbol("VfThemeContext"), On = /* @__PURE__ */ A({
|
|
|
77
68
|
function z(m) {
|
|
78
69
|
a.value = m;
|
|
79
70
|
}
|
|
80
|
-
function
|
|
71
|
+
function k() {
|
|
81
72
|
const m = v.value === "dark" ? "light" : "dark";
|
|
82
73
|
a.value = m;
|
|
83
74
|
}
|
|
@@ -86,25 +77,25 @@ const En = Ye(), Ee = Symbol("VfThemeContext"), On = /* @__PURE__ */ A({
|
|
|
86
77
|
}), J(
|
|
87
78
|
v,
|
|
88
79
|
(m) => {
|
|
89
|
-
|
|
80
|
+
A(m, { animate: d.value });
|
|
90
81
|
},
|
|
91
82
|
{ immediate: !0 }
|
|
92
|
-
),
|
|
93
|
-
a.value = i.value,
|
|
83
|
+
), re(() => {
|
|
84
|
+
a.value = i.value, g(), u.value = window.matchMedia("(prefers-color-scheme: dark)"), D(), u.value.addEventListener("change", D), d.value = !0;
|
|
94
85
|
}), te(() => {
|
|
95
86
|
var m;
|
|
96
|
-
(m = u.value) == null || m.removeEventListener("change", D),
|
|
97
|
-
}),
|
|
87
|
+
(m = u.value) == null || m.removeEventListener("change", D), V();
|
|
88
|
+
}), ze(Ee, {
|
|
98
89
|
mode: a,
|
|
99
90
|
resolvedTheme: v,
|
|
100
91
|
setTheme: z,
|
|
101
|
-
toggleTheme:
|
|
102
|
-
}), (m, o) =>
|
|
92
|
+
toggleTheme: k
|
|
93
|
+
}), (m, o) => C(m.$slots, "default");
|
|
103
94
|
}
|
|
104
95
|
});
|
|
105
96
|
function Oe(t, n, e = {}) {
|
|
106
97
|
const i = e.event ?? "pointerdown", a = (r) => {
|
|
107
|
-
if (
|
|
98
|
+
if (K(e.enabled) === !1)
|
|
108
99
|
return;
|
|
109
100
|
const u = r.target;
|
|
110
101
|
if (!(u instanceof Node))
|
|
@@ -114,18 +105,18 @@ function Oe(t, n, e = {}) {
|
|
|
114
105
|
);
|
|
115
106
|
v.length === 0 || v.some((f) => f.contains(u)) || n(r);
|
|
116
107
|
};
|
|
117
|
-
|
|
108
|
+
re(() => {
|
|
118
109
|
document.addEventListener(i, a);
|
|
119
110
|
}), te(() => {
|
|
120
111
|
document.removeEventListener(i, a);
|
|
121
112
|
});
|
|
122
113
|
}
|
|
123
|
-
function
|
|
124
|
-
const n =
|
|
125
|
-
() => n.value ? !!
|
|
114
|
+
function ce(t = {}) {
|
|
115
|
+
const n = l(() => K(t.open) !== void 0), e = I(t.defaultOpen ?? !1), i = l(
|
|
116
|
+
() => n.value ? !!K(t.open) : e.value
|
|
126
117
|
);
|
|
127
118
|
J(
|
|
128
|
-
() =>
|
|
119
|
+
() => K(t.open),
|
|
129
120
|
(r) => {
|
|
130
121
|
r !== void 0 && (e.value = r);
|
|
131
122
|
}
|
|
@@ -142,64 +133,64 @@ function ue(t = {}) {
|
|
|
142
133
|
setOpen: a
|
|
143
134
|
};
|
|
144
135
|
}
|
|
145
|
-
function
|
|
136
|
+
function ve(t, n = {}) {
|
|
146
137
|
const e = n.event ?? "keydown", i = (a) => {
|
|
147
|
-
|
|
138
|
+
K(n.enabled) === !1 || a.key !== "Escape" || t(a);
|
|
148
139
|
};
|
|
149
|
-
|
|
140
|
+
re(() => {
|
|
150
141
|
document.addEventListener(e, i);
|
|
151
142
|
}), te(() => {
|
|
152
143
|
document.removeEventListener(e, i);
|
|
153
144
|
});
|
|
154
145
|
}
|
|
155
|
-
function
|
|
156
|
-
const i = I(0), a = I(0), r = I(
|
|
146
|
+
function ye(t, n, e = {}) {
|
|
147
|
+
const i = I(0), a = I(0), r = I(K(e.placement) ?? "bottom"), u = I({}), v = I(null);
|
|
157
148
|
let f = 0;
|
|
158
|
-
const
|
|
149
|
+
const b = l(() => ({
|
|
159
150
|
left: `${i.value}px`,
|
|
160
151
|
top: `${a.value}px`
|
|
161
152
|
}));
|
|
162
153
|
async function d() {
|
|
163
154
|
if (!t.value || !n.value)
|
|
164
155
|
return;
|
|
165
|
-
const
|
|
156
|
+
const g = await Ue(
|
|
166
157
|
t.value,
|
|
167
158
|
n.value,
|
|
168
159
|
{
|
|
169
|
-
placement:
|
|
170
|
-
middleware:
|
|
171
|
-
strategy:
|
|
160
|
+
placement: K(e.placement) ?? r.value,
|
|
161
|
+
middleware: K(e.middleware),
|
|
162
|
+
strategy: K(e.strategy)
|
|
172
163
|
}
|
|
173
164
|
);
|
|
174
|
-
i.value =
|
|
165
|
+
i.value = g.x, a.value = g.y, r.value = g.placement, u.value = g.middlewareData ?? {};
|
|
175
166
|
}
|
|
176
|
-
function
|
|
177
|
-
var
|
|
178
|
-
(
|
|
167
|
+
function T() {
|
|
168
|
+
var g;
|
|
169
|
+
(g = v.value) == null || g.call(v), v.value = null;
|
|
179
170
|
}
|
|
180
171
|
return J(
|
|
181
|
-
[() =>
|
|
182
|
-
async ([
|
|
172
|
+
[() => K(e.enabled) !== !1, t, n],
|
|
173
|
+
async ([g]) => {
|
|
183
174
|
f += 1;
|
|
184
|
-
const
|
|
185
|
-
|
|
175
|
+
const V = f;
|
|
176
|
+
T(), !(!g || !t.value || !n.value) && (await ne(), !(V !== f || K(e.enabled) === !1 || !t.value || !n.value) && (await d(), !(V !== f || K(e.enabled) === !1 || !t.value || !n.value) && (v.value = qe(t.value, () => {
|
|
186
177
|
d();
|
|
187
178
|
}))));
|
|
188
179
|
},
|
|
189
180
|
{ immediate: !0 }
|
|
190
181
|
), te(() => {
|
|
191
|
-
|
|
182
|
+
T();
|
|
192
183
|
}), {
|
|
193
184
|
x: i,
|
|
194
185
|
y: a,
|
|
195
186
|
placement: r,
|
|
196
187
|
middlewareData: u,
|
|
197
|
-
styles:
|
|
188
|
+
styles: b,
|
|
198
189
|
update: d,
|
|
199
|
-
cleanup:
|
|
190
|
+
cleanup: T
|
|
200
191
|
};
|
|
201
192
|
}
|
|
202
|
-
const
|
|
193
|
+
const Ye = [
|
|
203
194
|
"a[href]",
|
|
204
195
|
"button:not([disabled])",
|
|
205
196
|
"input:not([disabled])",
|
|
@@ -207,21 +198,21 @@ const Xe = [
|
|
|
207
198
|
"textarea:not([disabled])",
|
|
208
199
|
'[tabindex]:not([tabindex="-1"])'
|
|
209
200
|
].join(", ");
|
|
210
|
-
function
|
|
201
|
+
function Xe(t) {
|
|
211
202
|
return Array.from(
|
|
212
|
-
t.querySelectorAll(
|
|
203
|
+
t.querySelectorAll(Ye)
|
|
213
204
|
).filter(
|
|
214
205
|
(n) => !n.hasAttribute("hidden") && n.getAttribute("aria-hidden") !== "true"
|
|
215
206
|
);
|
|
216
207
|
}
|
|
217
|
-
function
|
|
208
|
+
function Ae(t, n = {}) {
|
|
218
209
|
const e = (i) => {
|
|
219
|
-
if (i.key !== "Tab" ||
|
|
210
|
+
if (i.key !== "Tab" || K(n.enabled) === !1)
|
|
220
211
|
return;
|
|
221
212
|
const a = t.value;
|
|
222
213
|
if (!a)
|
|
223
214
|
return;
|
|
224
|
-
const r =
|
|
215
|
+
const r = Xe(a);
|
|
225
216
|
if (r.length === 0) {
|
|
226
217
|
i.preventDefault(), a.focus();
|
|
227
218
|
return;
|
|
@@ -233,53 +224,53 @@ function Ie(t, n = {}) {
|
|
|
233
224
|
}
|
|
234
225
|
f === v && (i.preventDefault(), u.focus());
|
|
235
226
|
};
|
|
236
|
-
|
|
227
|
+
re(() => {
|
|
237
228
|
document.addEventListener("keydown", e);
|
|
238
229
|
}), te(() => {
|
|
239
230
|
document.removeEventListener("keydown", e);
|
|
240
231
|
});
|
|
241
232
|
}
|
|
242
|
-
let
|
|
233
|
+
let Ge = 0;
|
|
243
234
|
function Q(t = {}) {
|
|
244
|
-
const n = `${t.prefix ?? "vf"}-${++
|
|
245
|
-
return
|
|
235
|
+
const n = `${t.prefix ?? "vf"}-${++Ge}`;
|
|
236
|
+
return l(() => K(t.providedId) ?? n);
|
|
246
237
|
}
|
|
247
|
-
function
|
|
238
|
+
function On(t) {
|
|
248
239
|
const n = I(void 0);
|
|
249
240
|
function e() {
|
|
250
|
-
return
|
|
241
|
+
return K(t.items);
|
|
251
242
|
}
|
|
252
243
|
function i() {
|
|
253
|
-
return
|
|
244
|
+
return K(t.offset) ?? 0;
|
|
254
245
|
}
|
|
255
246
|
function a() {
|
|
256
|
-
return !!
|
|
247
|
+
return !!K(t.disabled);
|
|
257
248
|
}
|
|
258
249
|
function r() {
|
|
259
|
-
var
|
|
250
|
+
var T;
|
|
260
251
|
if (typeof window > "u" || typeof document > "u")
|
|
261
252
|
return;
|
|
262
253
|
if (a()) {
|
|
263
254
|
n.value = void 0;
|
|
264
255
|
return;
|
|
265
256
|
}
|
|
266
|
-
const v = e(), f = i(),
|
|
267
|
-
id:
|
|
268
|
-
element: document.getElementById(
|
|
257
|
+
const v = e(), f = i(), b = v.map((g) => ({
|
|
258
|
+
id: g.id,
|
|
259
|
+
element: document.getElementById(g.id)
|
|
269
260
|
})).filter(
|
|
270
|
-
(
|
|
261
|
+
(g) => !!g.element
|
|
271
262
|
);
|
|
272
|
-
if (!
|
|
263
|
+
if (!b.length) {
|
|
273
264
|
n.value = void 0;
|
|
274
265
|
return;
|
|
275
266
|
}
|
|
276
|
-
let d = (
|
|
277
|
-
for (const
|
|
278
|
-
if (
|
|
279
|
-
d =
|
|
267
|
+
let d = (T = b[0]) == null ? void 0 : T.id;
|
|
268
|
+
for (const g of b) {
|
|
269
|
+
if (g.element.getBoundingClientRect().top - f <= 0) {
|
|
270
|
+
d = g.id;
|
|
280
271
|
continue;
|
|
281
272
|
}
|
|
282
|
-
d || (d =
|
|
273
|
+
d || (d = g.id);
|
|
283
274
|
break;
|
|
284
275
|
}
|
|
285
276
|
n.value = d;
|
|
@@ -287,9 +278,9 @@ function In(t) {
|
|
|
287
278
|
function u() {
|
|
288
279
|
r();
|
|
289
280
|
}
|
|
290
|
-
return
|
|
281
|
+
return re(async () => {
|
|
291
282
|
await ne(), r(), window.addEventListener("scroll", u, { passive: !0 }), window.addEventListener("resize", u), window.addEventListener("hashchange", u);
|
|
292
|
-
}),
|
|
283
|
+
}), Me(() => {
|
|
293
284
|
window.removeEventListener("scroll", u), window.removeEventListener("resize", u), window.removeEventListener("hashchange", u);
|
|
294
285
|
}), J(
|
|
295
286
|
() => [
|
|
@@ -306,7 +297,7 @@ function In(t) {
|
|
|
306
297
|
updateActiveId: r
|
|
307
298
|
};
|
|
308
299
|
}
|
|
309
|
-
function
|
|
300
|
+
function Qe() {
|
|
310
301
|
const t = Te(Ee);
|
|
311
302
|
if (!t)
|
|
312
303
|
throw new Error("useTheme must be used inside VfThemeProvider.");
|
|
@@ -317,7 +308,7 @@ function Je() {
|
|
|
317
308
|
toggleTheme: t.toggleTheme
|
|
318
309
|
};
|
|
319
310
|
}
|
|
320
|
-
const
|
|
311
|
+
const Je = { class: "vf-accordion" }, Ze = ["id", "aria-controls", "aria-expanded", "disabled"], et = ["id", "aria-labelledby"], tt = { class: "vf-accordion__content-inner" }, An = /* @__PURE__ */ S({
|
|
321
312
|
__name: "VfAccordion",
|
|
322
313
|
props: {
|
|
323
314
|
open: { type: Boolean, default: void 0 },
|
|
@@ -327,9 +318,9 @@ const Ze = { class: "vf-accordion" }, et = ["id", "aria-controls", "aria-expande
|
|
|
327
318
|
},
|
|
328
319
|
emits: ["update:open", "openChange"],
|
|
329
320
|
setup(t, { emit: n }) {
|
|
330
|
-
const e = t, i = n, a = Q({ prefix: "vf-accordion-trigger" }), r = Q({ prefix: "vf-accordion-content" }), u =
|
|
321
|
+
const e = t, i = n, a = Q({ prefix: "vf-accordion-trigger" }), r = Q({ prefix: "vf-accordion-content" }), u = ce({
|
|
331
322
|
defaultOpen: e.defaultOpen,
|
|
332
|
-
open:
|
|
323
|
+
open: l(() => e.open),
|
|
333
324
|
onOpenChange: (m) => {
|
|
334
325
|
i("update:open", m), i("openChange", m);
|
|
335
326
|
}
|
|
@@ -337,103 +328,103 @@ const Ze = { class: "vf-accordion" }, et = ["id", "aria-controls", "aria-expande
|
|
|
337
328
|
"height var(--vf-motion-duration-normal) var(--vf-motion-ease-standard)",
|
|
338
329
|
"opacity var(--vf-motion-duration-normal) var(--vf-motion-ease-standard)"
|
|
339
330
|
].join(", ");
|
|
340
|
-
function
|
|
331
|
+
function b(m) {
|
|
341
332
|
const o = m.firstElementChild;
|
|
342
333
|
return (o == null ? void 0 : o.offsetHeight) ?? m.scrollHeight;
|
|
343
334
|
}
|
|
344
335
|
function d() {
|
|
345
336
|
e.disabled || u.toggle();
|
|
346
337
|
}
|
|
347
|
-
function
|
|
338
|
+
function T(m) {
|
|
348
339
|
(m.key === "Enter" || m.key === " ") && (m.preventDefault(), d());
|
|
349
340
|
}
|
|
350
|
-
function
|
|
341
|
+
function g(m) {
|
|
351
342
|
const o = m;
|
|
352
343
|
o.style.height = "0px", o.style.opacity = "0", o.style.overflow = "hidden";
|
|
353
344
|
}
|
|
354
|
-
function
|
|
355
|
-
const
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
}), window.setTimeout(o,
|
|
345
|
+
function V(m, o) {
|
|
346
|
+
const y = m;
|
|
347
|
+
y.style.transition = f, requestAnimationFrame(() => {
|
|
348
|
+
y.style.height = `${b(y)}px`, y.style.opacity = "1";
|
|
349
|
+
}), window.setTimeout(o, X.normal);
|
|
359
350
|
}
|
|
360
|
-
function
|
|
351
|
+
function A(m) {
|
|
361
352
|
const o = m;
|
|
362
353
|
o.style.height = "", o.style.opacity = "", o.style.overflow = "", o.style.transition = "";
|
|
363
354
|
}
|
|
364
355
|
function D(m) {
|
|
365
356
|
const o = m;
|
|
366
|
-
o.style.height = `${
|
|
357
|
+
o.style.height = `${b(o)}px`, o.style.opacity = "1", o.style.overflow = "hidden";
|
|
367
358
|
}
|
|
368
359
|
function z(m, o) {
|
|
369
|
-
const
|
|
370
|
-
|
|
360
|
+
const y = m;
|
|
361
|
+
y.style.transition = f, y.offsetHeight, y.style.height = "0px", y.style.opacity = "0", window.setTimeout(o, X.normal);
|
|
371
362
|
}
|
|
372
|
-
function
|
|
363
|
+
function k(m) {
|
|
373
364
|
const o = m;
|
|
374
365
|
o.style.height = "", o.style.opacity = "", o.style.overflow = "", o.style.transition = "";
|
|
375
366
|
}
|
|
376
|
-
return (m, o) => (c(),
|
|
377
|
-
|
|
378
|
-
id:
|
|
379
|
-
"aria-controls":
|
|
380
|
-
"aria-expanded":
|
|
367
|
+
return (m, o) => (c(), _("section", Je, [
|
|
368
|
+
x("button", {
|
|
369
|
+
id: h(a),
|
|
370
|
+
"aria-controls": h(r),
|
|
371
|
+
"aria-expanded": h(v),
|
|
381
372
|
disabled: t.disabled,
|
|
382
373
|
class: "vf-accordion__trigger",
|
|
383
374
|
type: "button",
|
|
384
375
|
onClick: d,
|
|
385
|
-
onKeydown:
|
|
376
|
+
onKeydown: T
|
|
386
377
|
}, [
|
|
387
|
-
|
|
388
|
-
|
|
378
|
+
C(m.$slots, "trigger", { open: h(v) }, () => [
|
|
379
|
+
x("span", null, F(t.title), 1)
|
|
389
380
|
]),
|
|
390
|
-
|
|
381
|
+
x("span", {
|
|
391
382
|
"aria-hidden": "true",
|
|
392
|
-
class:
|
|
383
|
+
class: R(["vf-accordion__icon", h(v) && "vf-accordion__icon--open"])
|
|
393
384
|
}, [
|
|
394
|
-
|
|
395
|
-
icon:
|
|
385
|
+
q(h(ee), {
|
|
386
|
+
icon: h(W).chevronDown,
|
|
396
387
|
size: "0.875rem"
|
|
397
388
|
}, null, 8, ["icon"])
|
|
398
389
|
], 2)
|
|
399
|
-
], 40,
|
|
400
|
-
|
|
390
|
+
], 40, Ze),
|
|
391
|
+
q(oe, {
|
|
401
392
|
css: !1,
|
|
402
|
-
onBeforeEnter:
|
|
403
|
-
onEnter:
|
|
404
|
-
onAfterEnter:
|
|
393
|
+
onBeforeEnter: g,
|
|
394
|
+
onEnter: V,
|
|
395
|
+
onAfterEnter: A,
|
|
405
396
|
onBeforeLeave: D,
|
|
406
397
|
onLeave: z,
|
|
407
|
-
onAfterLeave:
|
|
398
|
+
onAfterLeave: k
|
|
408
399
|
}, {
|
|
409
|
-
default:
|
|
410
|
-
|
|
400
|
+
default: U(() => [
|
|
401
|
+
h(v) ? (c(), _("div", {
|
|
411
402
|
key: 0,
|
|
412
|
-
id:
|
|
413
|
-
"aria-labelledby":
|
|
403
|
+
id: h(r),
|
|
404
|
+
"aria-labelledby": h(a),
|
|
414
405
|
class: "vf-accordion__content",
|
|
415
406
|
role: "region"
|
|
416
407
|
}, [
|
|
417
|
-
|
|
418
|
-
|
|
408
|
+
x("div", tt, [
|
|
409
|
+
C(m.$slots, "default", { open: h(v) })
|
|
419
410
|
])
|
|
420
|
-
], 8,
|
|
411
|
+
], 8, et)) : O("", !0)
|
|
421
412
|
]),
|
|
422
413
|
_: 3
|
|
423
414
|
})
|
|
424
415
|
]));
|
|
425
416
|
}
|
|
426
417
|
});
|
|
427
|
-
function
|
|
418
|
+
function P(...t) {
|
|
428
419
|
return t.filter(Boolean).join(" ");
|
|
429
420
|
}
|
|
430
|
-
const
|
|
421
|
+
const nt = {
|
|
431
422
|
class: "vf-alert__icon",
|
|
432
423
|
"aria-hidden": "true"
|
|
433
|
-
},
|
|
424
|
+
}, at = { class: "vf-alert__content" }, ot = {
|
|
434
425
|
key: 0,
|
|
435
426
|
class: "vf-alert__title"
|
|
436
|
-
},
|
|
427
|
+
}, lt = { class: "vf-alert__body" }, In = /* @__PURE__ */ S({
|
|
437
428
|
inheritAttrs: !1,
|
|
438
429
|
__name: "VfAlert",
|
|
439
430
|
props: {
|
|
@@ -441,46 +432,46 @@ const at = {
|
|
|
441
432
|
title: { default: void 0 }
|
|
442
433
|
},
|
|
443
434
|
setup(t) {
|
|
444
|
-
const n = t, e =
|
|
445
|
-
() =>
|
|
446
|
-
), a =
|
|
447
|
-
return (r, u) => (c(),
|
|
435
|
+
const n = t, e = N(), i = l(
|
|
436
|
+
() => P("vf-alert", n.tone !== "primary" && `vf-alert--${n.tone}`)
|
|
437
|
+
), a = l(() => n.tone === "success" ? W.checkCircle : n.tone === "info" ? W.info : n.tone === "warn" ? W.warning : n.tone === "help" ? W.questionCircle : n.tone === "danger" ? W.warning : n.tone === "contrast" ? W.info : W.info);
|
|
438
|
+
return (r, u) => (c(), _("section", H({
|
|
448
439
|
class: i.value,
|
|
449
440
|
role: "alert"
|
|
450
|
-
},
|
|
451
|
-
|
|
452
|
-
|
|
441
|
+
}, h(e)), [
|
|
442
|
+
x("div", nt, [
|
|
443
|
+
q(h(ee), {
|
|
453
444
|
icon: a.value,
|
|
454
445
|
size: "2rem"
|
|
455
446
|
}, null, 8, ["icon"])
|
|
456
447
|
]),
|
|
457
|
-
|
|
458
|
-
n.title || r.$slots.title ? (c(),
|
|
459
|
-
|
|
460
|
-
|
|
448
|
+
x("div", at, [
|
|
449
|
+
n.title || r.$slots.title ? (c(), _("p", ot, [
|
|
450
|
+
C(r.$slots, "title", {}, () => [
|
|
451
|
+
le(F(n.title), 1)
|
|
461
452
|
])
|
|
462
453
|
])) : O("", !0),
|
|
463
|
-
|
|
464
|
-
|
|
454
|
+
x("div", lt, [
|
|
455
|
+
C(r.$slots, "default")
|
|
465
456
|
])
|
|
466
457
|
])
|
|
467
458
|
], 16));
|
|
468
459
|
}
|
|
469
|
-
}),
|
|
460
|
+
}), Ln = /* @__PURE__ */ S({
|
|
470
461
|
inheritAttrs: !1,
|
|
471
462
|
__name: "VfBadge",
|
|
472
463
|
props: {
|
|
473
464
|
tone: { default: "neutral" }
|
|
474
465
|
},
|
|
475
466
|
setup(t) {
|
|
476
|
-
const n = t, e =
|
|
477
|
-
() =>
|
|
467
|
+
const n = t, e = N(), i = l(
|
|
468
|
+
() => P("vf-badge", n.tone !== "neutral" && `vf-badge--${n.tone}`)
|
|
478
469
|
);
|
|
479
|
-
return (a, r) => (c(),
|
|
480
|
-
|
|
470
|
+
return (a, r) => (c(), _("span", H({ class: i.value }, h(e)), [
|
|
471
|
+
C(a.$slots, "default")
|
|
481
472
|
], 16));
|
|
482
473
|
}
|
|
483
|
-
}),
|
|
474
|
+
}), st = ["type"], Sn = /* @__PURE__ */ S({
|
|
484
475
|
inheritAttrs: !1,
|
|
485
476
|
__name: "VfButton",
|
|
486
477
|
props: {
|
|
@@ -490,25 +481,25 @@ const at = {
|
|
|
490
481
|
type: { default: "button" }
|
|
491
482
|
},
|
|
492
483
|
setup(t) {
|
|
493
|
-
const n = t, e =
|
|
494
|
-
() =>
|
|
484
|
+
const n = t, e = N(), i = l(
|
|
485
|
+
() => P(
|
|
495
486
|
"vf-button",
|
|
496
487
|
`vf-button--${n.variant}`,
|
|
497
488
|
n.size !== "md" && `vf-button--${n.size}`,
|
|
498
489
|
n.block && "vf-button--block"
|
|
499
490
|
)
|
|
500
491
|
);
|
|
501
|
-
return (a, r) => (c(),
|
|
492
|
+
return (a, r) => (c(), _("button", H({
|
|
502
493
|
class: i.value,
|
|
503
494
|
type: n.type
|
|
504
|
-
},
|
|
505
|
-
|
|
506
|
-
], 16,
|
|
495
|
+
}, h(e)), [
|
|
496
|
+
C(a.$slots, "default")
|
|
497
|
+
], 16, st));
|
|
507
498
|
}
|
|
508
|
-
}),
|
|
499
|
+
}), it = { key: 0 }, rt = { class: "vf-card__title" }, ut = {
|
|
509
500
|
key: 1,
|
|
510
501
|
class: "vf-card__body"
|
|
511
|
-
}, ct = { key: 2 },
|
|
502
|
+
}, ct = { key: 2 }, Dn = /* @__PURE__ */ S({
|
|
512
503
|
inheritAttrs: !1,
|
|
513
504
|
__name: "VfCard",
|
|
514
505
|
props: {
|
|
@@ -516,27 +507,27 @@ const at = {
|
|
|
516
507
|
compact: { type: Boolean, default: !1 }
|
|
517
508
|
},
|
|
518
509
|
setup(t) {
|
|
519
|
-
const n = t, e =
|
|
520
|
-
() =>
|
|
510
|
+
const n = t, e = N(), i = l(
|
|
511
|
+
() => P("vf-card", n.compact && "vf-card--compact")
|
|
521
512
|
);
|
|
522
|
-
return (a, r) => (c(),
|
|
523
|
-
n.title || a.$slots.header ? (c(),
|
|
524
|
-
|
|
525
|
-
|
|
513
|
+
return (a, r) => (c(), _("section", H({ class: i.value }, h(e)), [
|
|
514
|
+
n.title || a.$slots.header ? (c(), _("header", it, [
|
|
515
|
+
C(a.$slots, "header", {}, () => [
|
|
516
|
+
x("h3", rt, F(n.title), 1)
|
|
526
517
|
])
|
|
527
518
|
])) : O("", !0),
|
|
528
|
-
a.$slots.default ? (c(),
|
|
529
|
-
|
|
519
|
+
a.$slots.default ? (c(), _("div", ut, [
|
|
520
|
+
C(a.$slots, "default")
|
|
530
521
|
])) : O("", !0),
|
|
531
|
-
a.$slots.footer ? (c(),
|
|
532
|
-
|
|
522
|
+
a.$slots.footer ? (c(), _("footer", ct, [
|
|
523
|
+
C(a.$slots, "footer")
|
|
533
524
|
])) : O("", !0)
|
|
534
525
|
], 16));
|
|
535
526
|
}
|
|
536
|
-
}),
|
|
527
|
+
}), dt = ["checked", "disabled", "aria-invalid"], ft = {
|
|
537
528
|
key: 0,
|
|
538
529
|
class: "vf-checkbox__content"
|
|
539
|
-
},
|
|
530
|
+
}, zn = /* @__PURE__ */ S({
|
|
540
531
|
inheritAttrs: !1,
|
|
541
532
|
__name: "VfCheckbox",
|
|
542
533
|
props: {
|
|
@@ -548,8 +539,8 @@ const at = {
|
|
|
548
539
|
},
|
|
549
540
|
emits: ["update:modelValue", "change"],
|
|
550
541
|
setup(t, { emit: n }) {
|
|
551
|
-
const e = t, i = n, a =
|
|
552
|
-
() =>
|
|
542
|
+
const e = t, i = n, a = N(), r = l(
|
|
543
|
+
() => P(
|
|
553
544
|
"vf-checkbox",
|
|
554
545
|
`vf-checkbox--${e.size}`,
|
|
555
546
|
e.modelValue && "vf-checkbox--checked",
|
|
@@ -557,40 +548,40 @@ const at = {
|
|
|
557
548
|
e.disabled && "vf-checkbox--disabled",
|
|
558
549
|
a.class
|
|
559
550
|
)
|
|
560
|
-
), u =
|
|
551
|
+
), u = l(() => a.style), v = l(
|
|
561
552
|
() => Object.fromEntries(
|
|
562
|
-
Object.entries(a).filter(([
|
|
553
|
+
Object.entries(a).filter(([b]) => b !== "class" && b !== "style")
|
|
563
554
|
)
|
|
564
555
|
);
|
|
565
|
-
function f(
|
|
566
|
-
const d =
|
|
556
|
+
function f(b) {
|
|
557
|
+
const d = b.target.checked;
|
|
567
558
|
i("update:modelValue", d), i("change", d);
|
|
568
559
|
}
|
|
569
|
-
return (
|
|
570
|
-
class:
|
|
571
|
-
style:
|
|
560
|
+
return (b, d) => (c(), _("label", {
|
|
561
|
+
class: R(r.value),
|
|
562
|
+
style: Y(u.value)
|
|
572
563
|
}, [
|
|
573
|
-
|
|
564
|
+
x("input", H({
|
|
574
565
|
class: "vf-checkbox__input",
|
|
575
566
|
type: "checkbox",
|
|
576
567
|
checked: e.modelValue,
|
|
577
568
|
disabled: e.disabled,
|
|
578
569
|
"aria-invalid": e.invalid || void 0
|
|
579
|
-
}, v.value, { onChange: f }), null, 16,
|
|
580
|
-
d[0] || (d[0] =
|
|
570
|
+
}, v.value, { onChange: f }), null, 16, dt),
|
|
571
|
+
d[0] || (d[0] = x("span", {
|
|
581
572
|
class: "vf-checkbox__control",
|
|
582
573
|
"aria-hidden": "true"
|
|
583
574
|
}, [
|
|
584
|
-
|
|
575
|
+
x("span", { class: "vf-checkbox__mark" })
|
|
585
576
|
], -1)),
|
|
586
|
-
t.label ||
|
|
587
|
-
|
|
588
|
-
|
|
577
|
+
t.label || b.$slots.default ? (c(), _("span", ft, [
|
|
578
|
+
C(b.$slots, "default", {}, () => [
|
|
579
|
+
le(F(t.label), 1)
|
|
589
580
|
])
|
|
590
581
|
])) : O("", !0)
|
|
591
582
|
], 6));
|
|
592
583
|
}
|
|
593
|
-
}),
|
|
584
|
+
}), vt = ["type"], Ie = /* @__PURE__ */ S({
|
|
594
585
|
inheritAttrs: !1,
|
|
595
586
|
__name: "VfIconButton",
|
|
596
587
|
props: {
|
|
@@ -600,34 +591,34 @@ const at = {
|
|
|
600
591
|
type: { default: "button" }
|
|
601
592
|
},
|
|
602
593
|
setup(t) {
|
|
603
|
-
const n = t, e =
|
|
604
|
-
() =>
|
|
594
|
+
const n = t, e = N(), i = l(
|
|
595
|
+
() => P(
|
|
605
596
|
"vf-icon-button",
|
|
606
597
|
n.variant !== "ghost" && `vf-icon-button--${n.variant}`,
|
|
607
598
|
n.size !== "md" && `vf-icon-button--${n.size}`
|
|
608
599
|
)
|
|
609
|
-
), a =
|
|
610
|
-
return (r, u) => (c(),
|
|
600
|
+
), a = l(() => n.size === "sm" ? "0.875rem" : n.size === "lg" ? "1.125rem" : "1rem");
|
|
601
|
+
return (r, u) => (c(), _("button", H({
|
|
611
602
|
class: i.value,
|
|
612
603
|
type: n.type
|
|
613
|
-
},
|
|
614
|
-
|
|
604
|
+
}, h(e)), [
|
|
605
|
+
q(h(ee), {
|
|
615
606
|
icon: n.icon,
|
|
616
607
|
size: a.value,
|
|
617
608
|
"aria-hidden": "true"
|
|
618
609
|
}, null, 8, ["icon", "size"])
|
|
619
|
-
], 16,
|
|
610
|
+
], 16, vt));
|
|
620
611
|
}
|
|
621
|
-
}),
|
|
612
|
+
}), pt = ["aria-labelledby"], mt = {
|
|
622
613
|
key: 0,
|
|
623
614
|
class: "vf-drawer__header"
|
|
624
|
-
},
|
|
615
|
+
}, ht = ["id"], _t = { class: "vf-drawer__actions" }, yt = {
|
|
625
616
|
key: 1,
|
|
626
617
|
class: "vf-drawer__body"
|
|
627
|
-
},
|
|
618
|
+
}, bt = {
|
|
628
619
|
key: 2,
|
|
629
620
|
class: "vf-drawer__footer"
|
|
630
|
-
},
|
|
621
|
+
}, Mn = /* @__PURE__ */ S({
|
|
631
622
|
inheritAttrs: !1,
|
|
632
623
|
__name: "VfDrawer",
|
|
633
624
|
props: {
|
|
@@ -647,166 +638,166 @@ const at = {
|
|
|
647
638
|
},
|
|
648
639
|
emits: ["update:open", "openChange"],
|
|
649
640
|
setup(t, { emit: n }) {
|
|
650
|
-
const e = t, i = n, a =
|
|
641
|
+
const e = t, i = n, a = N(), r = I(null), u = I(null), v = fe(), f = Q({ prefix: "vf-drawer-title" }), b = ce({
|
|
651
642
|
defaultOpen: e.defaultOpen,
|
|
652
|
-
open:
|
|
653
|
-
onOpenChange: (
|
|
654
|
-
i("update:open",
|
|
643
|
+
open: l(() => e.open),
|
|
644
|
+
onOpenChange: (B) => {
|
|
645
|
+
i("update:open", B), i("openChange", B);
|
|
655
646
|
}
|
|
656
|
-
}), d =
|
|
657
|
-
enter:
|
|
658
|
-
leave:
|
|
647
|
+
}), d = b.isOpen, T = {
|
|
648
|
+
enter: X.normal,
|
|
649
|
+
leave: X.normal
|
|
659
650
|
};
|
|
660
|
-
function
|
|
661
|
-
return typeof
|
|
662
|
-
}
|
|
663
|
-
const
|
|
664
|
-
const
|
|
665
|
-
return
|
|
666
|
-
}),
|
|
667
|
-
() =>
|
|
651
|
+
function g(B) {
|
|
652
|
+
return typeof B == "number" ? `${B}px` : B;
|
|
653
|
+
}
|
|
654
|
+
const V = l(() => {
|
|
655
|
+
const B = {}, w = g(e.offsetTop), Z = g(e.bodyPadding);
|
|
656
|
+
return w != null && (B["--vf-drawer-offset-top"] = w), Z != null && (B["--vf-drawer-body-padding"] = Z), B;
|
|
657
|
+
}), A = l(
|
|
658
|
+
() => P(
|
|
668
659
|
"vf-drawer",
|
|
669
660
|
`vf-drawer--${e.placement}`,
|
|
670
661
|
e.offsetTop != null && "vf-drawer--offset-top"
|
|
671
662
|
)
|
|
672
|
-
), D =
|
|
673
|
-
|
|
663
|
+
), D = l(() => [
|
|
664
|
+
V.value,
|
|
674
665
|
a.style
|
|
675
|
-
]), z =
|
|
676
|
-
Object.entries(a).filter(([
|
|
677
|
-
)),
|
|
666
|
+
]), z = l(() => Object.fromEntries(
|
|
667
|
+
Object.entries(a).filter(([B]) => B !== "class" && B !== "style")
|
|
668
|
+
)), k = l(
|
|
678
669
|
() => e.disableTeleport || e.teleportTo === !1 || e.teleportTo === null
|
|
679
|
-
), m =
|
|
680
|
-
() =>
|
|
670
|
+
), m = l(() => e.scrollLockTarget === !1 ? null : e.scrollLockTarget), o = l(() => typeof e.teleportTo == "string" || typeof HTMLElement < "u" && e.teleportTo instanceof HTMLElement ? e.teleportTo : "body"), y = l(
|
|
671
|
+
() => P(
|
|
681
672
|
"vf-drawer__content",
|
|
682
673
|
`vf-drawer__content--${e.placement}`,
|
|
683
674
|
`vf-drawer__content--${e.size}`
|
|
684
675
|
)
|
|
685
|
-
), p =
|
|
676
|
+
), p = l(() => !!v.header), s = l(
|
|
686
677
|
() => e.title || p.value ? f.value : void 0
|
|
687
678
|
);
|
|
688
679
|
function E() {
|
|
689
|
-
|
|
680
|
+
b.close();
|
|
690
681
|
}
|
|
691
682
|
function L() {
|
|
692
683
|
e.closeOnOverlayClick && E();
|
|
693
684
|
}
|
|
694
685
|
function M() {
|
|
695
|
-
const
|
|
696
|
-
if (!
|
|
686
|
+
const B = r.value;
|
|
687
|
+
if (!B)
|
|
697
688
|
return;
|
|
698
|
-
const
|
|
689
|
+
const w = B.querySelector(
|
|
699
690
|
"[autofocus], [data-autofocus]"
|
|
700
691
|
);
|
|
701
|
-
if (
|
|
702
|
-
|
|
692
|
+
if (w) {
|
|
693
|
+
w.focus();
|
|
703
694
|
return;
|
|
704
695
|
}
|
|
705
|
-
|
|
696
|
+
B.focus();
|
|
706
697
|
}
|
|
707
|
-
return
|
|
708
|
-
(
|
|
709
|
-
!e.closeOnEscape || !d.value || (
|
|
698
|
+
return ve(
|
|
699
|
+
(B) => {
|
|
700
|
+
!e.closeOnEscape || !d.value || (B.preventDefault(), E());
|
|
710
701
|
},
|
|
711
702
|
{
|
|
712
703
|
enabled: d
|
|
713
704
|
}
|
|
714
|
-
),
|
|
705
|
+
), Ae(r, {
|
|
715
706
|
enabled: d
|
|
716
|
-
}),
|
|
707
|
+
}), Ce(d, {
|
|
717
708
|
target: m
|
|
718
709
|
}), J(
|
|
719
710
|
d,
|
|
720
|
-
async (
|
|
721
|
-
var
|
|
711
|
+
async (B) => {
|
|
712
|
+
var w;
|
|
722
713
|
if (!(typeof document > "u")) {
|
|
723
|
-
if (
|
|
714
|
+
if (B) {
|
|
724
715
|
u.value = document.activeElement instanceof HTMLElement ? document.activeElement : null, await ne(), M();
|
|
725
716
|
return;
|
|
726
717
|
}
|
|
727
|
-
(
|
|
718
|
+
(w = u.value) == null || w.focus();
|
|
728
719
|
}
|
|
729
720
|
},
|
|
730
721
|
{ immediate: !0 }
|
|
731
722
|
), te(() => {
|
|
732
|
-
var
|
|
733
|
-
d.value && ((
|
|
734
|
-
}), (
|
|
723
|
+
var B;
|
|
724
|
+
d.value && ((B = u.value) == null || B.focus());
|
|
725
|
+
}), (B, w) => (c(), j(ue, {
|
|
735
726
|
to: o.value,
|
|
736
|
-
disabled:
|
|
727
|
+
disabled: k.value
|
|
737
728
|
}, [
|
|
738
|
-
|
|
729
|
+
q(oe, {
|
|
739
730
|
name: "vf-drawer-transition",
|
|
740
731
|
appear: "",
|
|
741
|
-
duration:
|
|
732
|
+
duration: T
|
|
742
733
|
}, {
|
|
743
|
-
default:
|
|
744
|
-
|
|
734
|
+
default: U(() => [
|
|
735
|
+
h(d) ? (c(), _("div", H({
|
|
745
736
|
key: 0,
|
|
746
|
-
class: [
|
|
737
|
+
class: [A.value, h(a).class],
|
|
747
738
|
style: D.value
|
|
748
739
|
}, z.value), [
|
|
749
|
-
|
|
740
|
+
x("div", {
|
|
750
741
|
class: "vf-drawer__overlay",
|
|
751
742
|
"aria-hidden": "true",
|
|
752
743
|
onClick: L
|
|
753
744
|
}),
|
|
754
|
-
|
|
745
|
+
x("section", {
|
|
755
746
|
ref_key: "contentRef",
|
|
756
747
|
ref: r,
|
|
757
|
-
class:
|
|
758
|
-
"aria-labelledby":
|
|
748
|
+
class: R(y.value),
|
|
749
|
+
"aria-labelledby": s.value,
|
|
759
750
|
"aria-modal": "true",
|
|
760
751
|
role: "dialog",
|
|
761
752
|
tabindex: "-1"
|
|
762
753
|
}, [
|
|
763
|
-
t.title ||
|
|
764
|
-
|
|
765
|
-
B
|
|
766
|
-
t.title ? (c(),
|
|
754
|
+
t.title || B.$slots.header ? (c(), _("header", mt, [
|
|
755
|
+
x("div", null, [
|
|
756
|
+
C(B.$slots, "header", {}, () => [
|
|
757
|
+
t.title ? (c(), _("h2", {
|
|
767
758
|
key: 0,
|
|
768
|
-
id:
|
|
759
|
+
id: h(f),
|
|
769
760
|
class: "vf-drawer__title"
|
|
770
|
-
},
|
|
761
|
+
}, F(t.title), 9, ht)) : O("", !0)
|
|
771
762
|
])
|
|
772
763
|
]),
|
|
773
|
-
|
|
774
|
-
B
|
|
775
|
-
e.closable ? (c(),
|
|
764
|
+
x("div", _t, [
|
|
765
|
+
C(B.$slots, "actions", { close: E }),
|
|
766
|
+
e.closable ? (c(), j(Ie, {
|
|
776
767
|
key: 0,
|
|
777
|
-
icon:
|
|
768
|
+
icon: h(W).xmark,
|
|
778
769
|
"aria-label": "Close drawer",
|
|
779
770
|
size: "sm",
|
|
780
771
|
onClick: E
|
|
781
772
|
}, null, 8, ["icon"])) : O("", !0)
|
|
782
773
|
])
|
|
783
774
|
])) : O("", !0),
|
|
784
|
-
|
|
785
|
-
B
|
|
775
|
+
B.$slots.default ? (c(), _("div", yt, [
|
|
776
|
+
C(B.$slots, "default", { close: E })
|
|
786
777
|
])) : O("", !0),
|
|
787
|
-
|
|
788
|
-
B
|
|
778
|
+
B.$slots.footer ? (c(), _("footer", bt, [
|
|
779
|
+
C(B.$slots, "footer", { close: E })
|
|
789
780
|
])) : O("", !0)
|
|
790
|
-
], 10,
|
|
781
|
+
], 10, pt)
|
|
791
782
|
], 16)) : O("", !0)
|
|
792
783
|
]),
|
|
793
784
|
_: 3
|
|
794
785
|
})
|
|
795
786
|
], 8, ["to", "disabled"]));
|
|
796
787
|
}
|
|
797
|
-
}),
|
|
788
|
+
}), gt = {
|
|
798
789
|
key: 0,
|
|
799
790
|
class: "vf-dialog"
|
|
800
|
-
},
|
|
791
|
+
}, $t = ["aria-describedby", "aria-labelledby"], kt = {
|
|
801
792
|
key: 0,
|
|
802
793
|
class: "vf-dialog__header"
|
|
803
|
-
},
|
|
794
|
+
}, wt = ["id"], Tt = ["id"], Vt = { class: "vf-dialog__actions" }, xt = {
|
|
804
795
|
key: 1,
|
|
805
796
|
class: "vf-dialog__body"
|
|
806
|
-
},
|
|
797
|
+
}, Ct = {
|
|
807
798
|
key: 2,
|
|
808
799
|
class: "vf-dialog__footer"
|
|
809
|
-
},
|
|
800
|
+
}, Pn = /* @__PURE__ */ S({
|
|
810
801
|
__name: "VfDialog",
|
|
811
802
|
props: {
|
|
812
803
|
open: { type: Boolean, default: void 0 },
|
|
@@ -822,61 +813,61 @@ const at = {
|
|
|
822
813
|
},
|
|
823
814
|
emits: ["update:open", "openChange"],
|
|
824
815
|
setup(t, { emit: n }) {
|
|
825
|
-
const e = t, i = n, a = I(null), r = I(null), u =
|
|
816
|
+
const e = t, i = n, a = I(null), r = I(null), u = fe(), v = Q({ prefix: "vf-dialog-title" }), f = Q({ prefix: "vf-dialog-description" }), b = ce({
|
|
826
817
|
defaultOpen: e.defaultOpen,
|
|
827
|
-
open:
|
|
828
|
-
onOpenChange: (
|
|
829
|
-
i("update:open",
|
|
818
|
+
open: l(() => e.open),
|
|
819
|
+
onOpenChange: (s) => {
|
|
820
|
+
i("update:open", s), i("openChange", s);
|
|
830
821
|
}
|
|
831
|
-
}), d =
|
|
832
|
-
enter:
|
|
833
|
-
leave:
|
|
834
|
-
},
|
|
822
|
+
}), d = b.isOpen, T = {
|
|
823
|
+
enter: X.fast,
|
|
824
|
+
leave: X.fast
|
|
825
|
+
}, g = l(
|
|
835
826
|
() => e.disableTeleport || e.teleportTo === !1 || e.teleportTo === null
|
|
836
|
-
),
|
|
837
|
-
() =>
|
|
827
|
+
), V = l(() => typeof e.teleportTo == "string" || typeof HTMLElement < "u" && e.teleportTo instanceof HTMLElement ? e.teleportTo : "body"), A = l(
|
|
828
|
+
() => P(
|
|
838
829
|
"vf-dialog__content",
|
|
839
830
|
e.size !== "md" && `vf-dialog__content--${e.size}`
|
|
840
831
|
)
|
|
841
|
-
), D =
|
|
832
|
+
), D = l(() => !!u.header), z = l(() => !!u.description), k = l(
|
|
842
833
|
() => e.title || D.value ? v.value : void 0
|
|
843
|
-
), m =
|
|
834
|
+
), m = l(
|
|
844
835
|
() => e.description || z.value ? f.value : void 0
|
|
845
836
|
);
|
|
846
837
|
function o() {
|
|
847
|
-
|
|
838
|
+
b.close();
|
|
848
839
|
}
|
|
849
|
-
function
|
|
840
|
+
function y() {
|
|
850
841
|
e.closeOnOverlayClick && o();
|
|
851
842
|
}
|
|
852
843
|
function p() {
|
|
853
|
-
const
|
|
854
|
-
if (!
|
|
844
|
+
const s = a.value;
|
|
845
|
+
if (!s)
|
|
855
846
|
return;
|
|
856
|
-
const E =
|
|
847
|
+
const E = s.querySelector(
|
|
857
848
|
"[autofocus], [data-autofocus]"
|
|
858
849
|
);
|
|
859
850
|
if (E) {
|
|
860
851
|
E.focus();
|
|
861
852
|
return;
|
|
862
853
|
}
|
|
863
|
-
|
|
854
|
+
s.focus();
|
|
864
855
|
}
|
|
865
|
-
return
|
|
866
|
-
(
|
|
867
|
-
!e.closeOnEscape || !d.value || (
|
|
856
|
+
return ve(
|
|
857
|
+
(s) => {
|
|
858
|
+
!e.closeOnEscape || !d.value || (s.preventDefault(), o());
|
|
868
859
|
},
|
|
869
860
|
{
|
|
870
861
|
enabled: d
|
|
871
862
|
}
|
|
872
|
-
),
|
|
863
|
+
), Ae(a, {
|
|
873
864
|
enabled: d
|
|
874
|
-
}),
|
|
865
|
+
}), Ce(d), J(
|
|
875
866
|
d,
|
|
876
|
-
async (
|
|
867
|
+
async (s) => {
|
|
877
868
|
var E;
|
|
878
869
|
if (!(typeof document > "u")) {
|
|
879
|
-
if (
|
|
870
|
+
if (s) {
|
|
880
871
|
r.value = document.activeElement instanceof HTMLElement ? document.activeElement : null, await ne(), p();
|
|
881
872
|
return;
|
|
882
873
|
}
|
|
@@ -885,92 +876,92 @@ const at = {
|
|
|
885
876
|
},
|
|
886
877
|
{ immediate: !0 }
|
|
887
878
|
), te(() => {
|
|
888
|
-
var
|
|
889
|
-
d.value && ((
|
|
890
|
-
}), (
|
|
891
|
-
to:
|
|
892
|
-
disabled:
|
|
879
|
+
var s;
|
|
880
|
+
d.value && ((s = r.value) == null || s.focus());
|
|
881
|
+
}), (s, E) => (c(), j(ue, {
|
|
882
|
+
to: V.value,
|
|
883
|
+
disabled: g.value
|
|
893
884
|
}, [
|
|
894
|
-
|
|
885
|
+
q(oe, {
|
|
895
886
|
name: "vf-dialog-transition",
|
|
896
887
|
appear: "",
|
|
897
|
-
duration:
|
|
888
|
+
duration: T
|
|
898
889
|
}, {
|
|
899
|
-
default:
|
|
900
|
-
|
|
901
|
-
|
|
890
|
+
default: U(() => [
|
|
891
|
+
h(d) ? (c(), _("div", gt, [
|
|
892
|
+
x("div", {
|
|
902
893
|
class: "vf-dialog__overlay",
|
|
903
894
|
"aria-hidden": "true",
|
|
904
|
-
onClick:
|
|
895
|
+
onClick: y
|
|
905
896
|
}),
|
|
906
|
-
|
|
897
|
+
x("section", {
|
|
907
898
|
ref_key: "contentRef",
|
|
908
899
|
ref: a,
|
|
909
|
-
class:
|
|
900
|
+
class: R(A.value),
|
|
910
901
|
"aria-describedby": m.value,
|
|
911
|
-
"aria-labelledby":
|
|
902
|
+
"aria-labelledby": k.value,
|
|
912
903
|
"aria-modal": "true",
|
|
913
904
|
role: "dialog",
|
|
914
905
|
tabindex: "-1"
|
|
915
906
|
}, [
|
|
916
|
-
t.title || t.description ||
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
t.title ? (c(),
|
|
907
|
+
t.title || t.description || s.$slots.header || s.$slots.description ? (c(), _("header", kt, [
|
|
908
|
+
x("div", null, [
|
|
909
|
+
C(s.$slots, "header", {}, () => [
|
|
910
|
+
t.title ? (c(), _("h2", {
|
|
920
911
|
key: 0,
|
|
921
|
-
id:
|
|
912
|
+
id: h(v),
|
|
922
913
|
class: "vf-dialog__title"
|
|
923
|
-
},
|
|
914
|
+
}, F(t.title), 9, wt)) : O("", !0)
|
|
924
915
|
]),
|
|
925
|
-
|
|
926
|
-
t.description ? (c(),
|
|
916
|
+
C(s.$slots, "description", {}, () => [
|
|
917
|
+
t.description ? (c(), _("p", {
|
|
927
918
|
key: 0,
|
|
928
|
-
id:
|
|
919
|
+
id: h(f),
|
|
929
920
|
class: "vf-dialog__description"
|
|
930
|
-
},
|
|
921
|
+
}, F(t.description), 9, Tt)) : O("", !0)
|
|
931
922
|
])
|
|
932
923
|
]),
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
e.closable ? (c(),
|
|
924
|
+
x("div", Vt, [
|
|
925
|
+
C(s.$slots, "actions", { close: o }),
|
|
926
|
+
e.closable ? (c(), j(Ie, {
|
|
936
927
|
key: 0,
|
|
937
|
-
icon:
|
|
928
|
+
icon: h(W).xmark,
|
|
938
929
|
"aria-label": "Close dialog",
|
|
939
930
|
size: "sm",
|
|
940
931
|
onClick: o
|
|
941
932
|
}, null, 8, ["icon"])) : O("", !0)
|
|
942
933
|
])
|
|
943
934
|
])) : O("", !0),
|
|
944
|
-
|
|
945
|
-
|
|
935
|
+
s.$slots.default ? (c(), _("div", xt, [
|
|
936
|
+
C(s.$slots, "default", { close: o })
|
|
946
937
|
])) : O("", !0),
|
|
947
|
-
|
|
948
|
-
|
|
938
|
+
s.$slots.footer ? (c(), _("footer", Ct, [
|
|
939
|
+
C(s.$slots, "footer", { close: o })
|
|
949
940
|
])) : O("", !0)
|
|
950
|
-
], 10,
|
|
941
|
+
], 10, $t)
|
|
951
942
|
])) : O("", !0)
|
|
952
943
|
]),
|
|
953
944
|
_: 3
|
|
954
945
|
})
|
|
955
946
|
], 8, ["to", "disabled"]));
|
|
956
947
|
}
|
|
957
|
-
}),
|
|
948
|
+
}), Bt = ["aria-orientation", "role"], Nn = /* @__PURE__ */ S({
|
|
958
949
|
inheritAttrs: !1,
|
|
959
950
|
__name: "VfDivider",
|
|
960
951
|
props: {
|
|
961
952
|
orientation: { default: "horizontal" }
|
|
962
953
|
},
|
|
963
954
|
setup(t) {
|
|
964
|
-
const n = t, e =
|
|
965
|
-
() =>
|
|
955
|
+
const n = t, e = N(), i = l(() => n.orientation === "vertical"), a = l(
|
|
956
|
+
() => P("vf-divider", `vf-divider--${n.orientation}`)
|
|
966
957
|
);
|
|
967
|
-
return (r, u) => (c(),
|
|
958
|
+
return (r, u) => (c(), _("div", H({
|
|
968
959
|
class: a.value,
|
|
969
960
|
"aria-orientation": n.orientation,
|
|
970
961
|
role: i.value ? "separator" : void 0
|
|
971
|
-
},
|
|
962
|
+
}, h(e)), null, 16, Bt));
|
|
972
963
|
}
|
|
973
|
-
}),
|
|
964
|
+
}), Et = { class: "vf-dropdown" }, Ot = ["id", "aria-controls", "aria-expanded"], At = ["id", "aria-labelledby"], Hn = /* @__PURE__ */ S({
|
|
974
965
|
__name: "VfDropdown",
|
|
975
966
|
props: {
|
|
976
967
|
open: { type: Boolean, default: void 0 },
|
|
@@ -982,96 +973,96 @@ const at = {
|
|
|
982
973
|
},
|
|
983
974
|
emits: ["update:open", "openChange"],
|
|
984
975
|
setup(t, { emit: n }) {
|
|
985
|
-
const e = t, i = n, a = I(null), r = I(null), u = I(null), v = Q({ prefix: "vf-dropdown-menu" }), f = Q({ prefix: "vf-dropdown-trigger" }),
|
|
986
|
-
enter:
|
|
987
|
-
leave:
|
|
988
|
-
}, d =
|
|
976
|
+
const e = t, i = n, a = I(null), r = I(null), u = I(null), v = Q({ prefix: "vf-dropdown-menu" }), f = Q({ prefix: "vf-dropdown-trigger" }), b = {
|
|
977
|
+
enter: X.fast,
|
|
978
|
+
leave: X.fast
|
|
979
|
+
}, d = l(
|
|
989
980
|
() => e.disableTeleport || e.teleportTo === !1 || e.teleportTo === null
|
|
990
|
-
),
|
|
981
|
+
), T = l(() => typeof e.teleportTo == "string" || typeof HTMLElement < "u" && e.teleportTo instanceof HTMLElement ? e.teleportTo : "body"), g = ce({
|
|
991
982
|
defaultOpen: e.defaultOpen,
|
|
992
|
-
open:
|
|
993
|
-
onOpenChange: (
|
|
994
|
-
i("update:open",
|
|
983
|
+
open: l(() => e.open),
|
|
984
|
+
onOpenChange: ($) => {
|
|
985
|
+
i("update:open", $), i("openChange", $);
|
|
995
986
|
}
|
|
996
|
-
}),
|
|
987
|
+
}), V = g.isOpen, A = l(() => [
|
|
997
988
|
"vf-dropdown__menu",
|
|
998
989
|
o.value.startsWith("top") && "vf-dropdown__menu--top"
|
|
999
|
-
]), D =
|
|
1000
|
-
const
|
|
990
|
+
]), D = l(() => {
|
|
991
|
+
const $ = y.value.arrow;
|
|
1001
992
|
return {
|
|
1002
|
-
x: (
|
|
1003
|
-
y: (
|
|
993
|
+
x: ($ == null ? void 0 : $.x) !== void 0 && ($ == null ? void 0 : $.baseX) !== void 0 ? $.x - $.baseX : 0,
|
|
994
|
+
y: ($ == null ? void 0 : $.y) !== void 0 && ($ == null ? void 0 : $.baseY) !== void 0 ? $.y - $.baseY : 0
|
|
1004
995
|
};
|
|
1005
|
-
}), z =
|
|
996
|
+
}), z = l(() => ({
|
|
1006
997
|
left: `${D.value.x}px`,
|
|
1007
998
|
top: `${D.value.y}px`
|
|
1008
|
-
})),
|
|
999
|
+
})), k = l(() => [
|
|
1009
1000
|
"vf-dropdown__arrow",
|
|
1010
1001
|
o.value.startsWith("top") ? "vf-dropdown__arrow--top" : "vf-dropdown__arrow--bottom"
|
|
1011
|
-
]), m =
|
|
1002
|
+
]), m = l(
|
|
1012
1003
|
() => e.placement === "bottom-end" ? ["bottom-end", "top-end"] : ["bottom-start", "top-start"]
|
|
1013
1004
|
), {
|
|
1014
1005
|
placement: o,
|
|
1015
|
-
middlewareData:
|
|
1006
|
+
middlewareData: y,
|
|
1016
1007
|
styles: p
|
|
1017
|
-
} =
|
|
1018
|
-
enabled:
|
|
1019
|
-
placement:
|
|
1020
|
-
middleware:
|
|
1008
|
+
} = ye(a, r, {
|
|
1009
|
+
enabled: V,
|
|
1010
|
+
placement: l(() => e.placement),
|
|
1011
|
+
middleware: l(
|
|
1021
1012
|
() => [
|
|
1022
1013
|
pe(10),
|
|
1023
1014
|
me({ placements: m.value }),
|
|
1024
1015
|
he(),
|
|
1025
|
-
u.value ?
|
|
1026
|
-
].filter((
|
|
1016
|
+
u.value ? _e(u.value) : void 0
|
|
1017
|
+
].filter(($) => $ !== void 0)
|
|
1027
1018
|
),
|
|
1028
1019
|
strategy: "fixed"
|
|
1029
1020
|
});
|
|
1030
|
-
function
|
|
1031
|
-
var
|
|
1021
|
+
function s() {
|
|
1022
|
+
var $;
|
|
1032
1023
|
return Array.from(
|
|
1033
|
-
((
|
|
1024
|
+
(($ = r.value) == null ? void 0 : $.querySelectorAll('[role="menuitem"]')) ?? []
|
|
1034
1025
|
);
|
|
1035
1026
|
}
|
|
1036
1027
|
async function E() {
|
|
1037
|
-
var
|
|
1038
|
-
await ne(), (
|
|
1028
|
+
var $;
|
|
1029
|
+
await ne(), ($ = s()[0]) == null || $.focus();
|
|
1039
1030
|
}
|
|
1040
|
-
function L(
|
|
1041
|
-
|
|
1031
|
+
function L($ = {}) {
|
|
1032
|
+
g.open(), $.focusFirstItem && E();
|
|
1042
1033
|
}
|
|
1043
1034
|
function M() {
|
|
1044
|
-
var
|
|
1045
|
-
|
|
1035
|
+
var $;
|
|
1036
|
+
g.close(), ($ = a.value) == null || $.focus();
|
|
1046
1037
|
}
|
|
1047
|
-
function
|
|
1048
|
-
if (
|
|
1038
|
+
function B() {
|
|
1039
|
+
if (V.value) {
|
|
1049
1040
|
M();
|
|
1050
1041
|
return;
|
|
1051
1042
|
}
|
|
1052
1043
|
L();
|
|
1053
1044
|
}
|
|
1054
|
-
function
|
|
1055
|
-
(
|
|
1045
|
+
function w($) {
|
|
1046
|
+
($.key === "ArrowDown" || $.key === "Enter" || $.key === " ") && ($.preventDefault(), L({ focusFirstItem: !0 }));
|
|
1056
1047
|
}
|
|
1057
|
-
function Z(
|
|
1048
|
+
function Z($) {
|
|
1058
1049
|
var ge, $e, ke, we;
|
|
1059
|
-
const
|
|
1060
|
-
(
|
|
1050
|
+
const G = s(), be = G.findIndex(
|
|
1051
|
+
(Le) => Le === document.activeElement
|
|
1061
1052
|
);
|
|
1062
|
-
if (
|
|
1063
|
-
|
|
1053
|
+
if ($.key === "ArrowDown") {
|
|
1054
|
+
$.preventDefault(), (ge = G[(be + 1 + G.length) % G.length]) == null || ge.focus();
|
|
1064
1055
|
return;
|
|
1065
1056
|
}
|
|
1066
|
-
if (
|
|
1067
|
-
|
|
1057
|
+
if ($.key === "ArrowUp") {
|
|
1058
|
+
$.preventDefault(), ($e = G[(be - 1 + G.length) % G.length]) == null || $e.focus();
|
|
1068
1059
|
return;
|
|
1069
1060
|
}
|
|
1070
|
-
if (
|
|
1071
|
-
|
|
1061
|
+
if ($.key === "Home") {
|
|
1062
|
+
$.preventDefault(), (ke = G[0]) == null || ke.focus();
|
|
1072
1063
|
return;
|
|
1073
1064
|
}
|
|
1074
|
-
|
|
1065
|
+
$.key === "End" && ($.preventDefault(), (we = G[G.length - 1]) == null || we.focus());
|
|
1075
1066
|
}
|
|
1076
1067
|
function de() {
|
|
1077
1068
|
e.closeOnSelect && M();
|
|
@@ -1079,78 +1070,94 @@ const at = {
|
|
|
1079
1070
|
return Oe(
|
|
1080
1071
|
[a, r],
|
|
1081
1072
|
() => {
|
|
1082
|
-
|
|
1073
|
+
V.value && M();
|
|
1083
1074
|
},
|
|
1084
1075
|
{
|
|
1085
|
-
enabled:
|
|
1076
|
+
enabled: V,
|
|
1086
1077
|
event: "click"
|
|
1087
1078
|
}
|
|
1088
|
-
),
|
|
1089
|
-
(
|
|
1090
|
-
|
|
1079
|
+
), ve(
|
|
1080
|
+
($) => {
|
|
1081
|
+
V.value && ($.preventDefault(), M());
|
|
1091
1082
|
},
|
|
1092
1083
|
{
|
|
1093
|
-
enabled:
|
|
1084
|
+
enabled: V
|
|
1094
1085
|
}
|
|
1095
|
-
), (
|
|
1096
|
-
|
|
1097
|
-
id:
|
|
1086
|
+
), ($, G) => (c(), _("div", Et, [
|
|
1087
|
+
x("div", {
|
|
1088
|
+
id: h(f),
|
|
1098
1089
|
ref_key: "triggerRef",
|
|
1099
1090
|
ref: a,
|
|
1100
1091
|
class: "vf-dropdown__trigger",
|
|
1101
|
-
"aria-controls":
|
|
1102
|
-
"aria-expanded":
|
|
1092
|
+
"aria-controls": h(v),
|
|
1093
|
+
"aria-expanded": h(V),
|
|
1103
1094
|
"aria-haspopup": "menu",
|
|
1104
1095
|
tabindex: "0",
|
|
1105
|
-
onClick:
|
|
1106
|
-
onKeydown:
|
|
1096
|
+
onClick: B,
|
|
1097
|
+
onKeydown: w
|
|
1107
1098
|
}, [
|
|
1108
|
-
|
|
1109
|
-
open:
|
|
1110
|
-
toggle:
|
|
1099
|
+
C($.$slots, "trigger", {
|
|
1100
|
+
open: h(V),
|
|
1101
|
+
toggle: B
|
|
1111
1102
|
})
|
|
1112
|
-
], 40,
|
|
1113
|
-
(c(),
|
|
1114
|
-
to:
|
|
1103
|
+
], 40, Ot),
|
|
1104
|
+
(c(), j(ue, {
|
|
1105
|
+
to: T.value,
|
|
1115
1106
|
disabled: d.value
|
|
1116
1107
|
}, [
|
|
1117
|
-
|
|
1108
|
+
q(oe, {
|
|
1118
1109
|
name: "vf-floating-transition",
|
|
1119
1110
|
appear: "",
|
|
1120
|
-
duration:
|
|
1111
|
+
duration: b
|
|
1121
1112
|
}, {
|
|
1122
|
-
default:
|
|
1123
|
-
|
|
1113
|
+
default: U(() => [
|
|
1114
|
+
h(V) ? (c(), _("div", {
|
|
1124
1115
|
key: 0,
|
|
1125
|
-
id:
|
|
1116
|
+
id: h(v),
|
|
1126
1117
|
ref_key: "menuRef",
|
|
1127
1118
|
ref: r,
|
|
1128
|
-
class:
|
|
1129
|
-
style:
|
|
1130
|
-
"aria-labelledby":
|
|
1119
|
+
class: R(A.value),
|
|
1120
|
+
style: Y(h(p)),
|
|
1121
|
+
"aria-labelledby": h(f),
|
|
1131
1122
|
role: "menu",
|
|
1132
1123
|
onClick: de,
|
|
1133
1124
|
onKeydown: Z
|
|
1134
1125
|
}, [
|
|
1135
|
-
|
|
1126
|
+
x("span", {
|
|
1136
1127
|
ref_key: "arrowRef",
|
|
1137
1128
|
ref: u,
|
|
1138
|
-
class:
|
|
1139
|
-
style:
|
|
1129
|
+
class: R(k.value),
|
|
1130
|
+
style: Y(z.value),
|
|
1140
1131
|
"aria-hidden": "true"
|
|
1141
1132
|
}, null, 6),
|
|
1142
|
-
|
|
1133
|
+
C($.$slots, "default", {
|
|
1143
1134
|
close: M,
|
|
1144
|
-
open:
|
|
1135
|
+
open: h(V)
|
|
1145
1136
|
})
|
|
1146
|
-
], 46,
|
|
1137
|
+
], 46, At)) : O("", !0)
|
|
1147
1138
|
]),
|
|
1148
1139
|
_: 3
|
|
1149
1140
|
})
|
|
1150
1141
|
], 8, ["to", "disabled"]))
|
|
1151
1142
|
]));
|
|
1152
1143
|
}
|
|
1153
|
-
}),
|
|
1144
|
+
}), Rn = /* @__PURE__ */ S({
|
|
1145
|
+
inheritAttrs: !1,
|
|
1146
|
+
__name: "VfHeading",
|
|
1147
|
+
props: {
|
|
1148
|
+
as: { default: "h2" },
|
|
1149
|
+
size: { default: "md" }
|
|
1150
|
+
},
|
|
1151
|
+
setup(t) {
|
|
1152
|
+
const n = t, e = N(), i = l(() => P("vf-heading", `vf-heading--${n.size}`));
|
|
1153
|
+
return (a, r) => (c(), j(ae(n.as), H({ class: i.value }, h(e)), {
|
|
1154
|
+
default: U(() => [
|
|
1155
|
+
C(a.$slots, "default")
|
|
1156
|
+
]),
|
|
1157
|
+
_: 3
|
|
1158
|
+
}, 16, ["class"]));
|
|
1159
|
+
}
|
|
1160
|
+
}), It = ["value", "aria-invalid"], Fn = /* @__PURE__ */ S({
|
|
1154
1161
|
inheritAttrs: !1,
|
|
1155
1162
|
__name: "VfInput",
|
|
1156
1163
|
props: {
|
|
@@ -1160,8 +1167,8 @@ const at = {
|
|
|
1160
1167
|
},
|
|
1161
1168
|
emits: ["update:modelValue"],
|
|
1162
1169
|
setup(t, { emit: n }) {
|
|
1163
|
-
const e = t, i = n, a =
|
|
1164
|
-
() =>
|
|
1170
|
+
const e = t, i = n, a = N(), r = l(
|
|
1171
|
+
() => P(
|
|
1165
1172
|
"vf-input",
|
|
1166
1173
|
e.size !== "md" && `vf-input--${e.size}`,
|
|
1167
1174
|
e.invalid && "vf-input--invalid"
|
|
@@ -1170,13 +1177,13 @@ const at = {
|
|
|
1170
1177
|
function u(v) {
|
|
1171
1178
|
i("update:modelValue", v.target.value);
|
|
1172
1179
|
}
|
|
1173
|
-
return (v, f) => (c(),
|
|
1180
|
+
return (v, f) => (c(), _("input", H({
|
|
1174
1181
|
class: r.value,
|
|
1175
1182
|
value: e.modelValue,
|
|
1176
1183
|
"aria-invalid": e.invalid || void 0
|
|
1177
|
-
},
|
|
1184
|
+
}, h(a), { onInput: u }), null, 16, It));
|
|
1178
1185
|
}
|
|
1179
|
-
}), Kn = /* @__PURE__ */
|
|
1186
|
+
}), Kn = /* @__PURE__ */ S({
|
|
1180
1187
|
inheritAttrs: !1,
|
|
1181
1188
|
__name: "VfLink",
|
|
1182
1189
|
props: {
|
|
@@ -1189,13 +1196,13 @@ const at = {
|
|
|
1189
1196
|
component: { default: void 0 }
|
|
1190
1197
|
},
|
|
1191
1198
|
setup(t) {
|
|
1192
|
-
const n = t, e =
|
|
1193
|
-
() =>
|
|
1199
|
+
const n = t, e = N(), i = l(() => n.to !== void 0), a = l(() => i.value ? n.component ?? ae("RouterLink") : "a"), r = l(() => n.rel ? n.rel : n.target === "_blank" ? "noopener noreferrer" : void 0), u = l(
|
|
1200
|
+
() => P(
|
|
1194
1201
|
"vf-link",
|
|
1195
1202
|
n.underline && "vf-link--underline",
|
|
1196
1203
|
n.tone === "muted" && "vf-link--muted"
|
|
1197
1204
|
)
|
|
1198
|
-
), v =
|
|
1205
|
+
), v = l(() => i.value ? {
|
|
1199
1206
|
to: n.to,
|
|
1200
1207
|
target: n.target,
|
|
1201
1208
|
rel: r.value
|
|
@@ -1203,34 +1210,34 @@ const at = {
|
|
|
1203
1210
|
href: n.href,
|
|
1204
1211
|
target: n.target,
|
|
1205
1212
|
rel: r.value
|
|
1206
|
-
}), f =
|
|
1213
|
+
}), f = l(() => ({
|
|
1207
1214
|
...e,
|
|
1208
1215
|
...v.value,
|
|
1209
1216
|
class: u.value
|
|
1210
1217
|
}));
|
|
1211
|
-
return (
|
|
1212
|
-
default:
|
|
1213
|
-
|
|
1218
|
+
return (b, d) => (c(), j(ae(a.value), Ve(xe(f.value)), {
|
|
1219
|
+
default: U(() => [
|
|
1220
|
+
C(b.$slots, "default")
|
|
1214
1221
|
]),
|
|
1215
1222
|
_: 3
|
|
1216
1223
|
}, 16));
|
|
1217
1224
|
}
|
|
1218
|
-
}),
|
|
1225
|
+
}), Lt = { class: "vf-nav-menu__node" }, St = { class: "vf-nav-menu__item-content" }, Dt = { class: "vf-nav-menu__group-label" }, zt = ["aria-expanded", "disabled"], Mt = { class: "vf-nav-menu__item-content" }, Pt = {
|
|
1219
1226
|
key: 0,
|
|
1220
1227
|
class: "vf-nav-menu__leading-icon",
|
|
1221
1228
|
"aria-hidden": "true"
|
|
1222
|
-
},
|
|
1229
|
+
}, Nt = { class: "vf-nav-menu__label" }, Ht = { class: "vf-nav-menu__item-content" }, Rt = {
|
|
1223
1230
|
key: 0,
|
|
1224
1231
|
class: "vf-nav-menu__leading-icon",
|
|
1225
1232
|
"aria-hidden": "true"
|
|
1226
|
-
},
|
|
1233
|
+
}, Ft = { class: "vf-nav-menu__label" }, Kt = ["aria-current", "disabled"], jt = { class: "vf-nav-menu__item-content" }, qt = {
|
|
1227
1234
|
key: 0,
|
|
1228
1235
|
class: "vf-nav-menu__leading-icon",
|
|
1229
1236
|
"aria-hidden": "true"
|
|
1230
|
-
},
|
|
1237
|
+
}, Ut = { class: "vf-nav-menu__label" }, Wt = {
|
|
1231
1238
|
key: 4,
|
|
1232
1239
|
class: "vf-nav-menu__list vf-nav-menu__list--nested"
|
|
1233
|
-
},
|
|
1240
|
+
}, Yt = { class: "vf-nav-menu__list vf-nav-menu__list--nested" }, Xt = /* @__PURE__ */ S({
|
|
1234
1241
|
name: "VfNavMenuItemNode",
|
|
1235
1242
|
__name: "VfNavMenuItemNode",
|
|
1236
1243
|
props: {
|
|
@@ -1242,14 +1249,14 @@ const at = {
|
|
|
1242
1249
|
},
|
|
1243
1250
|
emits: ["toggle", "select"],
|
|
1244
1251
|
setup(t, { emit: n }) {
|
|
1245
|
-
const e = t, i = n, a =
|
|
1252
|
+
const e = t, i = n, a = l(() => {
|
|
1246
1253
|
var p;
|
|
1247
1254
|
return !!((p = e.item.children) != null && p.length);
|
|
1248
|
-
}), r =
|
|
1255
|
+
}), r = l(() => e.item.kind === "group"), u = l(
|
|
1249
1256
|
() => e.expandedValues.includes(e.item.value)
|
|
1250
|
-
), v =
|
|
1257
|
+
), v = l(() => e.activeValue === e.item.value), f = l(
|
|
1251
1258
|
() => e.item.href !== void 0 || e.item.to !== void 0
|
|
1252
|
-
),
|
|
1259
|
+
), b = l(() => e.item.to !== void 0 ? ae("RouterLink") : "a"), d = l(() => e.item.rel ? e.item.rel : e.item.target === "_blank" ? "noopener noreferrer" : void 0), T = l(() => e.item.to !== void 0 ? {
|
|
1253
1260
|
to: e.item.to,
|
|
1254
1261
|
target: e.item.target,
|
|
1255
1262
|
rel: d.value
|
|
@@ -1258,94 +1265,94 @@ const at = {
|
|
|
1258
1265
|
target: e.item.target,
|
|
1259
1266
|
rel: d.value
|
|
1260
1267
|
});
|
|
1261
|
-
function
|
|
1268
|
+
function g() {
|
|
1262
1269
|
e.item.disabled || i("toggle", {
|
|
1263
1270
|
value: e.item.value,
|
|
1264
1271
|
parentPath: e.parentPath
|
|
1265
1272
|
});
|
|
1266
1273
|
}
|
|
1267
|
-
function
|
|
1274
|
+
function V(p) {
|
|
1268
1275
|
if (e.item.disabled) {
|
|
1269
1276
|
p == null || p.preventDefault();
|
|
1270
1277
|
return;
|
|
1271
1278
|
}
|
|
1272
1279
|
i("select", e.item);
|
|
1273
1280
|
}
|
|
1274
|
-
function
|
|
1275
|
-
const
|
|
1276
|
-
return
|
|
1281
|
+
function A(p) {
|
|
1282
|
+
const s = p;
|
|
1283
|
+
return s.style.transition = "height var(--vf-motion-duration-normal) var(--vf-motion-ease-standard), opacity var(--vf-motion-duration-normal) var(--vf-motion-ease-standard)", s;
|
|
1277
1284
|
}
|
|
1278
1285
|
function D(p) {
|
|
1279
|
-
const
|
|
1280
|
-
|
|
1286
|
+
const s = A(p);
|
|
1287
|
+
s.style.overflow = "hidden", s.style.height = "0", s.style.opacity = "0";
|
|
1281
1288
|
}
|
|
1282
1289
|
function z(p) {
|
|
1283
|
-
const
|
|
1290
|
+
const s = A(p);
|
|
1284
1291
|
requestAnimationFrame(() => {
|
|
1285
|
-
|
|
1292
|
+
s.style.height = `${s.scrollHeight}px`, s.style.opacity = "1";
|
|
1286
1293
|
});
|
|
1287
1294
|
}
|
|
1288
|
-
function
|
|
1289
|
-
const
|
|
1290
|
-
|
|
1295
|
+
function k(p) {
|
|
1296
|
+
const s = p;
|
|
1297
|
+
s.style.transition = "", s.style.overflow = "", s.style.height = "", s.style.opacity = "";
|
|
1291
1298
|
}
|
|
1292
1299
|
function m(p) {
|
|
1293
|
-
const
|
|
1294
|
-
|
|
1300
|
+
const s = A(p);
|
|
1301
|
+
s.style.overflow = "hidden", s.style.height = `${s.scrollHeight}px`, s.style.opacity = "1";
|
|
1295
1302
|
}
|
|
1296
1303
|
function o(p) {
|
|
1297
|
-
const
|
|
1298
|
-
|
|
1299
|
-
|
|
1304
|
+
const s = p;
|
|
1305
|
+
s.offsetHeight, requestAnimationFrame(() => {
|
|
1306
|
+
s.style.height = "0", s.style.opacity = "0";
|
|
1300
1307
|
});
|
|
1301
1308
|
}
|
|
1302
|
-
function
|
|
1303
|
-
const
|
|
1304
|
-
|
|
1309
|
+
function y(p) {
|
|
1310
|
+
const s = p;
|
|
1311
|
+
s.style.transition = "", s.style.overflow = "", s.style.height = "", s.style.opacity = "";
|
|
1305
1312
|
}
|
|
1306
|
-
return (p,
|
|
1307
|
-
const E =
|
|
1308
|
-
return c(),
|
|
1309
|
-
r.value ? (c(),
|
|
1313
|
+
return (p, s) => {
|
|
1314
|
+
const E = Pe("VfNavMenuItemNode", !0);
|
|
1315
|
+
return c(), _("li", Lt, [
|
|
1316
|
+
r.value ? (c(), _("div", {
|
|
1310
1317
|
key: 0,
|
|
1311
|
-
class:
|
|
1312
|
-
style:
|
|
1318
|
+
class: R(["vf-nav-menu__group", `vf-nav-menu__group--level-${t.level}`]),
|
|
1319
|
+
style: Y({ "--vf-nav-menu-level": String(t.level) })
|
|
1313
1320
|
}, [
|
|
1314
|
-
|
|
1315
|
-
|
|
1321
|
+
x("span", St, [
|
|
1322
|
+
x("span", Dt, F(t.item.label), 1)
|
|
1316
1323
|
])
|
|
1317
|
-
], 6)) : a.value ? (c(),
|
|
1324
|
+
], 6)) : a.value ? (c(), _("button", {
|
|
1318
1325
|
key: 1,
|
|
1319
|
-
class:
|
|
1326
|
+
class: R([
|
|
1320
1327
|
"vf-nav-menu__item",
|
|
1321
1328
|
"vf-nav-menu__item--branch",
|
|
1322
1329
|
u.value && "vf-nav-menu__item--expanded"
|
|
1323
1330
|
]),
|
|
1324
|
-
style:
|
|
1331
|
+
style: Y({ "--vf-nav-menu-level": String(t.level) }),
|
|
1325
1332
|
"aria-expanded": u.value,
|
|
1326
1333
|
disabled: t.item.disabled,
|
|
1327
1334
|
type: "button",
|
|
1328
|
-
onClick:
|
|
1335
|
+
onClick: g
|
|
1329
1336
|
}, [
|
|
1330
|
-
|
|
1331
|
-
t.item.leadingIcon ? (c(),
|
|
1332
|
-
|
|
1337
|
+
x("span", Mt, [
|
|
1338
|
+
t.item.leadingIcon ? (c(), _("span", Pt, [
|
|
1339
|
+
q(h(ee), {
|
|
1333
1340
|
icon: t.item.leadingIcon,
|
|
1334
1341
|
size: "1rem"
|
|
1335
1342
|
}, null, 8, ["icon"])
|
|
1336
1343
|
])) : O("", !0),
|
|
1337
|
-
|
|
1344
|
+
x("span", Nt, F(t.item.label), 1)
|
|
1338
1345
|
]),
|
|
1339
|
-
|
|
1340
|
-
class:
|
|
1346
|
+
x("span", {
|
|
1347
|
+
class: R(["vf-nav-menu__icon", u.value && "vf-nav-menu__icon--open"]),
|
|
1341
1348
|
"aria-hidden": "true"
|
|
1342
1349
|
}, [
|
|
1343
|
-
|
|
1344
|
-
icon:
|
|
1350
|
+
q(h(ee), {
|
|
1351
|
+
icon: h(W).chevronDown,
|
|
1345
1352
|
size: "0.875rem"
|
|
1346
1353
|
}, null, 8, ["icon"])
|
|
1347
1354
|
], 2)
|
|
1348
|
-
], 14,
|
|
1355
|
+
], 14, zt)) : f.value ? (c(), j(ae(b.value), H({ key: 2 }, T.value, {
|
|
1349
1356
|
class: [
|
|
1350
1357
|
"vf-nav-menu__item",
|
|
1351
1358
|
v.value && "vf-nav-menu__item--active",
|
|
@@ -1353,81 +1360,81 @@ const at = {
|
|
|
1353
1360
|
],
|
|
1354
1361
|
style: { "--vf-nav-menu-level": String(t.level) },
|
|
1355
1362
|
"aria-current": v.value ? "page" : void 0,
|
|
1356
|
-
onClick:
|
|
1363
|
+
onClick: V
|
|
1357
1364
|
}), {
|
|
1358
|
-
default:
|
|
1359
|
-
|
|
1360
|
-
t.item.leadingIcon ? (c(),
|
|
1361
|
-
|
|
1365
|
+
default: U(() => [
|
|
1366
|
+
x("span", Ht, [
|
|
1367
|
+
t.item.leadingIcon ? (c(), _("span", Rt, [
|
|
1368
|
+
q(h(ee), {
|
|
1362
1369
|
icon: t.item.leadingIcon,
|
|
1363
1370
|
size: "1rem"
|
|
1364
1371
|
}, null, 8, ["icon"])
|
|
1365
1372
|
])) : O("", !0),
|
|
1366
|
-
|
|
1373
|
+
x("span", Ft, F(t.item.label), 1)
|
|
1367
1374
|
])
|
|
1368
1375
|
]),
|
|
1369
1376
|
_: 1
|
|
1370
|
-
}, 16, ["class", "style", "aria-current"])) : (c(),
|
|
1377
|
+
}, 16, ["class", "style", "aria-current"])) : (c(), _("button", {
|
|
1371
1378
|
key: 3,
|
|
1372
|
-
class:
|
|
1379
|
+
class: R([
|
|
1373
1380
|
"vf-nav-menu__item",
|
|
1374
1381
|
v.value && "vf-nav-menu__item--active",
|
|
1375
1382
|
t.item.disabled && "vf-nav-menu__item--disabled"
|
|
1376
1383
|
]),
|
|
1377
|
-
style:
|
|
1384
|
+
style: Y({ "--vf-nav-menu-level": String(t.level) }),
|
|
1378
1385
|
"aria-current": v.value ? "page" : void 0,
|
|
1379
1386
|
disabled: t.item.disabled,
|
|
1380
1387
|
type: "button",
|
|
1381
|
-
onClick:
|
|
1388
|
+
onClick: s[0] || (s[0] = (L) => V())
|
|
1382
1389
|
}, [
|
|
1383
|
-
|
|
1384
|
-
t.item.leadingIcon ? (c(),
|
|
1385
|
-
|
|
1390
|
+
x("span", jt, [
|
|
1391
|
+
t.item.leadingIcon ? (c(), _("span", qt, [
|
|
1392
|
+
q(h(ee), {
|
|
1386
1393
|
icon: t.item.leadingIcon,
|
|
1387
1394
|
size: "1rem"
|
|
1388
1395
|
}, null, 8, ["icon"])
|
|
1389
1396
|
])) : O("", !0),
|
|
1390
|
-
|
|
1397
|
+
x("span", Ut, F(t.item.label), 1)
|
|
1391
1398
|
])
|
|
1392
|
-
], 14,
|
|
1393
|
-
a.value && r.value ? (c(),
|
|
1394
|
-
(c(!0),
|
|
1399
|
+
], 14, Kt)),
|
|
1400
|
+
a.value && r.value ? (c(), _("ul", Wt, [
|
|
1401
|
+
(c(!0), _(se, null, ie(t.item.children, (L) => (c(), j(E, {
|
|
1395
1402
|
key: L.value,
|
|
1396
1403
|
item: L,
|
|
1397
1404
|
level: t.level + 1,
|
|
1398
1405
|
"parent-path": [...t.parentPath, t.item.value],
|
|
1399
1406
|
"active-value": t.activeValue,
|
|
1400
1407
|
"expanded-values": t.expandedValues,
|
|
1401
|
-
onToggle:
|
|
1402
|
-
onSelect:
|
|
1408
|
+
onToggle: s[1] || (s[1] = (M) => i("toggle", M)),
|
|
1409
|
+
onSelect: s[2] || (s[2] = (M) => i("select", M))
|
|
1403
1410
|
}, null, 8, ["item", "level", "parent-path", "active-value", "expanded-values"]))), 128))
|
|
1404
|
-
])) : a.value ? (c(),
|
|
1411
|
+
])) : a.value ? (c(), j(oe, {
|
|
1405
1412
|
key: 5,
|
|
1406
1413
|
onBeforeEnter: D,
|
|
1407
1414
|
onEnter: z,
|
|
1408
|
-
onAfterEnter:
|
|
1415
|
+
onAfterEnter: k,
|
|
1409
1416
|
onBeforeLeave: m,
|
|
1410
1417
|
onLeave: o,
|
|
1411
|
-
onAfterLeave:
|
|
1418
|
+
onAfterLeave: y
|
|
1412
1419
|
}, {
|
|
1413
|
-
default:
|
|
1414
|
-
u.value ? (c(),
|
|
1420
|
+
default: U(() => [
|
|
1421
|
+
u.value ? (c(), _("div", {
|
|
1415
1422
|
key: 0,
|
|
1416
|
-
class:
|
|
1423
|
+
class: R([
|
|
1417
1424
|
"vf-nav-menu__collapse",
|
|
1418
1425
|
`vf-nav-menu__collapse--level-${t.level}`
|
|
1419
1426
|
])
|
|
1420
1427
|
}, [
|
|
1421
|
-
|
|
1422
|
-
(c(!0),
|
|
1428
|
+
x("ul", Yt, [
|
|
1429
|
+
(c(!0), _(se, null, ie(t.item.children, (L) => (c(), j(E, {
|
|
1423
1430
|
key: L.value,
|
|
1424
1431
|
item: L,
|
|
1425
1432
|
level: t.level + 1,
|
|
1426
1433
|
"parent-path": [...t.parentPath, t.item.value],
|
|
1427
1434
|
"active-value": t.activeValue,
|
|
1428
1435
|
"expanded-values": t.expandedValues,
|
|
1429
|
-
onToggle:
|
|
1430
|
-
onSelect:
|
|
1436
|
+
onToggle: s[3] || (s[3] = (M) => i("toggle", M)),
|
|
1437
|
+
onSelect: s[4] || (s[4] = (M) => i("select", M))
|
|
1431
1438
|
}, null, 8, ["item", "level", "parent-path", "active-value", "expanded-values"]))), 128))
|
|
1432
1439
|
])
|
|
1433
1440
|
], 2)) : O("", !0)
|
|
@@ -1437,7 +1444,7 @@ const at = {
|
|
|
1437
1444
|
]);
|
|
1438
1445
|
};
|
|
1439
1446
|
}
|
|
1440
|
-
}),
|
|
1447
|
+
}), Gt = ["aria-label"], Qt = { class: "vf-nav-menu__list" }, jn = /* @__PURE__ */ S({
|
|
1441
1448
|
__name: "VfNavMenu",
|
|
1442
1449
|
props: {
|
|
1443
1450
|
items: {},
|
|
@@ -1448,33 +1455,33 @@ const at = {
|
|
|
1448
1455
|
},
|
|
1449
1456
|
emits: ["update:modelValue", "change", "select"],
|
|
1450
1457
|
setup(t, { emit: n }) {
|
|
1451
|
-
const e = t, i = n, a = I(e.defaultValue), r =
|
|
1452
|
-
function v(o,
|
|
1458
|
+
const e = t, i = n, a = I(e.defaultValue), r = l(() => e.modelValue ?? a.value), u = I([]);
|
|
1459
|
+
function v(o, y) {
|
|
1453
1460
|
return o.some(
|
|
1454
1461
|
(p) => {
|
|
1455
|
-
var
|
|
1456
|
-
return
|
|
1462
|
+
var s;
|
|
1463
|
+
return y(p) || ((s = p.children) != null && s.length ? v(p.children, y) : !1);
|
|
1457
1464
|
}
|
|
1458
1465
|
);
|
|
1459
1466
|
}
|
|
1460
|
-
const f =
|
|
1467
|
+
const f = l(
|
|
1461
1468
|
() => v(e.items, (o) => o.kind === "group")
|
|
1462
|
-
),
|
|
1469
|
+
), b = l(
|
|
1463
1470
|
() => v(e.items, (o) => !!o.leadingIcon)
|
|
1464
|
-
), d =
|
|
1465
|
-
function
|
|
1466
|
-
var
|
|
1467
|
-
return o.kind !== "group" && !!((
|
|
1468
|
-
}
|
|
1469
|
-
function
|
|
1470
|
-
var
|
|
1471
|
-
if (!
|
|
1471
|
+
), d = l(() => !f.value && !b.value);
|
|
1472
|
+
function T(o) {
|
|
1473
|
+
var y;
|
|
1474
|
+
return o.kind !== "group" && !!((y = o.children) != null && y.length);
|
|
1475
|
+
}
|
|
1476
|
+
function g(o, y, p = []) {
|
|
1477
|
+
var s;
|
|
1478
|
+
if (!y)
|
|
1472
1479
|
return [];
|
|
1473
1480
|
for (const E of o) {
|
|
1474
|
-
if (E.value ===
|
|
1481
|
+
if (E.value === y)
|
|
1475
1482
|
return p;
|
|
1476
|
-
if ((
|
|
1477
|
-
const L =
|
|
1483
|
+
if ((s = E.children) != null && s.length) {
|
|
1484
|
+
const L = g(E.children, y, [
|
|
1478
1485
|
...p,
|
|
1479
1486
|
E.value
|
|
1480
1487
|
]);
|
|
@@ -1484,65 +1491,65 @@ const at = {
|
|
|
1484
1491
|
}
|
|
1485
1492
|
return [];
|
|
1486
1493
|
}
|
|
1487
|
-
function
|
|
1488
|
-
const o =
|
|
1494
|
+
function V() {
|
|
1495
|
+
const o = g(e.items, r.value);
|
|
1489
1496
|
u.value = Array.from(
|
|
1490
1497
|
/* @__PURE__ */ new Set([...u.value, ...o])
|
|
1491
1498
|
);
|
|
1492
1499
|
}
|
|
1493
|
-
function
|
|
1500
|
+
function A(o, y) {
|
|
1494
1501
|
var L;
|
|
1495
|
-
if (!
|
|
1502
|
+
if (!y.length)
|
|
1496
1503
|
return o;
|
|
1497
|
-
const [p, ...
|
|
1498
|
-
return (L = E == null ? void 0 : E.children) != null && L.length ?
|
|
1504
|
+
const [p, ...s] = y, E = o.find((M) => M.value === p);
|
|
1505
|
+
return (L = E == null ? void 0 : E.children) != null && L.length ? A(E.children, s) : [];
|
|
1499
1506
|
}
|
|
1500
1507
|
function D(o) {
|
|
1501
|
-
return o.flatMap((
|
|
1502
|
-
var
|
|
1503
|
-
const p = (
|
|
1504
|
-
return
|
|
1508
|
+
return o.flatMap((y) => {
|
|
1509
|
+
var s;
|
|
1510
|
+
const p = (s = y.children) != null && s.length ? D(y.children) : [];
|
|
1511
|
+
return T(y) ? [y.value, ...p] : p;
|
|
1505
1512
|
});
|
|
1506
1513
|
}
|
|
1507
1514
|
function z(o) {
|
|
1508
1515
|
e.modelValue === void 0 && (a.value = o), i("update:modelValue", o), i("change", o);
|
|
1509
1516
|
}
|
|
1510
|
-
function
|
|
1517
|
+
function k(o) {
|
|
1511
1518
|
z(o.value), u.value = Array.from(
|
|
1512
1519
|
/* @__PURE__ */ new Set([
|
|
1513
1520
|
...u.value,
|
|
1514
|
-
...
|
|
1521
|
+
...g(e.items, o.value)
|
|
1515
1522
|
])
|
|
1516
1523
|
), i("select", o);
|
|
1517
1524
|
}
|
|
1518
1525
|
function m(o) {
|
|
1519
|
-
const { value:
|
|
1520
|
-
if (u.value.includes(
|
|
1526
|
+
const { value: y, parentPath: p } = o;
|
|
1527
|
+
if (u.value.includes(y)) {
|
|
1521
1528
|
u.value = u.value.filter(
|
|
1522
|
-
(
|
|
1529
|
+
(s) => s !== y
|
|
1523
1530
|
);
|
|
1524
1531
|
return;
|
|
1525
1532
|
}
|
|
1526
1533
|
if (e.expandMode === "single") {
|
|
1527
|
-
const E =
|
|
1534
|
+
const E = A(e.items, p).filter((L) => L.value !== y && T(L)).flatMap((L) => D([L]));
|
|
1528
1535
|
u.value = u.value.filter(
|
|
1529
1536
|
(L) => !E.includes(L)
|
|
1530
1537
|
);
|
|
1531
1538
|
}
|
|
1532
|
-
u.value = [...u.value,
|
|
1539
|
+
u.value = [...u.value, y];
|
|
1533
1540
|
}
|
|
1534
1541
|
return J(
|
|
1535
1542
|
() => [e.items, r.value],
|
|
1536
1543
|
() => {
|
|
1537
|
-
|
|
1544
|
+
V();
|
|
1538
1545
|
},
|
|
1539
1546
|
{ immediate: !0, deep: !0 }
|
|
1540
|
-
), (o,
|
|
1541
|
-
class:
|
|
1547
|
+
), (o, y) => (c(), _("nav", {
|
|
1548
|
+
class: R(["vf-nav-menu", d.value && "vf-nav-menu--simple"]),
|
|
1542
1549
|
"aria-label": t.ariaLabel
|
|
1543
1550
|
}, [
|
|
1544
|
-
|
|
1545
|
-
(c(!0),
|
|
1551
|
+
x("ul", Qt, [
|
|
1552
|
+
(c(!0), _(se, null, ie(t.items, (p) => (c(), j(Xt, {
|
|
1546
1553
|
key: p.value,
|
|
1547
1554
|
item: p,
|
|
1548
1555
|
level: 0,
|
|
@@ -1550,12 +1557,12 @@ const at = {
|
|
|
1550
1557
|
"active-value": r.value,
|
|
1551
1558
|
"expanded-values": u.value,
|
|
1552
1559
|
onToggle: m,
|
|
1553
|
-
onSelect:
|
|
1560
|
+
onSelect: k
|
|
1554
1561
|
}, null, 8, ["item", "active-value", "expanded-values"]))), 128))
|
|
1555
1562
|
])
|
|
1556
|
-
], 10,
|
|
1563
|
+
], 10, Gt));
|
|
1557
1564
|
}
|
|
1558
|
-
}),
|
|
1565
|
+
}), Jt = { key: 0 }, Zt = { class: "vf-panel__title" }, qn = /* @__PURE__ */ S({
|
|
1559
1566
|
inheritAttrs: !1,
|
|
1560
1567
|
__name: "VfPanel",
|
|
1561
1568
|
props: {
|
|
@@ -1563,19 +1570,19 @@ const at = {
|
|
|
1563
1570
|
subtle: { type: Boolean, default: !1 }
|
|
1564
1571
|
},
|
|
1565
1572
|
setup(t) {
|
|
1566
|
-
const n = t, e =
|
|
1567
|
-
() =>
|
|
1573
|
+
const n = t, e = N(), i = l(
|
|
1574
|
+
() => P("vf-panel", n.subtle && "vf-panel--subtle")
|
|
1568
1575
|
);
|
|
1569
|
-
return (a, r) => (c(),
|
|
1570
|
-
n.title || a.$slots.header ? (c(),
|
|
1571
|
-
|
|
1572
|
-
|
|
1576
|
+
return (a, r) => (c(), _("section", H({ class: i.value }, h(e)), [
|
|
1577
|
+
n.title || a.$slots.header ? (c(), _("header", Jt, [
|
|
1578
|
+
C(a.$slots, "header", {}, () => [
|
|
1579
|
+
x("h3", Zt, F(n.title), 1)
|
|
1573
1580
|
])
|
|
1574
1581
|
])) : O("", !0),
|
|
1575
|
-
|
|
1582
|
+
C(a.$slots, "default")
|
|
1576
1583
|
], 16));
|
|
1577
1584
|
}
|
|
1578
|
-
}),
|
|
1585
|
+
}), en = { class: "vf-popover" }, tn = ["id", "aria-controls", "aria-expanded"], nn = ["id", "aria-labelledby"], Un = /* @__PURE__ */ S({
|
|
1579
1586
|
__name: "VfPopover",
|
|
1580
1587
|
props: {
|
|
1581
1588
|
open: { type: Boolean, default: void 0 },
|
|
@@ -1588,157 +1595,172 @@ const at = {
|
|
|
1588
1595
|
},
|
|
1589
1596
|
emits: ["update:open", "openChange"],
|
|
1590
1597
|
setup(t, { emit: n }) {
|
|
1591
|
-
const e = t, i = n, a = I(null), r = I(null), u = I(null), v = Q({ prefix: "vf-popover-content" }), f = Q({ prefix: "vf-popover-trigger" }),
|
|
1592
|
-
enter:
|
|
1593
|
-
leave:
|
|
1594
|
-
}, d =
|
|
1598
|
+
const e = t, i = n, a = I(null), r = I(null), u = I(null), v = Q({ prefix: "vf-popover-content" }), f = Q({ prefix: "vf-popover-trigger" }), b = {
|
|
1599
|
+
enter: X.fast,
|
|
1600
|
+
leave: X.fast
|
|
1601
|
+
}, d = l(
|
|
1595
1602
|
() => e.disableTeleport || e.teleportTo === !1 || e.teleportTo === null
|
|
1596
|
-
),
|
|
1603
|
+
), T = l(() => typeof e.teleportTo == "string" || typeof HTMLElement < "u" && e.teleportTo instanceof HTMLElement ? e.teleportTo : "body"), g = ce({
|
|
1597
1604
|
defaultOpen: e.defaultOpen,
|
|
1598
|
-
open:
|
|
1599
|
-
onOpenChange: (
|
|
1600
|
-
i("update:open",
|
|
1605
|
+
open: l(() => e.open),
|
|
1606
|
+
onOpenChange: (w) => {
|
|
1607
|
+
i("update:open", w), i("openChange", w);
|
|
1601
1608
|
}
|
|
1602
|
-
}),
|
|
1609
|
+
}), V = g.isOpen, A = l(
|
|
1603
1610
|
() => e.placement === "bottom-end" ? ["bottom-end", "top-end"] : ["bottom-start", "top-start"]
|
|
1604
1611
|
), {
|
|
1605
1612
|
placement: D,
|
|
1606
1613
|
middlewareData: z,
|
|
1607
|
-
styles:
|
|
1608
|
-
} =
|
|
1609
|
-
enabled:
|
|
1610
|
-
placement:
|
|
1611
|
-
middleware:
|
|
1614
|
+
styles: k
|
|
1615
|
+
} = ye(a, r, {
|
|
1616
|
+
enabled: V,
|
|
1617
|
+
placement: l(() => e.placement),
|
|
1618
|
+
middleware: l(
|
|
1612
1619
|
() => [
|
|
1613
1620
|
pe(10),
|
|
1614
|
-
me({ placements:
|
|
1621
|
+
me({ placements: A.value }),
|
|
1615
1622
|
he(),
|
|
1616
|
-
u.value ?
|
|
1617
|
-
].filter((
|
|
1623
|
+
u.value ? _e(u.value) : void 0
|
|
1624
|
+
].filter((w) => w !== void 0)
|
|
1618
1625
|
),
|
|
1619
1626
|
strategy: "fixed"
|
|
1620
|
-
}), m =
|
|
1627
|
+
}), m = l(() => [
|
|
1621
1628
|
"vf-popover__content",
|
|
1622
1629
|
D.value.startsWith("top") && "vf-popover__content--top"
|
|
1623
|
-
]), o =
|
|
1624
|
-
const
|
|
1630
|
+
]), o = l(() => {
|
|
1631
|
+
const w = z.value.arrow;
|
|
1625
1632
|
return {
|
|
1626
|
-
x: (
|
|
1627
|
-
y: (
|
|
1633
|
+
x: (w == null ? void 0 : w.x) !== void 0 && (w == null ? void 0 : w.baseX) !== void 0 ? w.x - w.baseX : 0,
|
|
1634
|
+
y: (w == null ? void 0 : w.y) !== void 0 && (w == null ? void 0 : w.baseY) !== void 0 ? w.y - w.baseY : 0
|
|
1628
1635
|
};
|
|
1629
|
-
}),
|
|
1636
|
+
}), y = l(() => ({
|
|
1630
1637
|
left: `${o.value.x}px`,
|
|
1631
1638
|
top: `${o.value.y}px`
|
|
1632
|
-
})), p =
|
|
1639
|
+
})), p = l(() => [
|
|
1633
1640
|
"vf-popover__arrow",
|
|
1634
1641
|
D.value.startsWith("top") ? "vf-popover__arrow--top" : "vf-popover__arrow--bottom"
|
|
1635
1642
|
]);
|
|
1636
|
-
async function
|
|
1643
|
+
async function s() {
|
|
1637
1644
|
var Z, de;
|
|
1638
1645
|
await ne();
|
|
1639
|
-
const
|
|
1646
|
+
const w = (Z = r.value) == null ? void 0 : Z.querySelector(
|
|
1640
1647
|
"[autofocus], [data-autofocus]"
|
|
1641
1648
|
);
|
|
1642
|
-
if (
|
|
1643
|
-
|
|
1649
|
+
if (w) {
|
|
1650
|
+
w.focus();
|
|
1644
1651
|
return;
|
|
1645
1652
|
}
|
|
1646
1653
|
(de = r.value) == null || de.focus();
|
|
1647
1654
|
}
|
|
1648
1655
|
function E() {
|
|
1649
|
-
|
|
1656
|
+
g.open(), s();
|
|
1650
1657
|
}
|
|
1651
1658
|
function L() {
|
|
1652
|
-
var
|
|
1653
|
-
|
|
1659
|
+
var w;
|
|
1660
|
+
g.close(), (w = a.value) == null || w.focus();
|
|
1654
1661
|
}
|
|
1655
1662
|
function M() {
|
|
1656
|
-
if (
|
|
1663
|
+
if (V.value) {
|
|
1657
1664
|
L();
|
|
1658
1665
|
return;
|
|
1659
1666
|
}
|
|
1660
1667
|
E();
|
|
1661
1668
|
}
|
|
1662
|
-
function
|
|
1663
|
-
(
|
|
1669
|
+
function B(w) {
|
|
1670
|
+
(w.key === "Enter" || w.key === " ") && (w.preventDefault(), M()), w.key === "ArrowDown" && (w.preventDefault(), E());
|
|
1664
1671
|
}
|
|
1665
1672
|
return Oe(
|
|
1666
1673
|
[a, r],
|
|
1667
1674
|
() => {
|
|
1668
|
-
|
|
1675
|
+
V.value && e.closeOnOutsideClick && L();
|
|
1669
1676
|
},
|
|
1670
1677
|
{
|
|
1671
|
-
enabled:
|
|
1678
|
+
enabled: V,
|
|
1672
1679
|
event: "click"
|
|
1673
1680
|
}
|
|
1674
|
-
),
|
|
1675
|
-
(
|
|
1676
|
-
!
|
|
1681
|
+
), ve(
|
|
1682
|
+
(w) => {
|
|
1683
|
+
!V.value || !e.closeOnEscape || (w.preventDefault(), L());
|
|
1677
1684
|
},
|
|
1678
1685
|
{
|
|
1679
|
-
enabled:
|
|
1686
|
+
enabled: V
|
|
1680
1687
|
}
|
|
1681
|
-
), (
|
|
1682
|
-
|
|
1683
|
-
id:
|
|
1688
|
+
), (w, Z) => (c(), _("div", en, [
|
|
1689
|
+
x("div", {
|
|
1690
|
+
id: h(f),
|
|
1684
1691
|
ref_key: "triggerRef",
|
|
1685
1692
|
ref: a,
|
|
1686
1693
|
class: "vf-popover__trigger",
|
|
1687
|
-
"aria-controls":
|
|
1688
|
-
"aria-expanded":
|
|
1694
|
+
"aria-controls": h(v),
|
|
1695
|
+
"aria-expanded": h(V),
|
|
1689
1696
|
"aria-haspopup": "dialog",
|
|
1690
1697
|
tabindex: "0",
|
|
1691
1698
|
onClick: M,
|
|
1692
|
-
onKeydown:
|
|
1699
|
+
onKeydown: B
|
|
1693
1700
|
}, [
|
|
1694
|
-
|
|
1695
|
-
open:
|
|
1701
|
+
C(w.$slots, "trigger", {
|
|
1702
|
+
open: h(V),
|
|
1696
1703
|
toggle: M
|
|
1697
1704
|
})
|
|
1698
|
-
], 40,
|
|
1699
|
-
(c(),
|
|
1700
|
-
to:
|
|
1705
|
+
], 40, tn),
|
|
1706
|
+
(c(), j(ue, {
|
|
1707
|
+
to: T.value,
|
|
1701
1708
|
disabled: d.value
|
|
1702
1709
|
}, [
|
|
1703
|
-
|
|
1710
|
+
q(oe, {
|
|
1704
1711
|
name: "vf-floating-transition",
|
|
1705
1712
|
appear: "",
|
|
1706
|
-
duration:
|
|
1713
|
+
duration: b
|
|
1707
1714
|
}, {
|
|
1708
|
-
default:
|
|
1709
|
-
|
|
1715
|
+
default: U(() => [
|
|
1716
|
+
h(V) ? (c(), _("section", {
|
|
1710
1717
|
key: 0,
|
|
1711
|
-
id:
|
|
1718
|
+
id: h(v),
|
|
1712
1719
|
ref_key: "contentRef",
|
|
1713
1720
|
ref: r,
|
|
1714
|
-
class:
|
|
1715
|
-
style:
|
|
1716
|
-
"aria-labelledby":
|
|
1721
|
+
class: R(m.value),
|
|
1722
|
+
style: Y(h(k)),
|
|
1723
|
+
"aria-labelledby": h(f),
|
|
1717
1724
|
role: "dialog",
|
|
1718
1725
|
tabindex: "-1"
|
|
1719
1726
|
}, [
|
|
1720
|
-
|
|
1727
|
+
x("span", {
|
|
1721
1728
|
ref_key: "arrowRef",
|
|
1722
1729
|
ref: u,
|
|
1723
|
-
class:
|
|
1724
|
-
style:
|
|
1730
|
+
class: R(p.value),
|
|
1731
|
+
style: Y(y.value),
|
|
1725
1732
|
"aria-hidden": "true"
|
|
1726
1733
|
}, null, 6),
|
|
1727
|
-
|
|
1728
|
-
open:
|
|
1734
|
+
C(w.$slots, "default", {
|
|
1735
|
+
open: h(V),
|
|
1729
1736
|
close: L
|
|
1730
1737
|
})
|
|
1731
|
-
], 14,
|
|
1738
|
+
], 14, nn)) : O("", !0)
|
|
1732
1739
|
]),
|
|
1733
1740
|
_: 3
|
|
1734
1741
|
})
|
|
1735
1742
|
], 8, ["to", "disabled"]))
|
|
1736
1743
|
]));
|
|
1737
1744
|
}
|
|
1738
|
-
}),
|
|
1745
|
+
}), Wn = /* @__PURE__ */ S({
|
|
1746
|
+
inheritAttrs: !1,
|
|
1747
|
+
__name: "VfProse",
|
|
1748
|
+
props: {
|
|
1749
|
+
as: { default: "article" }
|
|
1750
|
+
},
|
|
1751
|
+
setup(t) {
|
|
1752
|
+
const n = t, e = N(), i = l(() => P("vf-prose"));
|
|
1753
|
+
return (a, r) => (c(), j(ae(n.as), H({ class: i.value }, h(e)), {
|
|
1754
|
+
default: U(() => [
|
|
1755
|
+
C(a.$slots, "default")
|
|
1756
|
+
]),
|
|
1757
|
+
_: 3
|
|
1758
|
+
}, 16, ["class"]));
|
|
1759
|
+
}
|
|
1760
|
+
}), an = ["checked", "disabled", "value", "aria-invalid"], on = {
|
|
1739
1761
|
key: 0,
|
|
1740
1762
|
class: "vf-radio__content"
|
|
1741
|
-
},
|
|
1763
|
+
}, Yn = /* @__PURE__ */ S({
|
|
1742
1764
|
inheritAttrs: !1,
|
|
1743
1765
|
__name: "VfRadio",
|
|
1744
1766
|
props: {
|
|
@@ -1751,8 +1773,8 @@ const at = {
|
|
|
1751
1773
|
},
|
|
1752
1774
|
emits: ["update:modelValue", "change"],
|
|
1753
1775
|
setup(t, { emit: n }) {
|
|
1754
|
-
const e = t, i = n, a =
|
|
1755
|
-
() =>
|
|
1776
|
+
const e = t, i = n, a = N(), r = l(() => e.modelValue === e.value), u = l(
|
|
1777
|
+
() => P(
|
|
1756
1778
|
"vf-radio",
|
|
1757
1779
|
`vf-radio--${e.size}`,
|
|
1758
1780
|
r.value && "vf-radio--checked",
|
|
@@ -1760,46 +1782,46 @@ const at = {
|
|
|
1760
1782
|
e.disabled && "vf-radio--disabled",
|
|
1761
1783
|
a.class
|
|
1762
1784
|
)
|
|
1763
|
-
), v =
|
|
1785
|
+
), v = l(() => a.style), f = l(
|
|
1764
1786
|
() => Object.fromEntries(
|
|
1765
1787
|
Object.entries(a).filter(([d]) => d !== "class" && d !== "style")
|
|
1766
1788
|
)
|
|
1767
1789
|
);
|
|
1768
|
-
function
|
|
1790
|
+
function b(d) {
|
|
1769
1791
|
d.target.checked && (i("update:modelValue", e.value), i("change", e.value));
|
|
1770
1792
|
}
|
|
1771
|
-
return (d,
|
|
1772
|
-
class:
|
|
1773
|
-
style:
|
|
1793
|
+
return (d, T) => (c(), _("label", {
|
|
1794
|
+
class: R(u.value),
|
|
1795
|
+
style: Y(v.value)
|
|
1774
1796
|
}, [
|
|
1775
|
-
|
|
1797
|
+
x("input", H({
|
|
1776
1798
|
class: "vf-radio__input",
|
|
1777
1799
|
type: "radio",
|
|
1778
1800
|
checked: r.value,
|
|
1779
1801
|
disabled: e.disabled,
|
|
1780
1802
|
value: e.value,
|
|
1781
1803
|
"aria-invalid": e.invalid || void 0
|
|
1782
|
-
}, f.value, { onChange:
|
|
1783
|
-
|
|
1804
|
+
}, f.value, { onChange: b }), null, 16, an),
|
|
1805
|
+
T[0] || (T[0] = x("span", {
|
|
1784
1806
|
class: "vf-radio__control",
|
|
1785
1807
|
"aria-hidden": "true"
|
|
1786
1808
|
}, [
|
|
1787
|
-
|
|
1809
|
+
x("span", { class: "vf-radio__dot" })
|
|
1788
1810
|
], -1)),
|
|
1789
|
-
t.label || d.$slots.default ? (c(),
|
|
1790
|
-
|
|
1791
|
-
|
|
1811
|
+
t.label || d.$slots.default ? (c(), _("span", on, [
|
|
1812
|
+
C(d.$slots, "default", {}, () => [
|
|
1813
|
+
le(F(t.label), 1)
|
|
1792
1814
|
])
|
|
1793
1815
|
])) : O("", !0)
|
|
1794
1816
|
], 6));
|
|
1795
1817
|
}
|
|
1796
|
-
}),
|
|
1818
|
+
}), ln = ["checked", "disabled"], sn = {
|
|
1797
1819
|
class: "vf-switch__control",
|
|
1798
1820
|
"aria-hidden": "true"
|
|
1799
|
-
},
|
|
1821
|
+
}, rn = { class: "vf-switch__thumb" }, un = {
|
|
1800
1822
|
key: 0,
|
|
1801
1823
|
class: "vf-switch__content"
|
|
1802
|
-
}, cn = /* @__PURE__ */
|
|
1824
|
+
}, cn = /* @__PURE__ */ S({
|
|
1803
1825
|
inheritAttrs: !1,
|
|
1804
1826
|
__name: "VfSwitch",
|
|
1805
1827
|
props: {
|
|
@@ -1810,52 +1832,61 @@ const at = {
|
|
|
1810
1832
|
},
|
|
1811
1833
|
emits: ["update:modelValue", "change"],
|
|
1812
1834
|
setup(t, { emit: n }) {
|
|
1813
|
-
const e = t, i = n, a =
|
|
1814
|
-
() =>
|
|
1835
|
+
const e = t, i = n, a = N(), r = fe(), u = l(
|
|
1836
|
+
() => P(
|
|
1815
1837
|
"vf-switch",
|
|
1816
1838
|
`vf-switch--${e.size}`,
|
|
1817
1839
|
e.modelValue && "vf-switch--checked",
|
|
1818
1840
|
e.disabled && "vf-switch--disabled",
|
|
1819
1841
|
a.class
|
|
1820
1842
|
)
|
|
1821
|
-
),
|
|
1843
|
+
), v = l(() => a.style), f = l(() => {
|
|
1844
|
+
var V;
|
|
1845
|
+
if (e.label)
|
|
1846
|
+
return !0;
|
|
1847
|
+
const T = ((V = r.default) == null ? void 0 : V.call(r, {})) ?? [];
|
|
1848
|
+
function g(A) {
|
|
1849
|
+
return A.type === Ne ? !1 : A.type === He ? String(A.children ?? "").trim().length > 0 : A.type === se && Array.isArray(A.children) ? A.children.some((D) => g(D)) : !0;
|
|
1850
|
+
}
|
|
1851
|
+
return T.some((A) => g(A));
|
|
1852
|
+
}), b = l(
|
|
1822
1853
|
() => Object.fromEntries(
|
|
1823
|
-
Object.entries(a).filter(([
|
|
1854
|
+
Object.entries(a).filter(([T]) => T !== "class" && T !== "style")
|
|
1824
1855
|
)
|
|
1825
1856
|
);
|
|
1826
|
-
function
|
|
1827
|
-
const
|
|
1828
|
-
i("update:modelValue",
|
|
1857
|
+
function d(T) {
|
|
1858
|
+
const g = T.target.checked;
|
|
1859
|
+
i("update:modelValue", g), i("change", g);
|
|
1829
1860
|
}
|
|
1830
|
-
return (
|
|
1831
|
-
class:
|
|
1832
|
-
style:
|
|
1861
|
+
return (T, g) => (c(), _("label", {
|
|
1862
|
+
class: R(u.value),
|
|
1863
|
+
style: Y(v.value)
|
|
1833
1864
|
}, [
|
|
1834
|
-
|
|
1865
|
+
x("input", H({
|
|
1835
1866
|
class: "vf-switch__input",
|
|
1836
1867
|
type: "checkbox",
|
|
1837
1868
|
role: "switch",
|
|
1838
1869
|
checked: e.modelValue,
|
|
1839
1870
|
disabled: e.disabled
|
|
1840
|
-
},
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1871
|
+
}, b.value, { onChange: d }), null, 16, ln),
|
|
1872
|
+
x("span", sn, [
|
|
1873
|
+
x("span", rn, [
|
|
1874
|
+
C(T.$slots, "thumb", {
|
|
1844
1875
|
checked: e.modelValue
|
|
1845
1876
|
})
|
|
1846
1877
|
])
|
|
1847
1878
|
]),
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1879
|
+
f.value ? (c(), _("span", un, [
|
|
1880
|
+
C(T.$slots, "default", {}, () => [
|
|
1881
|
+
le(F(t.label), 1)
|
|
1851
1882
|
])
|
|
1852
1883
|
])) : O("", !0)
|
|
1853
1884
|
], 6));
|
|
1854
1885
|
}
|
|
1855
|
-
}),
|
|
1886
|
+
}), dn = ["aria-label"], fn = {
|
|
1856
1887
|
key: 0,
|
|
1857
1888
|
class: "vf-table-of-contents__title"
|
|
1858
|
-
},
|
|
1889
|
+
}, vn = { class: "vf-table-of-contents__list" }, pn = ["href", "aria-current"], Xn = /* @__PURE__ */ S({
|
|
1859
1890
|
inheritAttrs: !1,
|
|
1860
1891
|
__name: "VfTableOfContents",
|
|
1861
1892
|
props: {
|
|
@@ -1865,9 +1896,9 @@ const at = {
|
|
|
1865
1896
|
label: { default: void 0 }
|
|
1866
1897
|
},
|
|
1867
1898
|
setup(t) {
|
|
1868
|
-
const n = t, e =
|
|
1869
|
-
() =>
|
|
1870
|
-
), a =
|
|
1899
|
+
const n = t, e = N(), i = l(
|
|
1900
|
+
() => P("vf-table-of-contents", e.class)
|
|
1901
|
+
), a = l(() => e.style), r = l(
|
|
1871
1902
|
() => Object.fromEntries(
|
|
1872
1903
|
Object.entries(e).filter(([f]) => f !== "class" && f !== "style")
|
|
1873
1904
|
)
|
|
@@ -1878,35 +1909,58 @@ const at = {
|
|
|
1878
1909
|
function v(f) {
|
|
1879
1910
|
return f.href ?? `#${f.id}`;
|
|
1880
1911
|
}
|
|
1881
|
-
return (f,
|
|
1912
|
+
return (f, b) => (c(), _("nav", H({
|
|
1882
1913
|
class: i.value,
|
|
1883
1914
|
style: a.value,
|
|
1884
1915
|
"aria-label": n.ariaLabel
|
|
1885
1916
|
}, r.value), [
|
|
1886
|
-
n.label || f.$slots.label ? (c(),
|
|
1887
|
-
|
|
1888
|
-
|
|
1917
|
+
n.label || f.$slots.label ? (c(), _("p", fn, [
|
|
1918
|
+
C(f.$slots, "label", {}, () => [
|
|
1919
|
+
le(F(n.label), 1)
|
|
1889
1920
|
])
|
|
1890
1921
|
])) : O("", !0),
|
|
1891
|
-
|
|
1892
|
-
(c(!0),
|
|
1922
|
+
x("ol", vn, [
|
|
1923
|
+
(c(!0), _(se, null, ie(n.items, (d) => (c(), _("li", {
|
|
1893
1924
|
key: d.id,
|
|
1894
1925
|
class: "vf-table-of-contents__item",
|
|
1895
|
-
style:
|
|
1926
|
+
style: Y({ "--vf-toc-level": String(u(d.level)) })
|
|
1896
1927
|
}, [
|
|
1897
|
-
|
|
1928
|
+
x("a", {
|
|
1898
1929
|
href: v(d),
|
|
1899
|
-
class:
|
|
1930
|
+
class: R([
|
|
1900
1931
|
"vf-table-of-contents__link",
|
|
1901
1932
|
n.activeId === d.id && "vf-table-of-contents__link--active"
|
|
1902
1933
|
]),
|
|
1903
1934
|
"aria-current": n.activeId === d.id ? "location" : void 0
|
|
1904
|
-
},
|
|
1935
|
+
}, F(d.label), 11, pn)
|
|
1905
1936
|
], 4))), 128))
|
|
1906
1937
|
])
|
|
1907
|
-
], 16,
|
|
1938
|
+
], 16, dn));
|
|
1908
1939
|
}
|
|
1909
|
-
}),
|
|
1940
|
+
}), Gn = /* @__PURE__ */ S({
|
|
1941
|
+
inheritAttrs: !1,
|
|
1942
|
+
__name: "VfText",
|
|
1943
|
+
props: {
|
|
1944
|
+
as: { default: "p" },
|
|
1945
|
+
size: { default: "body" },
|
|
1946
|
+
tone: { default: "default" }
|
|
1947
|
+
},
|
|
1948
|
+
setup(t) {
|
|
1949
|
+
const n = t, e = N(), i = l(
|
|
1950
|
+
() => P(
|
|
1951
|
+
"vf-text",
|
|
1952
|
+
`vf-text--${n.size}`,
|
|
1953
|
+
n.tone !== "default" && `vf-text--${n.tone}`
|
|
1954
|
+
)
|
|
1955
|
+
);
|
|
1956
|
+
return (a, r) => (c(), j(ae(n.as), H({ class: i.value }, h(e)), {
|
|
1957
|
+
default: U(() => [
|
|
1958
|
+
C(a.$slots, "default")
|
|
1959
|
+
]),
|
|
1960
|
+
_: 3
|
|
1961
|
+
}, 16, ["class"]));
|
|
1962
|
+
}
|
|
1963
|
+
}), Qn = /* @__PURE__ */ S({
|
|
1910
1964
|
inheritAttrs: !1,
|
|
1911
1965
|
__name: "VfThemeSwitch",
|
|
1912
1966
|
props: {
|
|
@@ -1915,54 +1969,54 @@ const at = {
|
|
|
1915
1969
|
label: { default: void 0 }
|
|
1916
1970
|
},
|
|
1917
1971
|
setup(t) {
|
|
1918
|
-
const n = t, e =
|
|
1972
|
+
const n = t, e = N(), i = fe(), { resolvedTheme: a, setTheme: r } = Qe(), u = l(() => !!(n.label || i.default)), v = l({
|
|
1919
1973
|
get: () => a.value === "dark",
|
|
1920
1974
|
set: (f) => {
|
|
1921
1975
|
r(f ? "dark" : "light");
|
|
1922
1976
|
}
|
|
1923
1977
|
});
|
|
1924
|
-
return (f,
|
|
1978
|
+
return (f, b) => (c(), j(cn, H(h(e), {
|
|
1925
1979
|
modelValue: v.value,
|
|
1926
|
-
"onUpdate:modelValue":
|
|
1980
|
+
"onUpdate:modelValue": b[0] || (b[0] = (d) => v.value = d),
|
|
1927
1981
|
size: n.size,
|
|
1928
1982
|
disabled: n.disabled,
|
|
1929
1983
|
label: n.label
|
|
1930
1984
|
}), {
|
|
1931
|
-
thumb:
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
icon: d ?
|
|
1985
|
+
thumb: U(({ checked: d }) => [
|
|
1986
|
+
C(f.$slots, "thumb", { checked: d }, () => [
|
|
1987
|
+
q(h(ee), {
|
|
1988
|
+
icon: d ? h(W).moon : h(W).sun,
|
|
1935
1989
|
size: "0.5rem"
|
|
1936
1990
|
}, null, 8, ["icon"])
|
|
1937
1991
|
])
|
|
1938
1992
|
]),
|
|
1939
|
-
default:
|
|
1940
|
-
u.value ?
|
|
1941
|
-
|
|
1993
|
+
default: U(() => [
|
|
1994
|
+
u.value ? C(f.$slots, "default", { key: 0 }, () => [
|
|
1995
|
+
le(F(n.label), 1)
|
|
1942
1996
|
]) : O("", !0)
|
|
1943
1997
|
]),
|
|
1944
1998
|
_: 3
|
|
1945
1999
|
}, 16, ["modelValue", "size", "disabled", "label"]));
|
|
1946
2000
|
}
|
|
1947
|
-
}),
|
|
2001
|
+
}), Jn = /* @__PURE__ */ S({
|
|
1948
2002
|
inheritAttrs: !1,
|
|
1949
2003
|
__name: "VfTag",
|
|
1950
2004
|
props: {
|
|
1951
2005
|
tone: { default: "neutral" }
|
|
1952
2006
|
},
|
|
1953
2007
|
setup(t) {
|
|
1954
|
-
const n = t, e =
|
|
1955
|
-
() =>
|
|
2008
|
+
const n = t, e = N(), i = l(
|
|
2009
|
+
() => P("vf-tag", n.tone !== "neutral" && `vf-tag--${n.tone}`)
|
|
1956
2010
|
);
|
|
1957
|
-
return (a, r) => (c(),
|
|
1958
|
-
|
|
2011
|
+
return (a, r) => (c(), _("span", H({ class: i.value }, h(e)), [
|
|
2012
|
+
C(a.$slots, "default")
|
|
1959
2013
|
], 16));
|
|
1960
2014
|
}
|
|
1961
|
-
}),
|
|
2015
|
+
}), mn = { class: "vf-tabs" }, hn = {
|
|
1962
2016
|
class: "vf-tabs__list",
|
|
1963
2017
|
role: "tablist",
|
|
1964
2018
|
"aria-orientation": "horizontal"
|
|
1965
|
-
}, _n = ["id", "aria-controls", "aria-selected", "disabled", "tabindex", "onClick", "onKeydown"],
|
|
2019
|
+
}, _n = ["id", "aria-controls", "aria-selected", "disabled", "tabindex", "onClick", "onKeydown"], yn = ["id", "aria-labelledby"], Zn = /* @__PURE__ */ S({
|
|
1966
2020
|
__name: "VfTabs",
|
|
1967
2021
|
props: {
|
|
1968
2022
|
items: {},
|
|
@@ -1971,106 +2025,106 @@ const at = {
|
|
|
1971
2025
|
},
|
|
1972
2026
|
emits: ["update:modelValue", "change"],
|
|
1973
2027
|
setup(t, { emit: n }) {
|
|
1974
|
-
const e = t, i = n, a = Q({ prefix: "vf-tabs" }), r = I([]), u =
|
|
2028
|
+
const e = t, i = n, a = Q({ prefix: "vf-tabs" }), r = I([]), u = l(
|
|
1975
2029
|
() => {
|
|
1976
|
-
var
|
|
1977
|
-
return (
|
|
2030
|
+
var k;
|
|
2031
|
+
return (k = e.items.find((m) => !m.disabled)) == null ? void 0 : k.value;
|
|
1978
2032
|
}
|
|
1979
|
-
), v = I(e.defaultValue ?? u.value), f =
|
|
2033
|
+
), v = I(e.defaultValue ?? u.value), f = l(() => e.modelValue !== void 0), b = l(
|
|
1980
2034
|
() => e.modelValue ?? v.value ?? u.value
|
|
1981
2035
|
);
|
|
1982
2036
|
J(
|
|
1983
2037
|
() => e.items,
|
|
1984
|
-
(
|
|
1985
|
-
|
|
1986
|
-
(o) => o.value ===
|
|
2038
|
+
(k) => {
|
|
2039
|
+
!k.some(
|
|
2040
|
+
(o) => o.value === b.value && !o.disabled
|
|
1987
2041
|
) && u.value && d(u.value);
|
|
1988
2042
|
},
|
|
1989
2043
|
{ deep: !0 }
|
|
1990
2044
|
);
|
|
1991
|
-
function d(
|
|
1992
|
-
f.value || (v.value =
|
|
2045
|
+
function d(k) {
|
|
2046
|
+
f.value || (v.value = k), i("update:modelValue", k), i("change", k);
|
|
1993
2047
|
}
|
|
1994
|
-
function
|
|
1995
|
-
|
|
2048
|
+
function T(k) {
|
|
2049
|
+
k.disabled || d(k.value);
|
|
1996
2050
|
}
|
|
1997
|
-
function
|
|
1998
|
-
return e.items.filter((
|
|
2051
|
+
function g() {
|
|
2052
|
+
return e.items.filter((k) => !k.disabled);
|
|
1999
2053
|
}
|
|
2000
|
-
function
|
|
2054
|
+
function V(k) {
|
|
2001
2055
|
var o;
|
|
2002
|
-
const m = e.items.findIndex((
|
|
2056
|
+
const m = e.items.findIndex((y) => y.value === k);
|
|
2003
2057
|
(o = r.value[m]) == null || o.focus();
|
|
2004
2058
|
}
|
|
2005
|
-
function
|
|
2006
|
-
const o =
|
|
2059
|
+
function A(k, m) {
|
|
2060
|
+
const o = g(), y = o.findIndex(
|
|
2007
2061
|
(p) => p.value === m.value
|
|
2008
2062
|
);
|
|
2009
|
-
if (
|
|
2010
|
-
if (
|
|
2011
|
-
|
|
2012
|
-
const p = o[(
|
|
2013
|
-
|
|
2063
|
+
if (y !== -1) {
|
|
2064
|
+
if (k.key === "ArrowRight" || k.key === "ArrowDown") {
|
|
2065
|
+
k.preventDefault();
|
|
2066
|
+
const p = o[(y + 1) % o.length];
|
|
2067
|
+
T(p), V(p.value);
|
|
2014
2068
|
return;
|
|
2015
2069
|
}
|
|
2016
|
-
if (
|
|
2017
|
-
|
|
2018
|
-
const p = o[(
|
|
2019
|
-
|
|
2070
|
+
if (k.key === "ArrowLeft" || k.key === "ArrowUp") {
|
|
2071
|
+
k.preventDefault();
|
|
2072
|
+
const p = o[(y - 1 + o.length) % o.length];
|
|
2073
|
+
T(p), V(p.value);
|
|
2020
2074
|
return;
|
|
2021
2075
|
}
|
|
2022
|
-
if (
|
|
2023
|
-
|
|
2076
|
+
if (k.key === "Home") {
|
|
2077
|
+
k.preventDefault();
|
|
2024
2078
|
const p = o[0];
|
|
2025
|
-
|
|
2079
|
+
T(p), V(p.value);
|
|
2026
2080
|
return;
|
|
2027
2081
|
}
|
|
2028
|
-
if (
|
|
2029
|
-
|
|
2082
|
+
if (k.key === "End") {
|
|
2083
|
+
k.preventDefault();
|
|
2030
2084
|
const p = o[o.length - 1];
|
|
2031
|
-
|
|
2085
|
+
T(p), V(p.value);
|
|
2032
2086
|
}
|
|
2033
2087
|
}
|
|
2034
2088
|
}
|
|
2035
|
-
function D(
|
|
2036
|
-
return `${a.value}-tab-${
|
|
2089
|
+
function D(k) {
|
|
2090
|
+
return `${a.value}-tab-${k}`;
|
|
2037
2091
|
}
|
|
2038
|
-
function z(
|
|
2039
|
-
return `${a.value}-panel-${
|
|
2092
|
+
function z(k) {
|
|
2093
|
+
return `${a.value}-panel-${k}`;
|
|
2040
2094
|
}
|
|
2041
|
-
return (
|
|
2042
|
-
|
|
2043
|
-
(c(!0),
|
|
2095
|
+
return (k, m) => (c(), _("div", mn, [
|
|
2096
|
+
x("div", hn, [
|
|
2097
|
+
(c(!0), _(se, null, ie(t.items, (o, y) => (c(), _("button", {
|
|
2044
2098
|
id: D(o.value),
|
|
2045
2099
|
key: o.value,
|
|
2046
2100
|
ref_for: !0,
|
|
2047
2101
|
ref: (p) => {
|
|
2048
|
-
r.value[
|
|
2102
|
+
r.value[y] = p;
|
|
2049
2103
|
},
|
|
2050
2104
|
"aria-controls": z(o.value),
|
|
2051
|
-
"aria-selected":
|
|
2105
|
+
"aria-selected": b.value === o.value,
|
|
2052
2106
|
disabled: o.disabled,
|
|
2053
|
-
tabindex:
|
|
2107
|
+
tabindex: b.value === o.value ? 0 : -1,
|
|
2054
2108
|
class: "vf-tabs__tab",
|
|
2055
2109
|
role: "tab",
|
|
2056
2110
|
type: "button",
|
|
2057
|
-
onClick: (p) =>
|
|
2058
|
-
onKeydown: (p) =>
|
|
2059
|
-
},
|
|
2111
|
+
onClick: (p) => T(o),
|
|
2112
|
+
onKeydown: (p) => A(p, o)
|
|
2113
|
+
}, F(o.label), 41, _n))), 128))
|
|
2060
2114
|
]),
|
|
2061
|
-
|
|
2115
|
+
b.value ? (c(), _("div", {
|
|
2062
2116
|
key: 0,
|
|
2063
|
-
id: z(
|
|
2064
|
-
"aria-labelledby": D(
|
|
2117
|
+
id: z(b.value),
|
|
2118
|
+
"aria-labelledby": D(b.value),
|
|
2065
2119
|
class: "vf-tabs__panel",
|
|
2066
2120
|
role: "tabpanel",
|
|
2067
2121
|
tabindex: "0"
|
|
2068
2122
|
}, [
|
|
2069
|
-
|
|
2070
|
-
], 8,
|
|
2123
|
+
C(k.$slots, "panel", Ve(xe({ activeValue: b.value })))
|
|
2124
|
+
], 8, yn)) : O("", !0)
|
|
2071
2125
|
]));
|
|
2072
2126
|
}
|
|
2073
|
-
}),
|
|
2127
|
+
}), bn = ["value", "aria-invalid"], ea = /* @__PURE__ */ S({
|
|
2074
2128
|
inheritAttrs: !1,
|
|
2075
2129
|
__name: "VfTextarea",
|
|
2076
2130
|
props: {
|
|
@@ -2080,8 +2134,8 @@ const at = {
|
|
|
2080
2134
|
},
|
|
2081
2135
|
emits: ["update:modelValue"],
|
|
2082
2136
|
setup(t, { emit: n }) {
|
|
2083
|
-
const e = t, i = n, a =
|
|
2084
|
-
() =>
|
|
2137
|
+
const e = t, i = n, a = N(), r = l(
|
|
2138
|
+
() => P(
|
|
2085
2139
|
"vf-textarea",
|
|
2086
2140
|
e.size !== "md" && `vf-textarea--${e.size}`,
|
|
2087
2141
|
e.invalid && "vf-textarea--invalid"
|
|
@@ -2090,13 +2144,13 @@ const at = {
|
|
|
2090
2144
|
function u(v) {
|
|
2091
2145
|
i("update:modelValue", v.target.value);
|
|
2092
2146
|
}
|
|
2093
|
-
return (v, f) => (c(),
|
|
2147
|
+
return (v, f) => (c(), _("textarea", H({
|
|
2094
2148
|
class: r.value,
|
|
2095
2149
|
value: e.modelValue,
|
|
2096
2150
|
"aria-invalid": e.invalid || void 0
|
|
2097
|
-
},
|
|
2151
|
+
}, h(a), { onInput: u }), null, 16, bn));
|
|
2098
2152
|
}
|
|
2099
|
-
}),
|
|
2153
|
+
}), gn = ["aria-describedby"], $n = ["id"], ta = /* @__PURE__ */ S({
|
|
2100
2154
|
__name: "VfTooltip",
|
|
2101
2155
|
props: {
|
|
2102
2156
|
text: { default: void 0 },
|
|
@@ -2107,45 +2161,45 @@ const at = {
|
|
|
2107
2161
|
},
|
|
2108
2162
|
setup(t) {
|
|
2109
2163
|
const n = t, e = I(!1), i = Q({ prefix: "vf-tooltip" }), a = I(null), r = I(null), u = I(null), v = I(null), f = {
|
|
2110
|
-
enter:
|
|
2111
|
-
leave:
|
|
2112
|
-
},
|
|
2164
|
+
enter: X.fast,
|
|
2165
|
+
leave: X.fast
|
|
2166
|
+
}, b = l(
|
|
2113
2167
|
() => n.disableTeleport || n.teleportTo === !1 || n.teleportTo === null
|
|
2114
|
-
), d =
|
|
2115
|
-
placement:
|
|
2116
|
-
middlewareData:
|
|
2117
|
-
styles:
|
|
2118
|
-
cleanup:
|
|
2119
|
-
} =
|
|
2168
|
+
), d = l(() => typeof n.teleportTo == "string" || typeof HTMLElement < "u" && n.teleportTo instanceof HTMLElement ? n.teleportTo : "body"), {
|
|
2169
|
+
placement: T,
|
|
2170
|
+
middlewareData: g,
|
|
2171
|
+
styles: V,
|
|
2172
|
+
cleanup: A
|
|
2173
|
+
} = ye(r, u, {
|
|
2120
2174
|
enabled: e,
|
|
2121
|
-
placement:
|
|
2122
|
-
middleware:
|
|
2175
|
+
placement: l(() => n.placement),
|
|
2176
|
+
middleware: l(
|
|
2123
2177
|
() => [
|
|
2124
2178
|
pe(10),
|
|
2125
2179
|
me({ placements: ["top", "bottom"] }),
|
|
2126
2180
|
he(),
|
|
2127
|
-
v.value ?
|
|
2128
|
-
].filter((
|
|
2181
|
+
v.value ? _e(v.value) : void 0
|
|
2182
|
+
].filter((s) => s !== void 0)
|
|
2129
2183
|
),
|
|
2130
2184
|
strategy: "fixed"
|
|
2131
|
-
}), D =
|
|
2185
|
+
}), D = l(() => [
|
|
2132
2186
|
"vf-tooltip__content",
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
]), z =
|
|
2136
|
-
const
|
|
2187
|
+
T.value.startsWith("bottom") && "vf-tooltip__content--bottom",
|
|
2188
|
+
T.value.startsWith("top") && "vf-tooltip__content--top"
|
|
2189
|
+
]), z = l(() => {
|
|
2190
|
+
const s = g.value.arrow;
|
|
2137
2191
|
return {
|
|
2138
|
-
x: (
|
|
2139
|
-
y: (
|
|
2192
|
+
x: (s == null ? void 0 : s.x) !== void 0 && (s == null ? void 0 : s.baseX) !== void 0 ? s.x - s.baseX : 0,
|
|
2193
|
+
y: (s == null ? void 0 : s.y) !== void 0 && (s == null ? void 0 : s.baseY) !== void 0 ? s.y - s.baseY : 0
|
|
2140
2194
|
};
|
|
2141
|
-
}),
|
|
2195
|
+
}), k = l(() => ["vf-tooltip__arrow"]), m = l(() => ({
|
|
2142
2196
|
left: `${z.value.x}px`,
|
|
2143
2197
|
top: `${z.value.y}px`
|
|
2144
2198
|
}));
|
|
2145
2199
|
function o() {
|
|
2146
2200
|
a.value !== null && (window.clearTimeout(a.value), a.value = null);
|
|
2147
2201
|
}
|
|
2148
|
-
function
|
|
2202
|
+
function y() {
|
|
2149
2203
|
o(), a.value = window.setTimeout(() => {
|
|
2150
2204
|
e.value = !0;
|
|
2151
2205
|
}, n.openDelay);
|
|
@@ -2154,52 +2208,52 @@ const at = {
|
|
|
2154
2208
|
o(), e.value = !1;
|
|
2155
2209
|
}
|
|
2156
2210
|
return te(() => {
|
|
2157
|
-
o(),
|
|
2158
|
-
}), (
|
|
2211
|
+
o(), A();
|
|
2212
|
+
}), (s, E) => (c(), _("span", {
|
|
2159
2213
|
class: "vf-tooltip",
|
|
2160
|
-
onMouseenter:
|
|
2214
|
+
onMouseenter: y,
|
|
2161
2215
|
onMouseleave: p,
|
|
2162
|
-
onFocusin:
|
|
2216
|
+
onFocusin: y,
|
|
2163
2217
|
onFocusout: p
|
|
2164
2218
|
}, [
|
|
2165
|
-
|
|
2219
|
+
x("span", {
|
|
2166
2220
|
ref_key: "triggerRef",
|
|
2167
2221
|
ref: r,
|
|
2168
2222
|
class: "vf-tooltip__trigger",
|
|
2169
|
-
"aria-describedby": e.value ?
|
|
2223
|
+
"aria-describedby": e.value ? h(i) : void 0
|
|
2170
2224
|
}, [
|
|
2171
|
-
|
|
2172
|
-
], 8,
|
|
2173
|
-
(c(),
|
|
2225
|
+
C(s.$slots, "default")
|
|
2226
|
+
], 8, gn),
|
|
2227
|
+
(c(), j(ue, {
|
|
2174
2228
|
to: d.value,
|
|
2175
|
-
disabled:
|
|
2229
|
+
disabled: b.value
|
|
2176
2230
|
}, [
|
|
2177
|
-
|
|
2231
|
+
q(oe, {
|
|
2178
2232
|
name: "vf-floating-transition",
|
|
2179
2233
|
appear: "",
|
|
2180
2234
|
duration: f
|
|
2181
2235
|
}, {
|
|
2182
|
-
default:
|
|
2183
|
-
e.value && (t.text ||
|
|
2236
|
+
default: U(() => [
|
|
2237
|
+
e.value && (t.text || s.$slots.content) ? (c(), _("span", {
|
|
2184
2238
|
key: 0,
|
|
2185
|
-
id:
|
|
2239
|
+
id: h(i),
|
|
2186
2240
|
ref_key: "contentRef",
|
|
2187
2241
|
ref: u,
|
|
2188
|
-
class:
|
|
2189
|
-
style:
|
|
2242
|
+
class: R(D.value),
|
|
2243
|
+
style: Y(h(V)),
|
|
2190
2244
|
role: "tooltip"
|
|
2191
2245
|
}, [
|
|
2192
|
-
|
|
2193
|
-
|
|
2246
|
+
C(s.$slots, "content", {}, () => [
|
|
2247
|
+
le(F(t.text), 1)
|
|
2194
2248
|
]),
|
|
2195
|
-
|
|
2249
|
+
x("span", {
|
|
2196
2250
|
ref_key: "arrowRef",
|
|
2197
2251
|
ref: v,
|
|
2198
|
-
class:
|
|
2199
|
-
style:
|
|
2252
|
+
class: R(k.value),
|
|
2253
|
+
style: Y(m.value),
|
|
2200
2254
|
"aria-hidden": "true"
|
|
2201
2255
|
}, null, 6)
|
|
2202
|
-
], 14,
|
|
2256
|
+
], 14, $n)) : O("", !0)
|
|
2203
2257
|
]),
|
|
2204
2258
|
_: 3
|
|
2205
2259
|
})
|
|
@@ -2208,49 +2262,52 @@ const at = {
|
|
|
2208
2262
|
}
|
|
2209
2263
|
});
|
|
2210
2264
|
export {
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2265
|
+
An as VfAccordion,
|
|
2266
|
+
In as VfAlert,
|
|
2267
|
+
Ln as VfBadge,
|
|
2214
2268
|
Sn as VfButton,
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2269
|
+
Dn as VfCard,
|
|
2270
|
+
zn as VfCheckbox,
|
|
2271
|
+
Pn as VfDialog,
|
|
2272
|
+
Nn as VfDivider,
|
|
2273
|
+
Mn as VfDrawer,
|
|
2274
|
+
Hn as VfDropdown,
|
|
2275
|
+
Rn as VfHeading,
|
|
2276
|
+
Ie as VfIconButton,
|
|
2277
|
+
Fn as VfInput,
|
|
2223
2278
|
Kn as VfLink,
|
|
2224
2279
|
jn as VfNavMenu,
|
|
2225
2280
|
qn as VfPanel,
|
|
2226
2281
|
Un as VfPopover,
|
|
2227
|
-
Wn as
|
|
2282
|
+
Wn as VfProse,
|
|
2283
|
+
Yn as VfRadio,
|
|
2228
2284
|
cn as VfSwitch,
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2285
|
+
Xn as VfTableOfContents,
|
|
2286
|
+
Zn as VfTabs,
|
|
2287
|
+
Jn as VfTag,
|
|
2288
|
+
Gn as VfText,
|
|
2289
|
+
ea as VfTextarea,
|
|
2290
|
+
En as VfThemeProvider,
|
|
2291
|
+
Qn as VfThemeSwitch,
|
|
2292
|
+
ta as VfTooltip,
|
|
2293
|
+
Bn as VueForgeCore,
|
|
2294
|
+
oa as createThemePreset,
|
|
2295
|
+
We as createVueForgeCore,
|
|
2296
|
+
Bn as default,
|
|
2297
|
+
la as defaultThemePreset,
|
|
2298
|
+
ia as toMaxWidthQuery,
|
|
2299
|
+
ra as toMinWidthQuery,
|
|
2300
|
+
ua as useBreakpoint,
|
|
2301
|
+
ca as useBreakpointValue,
|
|
2302
|
+
da as useBreakpoints,
|
|
2246
2303
|
Oe as useClickOutside,
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2304
|
+
ce as useDisclosure,
|
|
2305
|
+
ve as useEscapeKey,
|
|
2306
|
+
ye as useFloating,
|
|
2307
|
+
Ae as useFocusTrap,
|
|
2251
2308
|
Q as useId,
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2309
|
+
Ce as useScrollLock,
|
|
2310
|
+
On as useTableOfContents,
|
|
2311
|
+
Qe as useTheme,
|
|
2312
|
+
fa as vfBreakpoints
|
|
2256
2313
|
};
|