@codemonster-ru/vueforge-core 1.7.0 → 1.9.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 +26 -19
- package/dist/components/breadcrumbs/VfBreadcrumbs.vue.d.ts +13 -0
- package/dist/components/breadcrumbs/VfBreadcrumbs.vue.d.ts.map +1 -0
- package/dist/components/breadcrumbs/index.d.ts +2 -0
- package/dist/components/breadcrumbs/index.d.ts.map +1 -0
- package/dist/components/dialog/VfDialog.vue.d.ts.map +1 -1
- package/dist/components/drawer/VfDrawer.vue.d.ts +2 -0
- package/dist/components/drawer/VfDrawer.vue.d.ts.map +1 -1
- package/dist/components/dropdown/VfDropdown.vue.d.ts +2 -0
- package/dist/components/dropdown/VfDropdown.vue.d.ts.map +1 -1
- package/dist/components/index.d.ts +4 -3
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/link/VfLink.vue.d.ts +4 -4
- package/dist/components/link/VfLink.vue.d.ts.map +1 -1
- package/dist/components/menu-bar/VfMenuBar.vue.d.ts +26 -0
- package/dist/components/menu-bar/VfMenuBar.vue.d.ts.map +1 -0
- package/dist/components/menu-bar/VfMenuBarItemNode.vue.d.ts +18 -0
- package/dist/components/menu-bar/VfMenuBarItemNode.vue.d.ts.map +1 -0
- package/dist/components/menu-bar/index.d.ts +2 -0
- package/dist/components/menu-bar/index.d.ts.map +1 -0
- package/dist/components/nav-menu/VfNavMenu.vue.d.ts +3 -1
- package/dist/components/nav-menu/VfNavMenu.vue.d.ts.map +1 -1
- package/dist/components/nav-menu/VfNavMenuItemNode.vue.d.ts.map +1 -1
- package/dist/components/select/VfSelect.vue.d.ts +31 -0
- package/dist/components/select/VfSelect.vue.d.ts.map +1 -0
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/index.d.ts.map +1 -0
- package/dist/components/{prose/VfProse.vue.d.ts → table/VfTable.vue.d.ts} +14 -5
- package/dist/components/table/VfTable.vue.d.ts.map +1 -0
- package/dist/components/table/index.d.ts +2 -0
- package/dist/components/table/index.d.ts.map +1 -0
- package/dist/components/table-of-contents/VfTableOfContents.vue.d.ts +7 -18
- package/dist/components/table-of-contents/VfTableOfContents.vue.d.ts.map +1 -1
- package/dist/components/tabs/VfTabs.vue.d.ts +6 -2
- package/dist/components/tabs/VfTabs.vue.d.ts.map +1 -1
- package/dist/components/theme-switch/VfThemeSwitch.vue.d.ts.map +1 -1
- package/dist/components/tooltip/VfTooltip.vue.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/providers/VfThemeProvider.vue.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme/default-preset-source.d.ts +41 -10
- package/dist/theme/default-preset-source.d.ts.map +1 -1
- package/dist/theme/utils.d.ts.map +1 -1
- package/dist/theme-api.js +1 -1
- package/dist/theme.css +26 -18
- package/dist/tokens.css +86 -55
- package/dist/types/components.d.ts +15 -3
- package/dist/types/components.d.ts.map +1 -1
- package/dist/types/theme.d.ts +43 -8
- package/dist/types/theme.d.ts.map +1 -1
- package/dist/{utils-T2JkaeUr.js → utils-CsZ7hQHm.js} +118 -82
- package/dist/vueforge-core.js +1975 -1263
- package/package.json +5 -2
- package/dist/components/heading/VfHeading.vue.d.ts +0 -26
- package/dist/components/heading/VfHeading.vue.d.ts.map +0 -1
- package/dist/components/heading/index.d.ts +0 -2
- package/dist/components/heading/index.d.ts.map +0 -1
- package/dist/components/prose/VfProse.vue.d.ts.map +0 -1
- package/dist/components/prose/index.d.ts +0 -2
- package/dist/components/prose/index.d.ts.map +0 -1
- package/dist/components/text/VfText.vue.d.ts +0 -28
- package/dist/components/text/VfText.vue.d.ts.map +0 -1
- package/dist/components/text/index.d.ts +0 -2
- package/dist/components/text/index.d.ts.map +0 -1
package/dist/vueforge-core.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import { c as
|
|
3
|
-
import { defineComponent as
|
|
4
|
-
import {
|
|
5
|
-
import { d as
|
|
6
|
-
import { t as
|
|
7
|
-
import { VueIconify as
|
|
8
|
-
import { autoUpdate as
|
|
9
|
-
const
|
|
10
|
-
function
|
|
1
|
+
import { r as ze, a as Pe } from "./utils-CsZ7hQHm.js";
|
|
2
|
+
import { c as za, d as Pa } from "./utils-CsZ7hQHm.js";
|
|
3
|
+
import { defineComponent as M, inject as xe, computed as a, ref as A, watch as ne, onMounted as me, onBeforeUnmount as se, provide as Re, renderSlot as O, toValue as X, nextTick as le, onUnmounted as Fe, openBlock as d, createElementBlock as _, createElementVNode as V, unref as y, toDisplayString as F, normalizeClass as P, createVNode as H, Transition as de, withCtx as G, createCommentVNode as E, useAttrs as j, mergeProps as N, createTextVNode as ve, Fragment as re, renderList as ue, createBlock as q, resolveDynamicComponent as fe, normalizeStyle as U, useSlots as ye, Teleport as he, normalizeProps as Be, guardReactiveProps as Ie, resolveComponent as Ee, Comment as He, Text as Ne } from "vue";
|
|
4
|
+
import { DEFAULT_STORAGE_KEY as Ke, DEFAULT_ATTRIBUTE as je, resolveTheme as qe, isThemeMode as We, vfMotionDurationsMs as Z } from "@codemonster-ru/vueforge-theme";
|
|
5
|
+
import { d as Ae } from "./useScrollLock-FYdn9vRp.js";
|
|
6
|
+
import { t as Fa, a as Ha, u as Na, b as Ka, c as ja, v as qa } from "./useScrollLock-FYdn9vRp.js";
|
|
7
|
+
import { VueIconify as J, icons as W } from "@codemonster-ru/vueiconify";
|
|
8
|
+
import { autoUpdate as Ue, computePosition as Xe, offset as ge, flip as we, shift as ke, arrow as Ve } from "@codemonster-ru/floater.js";
|
|
9
|
+
const Oe = Symbol("VueForgeConfig");
|
|
10
|
+
function Ye() {
|
|
11
11
|
return {
|
|
12
12
|
install(n, e = {}) {
|
|
13
|
-
const
|
|
14
|
-
n.provide(
|
|
15
|
-
theme:
|
|
13
|
+
const l = ze(e.theme);
|
|
14
|
+
n.provide(Oe, {
|
|
15
|
+
theme: l,
|
|
16
16
|
themeMode: {
|
|
17
17
|
defaultTheme: e.defaultTheme,
|
|
18
18
|
storageKey: e.themeStorageKey,
|
|
19
19
|
attribute: e.themeAttribute
|
|
20
20
|
}
|
|
21
|
-
}), typeof document < "u" &&
|
|
21
|
+
}), typeof document < "u" && Pe(l);
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const sa = Ye(), Le = Symbol("VfThemeContext"), ia = /* @__PURE__ */ M({
|
|
26
26
|
__name: "VfThemeProvider",
|
|
27
27
|
props: {
|
|
28
28
|
defaultTheme: {},
|
|
@@ -30,167 +30,171 @@ const Bn = We(), Ee = Symbol("VfThemeContext"), En = /* @__PURE__ */ S({
|
|
|
30
30
|
attribute: {}
|
|
31
31
|
},
|
|
32
32
|
setup(t) {
|
|
33
|
-
const n = t, e =
|
|
33
|
+
const n = t, e = xe(Oe, null), l = a(
|
|
34
34
|
() => n.defaultTheme ?? (e == null ? void 0 : e.themeMode.defaultTheme) ?? "system"
|
|
35
|
-
),
|
|
36
|
-
() =>
|
|
37
|
-
),
|
|
38
|
-
() => n.
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
), d = I(!1);
|
|
42
|
-
let T = null;
|
|
43
|
-
function g() {
|
|
35
|
+
), o = a(
|
|
36
|
+
() => n.storageKey ?? (e == null ? void 0 : e.themeMode.storageKey) ?? (e == null ? void 0 : e.theme.options.storageKey) ?? Ke
|
|
37
|
+
), i = a(
|
|
38
|
+
() => n.attribute ?? (e == null ? void 0 : e.themeMode.attribute) ?? (e == null ? void 0 : e.theme.options.attribute) ?? je
|
|
39
|
+
);
|
|
40
|
+
function r() {
|
|
44
41
|
if (typeof window > "u")
|
|
45
|
-
return;
|
|
46
|
-
const
|
|
47
|
-
|
|
42
|
+
return l.value;
|
|
43
|
+
const u = window.localStorage.getItem(o.value);
|
|
44
|
+
return We(u) ? u : l.value;
|
|
48
45
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
46
|
+
function g() {
|
|
47
|
+
return typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
48
|
+
}
|
|
49
|
+
const v = A(r()), T = A(g()), p = A(null), c = a(
|
|
50
|
+
() => qe(v.value, T.value)
|
|
51
|
+
), m = A(!1);
|
|
52
|
+
let h = null;
|
|
53
|
+
function x() {
|
|
54
|
+
h !== null && (window.clearTimeout(h), h = null);
|
|
51
55
|
}
|
|
52
|
-
function
|
|
56
|
+
function L(u, w = {}) {
|
|
53
57
|
if (typeof document > "u")
|
|
54
58
|
return;
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
const B = document.documentElement;
|
|
60
|
+
w.animate && (x(), B.classList.add("vf-theme-transitioning")), B.setAttribute(i.value, u), w.animate && (h = window.setTimeout(() => {
|
|
61
|
+
B.classList.remove("vf-theme-transitioning"), h = null;
|
|
58
62
|
}, 320));
|
|
59
63
|
}
|
|
60
|
-
function D(
|
|
61
|
-
var
|
|
62
|
-
if (
|
|
63
|
-
|
|
64
|
+
function D(u) {
|
|
65
|
+
var w;
|
|
66
|
+
if (u) {
|
|
67
|
+
T.value = u.matches ? "dark" : "light";
|
|
64
68
|
return;
|
|
65
69
|
}
|
|
66
|
-
|
|
70
|
+
T.value = (w = p.value) != null && w.matches ? "dark" : "light";
|
|
67
71
|
}
|
|
68
|
-
function
|
|
69
|
-
|
|
72
|
+
function R(u) {
|
|
73
|
+
v.value = u;
|
|
70
74
|
}
|
|
71
|
-
function
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
return
|
|
76
|
-
typeof window > "u" || window.localStorage.setItem(
|
|
77
|
-
}),
|
|
78
|
-
|
|
79
|
-
(
|
|
80
|
-
|
|
75
|
+
function I() {
|
|
76
|
+
const u = c.value === "dark" ? "light" : "dark";
|
|
77
|
+
v.value = u;
|
|
78
|
+
}
|
|
79
|
+
return ne(v, (u) => {
|
|
80
|
+
typeof window > "u" || window.localStorage.setItem(o.value, u);
|
|
81
|
+
}), ne(
|
|
82
|
+
c,
|
|
83
|
+
(u) => {
|
|
84
|
+
L(u, { animate: m.value });
|
|
81
85
|
},
|
|
82
86
|
{ immediate: !0 }
|
|
83
|
-
),
|
|
84
|
-
|
|
85
|
-
}),
|
|
86
|
-
var
|
|
87
|
-
(
|
|
88
|
-
}),
|
|
89
|
-
mode:
|
|
90
|
-
resolvedTheme:
|
|
91
|
-
setTheme:
|
|
92
|
-
toggleTheme:
|
|
93
|
-
}), (
|
|
87
|
+
), me(() => {
|
|
88
|
+
p.value = window.matchMedia("(prefers-color-scheme: dark)"), D(), p.value.addEventListener("change", D), m.value = !0;
|
|
89
|
+
}), se(() => {
|
|
90
|
+
var u;
|
|
91
|
+
(u = p.value) == null || u.removeEventListener("change", D), x();
|
|
92
|
+
}), Re(Le, {
|
|
93
|
+
mode: v,
|
|
94
|
+
resolvedTheme: c,
|
|
95
|
+
setTheme: R,
|
|
96
|
+
toggleTheme: I
|
|
97
|
+
}), (u, w) => O(u.$slots, "default");
|
|
94
98
|
}
|
|
95
99
|
});
|
|
96
|
-
function
|
|
97
|
-
const
|
|
98
|
-
if (
|
|
100
|
+
function $e(t, n, e = {}) {
|
|
101
|
+
const l = e.event ?? "pointerdown", o = (i) => {
|
|
102
|
+
if (X(e.enabled) === !1)
|
|
99
103
|
return;
|
|
100
|
-
const
|
|
101
|
-
if (!(
|
|
104
|
+
const r = i.target;
|
|
105
|
+
if (!(r instanceof Node))
|
|
102
106
|
return;
|
|
103
|
-
const
|
|
104
|
-
(
|
|
107
|
+
const g = Array.isArray(t) ? t.map((v) => v.value).filter((v) => v instanceof HTMLElement) : [t.value].filter(
|
|
108
|
+
(v) => v instanceof HTMLElement
|
|
105
109
|
);
|
|
106
|
-
|
|
110
|
+
g.length === 0 || g.some((v) => v.contains(r)) || n(i);
|
|
107
111
|
};
|
|
108
|
-
|
|
109
|
-
document.addEventListener(
|
|
110
|
-
}),
|
|
111
|
-
document.removeEventListener(
|
|
112
|
+
me(() => {
|
|
113
|
+
document.addEventListener(l, o);
|
|
114
|
+
}), se(() => {
|
|
115
|
+
document.removeEventListener(l, o);
|
|
112
116
|
});
|
|
113
117
|
}
|
|
114
|
-
function
|
|
115
|
-
const n =
|
|
116
|
-
() => n.value ? !!
|
|
118
|
+
function be(t = {}) {
|
|
119
|
+
const n = a(() => X(t.open) !== void 0), e = A(t.defaultOpen ?? !1), l = a(
|
|
120
|
+
() => n.value ? !!X(t.open) : e.value
|
|
117
121
|
);
|
|
118
|
-
|
|
119
|
-
() =>
|
|
120
|
-
(
|
|
121
|
-
|
|
122
|
+
ne(
|
|
123
|
+
() => X(t.open),
|
|
124
|
+
(i) => {
|
|
125
|
+
i !== void 0 && (e.value = i);
|
|
122
126
|
}
|
|
123
127
|
);
|
|
124
|
-
function
|
|
125
|
-
var
|
|
126
|
-
n.value || (e.value =
|
|
128
|
+
function o(i) {
|
|
129
|
+
var r;
|
|
130
|
+
n.value || (e.value = i), (r = t.onOpenChange) == null || r.call(t, i);
|
|
127
131
|
}
|
|
128
132
|
return {
|
|
129
|
-
isOpen:
|
|
130
|
-
open: () =>
|
|
131
|
-
close: () =>
|
|
132
|
-
toggle: () =>
|
|
133
|
-
setOpen:
|
|
133
|
+
isOpen: l,
|
|
134
|
+
open: () => o(!0),
|
|
135
|
+
close: () => o(!1),
|
|
136
|
+
toggle: () => o(!l.value),
|
|
137
|
+
setOpen: o
|
|
134
138
|
};
|
|
135
139
|
}
|
|
136
|
-
function
|
|
137
|
-
const e = n.event ?? "keydown",
|
|
138
|
-
|
|
140
|
+
function _e(t, n = {}) {
|
|
141
|
+
const e = n.event ?? "keydown", l = (o) => {
|
|
142
|
+
X(n.enabled) === !1 || o.key !== "Escape" || t(o);
|
|
139
143
|
};
|
|
140
|
-
|
|
141
|
-
document.addEventListener(e,
|
|
142
|
-
}),
|
|
143
|
-
document.removeEventListener(e,
|
|
144
|
+
me(() => {
|
|
145
|
+
document.addEventListener(e, l);
|
|
146
|
+
}), se(() => {
|
|
147
|
+
document.removeEventListener(e, l);
|
|
144
148
|
});
|
|
145
149
|
}
|
|
146
|
-
function
|
|
147
|
-
const
|
|
148
|
-
let
|
|
149
|
-
const
|
|
150
|
-
left: `${
|
|
151
|
-
top: `${
|
|
150
|
+
function Te(t, n, e = {}) {
|
|
151
|
+
const l = A(0), o = A(0), i = A(X(e.placement) ?? "bottom"), r = A({}), g = A(null);
|
|
152
|
+
let v = 0;
|
|
153
|
+
const T = a(() => ({
|
|
154
|
+
left: `${l.value}px`,
|
|
155
|
+
top: `${o.value}px`
|
|
152
156
|
}));
|
|
153
|
-
async function
|
|
157
|
+
async function p() {
|
|
154
158
|
if (!t.value || !n.value)
|
|
155
159
|
return;
|
|
156
|
-
const
|
|
160
|
+
const m = await Xe(
|
|
157
161
|
t.value,
|
|
158
162
|
n.value,
|
|
159
163
|
{
|
|
160
|
-
placement:
|
|
161
|
-
middleware:
|
|
162
|
-
strategy:
|
|
164
|
+
placement: X(e.placement) ?? i.value,
|
|
165
|
+
middleware: X(e.middleware),
|
|
166
|
+
strategy: X(e.strategy)
|
|
163
167
|
}
|
|
164
168
|
);
|
|
165
|
-
|
|
169
|
+
l.value = m.x, o.value = m.y, i.value = m.placement, r.value = m.middlewareData ?? {};
|
|
166
170
|
}
|
|
167
|
-
function
|
|
168
|
-
var
|
|
169
|
-
(
|
|
171
|
+
function c() {
|
|
172
|
+
var m;
|
|
173
|
+
(m = g.value) == null || m.call(g), g.value = null;
|
|
170
174
|
}
|
|
171
|
-
return
|
|
172
|
-
[() =>
|
|
173
|
-
async ([
|
|
174
|
-
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
|
|
175
|
+
return ne(
|
|
176
|
+
[() => X(e.enabled) !== !1, t, n],
|
|
177
|
+
async ([m]) => {
|
|
178
|
+
v += 1;
|
|
179
|
+
const h = v;
|
|
180
|
+
c(), !(!m || !t.value || !n.value) && (await le(), !(h !== v || X(e.enabled) === !1 || !t.value || !n.value) && (await p(), !(h !== v || X(e.enabled) === !1 || !t.value || !n.value) && (g.value = Ue(t.value, () => {
|
|
181
|
+
p();
|
|
178
182
|
}))));
|
|
179
183
|
},
|
|
180
184
|
{ immediate: !0 }
|
|
181
|
-
),
|
|
182
|
-
|
|
185
|
+
), se(() => {
|
|
186
|
+
c();
|
|
183
187
|
}), {
|
|
184
|
-
x:
|
|
185
|
-
y:
|
|
186
|
-
placement:
|
|
187
|
-
middlewareData:
|
|
188
|
-
styles:
|
|
189
|
-
update:
|
|
190
|
-
cleanup:
|
|
188
|
+
x: l,
|
|
189
|
+
y: o,
|
|
190
|
+
placement: i,
|
|
191
|
+
middlewareData: r,
|
|
192
|
+
styles: T,
|
|
193
|
+
update: p,
|
|
194
|
+
cleanup: c
|
|
191
195
|
};
|
|
192
196
|
}
|
|
193
|
-
const
|
|
197
|
+
const Ge = [
|
|
194
198
|
"a[href]",
|
|
195
199
|
"button:not([disabled])",
|
|
196
200
|
"input:not([disabled])",
|
|
@@ -198,107 +202,107 @@ const Ye = [
|
|
|
198
202
|
"textarea:not([disabled])",
|
|
199
203
|
'[tabindex]:not([tabindex="-1"])'
|
|
200
204
|
].join(", ");
|
|
201
|
-
function
|
|
205
|
+
function Qe(t) {
|
|
202
206
|
return Array.from(
|
|
203
|
-
t.querySelectorAll(
|
|
207
|
+
t.querySelectorAll(Ge)
|
|
204
208
|
).filter(
|
|
205
209
|
(n) => !n.hasAttribute("hidden") && n.getAttribute("aria-hidden") !== "true"
|
|
206
210
|
);
|
|
207
211
|
}
|
|
208
|
-
function
|
|
209
|
-
const e = (
|
|
210
|
-
if (
|
|
212
|
+
function De(t, n = {}) {
|
|
213
|
+
const e = (l) => {
|
|
214
|
+
if (l.key !== "Tab" || X(n.enabled) === !1)
|
|
211
215
|
return;
|
|
212
|
-
const
|
|
213
|
-
if (!
|
|
216
|
+
const o = t.value;
|
|
217
|
+
if (!o)
|
|
214
218
|
return;
|
|
215
|
-
const
|
|
216
|
-
if (
|
|
217
|
-
|
|
219
|
+
const i = Qe(o);
|
|
220
|
+
if (i.length === 0) {
|
|
221
|
+
l.preventDefault(), o.focus();
|
|
218
222
|
return;
|
|
219
223
|
}
|
|
220
|
-
const
|
|
221
|
-
if (
|
|
222
|
-
(
|
|
224
|
+
const r = i[0], g = i[i.length - 1], v = document.activeElement;
|
|
225
|
+
if (l.shiftKey) {
|
|
226
|
+
(v === r || v === o) && (l.preventDefault(), g.focus());
|
|
223
227
|
return;
|
|
224
228
|
}
|
|
225
|
-
|
|
229
|
+
v === g && (l.preventDefault(), r.focus());
|
|
226
230
|
};
|
|
227
|
-
|
|
231
|
+
me(() => {
|
|
228
232
|
document.addEventListener("keydown", e);
|
|
229
|
-
}),
|
|
233
|
+
}), se(() => {
|
|
230
234
|
document.removeEventListener("keydown", e);
|
|
231
235
|
});
|
|
232
236
|
}
|
|
233
|
-
let
|
|
234
|
-
function
|
|
235
|
-
const n = `${t.prefix ?? "vf"}-${++
|
|
236
|
-
return
|
|
237
|
+
let Je = 0;
|
|
238
|
+
function ee(t = {}) {
|
|
239
|
+
const n = `${t.prefix ?? "vf"}-${++Je}`;
|
|
240
|
+
return a(() => X(t.providedId) ?? n);
|
|
237
241
|
}
|
|
238
|
-
function
|
|
239
|
-
const n =
|
|
242
|
+
function ra(t) {
|
|
243
|
+
const n = A(void 0);
|
|
240
244
|
function e() {
|
|
241
|
-
return
|
|
245
|
+
return X(t.items);
|
|
242
246
|
}
|
|
243
|
-
function
|
|
244
|
-
return
|
|
247
|
+
function l() {
|
|
248
|
+
return X(t.offset) ?? 0;
|
|
245
249
|
}
|
|
246
|
-
function
|
|
247
|
-
return !!
|
|
250
|
+
function o() {
|
|
251
|
+
return !!X(t.disabled);
|
|
248
252
|
}
|
|
249
|
-
function
|
|
250
|
-
var
|
|
253
|
+
function i() {
|
|
254
|
+
var c;
|
|
251
255
|
if (typeof window > "u" || typeof document > "u")
|
|
252
256
|
return;
|
|
253
|
-
if (
|
|
257
|
+
if (o()) {
|
|
254
258
|
n.value = void 0;
|
|
255
259
|
return;
|
|
256
260
|
}
|
|
257
|
-
const
|
|
258
|
-
id:
|
|
259
|
-
element: document.getElementById(
|
|
261
|
+
const g = e(), v = l(), T = g.map((m) => ({
|
|
262
|
+
id: m.id,
|
|
263
|
+
element: document.getElementById(m.id)
|
|
260
264
|
})).filter(
|
|
261
|
-
(
|
|
265
|
+
(m) => !!m.element
|
|
262
266
|
);
|
|
263
|
-
if (!
|
|
267
|
+
if (!T.length) {
|
|
264
268
|
n.value = void 0;
|
|
265
269
|
return;
|
|
266
270
|
}
|
|
267
|
-
let
|
|
268
|
-
for (const
|
|
269
|
-
if (
|
|
270
|
-
|
|
271
|
+
let p = (c = T[0]) == null ? void 0 : c.id;
|
|
272
|
+
for (const m of T) {
|
|
273
|
+
if (m.element.getBoundingClientRect().top - v <= 0) {
|
|
274
|
+
p = m.id;
|
|
271
275
|
continue;
|
|
272
276
|
}
|
|
273
|
-
|
|
277
|
+
p || (p = m.id);
|
|
274
278
|
break;
|
|
275
279
|
}
|
|
276
|
-
n.value =
|
|
280
|
+
n.value = p;
|
|
277
281
|
}
|
|
278
|
-
function
|
|
279
|
-
|
|
282
|
+
function r() {
|
|
283
|
+
i();
|
|
280
284
|
}
|
|
281
|
-
return
|
|
282
|
-
await
|
|
283
|
-
}),
|
|
284
|
-
window.removeEventListener("scroll",
|
|
285
|
-
}),
|
|
285
|
+
return me(async () => {
|
|
286
|
+
await le(), i(), window.addEventListener("scroll", r, { passive: !0 }), window.addEventListener("resize", r), window.addEventListener("hashchange", r);
|
|
287
|
+
}), Fe(() => {
|
|
288
|
+
window.removeEventListener("scroll", r), window.removeEventListener("resize", r), window.removeEventListener("hashchange", r);
|
|
289
|
+
}), ne(
|
|
286
290
|
() => [
|
|
287
|
-
e().map((
|
|
288
|
-
|
|
289
|
-
|
|
291
|
+
e().map((g) => g.id).join("|"),
|
|
292
|
+
l(),
|
|
293
|
+
o()
|
|
290
294
|
],
|
|
291
295
|
async () => {
|
|
292
|
-
await
|
|
296
|
+
await le(), i();
|
|
293
297
|
},
|
|
294
298
|
{ immediate: !0 }
|
|
295
299
|
), {
|
|
296
300
|
activeId: n,
|
|
297
|
-
updateActiveId:
|
|
301
|
+
updateActiveId: i
|
|
298
302
|
};
|
|
299
303
|
}
|
|
300
|
-
function
|
|
301
|
-
const t =
|
|
304
|
+
function Ze() {
|
|
305
|
+
const t = xe(Le);
|
|
302
306
|
if (!t)
|
|
303
307
|
throw new Error("useTheme must be used inside VfThemeProvider.");
|
|
304
308
|
return {
|
|
@@ -308,7 +312,7 @@ function Qe() {
|
|
|
308
312
|
toggleTheme: t.toggleTheme
|
|
309
313
|
};
|
|
310
314
|
}
|
|
311
|
-
const
|
|
315
|
+
const et = { class: "vf-accordion" }, tt = ["id", "aria-controls", "aria-expanded", "disabled"], nt = ["id", "aria-labelledby"], at = { class: "vf-accordion__content-inner" }, ua = /* @__PURE__ */ M({
|
|
312
316
|
__name: "VfAccordion",
|
|
313
317
|
props: {
|
|
314
318
|
open: { type: Boolean, default: void 0 },
|
|
@@ -318,113 +322,113 @@ const Je = { class: "vf-accordion" }, Ze = ["id", "aria-controls", "aria-expande
|
|
|
318
322
|
},
|
|
319
323
|
emits: ["update:open", "openChange"],
|
|
320
324
|
setup(t, { emit: n }) {
|
|
321
|
-
const e = t,
|
|
325
|
+
const e = t, l = n, o = ee({ prefix: "vf-accordion-trigger" }), i = ee({ prefix: "vf-accordion-content" }), r = be({
|
|
322
326
|
defaultOpen: e.defaultOpen,
|
|
323
|
-
open:
|
|
324
|
-
onOpenChange: (
|
|
325
|
-
|
|
327
|
+
open: a(() => e.open),
|
|
328
|
+
onOpenChange: (I) => {
|
|
329
|
+
l("update:open", I), l("openChange", I);
|
|
326
330
|
}
|
|
327
|
-
}),
|
|
331
|
+
}), g = r.isOpen, v = [
|
|
328
332
|
"height var(--vf-motion-duration-normal) var(--vf-motion-ease-standard)",
|
|
329
333
|
"opacity var(--vf-motion-duration-normal) var(--vf-motion-ease-standard)"
|
|
330
334
|
].join(", ");
|
|
331
|
-
function
|
|
332
|
-
const
|
|
333
|
-
return (
|
|
334
|
-
}
|
|
335
|
-
function
|
|
336
|
-
e.disabled ||
|
|
337
|
-
}
|
|
338
|
-
function
|
|
339
|
-
(
|
|
340
|
-
}
|
|
341
|
-
function
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
}
|
|
345
|
-
function
|
|
346
|
-
const
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}), window.setTimeout(
|
|
350
|
-
}
|
|
351
|
-
function
|
|
352
|
-
const
|
|
353
|
-
|
|
354
|
-
}
|
|
355
|
-
function
|
|
356
|
-
const
|
|
357
|
-
|
|
358
|
-
}
|
|
359
|
-
function
|
|
360
|
-
const
|
|
361
|
-
|
|
362
|
-
}
|
|
363
|
-
function
|
|
364
|
-
const
|
|
365
|
-
|
|
366
|
-
}
|
|
367
|
-
return (
|
|
368
|
-
|
|
369
|
-
id:
|
|
370
|
-
"aria-controls":
|
|
371
|
-
"aria-expanded":
|
|
335
|
+
function T(I) {
|
|
336
|
+
const u = I.firstElementChild;
|
|
337
|
+
return (u == null ? void 0 : u.offsetHeight) ?? I.scrollHeight;
|
|
338
|
+
}
|
|
339
|
+
function p() {
|
|
340
|
+
e.disabled || r.toggle();
|
|
341
|
+
}
|
|
342
|
+
function c(I) {
|
|
343
|
+
(I.key === "Enter" || I.key === " ") && (I.preventDefault(), p());
|
|
344
|
+
}
|
|
345
|
+
function m(I) {
|
|
346
|
+
const u = I;
|
|
347
|
+
u.style.height = "0px", u.style.opacity = "0", u.style.overflow = "hidden";
|
|
348
|
+
}
|
|
349
|
+
function h(I, u) {
|
|
350
|
+
const w = I;
|
|
351
|
+
w.style.transition = v, requestAnimationFrame(() => {
|
|
352
|
+
w.style.height = `${T(w)}px`, w.style.opacity = "1";
|
|
353
|
+
}), window.setTimeout(u, Z.normal);
|
|
354
|
+
}
|
|
355
|
+
function x(I) {
|
|
356
|
+
const u = I;
|
|
357
|
+
u.style.height = "", u.style.opacity = "", u.style.overflow = "", u.style.transition = "";
|
|
358
|
+
}
|
|
359
|
+
function L(I) {
|
|
360
|
+
const u = I;
|
|
361
|
+
u.style.height = `${T(u)}px`, u.style.opacity = "1", u.style.overflow = "hidden";
|
|
362
|
+
}
|
|
363
|
+
function D(I, u) {
|
|
364
|
+
const w = I;
|
|
365
|
+
w.style.transition = v, w.offsetHeight, w.style.height = "0px", w.style.opacity = "0", window.setTimeout(u, Z.normal);
|
|
366
|
+
}
|
|
367
|
+
function R(I) {
|
|
368
|
+
const u = I;
|
|
369
|
+
u.style.height = "", u.style.opacity = "", u.style.overflow = "", u.style.transition = "";
|
|
370
|
+
}
|
|
371
|
+
return (I, u) => (d(), _("section", et, [
|
|
372
|
+
V("button", {
|
|
373
|
+
id: y(o),
|
|
374
|
+
"aria-controls": y(i),
|
|
375
|
+
"aria-expanded": y(g),
|
|
372
376
|
disabled: t.disabled,
|
|
373
377
|
class: "vf-accordion__trigger",
|
|
374
378
|
type: "button",
|
|
375
|
-
onClick:
|
|
376
|
-
onKeydown:
|
|
379
|
+
onClick: p,
|
|
380
|
+
onKeydown: c
|
|
377
381
|
}, [
|
|
378
|
-
|
|
379
|
-
|
|
382
|
+
O(I.$slots, "trigger", { open: y(g) }, () => [
|
|
383
|
+
V("span", null, F(t.title), 1)
|
|
380
384
|
]),
|
|
381
|
-
|
|
385
|
+
V("span", {
|
|
382
386
|
"aria-hidden": "true",
|
|
383
|
-
class:
|
|
387
|
+
class: P(["vf-accordion__icon", y(g) && "vf-accordion__icon--open"])
|
|
384
388
|
}, [
|
|
385
|
-
|
|
386
|
-
icon:
|
|
389
|
+
H(y(J), {
|
|
390
|
+
icon: y(W).chevronDown,
|
|
387
391
|
size: "0.875rem"
|
|
388
392
|
}, null, 8, ["icon"])
|
|
389
393
|
], 2)
|
|
390
|
-
], 40,
|
|
391
|
-
|
|
394
|
+
], 40, tt),
|
|
395
|
+
H(de, {
|
|
392
396
|
css: !1,
|
|
393
|
-
onBeforeEnter:
|
|
394
|
-
onEnter:
|
|
395
|
-
onAfterEnter:
|
|
396
|
-
onBeforeLeave:
|
|
397
|
-
onLeave:
|
|
398
|
-
onAfterLeave:
|
|
397
|
+
onBeforeEnter: m,
|
|
398
|
+
onEnter: h,
|
|
399
|
+
onAfterEnter: x,
|
|
400
|
+
onBeforeLeave: L,
|
|
401
|
+
onLeave: D,
|
|
402
|
+
onAfterLeave: R
|
|
399
403
|
}, {
|
|
400
|
-
default:
|
|
401
|
-
|
|
404
|
+
default: G(() => [
|
|
405
|
+
y(g) ? (d(), _("div", {
|
|
402
406
|
key: 0,
|
|
403
|
-
id:
|
|
404
|
-
"aria-labelledby":
|
|
407
|
+
id: y(i),
|
|
408
|
+
"aria-labelledby": y(o),
|
|
405
409
|
class: "vf-accordion__content",
|
|
406
410
|
role: "region"
|
|
407
411
|
}, [
|
|
408
|
-
|
|
409
|
-
|
|
412
|
+
V("div", at, [
|
|
413
|
+
O(I.$slots, "default", { open: y(g) })
|
|
410
414
|
])
|
|
411
|
-
], 8,
|
|
415
|
+
], 8, nt)) : E("", !0)
|
|
412
416
|
]),
|
|
413
417
|
_: 3
|
|
414
418
|
})
|
|
415
419
|
]));
|
|
416
420
|
}
|
|
417
421
|
});
|
|
418
|
-
function
|
|
422
|
+
function K(...t) {
|
|
419
423
|
return t.filter(Boolean).join(" ");
|
|
420
424
|
}
|
|
421
|
-
const
|
|
425
|
+
const ot = {
|
|
422
426
|
class: "vf-alert__icon",
|
|
423
427
|
"aria-hidden": "true"
|
|
424
|
-
},
|
|
428
|
+
}, lt = { class: "vf-alert__content" }, st = {
|
|
425
429
|
key: 0,
|
|
426
430
|
class: "vf-alert__title"
|
|
427
|
-
},
|
|
431
|
+
}, it = { class: "vf-alert__body" }, da = /* @__PURE__ */ M({
|
|
428
432
|
inheritAttrs: !1,
|
|
429
433
|
__name: "VfAlert",
|
|
430
434
|
props: {
|
|
@@ -432,46 +436,121 @@ const nt = {
|
|
|
432
436
|
title: { default: void 0 }
|
|
433
437
|
},
|
|
434
438
|
setup(t) {
|
|
435
|
-
const n = t, e =
|
|
436
|
-
() =>
|
|
437
|
-
),
|
|
438
|
-
return (
|
|
439
|
-
class:
|
|
439
|
+
const n = t, e = j(), l = a(
|
|
440
|
+
() => K("vf-alert", n.tone !== "primary" && `vf-alert--${n.tone}`)
|
|
441
|
+
), o = a(() => 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);
|
|
442
|
+
return (i, r) => (d(), _("section", N({
|
|
443
|
+
class: l.value,
|
|
440
444
|
role: "alert"
|
|
441
|
-
},
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
icon:
|
|
445
|
+
}, y(e)), [
|
|
446
|
+
V("div", ot, [
|
|
447
|
+
H(y(J), {
|
|
448
|
+
icon: o.value,
|
|
445
449
|
size: "2rem"
|
|
446
450
|
}, null, 8, ["icon"])
|
|
447
451
|
]),
|
|
448
|
-
|
|
449
|
-
n.title ||
|
|
450
|
-
|
|
451
|
-
|
|
452
|
+
V("div", lt, [
|
|
453
|
+
n.title || i.$slots.title ? (d(), _("p", st, [
|
|
454
|
+
O(i.$slots, "title", {}, () => [
|
|
455
|
+
ve(F(n.title), 1)
|
|
452
456
|
])
|
|
453
|
-
])) :
|
|
454
|
-
|
|
455
|
-
|
|
457
|
+
])) : E("", !0),
|
|
458
|
+
V("div", it, [
|
|
459
|
+
O(i.$slots, "default")
|
|
456
460
|
])
|
|
457
461
|
])
|
|
458
462
|
], 16));
|
|
459
463
|
}
|
|
460
|
-
}),
|
|
464
|
+
}), ca = /* @__PURE__ */ M({
|
|
461
465
|
inheritAttrs: !1,
|
|
462
466
|
__name: "VfBadge",
|
|
463
467
|
props: {
|
|
464
468
|
tone: { default: "neutral" }
|
|
465
469
|
},
|
|
466
470
|
setup(t) {
|
|
467
|
-
const n = t, e =
|
|
468
|
-
() =>
|
|
471
|
+
const n = t, e = j(), l = a(
|
|
472
|
+
() => K("vf-badge", n.tone !== "neutral" && `vf-badge--${n.tone}`)
|
|
469
473
|
);
|
|
470
|
-
return (
|
|
471
|
-
|
|
474
|
+
return (o, i) => (d(), _("span", N({ class: l.value }, y(e)), [
|
|
475
|
+
O(o.$slots, "default")
|
|
472
476
|
], 16));
|
|
473
477
|
}
|
|
474
|
-
}),
|
|
478
|
+
}), rt = ["aria-label"], ut = { class: "vf-breadcrumbs__list" }, dt = ["aria-current"], ct = {
|
|
479
|
+
key: 2,
|
|
480
|
+
class: "vf-breadcrumbs__separator",
|
|
481
|
+
"aria-hidden": "true"
|
|
482
|
+
}, fa = /* @__PURE__ */ M({
|
|
483
|
+
inheritAttrs: !1,
|
|
484
|
+
__name: "VfBreadcrumbs",
|
|
485
|
+
props: {
|
|
486
|
+
items: {},
|
|
487
|
+
ariaLabel: { default: "Breadcrumb" },
|
|
488
|
+
component: { default: void 0 }
|
|
489
|
+
},
|
|
490
|
+
setup(t) {
|
|
491
|
+
const n = t, e = j(), l = a(
|
|
492
|
+
() => K("vf-breadcrumbs", e.class)
|
|
493
|
+
), o = a(
|
|
494
|
+
() => Object.fromEntries(Object.entries(e).filter(([c]) => c !== "class"))
|
|
495
|
+
), i = a(
|
|
496
|
+
() => n.items.some((c) => c.current)
|
|
497
|
+
);
|
|
498
|
+
function r(c, m) {
|
|
499
|
+
return c.current || !i.value && m === n.items.length - 1;
|
|
500
|
+
}
|
|
501
|
+
function g(c, m) {
|
|
502
|
+
return !c.disabled && !r(c, m) && (c.href || c.to);
|
|
503
|
+
}
|
|
504
|
+
function v(c) {
|
|
505
|
+
return c.rel ? c.rel : c.target === "_blank" ? "noopener noreferrer" : void 0;
|
|
506
|
+
}
|
|
507
|
+
function T(c) {
|
|
508
|
+
return c.to !== void 0 ? n.component ?? fe("RouterLink") : "a";
|
|
509
|
+
}
|
|
510
|
+
function p(c) {
|
|
511
|
+
return c.to !== void 0 ? {
|
|
512
|
+
to: c.to,
|
|
513
|
+
target: c.target,
|
|
514
|
+
rel: v(c)
|
|
515
|
+
} : {
|
|
516
|
+
href: c.href,
|
|
517
|
+
target: c.target,
|
|
518
|
+
rel: v(c)
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
return (c, m) => (d(), _("nav", N({
|
|
522
|
+
class: l.value,
|
|
523
|
+
"aria-label": n.ariaLabel
|
|
524
|
+
}, o.value), [
|
|
525
|
+
V("ol", ut, [
|
|
526
|
+
(d(!0), _(re, null, ue(n.items, (h, x) => (d(), _("li", {
|
|
527
|
+
key: `${h.label}-${x}`,
|
|
528
|
+
class: "vf-breadcrumbs__item"
|
|
529
|
+
}, [
|
|
530
|
+
g(h, x) ? (d(), q(fe(T(h)), N({
|
|
531
|
+
key: 0,
|
|
532
|
+
ref_for: !0
|
|
533
|
+
}, p(h), { class: "vf-breadcrumbs__link" }), {
|
|
534
|
+
default: G(() => [
|
|
535
|
+
ve(F(h.label), 1)
|
|
536
|
+
]),
|
|
537
|
+
_: 2
|
|
538
|
+
}, 1040)) : (d(), _("span", {
|
|
539
|
+
key: 1,
|
|
540
|
+
class: P(["vf-breadcrumbs__current", h.disabled && "vf-breadcrumbs__current--disabled"]),
|
|
541
|
+
"aria-current": r(h, x) ? "page" : void 0
|
|
542
|
+
}, F(h.label), 11, dt)),
|
|
543
|
+
x < n.items.length - 1 ? (d(), _("span", ct, [
|
|
544
|
+
H(y(J), {
|
|
545
|
+
icon: y(W).chevronRight,
|
|
546
|
+
size: "0.875rem"
|
|
547
|
+
}, null, 8, ["icon"])
|
|
548
|
+
])) : E("", !0)
|
|
549
|
+
]))), 128))
|
|
550
|
+
])
|
|
551
|
+
], 16, rt));
|
|
552
|
+
}
|
|
553
|
+
}), ft = ["type"], va = /* @__PURE__ */ M({
|
|
475
554
|
inheritAttrs: !1,
|
|
476
555
|
__name: "VfButton",
|
|
477
556
|
props: {
|
|
@@ -481,25 +560,25 @@ const nt = {
|
|
|
481
560
|
type: { default: "button" }
|
|
482
561
|
},
|
|
483
562
|
setup(t) {
|
|
484
|
-
const n = t, e =
|
|
485
|
-
() =>
|
|
563
|
+
const n = t, e = j(), l = a(
|
|
564
|
+
() => K(
|
|
486
565
|
"vf-button",
|
|
487
566
|
`vf-button--${n.variant}`,
|
|
488
567
|
n.size !== "md" && `vf-button--${n.size}`,
|
|
489
568
|
n.block && "vf-button--block"
|
|
490
569
|
)
|
|
491
570
|
);
|
|
492
|
-
return (
|
|
493
|
-
class:
|
|
571
|
+
return (o, i) => (d(), _("button", N({
|
|
572
|
+
class: l.value,
|
|
494
573
|
type: n.type
|
|
495
|
-
},
|
|
496
|
-
|
|
497
|
-
], 16,
|
|
574
|
+
}, y(e)), [
|
|
575
|
+
O(o.$slots, "default")
|
|
576
|
+
], 16, ft));
|
|
498
577
|
}
|
|
499
|
-
}),
|
|
578
|
+
}), vt = { key: 0 }, mt = { class: "vf-card__title" }, pt = {
|
|
500
579
|
key: 1,
|
|
501
580
|
class: "vf-card__body"
|
|
502
|
-
},
|
|
581
|
+
}, ht = { key: 2 }, ma = /* @__PURE__ */ M({
|
|
503
582
|
inheritAttrs: !1,
|
|
504
583
|
__name: "VfCard",
|
|
505
584
|
props: {
|
|
@@ -507,27 +586,27 @@ const nt = {
|
|
|
507
586
|
compact: { type: Boolean, default: !1 }
|
|
508
587
|
},
|
|
509
588
|
setup(t) {
|
|
510
|
-
const n = t, e =
|
|
511
|
-
() =>
|
|
589
|
+
const n = t, e = j(), l = a(
|
|
590
|
+
() => K("vf-card", n.compact && "vf-card--compact")
|
|
512
591
|
);
|
|
513
|
-
return (
|
|
514
|
-
n.title ||
|
|
515
|
-
|
|
516
|
-
|
|
592
|
+
return (o, i) => (d(), _("section", N({ class: l.value }, y(e)), [
|
|
593
|
+
n.title || o.$slots.header ? (d(), _("header", vt, [
|
|
594
|
+
O(o.$slots, "header", {}, () => [
|
|
595
|
+
V("h3", mt, F(n.title), 1)
|
|
517
596
|
])
|
|
518
|
-
])) :
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
])) :
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
])) :
|
|
597
|
+
])) : E("", !0),
|
|
598
|
+
o.$slots.default ? (d(), _("div", pt, [
|
|
599
|
+
O(o.$slots, "default")
|
|
600
|
+
])) : E("", !0),
|
|
601
|
+
o.$slots.footer ? (d(), _("footer", ht, [
|
|
602
|
+
O(o.$slots, "footer")
|
|
603
|
+
])) : E("", !0)
|
|
525
604
|
], 16));
|
|
526
605
|
}
|
|
527
|
-
}),
|
|
606
|
+
}), bt = ["checked", "disabled", "aria-invalid"], _t = {
|
|
528
607
|
key: 0,
|
|
529
608
|
class: "vf-checkbox__content"
|
|
530
|
-
},
|
|
609
|
+
}, pa = /* @__PURE__ */ M({
|
|
531
610
|
inheritAttrs: !1,
|
|
532
611
|
__name: "VfCheckbox",
|
|
533
612
|
props: {
|
|
@@ -539,49 +618,49 @@ const nt = {
|
|
|
539
618
|
},
|
|
540
619
|
emits: ["update:modelValue", "change"],
|
|
541
620
|
setup(t, { emit: n }) {
|
|
542
|
-
const e = t,
|
|
543
|
-
() =>
|
|
621
|
+
const e = t, l = n, o = j(), i = a(
|
|
622
|
+
() => K(
|
|
544
623
|
"vf-checkbox",
|
|
545
624
|
`vf-checkbox--${e.size}`,
|
|
546
625
|
e.modelValue && "vf-checkbox--checked",
|
|
547
626
|
e.invalid && "vf-checkbox--invalid",
|
|
548
627
|
e.disabled && "vf-checkbox--disabled",
|
|
549
|
-
|
|
628
|
+
o.class
|
|
550
629
|
)
|
|
551
|
-
),
|
|
630
|
+
), r = a(() => o.style), g = a(
|
|
552
631
|
() => Object.fromEntries(
|
|
553
|
-
Object.entries(
|
|
632
|
+
Object.entries(o).filter(([T]) => T !== "class" && T !== "style")
|
|
554
633
|
)
|
|
555
634
|
);
|
|
556
|
-
function
|
|
557
|
-
const
|
|
558
|
-
|
|
635
|
+
function v(T) {
|
|
636
|
+
const p = T.target.checked;
|
|
637
|
+
l("update:modelValue", p), l("change", p);
|
|
559
638
|
}
|
|
560
|
-
return (
|
|
561
|
-
class:
|
|
562
|
-
style:
|
|
639
|
+
return (T, p) => (d(), _("label", {
|
|
640
|
+
class: P(i.value),
|
|
641
|
+
style: U(r.value)
|
|
563
642
|
}, [
|
|
564
|
-
|
|
643
|
+
V("input", N({
|
|
565
644
|
class: "vf-checkbox__input",
|
|
566
645
|
type: "checkbox",
|
|
567
646
|
checked: e.modelValue,
|
|
568
647
|
disabled: e.disabled,
|
|
569
648
|
"aria-invalid": e.invalid || void 0
|
|
570
|
-
},
|
|
571
|
-
|
|
649
|
+
}, g.value, { onChange: v }), null, 16, bt),
|
|
650
|
+
p[0] || (p[0] = V("span", {
|
|
572
651
|
class: "vf-checkbox__control",
|
|
573
652
|
"aria-hidden": "true"
|
|
574
653
|
}, [
|
|
575
|
-
|
|
654
|
+
V("span", { class: "vf-checkbox__mark" })
|
|
576
655
|
], -1)),
|
|
577
|
-
t.label ||
|
|
578
|
-
|
|
579
|
-
|
|
656
|
+
t.label || T.$slots.default ? (d(), _("span", _t, [
|
|
657
|
+
O(T.$slots, "default", {}, () => [
|
|
658
|
+
ve(F(t.label), 1)
|
|
580
659
|
])
|
|
581
|
-
])) :
|
|
660
|
+
])) : E("", !0)
|
|
582
661
|
], 6));
|
|
583
662
|
}
|
|
584
|
-
}),
|
|
663
|
+
}), yt = ["type"], Se = /* @__PURE__ */ M({
|
|
585
664
|
inheritAttrs: !1,
|
|
586
665
|
__name: "VfIconButton",
|
|
587
666
|
props: {
|
|
@@ -591,34 +670,34 @@ const nt = {
|
|
|
591
670
|
type: { default: "button" }
|
|
592
671
|
},
|
|
593
672
|
setup(t) {
|
|
594
|
-
const n = t, e =
|
|
595
|
-
() =>
|
|
673
|
+
const n = t, e = j(), l = a(
|
|
674
|
+
() => K(
|
|
596
675
|
"vf-icon-button",
|
|
597
|
-
|
|
676
|
+
`vf-icon-button--${n.variant}`,
|
|
598
677
|
n.size !== "md" && `vf-icon-button--${n.size}`
|
|
599
678
|
)
|
|
600
|
-
),
|
|
601
|
-
return (
|
|
602
|
-
class:
|
|
679
|
+
), o = a(() => n.size === "sm" ? "0.875rem" : n.size === "lg" ? "1.125rem" : "1rem");
|
|
680
|
+
return (i, r) => (d(), _("button", N({
|
|
681
|
+
class: l.value,
|
|
603
682
|
type: n.type
|
|
604
|
-
},
|
|
605
|
-
|
|
683
|
+
}, y(e)), [
|
|
684
|
+
H(y(J), {
|
|
606
685
|
icon: n.icon,
|
|
607
|
-
size:
|
|
686
|
+
size: o.value,
|
|
608
687
|
"aria-hidden": "true"
|
|
609
688
|
}, null, 8, ["icon", "size"])
|
|
610
|
-
], 16,
|
|
689
|
+
], 16, yt));
|
|
611
690
|
}
|
|
612
|
-
}),
|
|
691
|
+
}), gt = ["aria-labelledby"], wt = {
|
|
613
692
|
key: 0,
|
|
614
693
|
class: "vf-drawer__header"
|
|
615
|
-
},
|
|
694
|
+
}, kt = ["id"], $t = { class: "vf-drawer__actions" }, Tt = {
|
|
616
695
|
key: 1,
|
|
617
696
|
class: "vf-drawer__body"
|
|
618
|
-
},
|
|
697
|
+
}, Vt = {
|
|
619
698
|
key: 2,
|
|
620
699
|
class: "vf-drawer__footer"
|
|
621
|
-
},
|
|
700
|
+
}, ha = /* @__PURE__ */ M({
|
|
622
701
|
inheritAttrs: !1,
|
|
623
702
|
__name: "VfDrawer",
|
|
624
703
|
props: {
|
|
@@ -627,6 +706,7 @@ const nt = {
|
|
|
627
706
|
title: { default: void 0 },
|
|
628
707
|
size: { default: "md" },
|
|
629
708
|
placement: { default: "right" },
|
|
709
|
+
rounded: { type: Boolean, default: !1 },
|
|
630
710
|
offsetTop: { default: void 0 },
|
|
631
711
|
bodyPadding: { default: void 0 },
|
|
632
712
|
teleportTo: { type: [String, null, Boolean], default: void 0 },
|
|
@@ -638,166 +718,168 @@ const nt = {
|
|
|
638
718
|
},
|
|
639
719
|
emits: ["update:open", "openChange"],
|
|
640
720
|
setup(t, { emit: n }) {
|
|
641
|
-
const e = t,
|
|
721
|
+
const e = t, l = n, o = j(), i = A(null), r = A(null), g = ye(), v = ee({ prefix: "vf-drawer-title" }), T = be({
|
|
642
722
|
defaultOpen: e.defaultOpen,
|
|
643
|
-
open:
|
|
644
|
-
onOpenChange: (
|
|
645
|
-
|
|
723
|
+
open: a(() => e.open),
|
|
724
|
+
onOpenChange: ($) => {
|
|
725
|
+
l("update:open", $), l("openChange", $);
|
|
646
726
|
}
|
|
647
|
-
}),
|
|
648
|
-
enter:
|
|
649
|
-
leave:
|
|
727
|
+
}), p = T.isOpen, c = {
|
|
728
|
+
enter: Z.normal,
|
|
729
|
+
leave: Z.normal
|
|
650
730
|
};
|
|
651
|
-
function
|
|
652
|
-
return typeof
|
|
653
|
-
}
|
|
654
|
-
const
|
|
655
|
-
const
|
|
656
|
-
return
|
|
657
|
-
}),
|
|
658
|
-
() =>
|
|
731
|
+
function m($) {
|
|
732
|
+
return typeof $ == "number" ? `${$}px` : $;
|
|
733
|
+
}
|
|
734
|
+
const h = a(() => {
|
|
735
|
+
const $ = {}, C = m(e.offsetTop), ie = m(e.bodyPadding);
|
|
736
|
+
return C != null && ($["--vf-drawer-offset-top"] = C), ie != null && ($["--vf-drawer-body-padding"] = ie), $;
|
|
737
|
+
}), x = a(
|
|
738
|
+
() => K(
|
|
659
739
|
"vf-drawer",
|
|
660
740
|
`vf-drawer--${e.placement}`,
|
|
741
|
+
e.rounded && "vf-drawer--rounded",
|
|
661
742
|
e.offsetTop != null && "vf-drawer--offset-top"
|
|
662
743
|
)
|
|
663
|
-
),
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
]),
|
|
667
|
-
Object.entries(
|
|
668
|
-
)),
|
|
744
|
+
), L = a(() => [
|
|
745
|
+
h.value,
|
|
746
|
+
o.style
|
|
747
|
+
]), D = a(() => Object.fromEntries(
|
|
748
|
+
Object.entries(o).filter(([$]) => $ !== "class" && $ !== "style")
|
|
749
|
+
)), R = a(
|
|
669
750
|
() => e.disableTeleport || e.teleportTo === !1 || e.teleportTo === null
|
|
670
|
-
),
|
|
671
|
-
() =>
|
|
751
|
+
), I = a(() => e.scrollLockTarget === !1 ? null : e.scrollLockTarget), u = a(() => typeof e.teleportTo == "string" || typeof HTMLElement < "u" && e.teleportTo instanceof HTMLElement ? e.teleportTo : "body"), w = a(
|
|
752
|
+
() => K(
|
|
672
753
|
"vf-drawer__content",
|
|
673
754
|
`vf-drawer__content--${e.placement}`,
|
|
674
755
|
`vf-drawer__content--${e.size}`
|
|
675
756
|
)
|
|
676
|
-
),
|
|
677
|
-
() => e.title ||
|
|
757
|
+
), B = a(() => !!g.header), s = a(
|
|
758
|
+
() => e.title || B.value ? v.value : void 0
|
|
678
759
|
);
|
|
679
|
-
function
|
|
680
|
-
|
|
760
|
+
function k() {
|
|
761
|
+
T.close();
|
|
681
762
|
}
|
|
682
|
-
function
|
|
683
|
-
e.closeOnOverlayClick &&
|
|
763
|
+
function f() {
|
|
764
|
+
e.closeOnOverlayClick && k();
|
|
684
765
|
}
|
|
685
|
-
function
|
|
686
|
-
const
|
|
687
|
-
if (
|
|
766
|
+
function S() {
|
|
767
|
+
const $ = i.value;
|
|
768
|
+
if (!$)
|
|
688
769
|
return;
|
|
689
|
-
const
|
|
770
|
+
const C = $.querySelector(
|
|
690
771
|
"[autofocus], [data-autofocus]"
|
|
691
772
|
);
|
|
692
|
-
if (
|
|
693
|
-
|
|
773
|
+
if (C) {
|
|
774
|
+
C.focus();
|
|
694
775
|
return;
|
|
695
776
|
}
|
|
696
|
-
|
|
777
|
+
$.focus();
|
|
697
778
|
}
|
|
698
|
-
return
|
|
699
|
-
(
|
|
700
|
-
!e.closeOnEscape || !
|
|
779
|
+
return _e(
|
|
780
|
+
($) => {
|
|
781
|
+
!e.closeOnEscape || !p.value || ($.preventDefault(), k());
|
|
701
782
|
},
|
|
702
783
|
{
|
|
703
|
-
enabled:
|
|
784
|
+
enabled: p
|
|
704
785
|
}
|
|
705
|
-
),
|
|
706
|
-
enabled:
|
|
707
|
-
}),
|
|
708
|
-
target:
|
|
709
|
-
}),
|
|
710
|
-
|
|
711
|
-
async (
|
|
712
|
-
var
|
|
786
|
+
), De(i, {
|
|
787
|
+
enabled: p
|
|
788
|
+
}), Ae(p, {
|
|
789
|
+
target: I
|
|
790
|
+
}), ne(
|
|
791
|
+
p,
|
|
792
|
+
async ($) => {
|
|
793
|
+
var C;
|
|
713
794
|
if (!(typeof document > "u")) {
|
|
714
|
-
if (
|
|
715
|
-
|
|
795
|
+
if ($) {
|
|
796
|
+
r.value = document.activeElement instanceof HTMLElement ? document.activeElement : null, await le(), S();
|
|
716
797
|
return;
|
|
717
798
|
}
|
|
718
|
-
(
|
|
799
|
+
(C = r.value) == null || C.focus();
|
|
719
800
|
}
|
|
720
801
|
},
|
|
721
802
|
{ immediate: !0 }
|
|
722
|
-
),
|
|
723
|
-
var
|
|
724
|
-
|
|
725
|
-
}), (
|
|
726
|
-
to:
|
|
727
|
-
disabled:
|
|
803
|
+
), se(() => {
|
|
804
|
+
var $;
|
|
805
|
+
p.value && (($ = r.value) == null || $.focus());
|
|
806
|
+
}), ($, C) => (d(), q(he, {
|
|
807
|
+
to: u.value,
|
|
808
|
+
disabled: R.value
|
|
728
809
|
}, [
|
|
729
|
-
|
|
810
|
+
H(de, {
|
|
730
811
|
name: "vf-drawer-transition",
|
|
731
812
|
appear: "",
|
|
732
|
-
duration:
|
|
813
|
+
duration: c
|
|
733
814
|
}, {
|
|
734
|
-
default:
|
|
735
|
-
|
|
815
|
+
default: G(() => [
|
|
816
|
+
y(p) ? (d(), _("div", N({
|
|
736
817
|
key: 0,
|
|
737
|
-
class: [
|
|
738
|
-
style:
|
|
739
|
-
},
|
|
740
|
-
|
|
818
|
+
class: [x.value, y(o).class],
|
|
819
|
+
style: L.value
|
|
820
|
+
}, D.value), [
|
|
821
|
+
V("div", {
|
|
741
822
|
class: "vf-drawer__overlay",
|
|
742
823
|
"aria-hidden": "true",
|
|
743
|
-
onClick:
|
|
824
|
+
onClick: f
|
|
744
825
|
}),
|
|
745
|
-
|
|
826
|
+
V("section", {
|
|
746
827
|
ref_key: "contentRef",
|
|
747
|
-
ref:
|
|
748
|
-
class:
|
|
828
|
+
ref: i,
|
|
829
|
+
class: P(w.value),
|
|
749
830
|
"aria-labelledby": s.value,
|
|
750
831
|
"aria-modal": "true",
|
|
751
832
|
role: "dialog",
|
|
752
833
|
tabindex: "-1"
|
|
753
834
|
}, [
|
|
754
|
-
t.title ||
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
t.title ? (
|
|
835
|
+
t.title || $.$slots.header ? (d(), _("header", wt, [
|
|
836
|
+
V("div", null, [
|
|
837
|
+
O($.$slots, "header", {}, () => [
|
|
838
|
+
t.title ? (d(), _("h2", {
|
|
758
839
|
key: 0,
|
|
759
|
-
id:
|
|
840
|
+
id: y(v),
|
|
760
841
|
class: "vf-drawer__title"
|
|
761
|
-
}, F(t.title), 9,
|
|
842
|
+
}, F(t.title), 9, kt)) : E("", !0)
|
|
762
843
|
])
|
|
763
844
|
]),
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
e.closable ? (
|
|
845
|
+
V("div", $t, [
|
|
846
|
+
O($.$slots, "actions", { close: k }),
|
|
847
|
+
e.closable ? (d(), q(Se, {
|
|
767
848
|
key: 0,
|
|
768
|
-
icon:
|
|
849
|
+
icon: y(W).xmark,
|
|
769
850
|
"aria-label": "Close drawer",
|
|
770
851
|
size: "sm",
|
|
771
|
-
|
|
772
|
-
|
|
852
|
+
variant: "ghost",
|
|
853
|
+
onClick: k
|
|
854
|
+
}, null, 8, ["icon"])) : E("", !0)
|
|
773
855
|
])
|
|
774
|
-
])) :
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
])) :
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
])) :
|
|
781
|
-
], 10,
|
|
782
|
-
], 16)) :
|
|
856
|
+
])) : E("", !0),
|
|
857
|
+
$.$slots.default ? (d(), _("div", Tt, [
|
|
858
|
+
O($.$slots, "default", { close: k })
|
|
859
|
+
])) : E("", !0),
|
|
860
|
+
$.$slots.footer ? (d(), _("footer", Vt, [
|
|
861
|
+
O($.$slots, "footer", { close: k })
|
|
862
|
+
])) : E("", !0)
|
|
863
|
+
], 10, gt)
|
|
864
|
+
], 16)) : E("", !0)
|
|
783
865
|
]),
|
|
784
866
|
_: 3
|
|
785
867
|
})
|
|
786
868
|
], 8, ["to", "disabled"]));
|
|
787
869
|
}
|
|
788
|
-
}),
|
|
870
|
+
}), Ct = {
|
|
789
871
|
key: 0,
|
|
790
872
|
class: "vf-dialog"
|
|
791
|
-
},
|
|
873
|
+
}, xt = ["aria-describedby", "aria-labelledby"], Bt = {
|
|
792
874
|
key: 0,
|
|
793
875
|
class: "vf-dialog__header"
|
|
794
|
-
},
|
|
876
|
+
}, It = ["id"], Et = ["id"], At = { class: "vf-dialog__actions" }, Ot = {
|
|
795
877
|
key: 1,
|
|
796
878
|
class: "vf-dialog__body"
|
|
797
|
-
},
|
|
879
|
+
}, Lt = {
|
|
798
880
|
key: 2,
|
|
799
881
|
class: "vf-dialog__footer"
|
|
800
|
-
},
|
|
882
|
+
}, ba = /* @__PURE__ */ M({
|
|
801
883
|
__name: "VfDialog",
|
|
802
884
|
props: {
|
|
803
885
|
open: { type: Boolean, default: void 0 },
|
|
@@ -813,155 +895,156 @@ const nt = {
|
|
|
813
895
|
},
|
|
814
896
|
emits: ["update:open", "openChange"],
|
|
815
897
|
setup(t, { emit: n }) {
|
|
816
|
-
const e = t,
|
|
898
|
+
const e = t, l = n, o = A(null), i = A(null), r = ye(), g = ee({ prefix: "vf-dialog-title" }), v = ee({ prefix: "vf-dialog-description" }), T = be({
|
|
817
899
|
defaultOpen: e.defaultOpen,
|
|
818
|
-
open:
|
|
900
|
+
open: a(() => e.open),
|
|
819
901
|
onOpenChange: (s) => {
|
|
820
|
-
|
|
902
|
+
l("update:open", s), l("openChange", s);
|
|
821
903
|
}
|
|
822
|
-
}),
|
|
823
|
-
enter:
|
|
824
|
-
leave:
|
|
825
|
-
},
|
|
904
|
+
}), p = T.isOpen, c = {
|
|
905
|
+
enter: Z.fast,
|
|
906
|
+
leave: Z.fast
|
|
907
|
+
}, m = a(
|
|
826
908
|
() => e.disableTeleport || e.teleportTo === !1 || e.teleportTo === null
|
|
827
|
-
),
|
|
828
|
-
() =>
|
|
909
|
+
), h = a(() => typeof e.teleportTo == "string" || typeof HTMLElement < "u" && e.teleportTo instanceof HTMLElement ? e.teleportTo : "body"), x = a(
|
|
910
|
+
() => K(
|
|
829
911
|
"vf-dialog__content",
|
|
830
912
|
e.size !== "md" && `vf-dialog__content--${e.size}`
|
|
831
913
|
)
|
|
832
|
-
),
|
|
833
|
-
() => e.title ||
|
|
834
|
-
),
|
|
835
|
-
() => e.description ||
|
|
914
|
+
), L = a(() => !!r.header), D = a(() => !!r.description), R = a(
|
|
915
|
+
() => e.title || L.value ? g.value : void 0
|
|
916
|
+
), I = a(
|
|
917
|
+
() => e.description || D.value ? v.value : void 0
|
|
836
918
|
);
|
|
837
|
-
function
|
|
838
|
-
|
|
919
|
+
function u() {
|
|
920
|
+
T.close();
|
|
839
921
|
}
|
|
840
|
-
function
|
|
841
|
-
e.closeOnOverlayClick &&
|
|
922
|
+
function w() {
|
|
923
|
+
e.closeOnOverlayClick && u();
|
|
842
924
|
}
|
|
843
|
-
function
|
|
844
|
-
const s =
|
|
925
|
+
function B() {
|
|
926
|
+
const s = o.value;
|
|
845
927
|
if (!s)
|
|
846
928
|
return;
|
|
847
|
-
const
|
|
929
|
+
const k = s.querySelector(
|
|
848
930
|
"[autofocus], [data-autofocus]"
|
|
849
931
|
);
|
|
850
|
-
if (
|
|
851
|
-
|
|
932
|
+
if (k) {
|
|
933
|
+
k.focus();
|
|
852
934
|
return;
|
|
853
935
|
}
|
|
854
936
|
s.focus();
|
|
855
937
|
}
|
|
856
|
-
return
|
|
938
|
+
return _e(
|
|
857
939
|
(s) => {
|
|
858
|
-
!e.closeOnEscape || !
|
|
940
|
+
!e.closeOnEscape || !p.value || (s.preventDefault(), u());
|
|
859
941
|
},
|
|
860
942
|
{
|
|
861
|
-
enabled:
|
|
943
|
+
enabled: p
|
|
862
944
|
}
|
|
863
|
-
),
|
|
864
|
-
enabled:
|
|
865
|
-
}),
|
|
866
|
-
|
|
945
|
+
), De(o, {
|
|
946
|
+
enabled: p
|
|
947
|
+
}), Ae(p), ne(
|
|
948
|
+
p,
|
|
867
949
|
async (s) => {
|
|
868
|
-
var
|
|
950
|
+
var k;
|
|
869
951
|
if (!(typeof document > "u")) {
|
|
870
952
|
if (s) {
|
|
871
|
-
|
|
953
|
+
i.value = document.activeElement instanceof HTMLElement ? document.activeElement : null, await le(), B();
|
|
872
954
|
return;
|
|
873
955
|
}
|
|
874
|
-
(
|
|
956
|
+
(k = i.value) == null || k.focus();
|
|
875
957
|
}
|
|
876
958
|
},
|
|
877
959
|
{ immediate: !0 }
|
|
878
|
-
),
|
|
960
|
+
), se(() => {
|
|
879
961
|
var s;
|
|
880
|
-
|
|
881
|
-
}), (s,
|
|
882
|
-
to:
|
|
883
|
-
disabled:
|
|
962
|
+
p.value && ((s = i.value) == null || s.focus());
|
|
963
|
+
}), (s, k) => (d(), q(he, {
|
|
964
|
+
to: h.value,
|
|
965
|
+
disabled: m.value
|
|
884
966
|
}, [
|
|
885
|
-
|
|
967
|
+
H(de, {
|
|
886
968
|
name: "vf-dialog-transition",
|
|
887
969
|
appear: "",
|
|
888
|
-
duration:
|
|
970
|
+
duration: c
|
|
889
971
|
}, {
|
|
890
|
-
default:
|
|
891
|
-
|
|
892
|
-
|
|
972
|
+
default: G(() => [
|
|
973
|
+
y(p) ? (d(), _("div", Ct, [
|
|
974
|
+
V("div", {
|
|
893
975
|
class: "vf-dialog__overlay",
|
|
894
976
|
"aria-hidden": "true",
|
|
895
|
-
onClick:
|
|
977
|
+
onClick: w
|
|
896
978
|
}),
|
|
897
|
-
|
|
979
|
+
V("section", {
|
|
898
980
|
ref_key: "contentRef",
|
|
899
|
-
ref:
|
|
900
|
-
class:
|
|
901
|
-
"aria-describedby":
|
|
902
|
-
"aria-labelledby":
|
|
981
|
+
ref: o,
|
|
982
|
+
class: P(x.value),
|
|
983
|
+
"aria-describedby": I.value,
|
|
984
|
+
"aria-labelledby": R.value,
|
|
903
985
|
"aria-modal": "true",
|
|
904
986
|
role: "dialog",
|
|
905
987
|
tabindex: "-1"
|
|
906
988
|
}, [
|
|
907
|
-
t.title || t.description || s.$slots.header || s.$slots.description ? (
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
t.title ? (
|
|
989
|
+
t.title || t.description || s.$slots.header || s.$slots.description ? (d(), _("header", Bt, [
|
|
990
|
+
V("div", null, [
|
|
991
|
+
O(s.$slots, "header", {}, () => [
|
|
992
|
+
t.title ? (d(), _("h2", {
|
|
911
993
|
key: 0,
|
|
912
|
-
id:
|
|
994
|
+
id: y(g),
|
|
913
995
|
class: "vf-dialog__title"
|
|
914
|
-
}, F(t.title), 9,
|
|
996
|
+
}, F(t.title), 9, It)) : E("", !0)
|
|
915
997
|
]),
|
|
916
|
-
|
|
917
|
-
t.description ? (
|
|
998
|
+
O(s.$slots, "description", {}, () => [
|
|
999
|
+
t.description ? (d(), _("p", {
|
|
918
1000
|
key: 0,
|
|
919
|
-
id:
|
|
1001
|
+
id: y(v),
|
|
920
1002
|
class: "vf-dialog__description"
|
|
921
|
-
}, F(t.description), 9,
|
|
1003
|
+
}, F(t.description), 9, Et)) : E("", !0)
|
|
922
1004
|
])
|
|
923
1005
|
]),
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
e.closable ? (
|
|
1006
|
+
V("div", At, [
|
|
1007
|
+
O(s.$slots, "actions", { close: u }),
|
|
1008
|
+
e.closable ? (d(), q(Se, {
|
|
927
1009
|
key: 0,
|
|
928
|
-
icon:
|
|
1010
|
+
icon: y(W).xmark,
|
|
929
1011
|
"aria-label": "Close dialog",
|
|
930
1012
|
size: "sm",
|
|
931
|
-
|
|
932
|
-
|
|
1013
|
+
variant: "ghost",
|
|
1014
|
+
onClick: u
|
|
1015
|
+
}, null, 8, ["icon"])) : E("", !0)
|
|
933
1016
|
])
|
|
934
|
-
])) :
|
|
935
|
-
s.$slots.default ? (
|
|
936
|
-
|
|
937
|
-
])) :
|
|
938
|
-
s.$slots.footer ? (
|
|
939
|
-
|
|
940
|
-
])) :
|
|
941
|
-
], 10,
|
|
942
|
-
])) :
|
|
1017
|
+
])) : E("", !0),
|
|
1018
|
+
s.$slots.default ? (d(), _("div", Ot, [
|
|
1019
|
+
O(s.$slots, "default", { close: u })
|
|
1020
|
+
])) : E("", !0),
|
|
1021
|
+
s.$slots.footer ? (d(), _("footer", Lt, [
|
|
1022
|
+
O(s.$slots, "footer", { close: u })
|
|
1023
|
+
])) : E("", !0)
|
|
1024
|
+
], 10, xt)
|
|
1025
|
+
])) : E("", !0)
|
|
943
1026
|
]),
|
|
944
1027
|
_: 3
|
|
945
1028
|
})
|
|
946
1029
|
], 8, ["to", "disabled"]));
|
|
947
1030
|
}
|
|
948
|
-
}),
|
|
1031
|
+
}), Dt = ["aria-orientation", "role"], _a = /* @__PURE__ */ M({
|
|
949
1032
|
inheritAttrs: !1,
|
|
950
1033
|
__name: "VfDivider",
|
|
951
1034
|
props: {
|
|
952
1035
|
orientation: { default: "horizontal" }
|
|
953
1036
|
},
|
|
954
1037
|
setup(t) {
|
|
955
|
-
const n = t, e =
|
|
956
|
-
() =>
|
|
1038
|
+
const n = t, e = j(), l = a(() => n.orientation === "vertical"), o = a(
|
|
1039
|
+
() => K("vf-divider", `vf-divider--${n.orientation}`)
|
|
957
1040
|
);
|
|
958
|
-
return (
|
|
959
|
-
class:
|
|
1041
|
+
return (i, r) => (d(), _("div", N({
|
|
1042
|
+
class: o.value,
|
|
960
1043
|
"aria-orientation": n.orientation,
|
|
961
|
-
role:
|
|
962
|
-
},
|
|
1044
|
+
role: l.value ? "separator" : void 0
|
|
1045
|
+
}, y(e)), null, 16, Dt));
|
|
963
1046
|
}
|
|
964
|
-
}),
|
|
1047
|
+
}), St = { class: "vf-dropdown" }, Mt = ["id", "aria-controls", "aria-expanded"], zt = ["id", "aria-labelledby"], ya = /* @__PURE__ */ M({
|
|
965
1048
|
__name: "VfDropdown",
|
|
966
1049
|
props: {
|
|
967
1050
|
open: { type: Boolean, default: void 0 },
|
|
@@ -969,195 +1052,181 @@ const nt = {
|
|
|
969
1052
|
placement: { default: "bottom-start" },
|
|
970
1053
|
teleportTo: { type: [String, null, Boolean], default: void 0 },
|
|
971
1054
|
disableTeleport: { type: Boolean, default: !1 },
|
|
972
|
-
closeOnSelect: { type: Boolean, default: !0 }
|
|
1055
|
+
closeOnSelect: { type: Boolean, default: !0 },
|
|
1056
|
+
variant: { default: "default" }
|
|
973
1057
|
},
|
|
974
1058
|
emits: ["update:open", "openChange"],
|
|
975
1059
|
setup(t, { emit: n }) {
|
|
976
|
-
const e = t,
|
|
977
|
-
enter:
|
|
978
|
-
leave:
|
|
979
|
-
},
|
|
1060
|
+
const e = t, l = n, o = A(null), i = A(null), r = A(null), g = ee({ prefix: "vf-dropdown-menu" }), v = ee({ prefix: "vf-dropdown-trigger" }), T = {
|
|
1061
|
+
enter: Z.fast,
|
|
1062
|
+
leave: Z.fast
|
|
1063
|
+
}, p = a(
|
|
980
1064
|
() => e.disableTeleport || e.teleportTo === !1 || e.teleportTo === null
|
|
981
|
-
),
|
|
1065
|
+
), c = a(() => typeof e.teleportTo == "string" || typeof HTMLElement < "u" && e.teleportTo instanceof HTMLElement ? e.teleportTo : "body"), m = be({
|
|
982
1066
|
defaultOpen: e.defaultOpen,
|
|
983
|
-
open:
|
|
984
|
-
onOpenChange: (
|
|
985
|
-
|
|
1067
|
+
open: a(() => e.open),
|
|
1068
|
+
onOpenChange: (b) => {
|
|
1069
|
+
l("update:open", b), l("openChange", b);
|
|
986
1070
|
}
|
|
987
|
-
}),
|
|
1071
|
+
}), h = m.isOpen, x = a(() => [
|
|
988
1072
|
"vf-dropdown__menu",
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
1073
|
+
`vf-dropdown__menu--${e.variant}`,
|
|
1074
|
+
u.value.startsWith("top") && "vf-dropdown__menu--top"
|
|
1075
|
+
]), L = a(() => {
|
|
1076
|
+
const b = w.value.arrow;
|
|
992
1077
|
return {
|
|
993
|
-
x: (
|
|
994
|
-
y: (
|
|
1078
|
+
x: (b == null ? void 0 : b.x) !== void 0 && (b == null ? void 0 : b.baseX) !== void 0 ? b.x - b.baseX : 0,
|
|
1079
|
+
y: (b == null ? void 0 : b.y) !== void 0 && (b == null ? void 0 : b.baseY) !== void 0 ? b.y - b.baseY : 0
|
|
995
1080
|
};
|
|
996
|
-
}),
|
|
997
|
-
left: `${
|
|
998
|
-
top: `${
|
|
999
|
-
})),
|
|
1081
|
+
}), D = a(() => ({
|
|
1082
|
+
left: `${L.value.x}px`,
|
|
1083
|
+
top: `${L.value.y}px`
|
|
1084
|
+
})), R = a(() => [
|
|
1000
1085
|
"vf-dropdown__arrow",
|
|
1001
|
-
|
|
1002
|
-
]),
|
|
1086
|
+
u.value.startsWith("top") ? "vf-dropdown__arrow--top" : "vf-dropdown__arrow--bottom"
|
|
1087
|
+
]), I = a(
|
|
1003
1088
|
() => e.placement === "bottom-end" ? ["bottom-end", "top-end"] : ["bottom-start", "top-start"]
|
|
1004
1089
|
), {
|
|
1005
|
-
placement:
|
|
1006
|
-
middlewareData:
|
|
1007
|
-
styles:
|
|
1008
|
-
} =
|
|
1009
|
-
enabled:
|
|
1010
|
-
placement:
|
|
1011
|
-
middleware:
|
|
1090
|
+
placement: u,
|
|
1091
|
+
middlewareData: w,
|
|
1092
|
+
styles: B
|
|
1093
|
+
} = Te(o, i, {
|
|
1094
|
+
enabled: h,
|
|
1095
|
+
placement: a(() => e.placement),
|
|
1096
|
+
middleware: a(
|
|
1012
1097
|
() => [
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
].filter((
|
|
1098
|
+
ge(10),
|
|
1099
|
+
we({ placements: I.value }),
|
|
1100
|
+
ke(),
|
|
1101
|
+
r.value ? Ve(r.value) : void 0
|
|
1102
|
+
].filter((b) => b !== void 0)
|
|
1018
1103
|
),
|
|
1019
1104
|
strategy: "fixed"
|
|
1020
1105
|
});
|
|
1021
1106
|
function s() {
|
|
1022
|
-
var
|
|
1107
|
+
var b;
|
|
1023
1108
|
return Array.from(
|
|
1024
|
-
((
|
|
1109
|
+
((b = i.value) == null ? void 0 : b.querySelectorAll('[role="menuitem"]')) ?? []
|
|
1025
1110
|
);
|
|
1026
1111
|
}
|
|
1027
|
-
async function
|
|
1028
|
-
var
|
|
1029
|
-
await
|
|
1112
|
+
async function k() {
|
|
1113
|
+
var b;
|
|
1114
|
+
await le(), (b = s()[0]) == null || b.focus();
|
|
1030
1115
|
}
|
|
1031
|
-
function
|
|
1032
|
-
|
|
1116
|
+
function f(b = {}) {
|
|
1117
|
+
m.open(), b.focusFirstItem && k();
|
|
1033
1118
|
}
|
|
1034
|
-
function
|
|
1035
|
-
var
|
|
1036
|
-
|
|
1119
|
+
function S() {
|
|
1120
|
+
var b;
|
|
1121
|
+
m.close(), (b = o.value) == null || b.focus();
|
|
1037
1122
|
}
|
|
1038
|
-
function
|
|
1039
|
-
if (
|
|
1040
|
-
|
|
1123
|
+
function $() {
|
|
1124
|
+
if (h.value) {
|
|
1125
|
+
S();
|
|
1041
1126
|
return;
|
|
1042
1127
|
}
|
|
1043
|
-
|
|
1128
|
+
f();
|
|
1044
1129
|
}
|
|
1045
|
-
function
|
|
1046
|
-
(
|
|
1130
|
+
function C(b) {
|
|
1131
|
+
(b.key === "ArrowDown" || b.key === "Enter" || b.key === " ") && (b.preventDefault(), f({ focusFirstItem: !0 }));
|
|
1047
1132
|
}
|
|
1048
|
-
function
|
|
1049
|
-
var
|
|
1050
|
-
const
|
|
1051
|
-
(
|
|
1133
|
+
function ie(b) {
|
|
1134
|
+
var ae, te, Q, ce;
|
|
1135
|
+
const z = s(), Y = z.findIndex(
|
|
1136
|
+
(oe) => oe === document.activeElement
|
|
1052
1137
|
);
|
|
1053
|
-
if (
|
|
1054
|
-
|
|
1138
|
+
if (b.key === "ArrowDown") {
|
|
1139
|
+
b.preventDefault(), (ae = z[(Y + 1 + z.length) % z.length]) == null || ae.focus();
|
|
1055
1140
|
return;
|
|
1056
1141
|
}
|
|
1057
|
-
if (
|
|
1058
|
-
|
|
1142
|
+
if (b.key === "ArrowUp") {
|
|
1143
|
+
b.preventDefault(), (te = z[(Y - 1 + z.length) % z.length]) == null || te.focus();
|
|
1059
1144
|
return;
|
|
1060
1145
|
}
|
|
1061
|
-
if (
|
|
1062
|
-
|
|
1146
|
+
if (b.key === "Home") {
|
|
1147
|
+
b.preventDefault(), (Q = z[0]) == null || Q.focus();
|
|
1063
1148
|
return;
|
|
1064
1149
|
}
|
|
1065
|
-
|
|
1150
|
+
b.key === "End" && (b.preventDefault(), (ce = z[z.length - 1]) == null || ce.focus());
|
|
1066
1151
|
}
|
|
1067
|
-
function
|
|
1068
|
-
e.closeOnSelect &&
|
|
1152
|
+
function pe() {
|
|
1153
|
+
e.closeOnSelect && S();
|
|
1069
1154
|
}
|
|
1070
|
-
return
|
|
1071
|
-
[
|
|
1155
|
+
return $e(
|
|
1156
|
+
[o, i],
|
|
1072
1157
|
() => {
|
|
1073
|
-
|
|
1158
|
+
h.value && S();
|
|
1074
1159
|
},
|
|
1075
1160
|
{
|
|
1076
|
-
enabled:
|
|
1161
|
+
enabled: h,
|
|
1077
1162
|
event: "click"
|
|
1078
1163
|
}
|
|
1079
|
-
),
|
|
1080
|
-
(
|
|
1081
|
-
|
|
1164
|
+
), _e(
|
|
1165
|
+
(b) => {
|
|
1166
|
+
h.value && (b.preventDefault(), S());
|
|
1082
1167
|
},
|
|
1083
1168
|
{
|
|
1084
|
-
enabled:
|
|
1169
|
+
enabled: h
|
|
1085
1170
|
}
|
|
1086
|
-
), (
|
|
1087
|
-
|
|
1088
|
-
id:
|
|
1171
|
+
), (b, z) => (d(), _("div", St, [
|
|
1172
|
+
V("div", {
|
|
1173
|
+
id: y(v),
|
|
1089
1174
|
ref_key: "triggerRef",
|
|
1090
|
-
ref:
|
|
1175
|
+
ref: o,
|
|
1091
1176
|
class: "vf-dropdown__trigger",
|
|
1092
|
-
"aria-controls":
|
|
1093
|
-
"aria-expanded": h
|
|
1177
|
+
"aria-controls": y(g),
|
|
1178
|
+
"aria-expanded": y(h),
|
|
1094
1179
|
"aria-haspopup": "menu",
|
|
1095
1180
|
tabindex: "0",
|
|
1096
|
-
onClick:
|
|
1097
|
-
onKeydown:
|
|
1181
|
+
onClick: $,
|
|
1182
|
+
onKeydown: C
|
|
1098
1183
|
}, [
|
|
1099
|
-
|
|
1100
|
-
open: h
|
|
1101
|
-
toggle:
|
|
1184
|
+
O(b.$slots, "trigger", {
|
|
1185
|
+
open: y(h),
|
|
1186
|
+
toggle: $
|
|
1102
1187
|
})
|
|
1103
|
-
], 40,
|
|
1104
|
-
(
|
|
1105
|
-
to:
|
|
1106
|
-
disabled:
|
|
1188
|
+
], 40, Mt),
|
|
1189
|
+
(d(), q(he, {
|
|
1190
|
+
to: c.value,
|
|
1191
|
+
disabled: p.value
|
|
1107
1192
|
}, [
|
|
1108
|
-
|
|
1193
|
+
H(de, {
|
|
1109
1194
|
name: "vf-floating-transition",
|
|
1110
1195
|
appear: "",
|
|
1111
|
-
duration:
|
|
1196
|
+
duration: T
|
|
1112
1197
|
}, {
|
|
1113
|
-
default:
|
|
1114
|
-
h
|
|
1198
|
+
default: G(() => [
|
|
1199
|
+
y(h) ? (d(), _("div", {
|
|
1115
1200
|
key: 0,
|
|
1116
|
-
id:
|
|
1201
|
+
id: y(g),
|
|
1117
1202
|
ref_key: "menuRef",
|
|
1118
|
-
ref:
|
|
1119
|
-
class:
|
|
1120
|
-
style:
|
|
1121
|
-
"aria-labelledby":
|
|
1203
|
+
ref: i,
|
|
1204
|
+
class: P(x.value),
|
|
1205
|
+
style: U(y(B)),
|
|
1206
|
+
"aria-labelledby": y(v),
|
|
1122
1207
|
role: "menu",
|
|
1123
|
-
onClick:
|
|
1124
|
-
onKeydown:
|
|
1208
|
+
onClick: pe,
|
|
1209
|
+
onKeydown: ie
|
|
1125
1210
|
}, [
|
|
1126
|
-
|
|
1211
|
+
V("span", {
|
|
1127
1212
|
ref_key: "arrowRef",
|
|
1128
|
-
ref:
|
|
1129
|
-
class: R
|
|
1130
|
-
style:
|
|
1213
|
+
ref: r,
|
|
1214
|
+
class: P(R.value),
|
|
1215
|
+
style: U(D.value),
|
|
1131
1216
|
"aria-hidden": "true"
|
|
1132
1217
|
}, null, 6),
|
|
1133
|
-
|
|
1134
|
-
close:
|
|
1135
|
-
open: h
|
|
1218
|
+
O(b.$slots, "default", {
|
|
1219
|
+
close: S,
|
|
1220
|
+
open: y(h)
|
|
1136
1221
|
})
|
|
1137
|
-
], 46,
|
|
1222
|
+
], 46, zt)) : E("", !0)
|
|
1138
1223
|
]),
|
|
1139
1224
|
_: 3
|
|
1140
1225
|
})
|
|
1141
1226
|
], 8, ["to", "disabled"]))
|
|
1142
1227
|
]));
|
|
1143
1228
|
}
|
|
1144
|
-
}),
|
|
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({
|
|
1229
|
+
}), Pt = ["value", "aria-invalid"], ga = /* @__PURE__ */ M({
|
|
1161
1230
|
inheritAttrs: !1,
|
|
1162
1231
|
__name: "VfInput",
|
|
1163
1232
|
props: {
|
|
@@ -1167,23 +1236,23 @@ const nt = {
|
|
|
1167
1236
|
},
|
|
1168
1237
|
emits: ["update:modelValue"],
|
|
1169
1238
|
setup(t, { emit: n }) {
|
|
1170
|
-
const e = t,
|
|
1171
|
-
() =>
|
|
1239
|
+
const e = t, l = n, o = j(), i = a(
|
|
1240
|
+
() => K(
|
|
1172
1241
|
"vf-input",
|
|
1173
1242
|
e.size !== "md" && `vf-input--${e.size}`,
|
|
1174
1243
|
e.invalid && "vf-input--invalid"
|
|
1175
1244
|
)
|
|
1176
1245
|
);
|
|
1177
|
-
function
|
|
1178
|
-
|
|
1246
|
+
function r(g) {
|
|
1247
|
+
l("update:modelValue", g.target.value);
|
|
1179
1248
|
}
|
|
1180
|
-
return (
|
|
1181
|
-
class:
|
|
1249
|
+
return (g, v) => (d(), _("input", N({
|
|
1250
|
+
class: i.value,
|
|
1182
1251
|
value: e.modelValue,
|
|
1183
1252
|
"aria-invalid": e.invalid || void 0
|
|
1184
|
-
},
|
|
1253
|
+
}, y(o), { onInput: r }), null, 16, Pt));
|
|
1185
1254
|
}
|
|
1186
|
-
}),
|
|
1255
|
+
}), wa = /* @__PURE__ */ M({
|
|
1187
1256
|
inheritAttrs: !1,
|
|
1188
1257
|
__name: "VfLink",
|
|
1189
1258
|
props: {
|
|
@@ -1191,53 +1260,348 @@ const nt = {
|
|
|
1191
1260
|
to: { default: void 0 },
|
|
1192
1261
|
target: { default: void 0 },
|
|
1193
1262
|
rel: { default: void 0 },
|
|
1194
|
-
underline: {
|
|
1263
|
+
underline: { default: "none" },
|
|
1195
1264
|
tone: { default: "default" },
|
|
1196
1265
|
component: { default: void 0 }
|
|
1197
1266
|
},
|
|
1198
1267
|
setup(t) {
|
|
1199
|
-
const n = t, e =
|
|
1200
|
-
() =>
|
|
1268
|
+
const n = t, e = j(), l = a(() => n.to !== void 0), o = a(() => l.value ? n.component ?? fe("RouterLink") : "a"), i = a(() => n.rel ? n.rel : n.target === "_blank" ? "noopener noreferrer" : void 0), r = a(
|
|
1269
|
+
() => K(
|
|
1201
1270
|
"vf-link",
|
|
1202
|
-
n.underline && "vf-link--underline",
|
|
1271
|
+
n.underline === "hover" && "vf-link--underline-hover",
|
|
1272
|
+
n.underline === "always" && "vf-link--underline-always",
|
|
1203
1273
|
n.tone === "muted" && "vf-link--muted"
|
|
1204
1274
|
)
|
|
1205
|
-
),
|
|
1275
|
+
), g = a(() => l.value ? {
|
|
1206
1276
|
to: n.to,
|
|
1207
1277
|
target: n.target,
|
|
1208
|
-
rel:
|
|
1278
|
+
rel: i.value
|
|
1209
1279
|
} : {
|
|
1210
1280
|
href: n.href,
|
|
1211
1281
|
target: n.target,
|
|
1212
|
-
rel:
|
|
1213
|
-
}),
|
|
1282
|
+
rel: i.value
|
|
1283
|
+
}), v = a(() => ({
|
|
1214
1284
|
...e,
|
|
1215
|
-
...
|
|
1216
|
-
class:
|
|
1285
|
+
...g.value,
|
|
1286
|
+
class: r.value
|
|
1217
1287
|
}));
|
|
1218
|
-
return (
|
|
1219
|
-
default:
|
|
1220
|
-
|
|
1288
|
+
return (T, p) => (d(), q(fe(o.value), Be(Ie(v.value)), {
|
|
1289
|
+
default: G(() => [
|
|
1290
|
+
O(T.$slots, "default")
|
|
1221
1291
|
]),
|
|
1222
1292
|
_: 3
|
|
1223
1293
|
}, 16));
|
|
1224
1294
|
}
|
|
1225
|
-
}),
|
|
1295
|
+
}), Rt = ["aria-expanded", "disabled"], Ft = { class: "vf-menu-bar__item-content" }, Ht = {
|
|
1296
|
+
key: 0,
|
|
1297
|
+
class: "vf-menu-bar__leading-icon",
|
|
1298
|
+
"aria-hidden": "true"
|
|
1299
|
+
}, Nt = { class: "vf-menu-bar__label" }, Kt = {
|
|
1300
|
+
class: "vf-menu-bar__icon",
|
|
1301
|
+
"aria-hidden": "true"
|
|
1302
|
+
}, jt = { class: "vf-menu-bar__item-content" }, qt = {
|
|
1303
|
+
key: 0,
|
|
1304
|
+
class: "vf-menu-bar__leading-icon",
|
|
1305
|
+
"aria-hidden": "true"
|
|
1306
|
+
}, Wt = { class: "vf-menu-bar__label" }, Ut = ["aria-current", "disabled"], Xt = { class: "vf-menu-bar__item-content" }, Yt = {
|
|
1307
|
+
key: 0,
|
|
1308
|
+
class: "vf-menu-bar__leading-icon",
|
|
1309
|
+
"aria-hidden": "true"
|
|
1310
|
+
}, Gt = { class: "vf-menu-bar__label" }, Qt = {
|
|
1311
|
+
class: "vf-menu-bar__submenu-list",
|
|
1312
|
+
role: "menu"
|
|
1313
|
+
}, Jt = /* @__PURE__ */ M({
|
|
1314
|
+
name: "VfMenuBarItemNode",
|
|
1315
|
+
__name: "VfMenuBarItemNode",
|
|
1316
|
+
props: {
|
|
1317
|
+
item: {},
|
|
1318
|
+
depth: {},
|
|
1319
|
+
parentPath: {},
|
|
1320
|
+
activeValue: {},
|
|
1321
|
+
openPath: {},
|
|
1322
|
+
hoverEnabled: { type: Boolean }
|
|
1323
|
+
},
|
|
1324
|
+
emits: ["openPathChange", "select"],
|
|
1325
|
+
setup(t, { emit: n }) {
|
|
1326
|
+
const e = t, l = n, o = a(() => [...e.parentPath, e.item.value]), i = a(
|
|
1327
|
+
() => {
|
|
1328
|
+
var w;
|
|
1329
|
+
return e.item.kind !== "group" && !!((w = e.item.children) != null && w.length);
|
|
1330
|
+
}
|
|
1331
|
+
), r = a(() => e.item.kind === "group"), g = a(
|
|
1332
|
+
() => e.item.href !== void 0 || e.item.to !== void 0
|
|
1333
|
+
), v = a(() => e.activeValue === e.item.value), T = a(
|
|
1334
|
+
() => !v.value && R(e.item, e.activeValue)
|
|
1335
|
+
), p = a(
|
|
1336
|
+
() => o.value.every((w, B) => e.openPath[B] === w)
|
|
1337
|
+
), c = a(() => e.item.to !== void 0 ? fe("RouterLink") : "a"), m = a(() => e.item.rel ? e.item.rel : e.item.target === "_blank" ? "noopener noreferrer" : void 0), h = a(() => e.item.to !== void 0 ? {
|
|
1338
|
+
to: e.item.to,
|
|
1339
|
+
target: e.item.target,
|
|
1340
|
+
rel: m.value
|
|
1341
|
+
} : {
|
|
1342
|
+
href: e.item.href,
|
|
1343
|
+
target: e.item.target,
|
|
1344
|
+
rel: m.value
|
|
1345
|
+
});
|
|
1346
|
+
function x() {
|
|
1347
|
+
!i.value || e.item.disabled || l("openPathChange", o.value);
|
|
1348
|
+
}
|
|
1349
|
+
function L() {
|
|
1350
|
+
if (!(!i.value || e.item.disabled)) {
|
|
1351
|
+
if (p.value) {
|
|
1352
|
+
l("openPathChange", e.parentPath);
|
|
1353
|
+
return;
|
|
1354
|
+
}
|
|
1355
|
+
l("openPathChange", o.value);
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
function D(w) {
|
|
1359
|
+
if (e.item.disabled) {
|
|
1360
|
+
w == null || w.preventDefault();
|
|
1361
|
+
return;
|
|
1362
|
+
}
|
|
1363
|
+
l("select", e.item);
|
|
1364
|
+
}
|
|
1365
|
+
function R(w, B) {
|
|
1366
|
+
var s;
|
|
1367
|
+
return !B || !((s = w.children) != null && s.length) ? !1 : w.children.some(
|
|
1368
|
+
(k) => k.value === B || R(k, B)
|
|
1369
|
+
);
|
|
1370
|
+
}
|
|
1371
|
+
function I(w) {
|
|
1372
|
+
if (i.value) {
|
|
1373
|
+
if (w.key === "Enter" || w.key === " " || w.key === "ArrowDown" || e.depth > 0 && w.key === "ArrowRight") {
|
|
1374
|
+
w.preventDefault(), x();
|
|
1375
|
+
return;
|
|
1376
|
+
}
|
|
1377
|
+
(w.key === "ArrowLeft" || w.key === "Escape") && e.depth > 0 && (w.preventDefault(), l("openPathChange", e.parentPath));
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
function u() {
|
|
1381
|
+
e.hoverEnabled && x();
|
|
1382
|
+
}
|
|
1383
|
+
return (w, B) => {
|
|
1384
|
+
const s = Ee("VfMenuBarItemNode", !0);
|
|
1385
|
+
return d(), _("li", {
|
|
1386
|
+
class: P(["vf-menu-bar__node", [
|
|
1387
|
+
`vf-menu-bar__node--depth-${t.depth}`,
|
|
1388
|
+
i.value && "vf-menu-bar__node--branch",
|
|
1389
|
+
p.value && "vf-menu-bar__node--open"
|
|
1390
|
+
]]),
|
|
1391
|
+
onMouseenter: u
|
|
1392
|
+
}, [
|
|
1393
|
+
r.value ? (d(), _("div", {
|
|
1394
|
+
key: 0,
|
|
1395
|
+
class: "vf-menu-bar__group",
|
|
1396
|
+
role: "presentation",
|
|
1397
|
+
style: U({ "--vf-menu-bar-depth": String(t.depth) })
|
|
1398
|
+
}, F(t.item.label), 5)) : i.value ? (d(), _("button", {
|
|
1399
|
+
key: 1,
|
|
1400
|
+
type: "button",
|
|
1401
|
+
class: P(["vf-menu-bar__item vf-menu-bar__item--branch", [
|
|
1402
|
+
t.depth === 0 && "vf-menu-bar__item--top",
|
|
1403
|
+
T.value && "vf-menu-bar__item--ancestor-active",
|
|
1404
|
+
p.value && "vf-menu-bar__item--open"
|
|
1405
|
+
]]),
|
|
1406
|
+
style: U({ "--vf-menu-bar-depth": String(t.depth) }),
|
|
1407
|
+
"aria-expanded": p.value,
|
|
1408
|
+
"aria-haspopup": "menu",
|
|
1409
|
+
role: "menuitem",
|
|
1410
|
+
disabled: t.item.disabled,
|
|
1411
|
+
onClick: L,
|
|
1412
|
+
onKeydown: I
|
|
1413
|
+
}, [
|
|
1414
|
+
V("span", Ft, [
|
|
1415
|
+
t.item.leadingIcon ? (d(), _("span", Ht, [
|
|
1416
|
+
H(y(J), {
|
|
1417
|
+
icon: t.item.leadingIcon,
|
|
1418
|
+
size: "1rem"
|
|
1419
|
+
}, null, 8, ["icon"])
|
|
1420
|
+
])) : E("", !0),
|
|
1421
|
+
V("span", Nt, F(t.item.label), 1)
|
|
1422
|
+
]),
|
|
1423
|
+
V("span", Kt, [
|
|
1424
|
+
H(y(J), {
|
|
1425
|
+
icon: t.depth === 0 ? y(W).chevronDown : p.value ? y(W).minus : y(W).plus,
|
|
1426
|
+
size: "0.875rem"
|
|
1427
|
+
}, null, 8, ["icon"])
|
|
1428
|
+
])
|
|
1429
|
+
], 46, Rt)) : g.value ? (d(), q(fe(c.value), N({ key: 2 }, h.value, {
|
|
1430
|
+
class: ["vf-menu-bar__item", [
|
|
1431
|
+
t.depth === 0 && "vf-menu-bar__item--top",
|
|
1432
|
+
v.value && "vf-menu-bar__item--active",
|
|
1433
|
+
T.value && "vf-menu-bar__item--ancestor-active",
|
|
1434
|
+
t.item.disabled && "vf-menu-bar__item--disabled"
|
|
1435
|
+
]],
|
|
1436
|
+
style: { "--vf-menu-bar-depth": String(t.depth) },
|
|
1437
|
+
"aria-current": v.value ? "page" : void 0,
|
|
1438
|
+
role: "menuitem",
|
|
1439
|
+
onClick: D
|
|
1440
|
+
}), {
|
|
1441
|
+
default: G(() => [
|
|
1442
|
+
V("span", jt, [
|
|
1443
|
+
t.item.leadingIcon ? (d(), _("span", qt, [
|
|
1444
|
+
H(y(J), {
|
|
1445
|
+
icon: t.item.leadingIcon,
|
|
1446
|
+
size: "1rem"
|
|
1447
|
+
}, null, 8, ["icon"])
|
|
1448
|
+
])) : E("", !0),
|
|
1449
|
+
V("span", Wt, F(t.item.label), 1)
|
|
1450
|
+
])
|
|
1451
|
+
]),
|
|
1452
|
+
_: 1
|
|
1453
|
+
}, 16, ["class", "style", "aria-current"])) : (d(), _("button", {
|
|
1454
|
+
key: 3,
|
|
1455
|
+
type: "button",
|
|
1456
|
+
class: P(["vf-menu-bar__item", [
|
|
1457
|
+
t.depth === 0 && "vf-menu-bar__item--top",
|
|
1458
|
+
v.value && "vf-menu-bar__item--active",
|
|
1459
|
+
T.value && "vf-menu-bar__item--ancestor-active",
|
|
1460
|
+
t.item.disabled && "vf-menu-bar__item--disabled"
|
|
1461
|
+
]]),
|
|
1462
|
+
style: U({ "--vf-menu-bar-depth": String(t.depth) }),
|
|
1463
|
+
"aria-current": v.value ? "page" : void 0,
|
|
1464
|
+
role: "menuitem",
|
|
1465
|
+
disabled: t.item.disabled,
|
|
1466
|
+
onClick: B[0] || (B[0] = (k) => D())
|
|
1467
|
+
}, [
|
|
1468
|
+
V("span", Xt, [
|
|
1469
|
+
t.item.leadingIcon ? (d(), _("span", Yt, [
|
|
1470
|
+
H(y(J), {
|
|
1471
|
+
icon: t.item.leadingIcon,
|
|
1472
|
+
size: "1rem"
|
|
1473
|
+
}, null, 8, ["icon"])
|
|
1474
|
+
])) : E("", !0),
|
|
1475
|
+
V("span", Gt, F(t.item.label), 1)
|
|
1476
|
+
])
|
|
1477
|
+
], 14, Ut)),
|
|
1478
|
+
H(de, {
|
|
1479
|
+
name: "vf-floating-transition",
|
|
1480
|
+
appear: ""
|
|
1481
|
+
}, {
|
|
1482
|
+
default: G(() => [
|
|
1483
|
+
i.value && p.value ? (d(), _("div", {
|
|
1484
|
+
key: 0,
|
|
1485
|
+
class: P([
|
|
1486
|
+
"vf-menu-bar__submenu",
|
|
1487
|
+
t.depth === 0 ? "vf-menu-bar__submenu--root" : "vf-menu-bar__submenu--nested"
|
|
1488
|
+
])
|
|
1489
|
+
}, [
|
|
1490
|
+
V("ul", Qt, [
|
|
1491
|
+
(d(!0), _(re, null, ue(t.item.children, (k) => (d(), q(s, {
|
|
1492
|
+
key: k.value,
|
|
1493
|
+
item: k,
|
|
1494
|
+
depth: t.depth + 1,
|
|
1495
|
+
"parent-path": o.value,
|
|
1496
|
+
"active-value": t.activeValue,
|
|
1497
|
+
"open-path": t.openPath,
|
|
1498
|
+
"hover-enabled": !0,
|
|
1499
|
+
onOpenPathChange: B[1] || (B[1] = (f) => l("openPathChange", f)),
|
|
1500
|
+
onSelect: B[2] || (B[2] = (f) => l("select", f))
|
|
1501
|
+
}, null, 8, ["item", "depth", "parent-path", "active-value", "open-path"]))), 128))
|
|
1502
|
+
])
|
|
1503
|
+
], 2)) : E("", !0)
|
|
1504
|
+
]),
|
|
1505
|
+
_: 1
|
|
1506
|
+
})
|
|
1507
|
+
], 34);
|
|
1508
|
+
};
|
|
1509
|
+
}
|
|
1510
|
+
}), Zt = ["aria-label"], en = {
|
|
1511
|
+
class: "vf-menu-bar__list",
|
|
1512
|
+
role: "menubar"
|
|
1513
|
+
}, ka = /* @__PURE__ */ M({
|
|
1514
|
+
__name: "VfMenuBar",
|
|
1515
|
+
props: {
|
|
1516
|
+
items: {},
|
|
1517
|
+
modelValue: { default: void 0 },
|
|
1518
|
+
defaultValue: { default: void 0 },
|
|
1519
|
+
ariaLabel: { default: "Menu bar" },
|
|
1520
|
+
variant: { default: "default" }
|
|
1521
|
+
},
|
|
1522
|
+
emits: ["update:modelValue", "change", "select"],
|
|
1523
|
+
setup(t, { emit: n }) {
|
|
1524
|
+
const e = t, l = n, o = A(null), i = A(e.defaultValue), r = A([]), g = a(() => e.modelValue ?? i.value);
|
|
1525
|
+
let v;
|
|
1526
|
+
function T(x) {
|
|
1527
|
+
e.modelValue === void 0 && (i.value = x), l("update:modelValue", x), l("change", x);
|
|
1528
|
+
}
|
|
1529
|
+
function p(x) {
|
|
1530
|
+
T(x.value), r.value = [], l("select", x);
|
|
1531
|
+
}
|
|
1532
|
+
function c(x) {
|
|
1533
|
+
h(), r.value = x;
|
|
1534
|
+
}
|
|
1535
|
+
function m() {
|
|
1536
|
+
h(), v = setTimeout(() => {
|
|
1537
|
+
r.value = [], v = void 0;
|
|
1538
|
+
}, 120);
|
|
1539
|
+
}
|
|
1540
|
+
function h() {
|
|
1541
|
+
v !== void 0 && (clearTimeout(v), v = void 0);
|
|
1542
|
+
}
|
|
1543
|
+
return $e(
|
|
1544
|
+
o,
|
|
1545
|
+
() => {
|
|
1546
|
+
r.value = [];
|
|
1547
|
+
},
|
|
1548
|
+
{
|
|
1549
|
+
enabled: a(() => r.value.length > 0)
|
|
1550
|
+
}
|
|
1551
|
+
), _e(
|
|
1552
|
+
(x) => {
|
|
1553
|
+
r.value.length !== 0 && (x.preventDefault(), r.value = []);
|
|
1554
|
+
},
|
|
1555
|
+
{
|
|
1556
|
+
enabled: a(() => r.value.length > 0)
|
|
1557
|
+
}
|
|
1558
|
+
), ne(
|
|
1559
|
+
() => e.items,
|
|
1560
|
+
() => {
|
|
1561
|
+
r.value = [];
|
|
1562
|
+
},
|
|
1563
|
+
{ deep: !0 }
|
|
1564
|
+
), se(() => {
|
|
1565
|
+
h();
|
|
1566
|
+
}), (x, L) => (d(), _("nav", {
|
|
1567
|
+
ref_key: "rootRef",
|
|
1568
|
+
ref: o,
|
|
1569
|
+
class: P(["vf-menu-bar", `vf-menu-bar--${t.variant}`]),
|
|
1570
|
+
"aria-label": t.ariaLabel,
|
|
1571
|
+
onMouseenter: h,
|
|
1572
|
+
onMouseleave: m
|
|
1573
|
+
}, [
|
|
1574
|
+
V("ul", en, [
|
|
1575
|
+
(d(!0), _(re, null, ue(t.items, (D) => (d(), q(Jt, {
|
|
1576
|
+
key: D.value,
|
|
1577
|
+
item: D,
|
|
1578
|
+
depth: 0,
|
|
1579
|
+
"parent-path": [],
|
|
1580
|
+
"active-value": g.value,
|
|
1581
|
+
"open-path": r.value,
|
|
1582
|
+
"hover-enabled": r.value.length > 0,
|
|
1583
|
+
onOpenPathChange: c,
|
|
1584
|
+
onSelect: p
|
|
1585
|
+
}, null, 8, ["item", "active-value", "open-path", "hover-enabled"]))), 128))
|
|
1586
|
+
])
|
|
1587
|
+
], 42, Zt));
|
|
1588
|
+
}
|
|
1589
|
+
}), tn = { class: "vf-nav-menu__node" }, nn = { class: "vf-nav-menu__item-content" }, an = { class: "vf-nav-menu__group-label" }, on = ["aria-expanded", "disabled"], ln = { class: "vf-nav-menu__item-content" }, sn = {
|
|
1226
1590
|
key: 0,
|
|
1227
1591
|
class: "vf-nav-menu__leading-icon",
|
|
1228
1592
|
"aria-hidden": "true"
|
|
1229
|
-
},
|
|
1593
|
+
}, rn = { class: "vf-nav-menu__label" }, un = { class: "vf-nav-menu__item-content" }, dn = {
|
|
1230
1594
|
key: 0,
|
|
1231
1595
|
class: "vf-nav-menu__leading-icon",
|
|
1232
1596
|
"aria-hidden": "true"
|
|
1233
|
-
},
|
|
1597
|
+
}, cn = { class: "vf-nav-menu__label" }, fn = ["aria-current", "disabled"], vn = { class: "vf-nav-menu__item-content" }, mn = {
|
|
1234
1598
|
key: 0,
|
|
1235
1599
|
class: "vf-nav-menu__leading-icon",
|
|
1236
1600
|
"aria-hidden": "true"
|
|
1237
|
-
},
|
|
1601
|
+
}, pn = { class: "vf-nav-menu__label" }, hn = {
|
|
1238
1602
|
key: 4,
|
|
1239
1603
|
class: "vf-nav-menu__list vf-nav-menu__list--nested"
|
|
1240
|
-
},
|
|
1604
|
+
}, bn = { class: "vf-nav-menu__list vf-nav-menu__list--nested" }, _n = /* @__PURE__ */ M({
|
|
1241
1605
|
name: "VfNavMenuItemNode",
|
|
1242
1606
|
__name: "VfNavMenuItemNode",
|
|
1243
1607
|
props: {
|
|
@@ -1249,320 +1613,339 @@ const nt = {
|
|
|
1249
1613
|
},
|
|
1250
1614
|
emits: ["toggle", "select"],
|
|
1251
1615
|
setup(t, { emit: n }) {
|
|
1252
|
-
const e = t,
|
|
1253
|
-
var
|
|
1254
|
-
return !!((
|
|
1255
|
-
}),
|
|
1616
|
+
const e = t, l = n, o = a(() => {
|
|
1617
|
+
var k;
|
|
1618
|
+
return !!((k = e.item.children) != null && k.length);
|
|
1619
|
+
}), i = a(() => e.item.kind === "group"), r = a(
|
|
1256
1620
|
() => e.expandedValues.includes(e.item.value)
|
|
1257
|
-
),
|
|
1621
|
+
), g = a(() => e.activeValue === e.item.value), v = a(
|
|
1622
|
+
() => !g.value && L(e.item, e.activeValue)
|
|
1623
|
+
), T = a(
|
|
1258
1624
|
() => e.item.href !== void 0 || e.item.to !== void 0
|
|
1259
|
-
),
|
|
1625
|
+
), p = a(() => e.item.to !== void 0 ? fe("RouterLink") : "a"), c = a(() => e.item.rel ? e.item.rel : e.item.target === "_blank" ? "noopener noreferrer" : void 0), m = a(() => e.item.to !== void 0 ? {
|
|
1260
1626
|
to: e.item.to,
|
|
1261
1627
|
target: e.item.target,
|
|
1262
|
-
rel:
|
|
1628
|
+
rel: c.value
|
|
1263
1629
|
} : {
|
|
1264
1630
|
href: e.item.href,
|
|
1265
1631
|
target: e.item.target,
|
|
1266
|
-
rel:
|
|
1632
|
+
rel: c.value
|
|
1267
1633
|
});
|
|
1268
|
-
function
|
|
1269
|
-
e.item.disabled ||
|
|
1634
|
+
function h() {
|
|
1635
|
+
e.item.disabled || l("toggle", {
|
|
1270
1636
|
value: e.item.value,
|
|
1271
1637
|
parentPath: e.parentPath
|
|
1272
1638
|
});
|
|
1273
1639
|
}
|
|
1274
|
-
function
|
|
1640
|
+
function x(k) {
|
|
1275
1641
|
if (e.item.disabled) {
|
|
1276
|
-
|
|
1642
|
+
k == null || k.preventDefault();
|
|
1277
1643
|
return;
|
|
1278
1644
|
}
|
|
1279
|
-
|
|
1645
|
+
l("select", e.item);
|
|
1280
1646
|
}
|
|
1281
|
-
function
|
|
1282
|
-
|
|
1283
|
-
return
|
|
1647
|
+
function L(k, f) {
|
|
1648
|
+
var S;
|
|
1649
|
+
return !f || !((S = k.children) != null && S.length) ? !1 : k.children.some(
|
|
1650
|
+
($) => $.value === f || L($, f)
|
|
1651
|
+
);
|
|
1284
1652
|
}
|
|
1285
|
-
function D(
|
|
1286
|
-
const
|
|
1287
|
-
|
|
1653
|
+
function D(k) {
|
|
1654
|
+
const f = k;
|
|
1655
|
+
return f.style.transition = "height var(--vf-motion-duration-normal) var(--vf-motion-ease-standard), opacity var(--vf-motion-duration-normal) var(--vf-motion-ease-standard)", f;
|
|
1288
1656
|
}
|
|
1289
|
-
function
|
|
1290
|
-
const
|
|
1657
|
+
function R(k) {
|
|
1658
|
+
const f = D(k);
|
|
1659
|
+
f.style.overflow = "hidden", f.style.height = "0", f.style.opacity = "0";
|
|
1660
|
+
}
|
|
1661
|
+
function I(k) {
|
|
1662
|
+
const f = D(k);
|
|
1291
1663
|
requestAnimationFrame(() => {
|
|
1292
|
-
|
|
1664
|
+
f.style.height = `${f.scrollHeight}px`, f.style.opacity = "1";
|
|
1293
1665
|
});
|
|
1294
1666
|
}
|
|
1295
|
-
function k
|
|
1296
|
-
const
|
|
1297
|
-
|
|
1667
|
+
function u(k) {
|
|
1668
|
+
const f = k;
|
|
1669
|
+
f.style.transition = "", f.style.overflow = "", f.style.height = "", f.style.opacity = "";
|
|
1298
1670
|
}
|
|
1299
|
-
function
|
|
1300
|
-
const
|
|
1301
|
-
|
|
1671
|
+
function w(k) {
|
|
1672
|
+
const f = D(k);
|
|
1673
|
+
f.style.overflow = "hidden", f.style.height = `${f.scrollHeight}px`, f.style.opacity = "1";
|
|
1302
1674
|
}
|
|
1303
|
-
function
|
|
1304
|
-
const
|
|
1305
|
-
|
|
1306
|
-
|
|
1675
|
+
function B(k) {
|
|
1676
|
+
const f = k;
|
|
1677
|
+
f.offsetHeight, requestAnimationFrame(() => {
|
|
1678
|
+
f.style.height = "0", f.style.opacity = "0";
|
|
1307
1679
|
});
|
|
1308
1680
|
}
|
|
1309
|
-
function
|
|
1310
|
-
const
|
|
1311
|
-
|
|
1681
|
+
function s(k) {
|
|
1682
|
+
const f = k;
|
|
1683
|
+
f.style.transition = "", f.style.overflow = "", f.style.height = "", f.style.opacity = "";
|
|
1312
1684
|
}
|
|
1313
|
-
return (
|
|
1314
|
-
const
|
|
1315
|
-
return
|
|
1316
|
-
|
|
1685
|
+
return (k, f) => {
|
|
1686
|
+
const S = Ee("VfNavMenuItemNode", !0);
|
|
1687
|
+
return d(), _("li", tn, [
|
|
1688
|
+
i.value ? (d(), _("div", {
|
|
1317
1689
|
key: 0,
|
|
1318
|
-
class:
|
|
1319
|
-
style:
|
|
1690
|
+
class: P(["vf-nav-menu__group", `vf-nav-menu__group--level-${t.level}`]),
|
|
1691
|
+
style: U({ "--vf-nav-menu-level": String(t.level) })
|
|
1320
1692
|
}, [
|
|
1321
|
-
|
|
1322
|
-
|
|
1693
|
+
V("span", nn, [
|
|
1694
|
+
V("span", an, F(t.item.label), 1)
|
|
1323
1695
|
])
|
|
1324
|
-
], 6)) :
|
|
1696
|
+
], 6)) : o.value ? (d(), _("button", {
|
|
1325
1697
|
key: 1,
|
|
1326
|
-
class:
|
|
1698
|
+
class: P([
|
|
1327
1699
|
"vf-nav-menu__item",
|
|
1328
1700
|
"vf-nav-menu__item--branch",
|
|
1329
|
-
|
|
1701
|
+
!t.item.leadingIcon && "vf-nav-menu__item--icon-offset",
|
|
1702
|
+
v.value && "vf-nav-menu__item--ancestor-active",
|
|
1703
|
+
r.value && "vf-nav-menu__item--expanded"
|
|
1330
1704
|
]),
|
|
1331
|
-
style:
|
|
1332
|
-
"aria-expanded":
|
|
1705
|
+
style: U({ "--vf-nav-menu-level": String(t.level) }),
|
|
1706
|
+
"aria-expanded": r.value,
|
|
1333
1707
|
disabled: t.item.disabled,
|
|
1334
1708
|
type: "button",
|
|
1335
|
-
onClick:
|
|
1709
|
+
onClick: h
|
|
1336
1710
|
}, [
|
|
1337
|
-
|
|
1338
|
-
t.item.leadingIcon ? (
|
|
1339
|
-
|
|
1711
|
+
V("span", ln, [
|
|
1712
|
+
t.item.leadingIcon ? (d(), _("span", sn, [
|
|
1713
|
+
H(y(J), {
|
|
1340
1714
|
icon: t.item.leadingIcon,
|
|
1341
1715
|
size: "1rem"
|
|
1342
1716
|
}, null, 8, ["icon"])
|
|
1343
|
-
])) :
|
|
1344
|
-
|
|
1717
|
+
])) : E("", !0),
|
|
1718
|
+
V("span", rn, F(t.item.label), 1)
|
|
1345
1719
|
]),
|
|
1346
|
-
|
|
1347
|
-
class:
|
|
1720
|
+
V("span", {
|
|
1721
|
+
class: P(["vf-nav-menu__icon", r.value && "vf-nav-menu__icon--open"]),
|
|
1348
1722
|
"aria-hidden": "true"
|
|
1349
1723
|
}, [
|
|
1350
|
-
|
|
1351
|
-
icon:
|
|
1724
|
+
H(y(J), {
|
|
1725
|
+
icon: y(W).chevronDown,
|
|
1352
1726
|
size: "0.875rem"
|
|
1353
1727
|
}, null, 8, ["icon"])
|
|
1354
1728
|
], 2)
|
|
1355
|
-
], 14,
|
|
1729
|
+
], 14, on)) : T.value ? (d(), q(fe(p.value), N({ key: 2 }, m.value, {
|
|
1356
1730
|
class: [
|
|
1357
1731
|
"vf-nav-menu__item",
|
|
1358
|
-
|
|
1732
|
+
!t.item.leadingIcon && "vf-nav-menu__item--icon-offset",
|
|
1733
|
+
g.value && "vf-nav-menu__item--active",
|
|
1734
|
+
v.value && "vf-nav-menu__item--ancestor-active",
|
|
1359
1735
|
t.item.disabled && "vf-nav-menu__item--disabled"
|
|
1360
1736
|
],
|
|
1361
1737
|
style: { "--vf-nav-menu-level": String(t.level) },
|
|
1362
|
-
"aria-current":
|
|
1363
|
-
onClick:
|
|
1738
|
+
"aria-current": g.value ? "page" : void 0,
|
|
1739
|
+
onClick: x
|
|
1364
1740
|
}), {
|
|
1365
|
-
default:
|
|
1366
|
-
|
|
1367
|
-
t.item.leadingIcon ? (
|
|
1368
|
-
|
|
1741
|
+
default: G(() => [
|
|
1742
|
+
V("span", un, [
|
|
1743
|
+
t.item.leadingIcon ? (d(), _("span", dn, [
|
|
1744
|
+
H(y(J), {
|
|
1369
1745
|
icon: t.item.leadingIcon,
|
|
1370
1746
|
size: "1rem"
|
|
1371
1747
|
}, null, 8, ["icon"])
|
|
1372
|
-
])) :
|
|
1373
|
-
|
|
1748
|
+
])) : E("", !0),
|
|
1749
|
+
V("span", cn, F(t.item.label), 1)
|
|
1374
1750
|
])
|
|
1375
1751
|
]),
|
|
1376
1752
|
_: 1
|
|
1377
|
-
}, 16, ["class", "style", "aria-current"])) : (
|
|
1753
|
+
}, 16, ["class", "style", "aria-current"])) : (d(), _("button", {
|
|
1378
1754
|
key: 3,
|
|
1379
|
-
class:
|
|
1755
|
+
class: P([
|
|
1380
1756
|
"vf-nav-menu__item",
|
|
1381
|
-
|
|
1757
|
+
!t.item.leadingIcon && "vf-nav-menu__item--icon-offset",
|
|
1758
|
+
g.value && "vf-nav-menu__item--active",
|
|
1759
|
+
v.value && "vf-nav-menu__item--ancestor-active",
|
|
1382
1760
|
t.item.disabled && "vf-nav-menu__item--disabled"
|
|
1383
1761
|
]),
|
|
1384
|
-
style:
|
|
1385
|
-
"aria-current":
|
|
1762
|
+
style: U({ "--vf-nav-menu-level": String(t.level) }),
|
|
1763
|
+
"aria-current": g.value ? "page" : void 0,
|
|
1386
1764
|
disabled: t.item.disabled,
|
|
1387
1765
|
type: "button",
|
|
1388
|
-
onClick:
|
|
1766
|
+
onClick: f[0] || (f[0] = ($) => x())
|
|
1389
1767
|
}, [
|
|
1390
|
-
|
|
1391
|
-
t.item.leadingIcon ? (
|
|
1392
|
-
|
|
1768
|
+
V("span", vn, [
|
|
1769
|
+
t.item.leadingIcon ? (d(), _("span", mn, [
|
|
1770
|
+
H(y(J), {
|
|
1393
1771
|
icon: t.item.leadingIcon,
|
|
1394
1772
|
size: "1rem"
|
|
1395
1773
|
}, null, 8, ["icon"])
|
|
1396
|
-
])) :
|
|
1397
|
-
|
|
1774
|
+
])) : E("", !0),
|
|
1775
|
+
V("span", pn, F(t.item.label), 1)
|
|
1398
1776
|
])
|
|
1399
|
-
], 14,
|
|
1400
|
-
|
|
1401
|
-
(
|
|
1402
|
-
key:
|
|
1403
|
-
item:
|
|
1777
|
+
], 14, fn)),
|
|
1778
|
+
o.value && i.value ? (d(), _("ul", hn, [
|
|
1779
|
+
(d(!0), _(re, null, ue(t.item.children, ($) => (d(), q(S, {
|
|
1780
|
+
key: $.value,
|
|
1781
|
+
item: $,
|
|
1404
1782
|
level: t.level + 1,
|
|
1405
1783
|
"parent-path": [...t.parentPath, t.item.value],
|
|
1406
1784
|
"active-value": t.activeValue,
|
|
1407
1785
|
"expanded-values": t.expandedValues,
|
|
1408
|
-
onToggle:
|
|
1409
|
-
onSelect:
|
|
1786
|
+
onToggle: f[1] || (f[1] = (C) => l("toggle", C)),
|
|
1787
|
+
onSelect: f[2] || (f[2] = (C) => l("select", C))
|
|
1410
1788
|
}, null, 8, ["item", "level", "parent-path", "active-value", "expanded-values"]))), 128))
|
|
1411
|
-
])) :
|
|
1789
|
+
])) : o.value ? (d(), q(de, {
|
|
1412
1790
|
key: 5,
|
|
1413
|
-
onBeforeEnter:
|
|
1414
|
-
onEnter:
|
|
1415
|
-
onAfterEnter:
|
|
1416
|
-
onBeforeLeave:
|
|
1417
|
-
onLeave:
|
|
1418
|
-
onAfterLeave:
|
|
1791
|
+
onBeforeEnter: R,
|
|
1792
|
+
onEnter: I,
|
|
1793
|
+
onAfterEnter: u,
|
|
1794
|
+
onBeforeLeave: w,
|
|
1795
|
+
onLeave: B,
|
|
1796
|
+
onAfterLeave: s
|
|
1419
1797
|
}, {
|
|
1420
|
-
default:
|
|
1421
|
-
|
|
1798
|
+
default: G(() => [
|
|
1799
|
+
r.value ? (d(), _("div", {
|
|
1422
1800
|
key: 0,
|
|
1423
|
-
class:
|
|
1801
|
+
class: P([
|
|
1424
1802
|
"vf-nav-menu__collapse",
|
|
1425
1803
|
`vf-nav-menu__collapse--level-${t.level}`
|
|
1426
1804
|
])
|
|
1427
1805
|
}, [
|
|
1428
|
-
|
|
1429
|
-
(
|
|
1430
|
-
key:
|
|
1431
|
-
item:
|
|
1806
|
+
V("ul", bn, [
|
|
1807
|
+
(d(!0), _(re, null, ue(t.item.children, ($) => (d(), q(S, {
|
|
1808
|
+
key: $.value,
|
|
1809
|
+
item: $,
|
|
1432
1810
|
level: t.level + 1,
|
|
1433
1811
|
"parent-path": [...t.parentPath, t.item.value],
|
|
1434
1812
|
"active-value": t.activeValue,
|
|
1435
1813
|
"expanded-values": t.expandedValues,
|
|
1436
|
-
onToggle:
|
|
1437
|
-
onSelect:
|
|
1814
|
+
onToggle: f[3] || (f[3] = (C) => l("toggle", C)),
|
|
1815
|
+
onSelect: f[4] || (f[4] = (C) => l("select", C))
|
|
1438
1816
|
}, null, 8, ["item", "level", "parent-path", "active-value", "expanded-values"]))), 128))
|
|
1439
1817
|
])
|
|
1440
|
-
], 2)) :
|
|
1818
|
+
], 2)) : E("", !0)
|
|
1441
1819
|
]),
|
|
1442
1820
|
_: 1
|
|
1443
|
-
})) :
|
|
1821
|
+
})) : E("", !0)
|
|
1444
1822
|
]);
|
|
1445
1823
|
};
|
|
1446
1824
|
}
|
|
1447
|
-
}),
|
|
1825
|
+
}), yn = ["aria-label"], gn = { class: "vf-nav-menu__list" }, $a = /* @__PURE__ */ M({
|
|
1448
1826
|
__name: "VfNavMenu",
|
|
1449
1827
|
props: {
|
|
1450
1828
|
items: {},
|
|
1451
1829
|
modelValue: { default: void 0 },
|
|
1452
1830
|
defaultValue: { default: void 0 },
|
|
1453
1831
|
ariaLabel: { default: "Navigation" },
|
|
1454
|
-
expandMode: { default: "multiple" }
|
|
1832
|
+
expandMode: { default: "multiple" },
|
|
1833
|
+
variant: { default: "default" }
|
|
1455
1834
|
},
|
|
1456
1835
|
emits: ["update:modelValue", "change", "select"],
|
|
1457
1836
|
setup(t, { emit: n }) {
|
|
1458
|
-
const e = t,
|
|
1459
|
-
function
|
|
1460
|
-
return
|
|
1461
|
-
(
|
|
1837
|
+
const e = t, l = n, o = A(e.defaultValue), i = a(() => e.modelValue ?? o.value), r = A([]);
|
|
1838
|
+
function g(u, w) {
|
|
1839
|
+
return u.some(
|
|
1840
|
+
(B) => {
|
|
1462
1841
|
var s;
|
|
1463
|
-
return
|
|
1842
|
+
return w(B) || ((s = B.children) != null && s.length ? g(B.children, w) : !1);
|
|
1464
1843
|
}
|
|
1465
1844
|
);
|
|
1466
1845
|
}
|
|
1467
|
-
const
|
|
1468
|
-
() =>
|
|
1469
|
-
),
|
|
1470
|
-
() =>
|
|
1471
|
-
),
|
|
1472
|
-
function
|
|
1473
|
-
var
|
|
1474
|
-
return
|
|
1846
|
+
const v = a(
|
|
1847
|
+
() => g(e.items, (u) => u.kind === "group")
|
|
1848
|
+
), T = a(
|
|
1849
|
+
() => g(e.items, (u) => !!u.leadingIcon)
|
|
1850
|
+
), p = a(() => !v.value && !T.value);
|
|
1851
|
+
function c(u) {
|
|
1852
|
+
var w;
|
|
1853
|
+
return u.kind !== "group" && !!((w = u.children) != null && w.length);
|
|
1475
1854
|
}
|
|
1476
|
-
function
|
|
1855
|
+
function m(u, w, B = []) {
|
|
1477
1856
|
var s;
|
|
1478
|
-
if (!
|
|
1857
|
+
if (!w)
|
|
1479
1858
|
return [];
|
|
1480
|
-
for (const
|
|
1481
|
-
if (
|
|
1482
|
-
return
|
|
1483
|
-
if ((s =
|
|
1484
|
-
const
|
|
1485
|
-
...
|
|
1486
|
-
|
|
1859
|
+
for (const k of u) {
|
|
1860
|
+
if (k.value === w)
|
|
1861
|
+
return B;
|
|
1862
|
+
if ((s = k.children) != null && s.length) {
|
|
1863
|
+
const f = m(k.children, w, [
|
|
1864
|
+
...B,
|
|
1865
|
+
k.value
|
|
1487
1866
|
]);
|
|
1488
|
-
if (
|
|
1489
|
-
return
|
|
1867
|
+
if (f.length)
|
|
1868
|
+
return f;
|
|
1490
1869
|
}
|
|
1491
1870
|
}
|
|
1492
1871
|
return [];
|
|
1493
1872
|
}
|
|
1494
|
-
function
|
|
1495
|
-
const
|
|
1496
|
-
|
|
1497
|
-
/* @__PURE__ */ new Set([...
|
|
1873
|
+
function h() {
|
|
1874
|
+
const u = m(e.items, i.value);
|
|
1875
|
+
r.value = Array.from(
|
|
1876
|
+
/* @__PURE__ */ new Set([...r.value, ...u])
|
|
1498
1877
|
);
|
|
1499
1878
|
}
|
|
1500
|
-
function
|
|
1501
|
-
var
|
|
1502
|
-
if (!
|
|
1503
|
-
return
|
|
1504
|
-
const [
|
|
1505
|
-
return (
|
|
1879
|
+
function x(u, w) {
|
|
1880
|
+
var f;
|
|
1881
|
+
if (!w.length)
|
|
1882
|
+
return u;
|
|
1883
|
+
const [B, ...s] = w, k = u.find((S) => S.value === B);
|
|
1884
|
+
return (f = k == null ? void 0 : k.children) != null && f.length ? x(k.children, s) : [];
|
|
1506
1885
|
}
|
|
1507
|
-
function
|
|
1508
|
-
return
|
|
1886
|
+
function L(u) {
|
|
1887
|
+
return u.flatMap((w) => {
|
|
1509
1888
|
var s;
|
|
1510
|
-
const
|
|
1511
|
-
return
|
|
1889
|
+
const B = (s = w.children) != null && s.length ? L(w.children) : [];
|
|
1890
|
+
return c(w) ? [w.value, ...B] : B;
|
|
1512
1891
|
});
|
|
1513
1892
|
}
|
|
1514
|
-
function
|
|
1515
|
-
e.modelValue === void 0 && (
|
|
1893
|
+
function D(u) {
|
|
1894
|
+
e.modelValue === void 0 && (o.value = u), l("update:modelValue", u), l("change", u);
|
|
1516
1895
|
}
|
|
1517
|
-
function
|
|
1518
|
-
|
|
1896
|
+
function R(u) {
|
|
1897
|
+
D(u.value), r.value = Array.from(
|
|
1519
1898
|
/* @__PURE__ */ new Set([
|
|
1520
|
-
...
|
|
1521
|
-
...
|
|
1899
|
+
...r.value,
|
|
1900
|
+
...m(e.items, u.value)
|
|
1522
1901
|
])
|
|
1523
|
-
),
|
|
1902
|
+
), l("select", u);
|
|
1524
1903
|
}
|
|
1525
|
-
function
|
|
1526
|
-
const { value:
|
|
1527
|
-
if (
|
|
1528
|
-
|
|
1529
|
-
(s) => s !==
|
|
1904
|
+
function I(u) {
|
|
1905
|
+
const { value: w, parentPath: B } = u;
|
|
1906
|
+
if (r.value.includes(w)) {
|
|
1907
|
+
r.value = r.value.filter(
|
|
1908
|
+
(s) => s !== w
|
|
1530
1909
|
);
|
|
1531
1910
|
return;
|
|
1532
1911
|
}
|
|
1533
1912
|
if (e.expandMode === "single") {
|
|
1534
|
-
const
|
|
1535
|
-
|
|
1536
|
-
(
|
|
1913
|
+
const k = x(e.items, B).filter((f) => f.value !== w && c(f)).flatMap((f) => L([f]));
|
|
1914
|
+
r.value = r.value.filter(
|
|
1915
|
+
(f) => !k.includes(f)
|
|
1537
1916
|
);
|
|
1538
1917
|
}
|
|
1539
|
-
|
|
1918
|
+
r.value = [...r.value, w];
|
|
1540
1919
|
}
|
|
1541
|
-
return
|
|
1542
|
-
() => [e.items,
|
|
1920
|
+
return ne(
|
|
1921
|
+
() => [e.items, i.value],
|
|
1543
1922
|
() => {
|
|
1544
|
-
|
|
1923
|
+
h();
|
|
1545
1924
|
},
|
|
1546
1925
|
{ immediate: !0, deep: !0 }
|
|
1547
|
-
), (
|
|
1548
|
-
class:
|
|
1926
|
+
), (u, w) => (d(), _("nav", {
|
|
1927
|
+
class: P([
|
|
1928
|
+
"vf-nav-menu",
|
|
1929
|
+
`vf-nav-menu--${t.variant}`,
|
|
1930
|
+
p.value && "vf-nav-menu--simple"
|
|
1931
|
+
]),
|
|
1549
1932
|
"aria-label": t.ariaLabel
|
|
1550
1933
|
}, [
|
|
1551
|
-
|
|
1552
|
-
(
|
|
1553
|
-
key:
|
|
1554
|
-
item:
|
|
1934
|
+
V("ul", gn, [
|
|
1935
|
+
(d(!0), _(re, null, ue(t.items, (B) => (d(), q(_n, {
|
|
1936
|
+
key: B.value,
|
|
1937
|
+
item: B,
|
|
1555
1938
|
level: 0,
|
|
1556
1939
|
"parent-path": [],
|
|
1557
|
-
"active-value":
|
|
1558
|
-
"expanded-values":
|
|
1559
|
-
onToggle:
|
|
1560
|
-
onSelect:
|
|
1940
|
+
"active-value": i.value,
|
|
1941
|
+
"expanded-values": r.value,
|
|
1942
|
+
onToggle: I,
|
|
1943
|
+
onSelect: R
|
|
1561
1944
|
}, null, 8, ["item", "active-value", "expanded-values"]))), 128))
|
|
1562
1945
|
])
|
|
1563
|
-
], 10,
|
|
1946
|
+
], 10, yn));
|
|
1564
1947
|
}
|
|
1565
|
-
}),
|
|
1948
|
+
}), wn = { key: 0 }, kn = { class: "vf-panel__title" }, Ta = /* @__PURE__ */ M({
|
|
1566
1949
|
inheritAttrs: !1,
|
|
1567
1950
|
__name: "VfPanel",
|
|
1568
1951
|
props: {
|
|
@@ -1570,19 +1953,19 @@ const nt = {
|
|
|
1570
1953
|
subtle: { type: Boolean, default: !1 }
|
|
1571
1954
|
},
|
|
1572
1955
|
setup(t) {
|
|
1573
|
-
const n = t, e =
|
|
1574
|
-
() =>
|
|
1956
|
+
const n = t, e = j(), l = a(
|
|
1957
|
+
() => K("vf-panel", n.subtle && "vf-panel--subtle")
|
|
1575
1958
|
);
|
|
1576
|
-
return (
|
|
1577
|
-
n.title ||
|
|
1578
|
-
|
|
1579
|
-
|
|
1959
|
+
return (o, i) => (d(), _("section", N({ class: l.value }, y(e)), [
|
|
1960
|
+
n.title || o.$slots.header ? (d(), _("header", wn, [
|
|
1961
|
+
O(o.$slots, "header", {}, () => [
|
|
1962
|
+
V("h3", kn, F(n.title), 1)
|
|
1580
1963
|
])
|
|
1581
|
-
])) :
|
|
1582
|
-
|
|
1964
|
+
])) : E("", !0),
|
|
1965
|
+
O(o.$slots, "default")
|
|
1583
1966
|
], 16));
|
|
1584
1967
|
}
|
|
1585
|
-
}),
|
|
1968
|
+
}), $n = { class: "vf-popover" }, Tn = ["id", "aria-controls", "aria-expanded"], Vn = ["id", "aria-labelledby"], Va = /* @__PURE__ */ M({
|
|
1586
1969
|
__name: "VfPopover",
|
|
1587
1970
|
props: {
|
|
1588
1971
|
open: { type: Boolean, default: void 0 },
|
|
@@ -1595,172 +1978,157 @@ const nt = {
|
|
|
1595
1978
|
},
|
|
1596
1979
|
emits: ["update:open", "openChange"],
|
|
1597
1980
|
setup(t, { emit: n }) {
|
|
1598
|
-
const e = t,
|
|
1599
|
-
enter:
|
|
1600
|
-
leave:
|
|
1601
|
-
},
|
|
1981
|
+
const e = t, l = n, o = A(null), i = A(null), r = A(null), g = ee({ prefix: "vf-popover-content" }), v = ee({ prefix: "vf-popover-trigger" }), T = {
|
|
1982
|
+
enter: Z.fast,
|
|
1983
|
+
leave: Z.fast
|
|
1984
|
+
}, p = a(
|
|
1602
1985
|
() => e.disableTeleport || e.teleportTo === !1 || e.teleportTo === null
|
|
1603
|
-
),
|
|
1986
|
+
), c = a(() => typeof e.teleportTo == "string" || typeof HTMLElement < "u" && e.teleportTo instanceof HTMLElement ? e.teleportTo : "body"), m = be({
|
|
1604
1987
|
defaultOpen: e.defaultOpen,
|
|
1605
|
-
open:
|
|
1606
|
-
onOpenChange: (
|
|
1607
|
-
|
|
1988
|
+
open: a(() => e.open),
|
|
1989
|
+
onOpenChange: (C) => {
|
|
1990
|
+
l("update:open", C), l("openChange", C);
|
|
1608
1991
|
}
|
|
1609
|
-
}),
|
|
1992
|
+
}), h = m.isOpen, x = a(
|
|
1610
1993
|
() => e.placement === "bottom-end" ? ["bottom-end", "top-end"] : ["bottom-start", "top-start"]
|
|
1611
1994
|
), {
|
|
1612
|
-
placement:
|
|
1613
|
-
middlewareData:
|
|
1614
|
-
styles:
|
|
1615
|
-
} =
|
|
1616
|
-
enabled:
|
|
1617
|
-
placement:
|
|
1618
|
-
middleware:
|
|
1995
|
+
placement: L,
|
|
1996
|
+
middlewareData: D,
|
|
1997
|
+
styles: R
|
|
1998
|
+
} = Te(o, i, {
|
|
1999
|
+
enabled: h,
|
|
2000
|
+
placement: a(() => e.placement),
|
|
2001
|
+
middleware: a(
|
|
1619
2002
|
() => [
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
].filter((
|
|
2003
|
+
ge(10),
|
|
2004
|
+
we({ placements: x.value }),
|
|
2005
|
+
ke(),
|
|
2006
|
+
r.value ? Ve(r.value) : void 0
|
|
2007
|
+
].filter((C) => C !== void 0)
|
|
1625
2008
|
),
|
|
1626
2009
|
strategy: "fixed"
|
|
1627
|
-
}),
|
|
2010
|
+
}), I = a(() => [
|
|
1628
2011
|
"vf-popover__content",
|
|
1629
|
-
|
|
1630
|
-
]),
|
|
1631
|
-
const
|
|
2012
|
+
L.value.startsWith("top") && "vf-popover__content--top"
|
|
2013
|
+
]), u = a(() => {
|
|
2014
|
+
const C = D.value.arrow;
|
|
1632
2015
|
return {
|
|
1633
|
-
x: (
|
|
1634
|
-
y: (
|
|
2016
|
+
x: (C == null ? void 0 : C.x) !== void 0 && (C == null ? void 0 : C.baseX) !== void 0 ? C.x - C.baseX : 0,
|
|
2017
|
+
y: (C == null ? void 0 : C.y) !== void 0 && (C == null ? void 0 : C.baseY) !== void 0 ? C.y - C.baseY : 0
|
|
1635
2018
|
};
|
|
1636
|
-
}),
|
|
1637
|
-
left: `${
|
|
1638
|
-
top: `${
|
|
1639
|
-
})),
|
|
2019
|
+
}), w = a(() => ({
|
|
2020
|
+
left: `${u.value.x}px`,
|
|
2021
|
+
top: `${u.value.y}px`
|
|
2022
|
+
})), B = a(() => [
|
|
1640
2023
|
"vf-popover__arrow",
|
|
1641
|
-
|
|
2024
|
+
L.value.startsWith("top") ? "vf-popover__arrow--top" : "vf-popover__arrow--bottom"
|
|
1642
2025
|
]);
|
|
1643
2026
|
async function s() {
|
|
1644
|
-
var
|
|
1645
|
-
await
|
|
1646
|
-
const
|
|
2027
|
+
var ie, pe;
|
|
2028
|
+
await le();
|
|
2029
|
+
const C = (ie = i.value) == null ? void 0 : ie.querySelector(
|
|
1647
2030
|
"[autofocus], [data-autofocus]"
|
|
1648
2031
|
);
|
|
1649
|
-
if (
|
|
1650
|
-
|
|
2032
|
+
if (C) {
|
|
2033
|
+
C.focus();
|
|
1651
2034
|
return;
|
|
1652
2035
|
}
|
|
1653
|
-
(
|
|
2036
|
+
(pe = i.value) == null || pe.focus();
|
|
1654
2037
|
}
|
|
1655
|
-
function
|
|
1656
|
-
|
|
2038
|
+
function k() {
|
|
2039
|
+
m.open(), s();
|
|
1657
2040
|
}
|
|
1658
|
-
function
|
|
1659
|
-
var
|
|
1660
|
-
|
|
2041
|
+
function f() {
|
|
2042
|
+
var C;
|
|
2043
|
+
m.close(), (C = o.value) == null || C.focus();
|
|
1661
2044
|
}
|
|
1662
|
-
function
|
|
1663
|
-
if (
|
|
1664
|
-
|
|
2045
|
+
function S() {
|
|
2046
|
+
if (h.value) {
|
|
2047
|
+
f();
|
|
1665
2048
|
return;
|
|
1666
2049
|
}
|
|
1667
|
-
|
|
2050
|
+
k();
|
|
1668
2051
|
}
|
|
1669
|
-
function
|
|
1670
|
-
(
|
|
2052
|
+
function $(C) {
|
|
2053
|
+
(C.key === "Enter" || C.key === " ") && (C.preventDefault(), S()), C.key === "ArrowDown" && (C.preventDefault(), k());
|
|
1671
2054
|
}
|
|
1672
|
-
return
|
|
1673
|
-
[
|
|
2055
|
+
return $e(
|
|
2056
|
+
[o, i],
|
|
1674
2057
|
() => {
|
|
1675
|
-
|
|
2058
|
+
h.value && e.closeOnOutsideClick && f();
|
|
1676
2059
|
},
|
|
1677
2060
|
{
|
|
1678
|
-
enabled:
|
|
2061
|
+
enabled: h,
|
|
1679
2062
|
event: "click"
|
|
1680
2063
|
}
|
|
1681
|
-
),
|
|
1682
|
-
(
|
|
1683
|
-
!
|
|
2064
|
+
), _e(
|
|
2065
|
+
(C) => {
|
|
2066
|
+
!h.value || !e.closeOnEscape || (C.preventDefault(), f());
|
|
1684
2067
|
},
|
|
1685
2068
|
{
|
|
1686
|
-
enabled:
|
|
2069
|
+
enabled: h
|
|
1687
2070
|
}
|
|
1688
|
-
), (
|
|
1689
|
-
|
|
1690
|
-
id:
|
|
2071
|
+
), (C, ie) => (d(), _("div", $n, [
|
|
2072
|
+
V("div", {
|
|
2073
|
+
id: y(v),
|
|
1691
2074
|
ref_key: "triggerRef",
|
|
1692
|
-
ref:
|
|
2075
|
+
ref: o,
|
|
1693
2076
|
class: "vf-popover__trigger",
|
|
1694
|
-
"aria-controls":
|
|
1695
|
-
"aria-expanded": h
|
|
2077
|
+
"aria-controls": y(g),
|
|
2078
|
+
"aria-expanded": y(h),
|
|
1696
2079
|
"aria-haspopup": "dialog",
|
|
1697
2080
|
tabindex: "0",
|
|
1698
|
-
onClick:
|
|
1699
|
-
onKeydown:
|
|
2081
|
+
onClick: S,
|
|
2082
|
+
onKeydown: $
|
|
1700
2083
|
}, [
|
|
1701
|
-
C
|
|
1702
|
-
open: h
|
|
1703
|
-
toggle:
|
|
2084
|
+
O(C.$slots, "trigger", {
|
|
2085
|
+
open: y(h),
|
|
2086
|
+
toggle: S
|
|
1704
2087
|
})
|
|
1705
|
-
], 40,
|
|
1706
|
-
(
|
|
1707
|
-
to:
|
|
1708
|
-
disabled:
|
|
2088
|
+
], 40, Tn),
|
|
2089
|
+
(d(), q(he, {
|
|
2090
|
+
to: c.value,
|
|
2091
|
+
disabled: p.value
|
|
1709
2092
|
}, [
|
|
1710
|
-
|
|
2093
|
+
H(de, {
|
|
1711
2094
|
name: "vf-floating-transition",
|
|
1712
2095
|
appear: "",
|
|
1713
|
-
duration:
|
|
2096
|
+
duration: T
|
|
1714
2097
|
}, {
|
|
1715
|
-
default:
|
|
1716
|
-
h
|
|
2098
|
+
default: G(() => [
|
|
2099
|
+
y(h) ? (d(), _("section", {
|
|
1717
2100
|
key: 0,
|
|
1718
|
-
id:
|
|
2101
|
+
id: y(g),
|
|
1719
2102
|
ref_key: "contentRef",
|
|
1720
|
-
ref:
|
|
1721
|
-
class:
|
|
1722
|
-
style:
|
|
1723
|
-
"aria-labelledby":
|
|
2103
|
+
ref: i,
|
|
2104
|
+
class: P(I.value),
|
|
2105
|
+
style: U(y(R)),
|
|
2106
|
+
"aria-labelledby": y(v),
|
|
1724
2107
|
role: "dialog",
|
|
1725
2108
|
tabindex: "-1"
|
|
1726
2109
|
}, [
|
|
1727
|
-
|
|
2110
|
+
V("span", {
|
|
1728
2111
|
ref_key: "arrowRef",
|
|
1729
|
-
ref:
|
|
1730
|
-
class:
|
|
1731
|
-
style:
|
|
2112
|
+
ref: r,
|
|
2113
|
+
class: P(B.value),
|
|
2114
|
+
style: U(w.value),
|
|
1732
2115
|
"aria-hidden": "true"
|
|
1733
2116
|
}, null, 6),
|
|
1734
|
-
C
|
|
1735
|
-
open: h
|
|
1736
|
-
close:
|
|
2117
|
+
O(C.$slots, "default", {
|
|
2118
|
+
open: y(h),
|
|
2119
|
+
close: f
|
|
1737
2120
|
})
|
|
1738
|
-
], 14,
|
|
2121
|
+
], 14, Vn)) : E("", !0)
|
|
1739
2122
|
]),
|
|
1740
2123
|
_: 3
|
|
1741
2124
|
})
|
|
1742
2125
|
], 8, ["to", "disabled"]))
|
|
1743
2126
|
]));
|
|
1744
2127
|
}
|
|
1745
|
-
}),
|
|
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 = {
|
|
2128
|
+
}), Cn = ["checked", "disabled", "value", "aria-invalid"], xn = {
|
|
1761
2129
|
key: 0,
|
|
1762
2130
|
class: "vf-radio__content"
|
|
1763
|
-
},
|
|
2131
|
+
}, Ca = /* @__PURE__ */ M({
|
|
1764
2132
|
inheritAttrs: !1,
|
|
1765
2133
|
__name: "VfRadio",
|
|
1766
2134
|
props: {
|
|
@@ -1773,55 +2141,272 @@ const nt = {
|
|
|
1773
2141
|
},
|
|
1774
2142
|
emits: ["update:modelValue", "change"],
|
|
1775
2143
|
setup(t, { emit: n }) {
|
|
1776
|
-
const e = t,
|
|
1777
|
-
() =>
|
|
2144
|
+
const e = t, l = n, o = j(), i = a(() => e.modelValue === e.value), r = a(
|
|
2145
|
+
() => K(
|
|
1778
2146
|
"vf-radio",
|
|
1779
2147
|
`vf-radio--${e.size}`,
|
|
1780
|
-
|
|
2148
|
+
i.value && "vf-radio--checked",
|
|
1781
2149
|
e.invalid && "vf-radio--invalid",
|
|
1782
2150
|
e.disabled && "vf-radio--disabled",
|
|
1783
|
-
|
|
2151
|
+
o.class
|
|
1784
2152
|
)
|
|
1785
|
-
),
|
|
2153
|
+
), g = a(() => o.style), v = a(
|
|
1786
2154
|
() => Object.fromEntries(
|
|
1787
|
-
Object.entries(
|
|
2155
|
+
Object.entries(o).filter(([p]) => p !== "class" && p !== "style")
|
|
1788
2156
|
)
|
|
1789
2157
|
);
|
|
1790
|
-
function
|
|
1791
|
-
|
|
2158
|
+
function T(p) {
|
|
2159
|
+
p.target.checked && (l("update:modelValue", e.value), l("change", e.value));
|
|
1792
2160
|
}
|
|
1793
|
-
return (
|
|
1794
|
-
class:
|
|
1795
|
-
style:
|
|
2161
|
+
return (p, c) => (d(), _("label", {
|
|
2162
|
+
class: P(r.value),
|
|
2163
|
+
style: U(g.value)
|
|
1796
2164
|
}, [
|
|
1797
|
-
|
|
2165
|
+
V("input", N({
|
|
1798
2166
|
class: "vf-radio__input",
|
|
1799
2167
|
type: "radio",
|
|
1800
|
-
checked:
|
|
2168
|
+
checked: i.value,
|
|
1801
2169
|
disabled: e.disabled,
|
|
1802
2170
|
value: e.value,
|
|
1803
2171
|
"aria-invalid": e.invalid || void 0
|
|
1804
|
-
},
|
|
1805
|
-
|
|
2172
|
+
}, v.value, { onChange: T }), null, 16, Cn),
|
|
2173
|
+
c[0] || (c[0] = V("span", {
|
|
1806
2174
|
class: "vf-radio__control",
|
|
1807
2175
|
"aria-hidden": "true"
|
|
1808
2176
|
}, [
|
|
1809
|
-
|
|
2177
|
+
V("span", { class: "vf-radio__dot" })
|
|
1810
2178
|
], -1)),
|
|
1811
|
-
t.label ||
|
|
1812
|
-
|
|
1813
|
-
|
|
2179
|
+
t.label || p.$slots.default ? (d(), _("span", xn, [
|
|
2180
|
+
O(p.$slots, "default", {}, () => [
|
|
2181
|
+
ve(F(t.label), 1)
|
|
1814
2182
|
])
|
|
1815
|
-
])) :
|
|
2183
|
+
])) : E("", !0)
|
|
1816
2184
|
], 6));
|
|
1817
2185
|
}
|
|
1818
|
-
}),
|
|
2186
|
+
}), Bn = { class: "vf-select-wrap" }, In = ["name", "value"], En = ["id", "aria-controls", "aria-expanded", "aria-invalid", "disabled"], An = { class: "vf-select__value" }, On = {
|
|
2187
|
+
class: "vf-select__icon",
|
|
2188
|
+
"aria-hidden": "true"
|
|
2189
|
+
}, Ln = ["id", "aria-labelledby"], Dn = ["aria-selected", "disabled", "onClick"], xa = /* @__PURE__ */ M({
|
|
2190
|
+
inheritAttrs: !1,
|
|
2191
|
+
__name: "VfSelect",
|
|
2192
|
+
props: {
|
|
2193
|
+
modelValue: { default: "" },
|
|
2194
|
+
options: {},
|
|
2195
|
+
size: { default: "md" },
|
|
2196
|
+
invalid: { type: Boolean, default: !1 },
|
|
2197
|
+
placeholder: { default: void 0 },
|
|
2198
|
+
disabled: { type: Boolean, default: !1 },
|
|
2199
|
+
placement: { default: "bottom-start" },
|
|
2200
|
+
teleportTo: { type: [String, null, Boolean], default: void 0 },
|
|
2201
|
+
disableTeleport: { type: Boolean, default: !1 }
|
|
2202
|
+
},
|
|
2203
|
+
emits: ["update:modelValue"],
|
|
2204
|
+
setup(t, { emit: n }) {
|
|
2205
|
+
const e = t, l = n, o = j(), i = A(null), r = A(null), g = ee({ prefix: "vf-select-trigger" }), v = ee({ prefix: "vf-select-listbox" }), T = {
|
|
2206
|
+
enter: Z.fast,
|
|
2207
|
+
leave: Z.fast
|
|
2208
|
+
}, p = be(), c = p.isOpen, m = a(
|
|
2209
|
+
() => e.options.find((b) => b.value === e.modelValue)
|
|
2210
|
+
), h = a(
|
|
2211
|
+
() => K(
|
|
2212
|
+
"vf-select",
|
|
2213
|
+
e.size !== "md" && `vf-select--${e.size}`,
|
|
2214
|
+
e.invalid && "vf-select--invalid",
|
|
2215
|
+
c.value && "vf-select--open",
|
|
2216
|
+
!m.value && e.placeholder && "vf-select--placeholder"
|
|
2217
|
+
)
|
|
2218
|
+
), x = a(() => m.value ? m.value.label : e.placeholder ?? ""), L = a(
|
|
2219
|
+
() => e.disableTeleport || e.teleportTo === !1 || e.teleportTo === null
|
|
2220
|
+
), D = a(() => typeof e.teleportTo == "string" || typeof HTMLElement < "u" && e.teleportTo instanceof HTMLElement ? e.teleportTo : "body"), R = a(
|
|
2221
|
+
() => e.placement === "bottom-end" ? ["bottom-end", "top-end"] : ["bottom-start", "top-start"]
|
|
2222
|
+
), { placement: I, styles: u } = Te(
|
|
2223
|
+
i,
|
|
2224
|
+
r,
|
|
2225
|
+
{
|
|
2226
|
+
enabled: c,
|
|
2227
|
+
placement: a(() => e.placement),
|
|
2228
|
+
middleware: a(
|
|
2229
|
+
() => [
|
|
2230
|
+
ge(2),
|
|
2231
|
+
we({ placements: R.value }),
|
|
2232
|
+
ke()
|
|
2233
|
+
]
|
|
2234
|
+
),
|
|
2235
|
+
strategy: "fixed"
|
|
2236
|
+
}
|
|
2237
|
+
), w = a(() => [
|
|
2238
|
+
"vf-dropdown__menu",
|
|
2239
|
+
"vf-select__menu",
|
|
2240
|
+
I.value.startsWith("top") && "vf-dropdown__menu--top"
|
|
2241
|
+
]), B = a(() => ({
|
|
2242
|
+
...u.value,
|
|
2243
|
+
minWidth: i.value ? `${i.value.offsetWidth}px` : void 0
|
|
2244
|
+
}));
|
|
2245
|
+
function s() {
|
|
2246
|
+
var b;
|
|
2247
|
+
return Array.from(
|
|
2248
|
+
((b = r.value) == null ? void 0 : b.querySelectorAll('[role="option"]')) ?? []
|
|
2249
|
+
);
|
|
2250
|
+
}
|
|
2251
|
+
async function k(b = {}) {
|
|
2252
|
+
await le(), await new Promise((Q) => {
|
|
2253
|
+
window.requestAnimationFrame(() => Q());
|
|
2254
|
+
});
|
|
2255
|
+
const z = s(), Y = e.options.findIndex(
|
|
2256
|
+
(Q) => Q.value === e.modelValue && !Q.disabled
|
|
2257
|
+
), ae = z[Math.max(Y, 0)];
|
|
2258
|
+
if (!ae)
|
|
2259
|
+
return;
|
|
2260
|
+
const te = r.value;
|
|
2261
|
+
if (te) {
|
|
2262
|
+
const Q = ae.offsetTop, ce = Q + ae.offsetHeight, oe = 8, Ce = te.scrollTop, Me = Ce + te.clientHeight;
|
|
2263
|
+
Q - oe < Ce ? te.scrollTop = Math.max(Q - oe, 0) : ce + oe > Me && (te.scrollTop = ce - te.clientHeight + oe);
|
|
2264
|
+
}
|
|
2265
|
+
b.focus && ae.focus();
|
|
2266
|
+
}
|
|
2267
|
+
function f(b = {}) {
|
|
2268
|
+
e.disabled || (p.open(), k({ focus: b.focusSelected }));
|
|
2269
|
+
}
|
|
2270
|
+
function S(b = {}) {
|
|
2271
|
+
var z;
|
|
2272
|
+
p.close(), b.restoreFocus !== !1 && ((z = i.value) == null || z.focus());
|
|
2273
|
+
}
|
|
2274
|
+
function $() {
|
|
2275
|
+
if (c.value) {
|
|
2276
|
+
S();
|
|
2277
|
+
return;
|
|
2278
|
+
}
|
|
2279
|
+
f();
|
|
2280
|
+
}
|
|
2281
|
+
function C(b, z = {}) {
|
|
2282
|
+
b.disabled || (l("update:modelValue", b.value), S({ restoreFocus: z.restoreFocus }));
|
|
2283
|
+
}
|
|
2284
|
+
function ie(b) {
|
|
2285
|
+
e.disabled || (b.key === "ArrowDown" || b.key === "ArrowUp" || b.key === "Enter" || b.key === " ") && (b.preventDefault(), f({ focusSelected: !0 }));
|
|
2286
|
+
}
|
|
2287
|
+
function pe(b) {
|
|
2288
|
+
var ae, te, Q, ce;
|
|
2289
|
+
const z = s(), Y = z.findIndex(
|
|
2290
|
+
(oe) => oe === document.activeElement
|
|
2291
|
+
);
|
|
2292
|
+
if (b.key === "ArrowDown") {
|
|
2293
|
+
b.preventDefault(), (ae = z[(Y + 1 + z.length) % z.length]) == null || ae.focus();
|
|
2294
|
+
return;
|
|
2295
|
+
}
|
|
2296
|
+
if (b.key === "ArrowUp") {
|
|
2297
|
+
b.preventDefault(), (te = z[(Y - 1 + z.length) % z.length]) == null || te.focus();
|
|
2298
|
+
return;
|
|
2299
|
+
}
|
|
2300
|
+
if (b.key === "Home") {
|
|
2301
|
+
b.preventDefault(), (Q = z[0]) == null || Q.focus();
|
|
2302
|
+
return;
|
|
2303
|
+
}
|
|
2304
|
+
if (b.key === "End") {
|
|
2305
|
+
b.preventDefault(), (ce = z[z.length - 1]) == null || ce.focus();
|
|
2306
|
+
return;
|
|
2307
|
+
}
|
|
2308
|
+
if (b.key === "Escape") {
|
|
2309
|
+
b.preventDefault(), S();
|
|
2310
|
+
return;
|
|
2311
|
+
}
|
|
2312
|
+
if (b.key === "Enter" || b.key === " ") {
|
|
2313
|
+
const oe = e.options[Y];
|
|
2314
|
+
if (!oe)
|
|
2315
|
+
return;
|
|
2316
|
+
b.preventDefault(), C(oe, { restoreFocus: !0 });
|
|
2317
|
+
}
|
|
2318
|
+
}
|
|
2319
|
+
return $e(
|
|
2320
|
+
[i, r],
|
|
2321
|
+
() => {
|
|
2322
|
+
c.value && S({ restoreFocus: !1 });
|
|
2323
|
+
},
|
|
2324
|
+
{
|
|
2325
|
+
enabled: c,
|
|
2326
|
+
event: "click"
|
|
2327
|
+
}
|
|
2328
|
+
), _e(
|
|
2329
|
+
(b) => {
|
|
2330
|
+
c.value && (b.preventDefault(), S());
|
|
2331
|
+
},
|
|
2332
|
+
{
|
|
2333
|
+
enabled: c
|
|
2334
|
+
}
|
|
2335
|
+
), (b, z) => (d(), _("div", Bn, [
|
|
2336
|
+
typeof y(o).name == "string" ? (d(), _("input", {
|
|
2337
|
+
key: 0,
|
|
2338
|
+
type: "hidden",
|
|
2339
|
+
name: y(o).name,
|
|
2340
|
+
value: e.modelValue
|
|
2341
|
+
}, null, 8, In)) : E("", !0),
|
|
2342
|
+
V("button", {
|
|
2343
|
+
id: typeof y(o).id == "string" ? y(o).id : y(g),
|
|
2344
|
+
ref_key: "triggerRef",
|
|
2345
|
+
ref: i,
|
|
2346
|
+
type: "button",
|
|
2347
|
+
class: P(h.value),
|
|
2348
|
+
"aria-controls": y(v),
|
|
2349
|
+
"aria-expanded": y(c),
|
|
2350
|
+
"aria-haspopup": "listbox",
|
|
2351
|
+
"aria-invalid": e.invalid || void 0,
|
|
2352
|
+
disabled: e.disabled,
|
|
2353
|
+
onClick: $,
|
|
2354
|
+
onKeydown: ie
|
|
2355
|
+
}, [
|
|
2356
|
+
V("span", An, F(x.value), 1),
|
|
2357
|
+
V("span", On, [
|
|
2358
|
+
H(y(J), {
|
|
2359
|
+
icon: y(W).chevronDown,
|
|
2360
|
+
size: "1rem"
|
|
2361
|
+
}, null, 8, ["icon"])
|
|
2362
|
+
])
|
|
2363
|
+
], 42, En),
|
|
2364
|
+
(d(), q(he, {
|
|
2365
|
+
to: D.value,
|
|
2366
|
+
disabled: L.value
|
|
2367
|
+
}, [
|
|
2368
|
+
H(de, {
|
|
2369
|
+
name: "vf-floating-transition",
|
|
2370
|
+
appear: "",
|
|
2371
|
+
duration: T
|
|
2372
|
+
}, {
|
|
2373
|
+
default: G(() => [
|
|
2374
|
+
y(c) ? (d(), _("div", {
|
|
2375
|
+
key: 0,
|
|
2376
|
+
id: y(v),
|
|
2377
|
+
ref_key: "menuRef",
|
|
2378
|
+
ref: r,
|
|
2379
|
+
class: P(w.value),
|
|
2380
|
+
style: U(B.value),
|
|
2381
|
+
"aria-labelledby": typeof y(o).id == "string" ? y(o).id : y(g),
|
|
2382
|
+
role: "listbox",
|
|
2383
|
+
onKeydown: pe
|
|
2384
|
+
}, [
|
|
2385
|
+
(d(!0), _(re, null, ue(e.options, (Y) => (d(), _("button", {
|
|
2386
|
+
key: Y.value,
|
|
2387
|
+
type: "button",
|
|
2388
|
+
class: P(["vf-dropdown__item vf-select__option", [
|
|
2389
|
+
Y.value === e.modelValue && "vf-select__option--selected"
|
|
2390
|
+
]]),
|
|
2391
|
+
role: "option",
|
|
2392
|
+
"aria-selected": Y.value === e.modelValue,
|
|
2393
|
+
disabled: Y.disabled,
|
|
2394
|
+
onClick: (ae) => C(Y, { restoreFocus: !1 })
|
|
2395
|
+
}, F(Y.label), 11, Dn))), 128))
|
|
2396
|
+
], 46, Ln)) : E("", !0)
|
|
2397
|
+
]),
|
|
2398
|
+
_: 1
|
|
2399
|
+
})
|
|
2400
|
+
], 8, ["to", "disabled"]))
|
|
2401
|
+
]));
|
|
2402
|
+
}
|
|
2403
|
+
}), Sn = ["checked", "disabled"], Mn = {
|
|
1819
2404
|
class: "vf-switch__control",
|
|
1820
2405
|
"aria-hidden": "true"
|
|
1821
|
-
},
|
|
2406
|
+
}, zn = { class: "vf-switch__thumb" }, Pn = {
|
|
1822
2407
|
key: 0,
|
|
1823
2408
|
class: "vf-switch__content"
|
|
1824
|
-
},
|
|
2409
|
+
}, Rn = /* @__PURE__ */ M({
|
|
1825
2410
|
inheritAttrs: !1,
|
|
1826
2411
|
__name: "VfSwitch",
|
|
1827
2412
|
props: {
|
|
@@ -1832,135 +2417,199 @@ const nt = {
|
|
|
1832
2417
|
},
|
|
1833
2418
|
emits: ["update:modelValue", "change"],
|
|
1834
2419
|
setup(t, { emit: n }) {
|
|
1835
|
-
const e = t,
|
|
1836
|
-
() =>
|
|
2420
|
+
const e = t, l = n, o = j(), i = ye(), r = a(
|
|
2421
|
+
() => K(
|
|
1837
2422
|
"vf-switch",
|
|
1838
2423
|
`vf-switch--${e.size}`,
|
|
1839
2424
|
e.modelValue && "vf-switch--checked",
|
|
1840
2425
|
e.disabled && "vf-switch--disabled",
|
|
1841
|
-
|
|
2426
|
+
o.class
|
|
1842
2427
|
)
|
|
1843
|
-
),
|
|
1844
|
-
var
|
|
2428
|
+
), g = a(() => o.style), v = a(() => {
|
|
2429
|
+
var h;
|
|
1845
2430
|
if (e.label)
|
|
1846
2431
|
return !0;
|
|
1847
|
-
const
|
|
1848
|
-
function
|
|
1849
|
-
return
|
|
2432
|
+
const c = ((h = i.default) == null ? void 0 : h.call(i, {})) ?? [];
|
|
2433
|
+
function m(x) {
|
|
2434
|
+
return x.type === He ? !1 : x.type === Ne ? String(x.children ?? "").trim().length > 0 : x.type === re && Array.isArray(x.children) ? x.children.some((L) => m(L)) : !0;
|
|
1850
2435
|
}
|
|
1851
|
-
return
|
|
1852
|
-
}),
|
|
2436
|
+
return c.some((x) => m(x));
|
|
2437
|
+
}), T = a(
|
|
1853
2438
|
() => Object.fromEntries(
|
|
1854
|
-
Object.entries(
|
|
2439
|
+
Object.entries(o).filter(([c]) => c !== "class" && c !== "style")
|
|
1855
2440
|
)
|
|
1856
2441
|
);
|
|
1857
|
-
function
|
|
1858
|
-
const
|
|
1859
|
-
|
|
2442
|
+
function p(c) {
|
|
2443
|
+
const m = c.target.checked;
|
|
2444
|
+
l("update:modelValue", m), l("change", m);
|
|
1860
2445
|
}
|
|
1861
|
-
return (
|
|
1862
|
-
class:
|
|
1863
|
-
style:
|
|
2446
|
+
return (c, m) => (d(), _("label", {
|
|
2447
|
+
class: P(r.value),
|
|
2448
|
+
style: U(g.value)
|
|
1864
2449
|
}, [
|
|
1865
|
-
|
|
2450
|
+
V("input", N({
|
|
1866
2451
|
class: "vf-switch__input",
|
|
1867
2452
|
type: "checkbox",
|
|
1868
2453
|
role: "switch",
|
|
1869
2454
|
checked: e.modelValue,
|
|
1870
2455
|
disabled: e.disabled
|
|
1871
|
-
},
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
2456
|
+
}, T.value, { onChange: p }), null, 16, Sn),
|
|
2457
|
+
V("span", Mn, [
|
|
2458
|
+
V("span", zn, [
|
|
2459
|
+
O(c.$slots, "thumb", {
|
|
1875
2460
|
checked: e.modelValue
|
|
1876
2461
|
})
|
|
1877
2462
|
])
|
|
1878
2463
|
]),
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
2464
|
+
v.value ? (d(), _("span", Pn, [
|
|
2465
|
+
O(c.$slots, "default", {}, () => [
|
|
2466
|
+
ve(F(t.label), 1)
|
|
1882
2467
|
])
|
|
1883
|
-
])) :
|
|
2468
|
+
])) : E("", !0)
|
|
1884
2469
|
], 6));
|
|
1885
2470
|
}
|
|
1886
|
-
}),
|
|
2471
|
+
}), Fn = { class: "vf-table-scroll" }, Hn = {
|
|
1887
2472
|
key: 0,
|
|
1888
|
-
class: "vf-
|
|
1889
|
-
},
|
|
2473
|
+
class: "vf-table__caption"
|
|
2474
|
+
}, Nn = {
|
|
2475
|
+
key: 1,
|
|
2476
|
+
class: "vf-table__head"
|
|
2477
|
+
}, Kn = {
|
|
2478
|
+
key: 2,
|
|
2479
|
+
class: "vf-table__body"
|
|
2480
|
+
}, jn = {
|
|
2481
|
+
key: 3,
|
|
2482
|
+
class: "vf-table__foot"
|
|
2483
|
+
}, Ba = /* @__PURE__ */ M({
|
|
2484
|
+
inheritAttrs: !1,
|
|
2485
|
+
__name: "VfTable",
|
|
2486
|
+
props: {
|
|
2487
|
+
caption: { default: void 0 },
|
|
2488
|
+
compact: { type: Boolean, default: !1 },
|
|
2489
|
+
striped: { type: Boolean, default: !1 },
|
|
2490
|
+
stickyHeader: { type: Boolean, default: !1 }
|
|
2491
|
+
},
|
|
2492
|
+
setup(t) {
|
|
2493
|
+
const n = t, e = j(), l = a(
|
|
2494
|
+
() => K(
|
|
2495
|
+
"vf-table",
|
|
2496
|
+
n.compact && "vf-table--compact",
|
|
2497
|
+
n.striped && "vf-table--striped",
|
|
2498
|
+
n.stickyHeader && "vf-table--sticky-header"
|
|
2499
|
+
)
|
|
2500
|
+
);
|
|
2501
|
+
return (o, i) => (d(), _("div", N({ class: "vf-table-wrap" }, y(e)), [
|
|
2502
|
+
V("div", Fn, [
|
|
2503
|
+
V("table", {
|
|
2504
|
+
class: P(l.value)
|
|
2505
|
+
}, [
|
|
2506
|
+
n.caption || o.$slots.caption ? (d(), _("caption", Hn, [
|
|
2507
|
+
O(o.$slots, "caption", {}, () => [
|
|
2508
|
+
ve(F(n.caption), 1)
|
|
2509
|
+
])
|
|
2510
|
+
])) : E("", !0),
|
|
2511
|
+
o.$slots.header ? (d(), _("thead", Nn, [
|
|
2512
|
+
O(o.$slots, "header")
|
|
2513
|
+
])) : E("", !0),
|
|
2514
|
+
o.$slots.default ? (d(), _("tbody", Kn, [
|
|
2515
|
+
O(o.$slots, "default")
|
|
2516
|
+
])) : E("", !0),
|
|
2517
|
+
o.$slots.footer ? (d(), _("tfoot", jn, [
|
|
2518
|
+
O(o.$slots, "footer")
|
|
2519
|
+
])) : E("", !0)
|
|
2520
|
+
], 2)
|
|
2521
|
+
])
|
|
2522
|
+
], 16));
|
|
2523
|
+
}
|
|
2524
|
+
}), qn = ["aria-label"], Wn = { class: "vf-table-of-contents__list" }, Un = ["href", "aria-current", "onClick"], Ia = /* @__PURE__ */ M({
|
|
1890
2525
|
inheritAttrs: !1,
|
|
1891
2526
|
__name: "VfTableOfContents",
|
|
1892
2527
|
props: {
|
|
1893
2528
|
items: {},
|
|
1894
2529
|
activeId: { default: void 0 },
|
|
1895
2530
|
ariaLabel: { default: "Table of contents" },
|
|
1896
|
-
|
|
2531
|
+
smooth: { type: Boolean, default: !1 },
|
|
2532
|
+
scrollOffset: { default: 0 },
|
|
2533
|
+
variant: { default: "default" }
|
|
1897
2534
|
},
|
|
1898
2535
|
setup(t) {
|
|
1899
|
-
const n = t, e =
|
|
1900
|
-
() =>
|
|
1901
|
-
|
|
2536
|
+
const n = t, e = j(), l = A(!1), o = a(
|
|
2537
|
+
() => K(
|
|
2538
|
+
"vf-table-of-contents",
|
|
2539
|
+
`vf-table-of-contents--${n.variant}`,
|
|
2540
|
+
l.value && "vf-table-of-contents--ready",
|
|
2541
|
+
e.class
|
|
2542
|
+
)
|
|
2543
|
+
), i = a(() => e.style), r = a(
|
|
1902
2544
|
() => Object.fromEntries(
|
|
1903
|
-
Object.entries(e).filter(([
|
|
2545
|
+
Object.entries(e).filter(([c]) => c !== "class" && c !== "style")
|
|
1904
2546
|
)
|
|
1905
2547
|
);
|
|
1906
|
-
function
|
|
1907
|
-
return !
|
|
2548
|
+
function g(c) {
|
|
2549
|
+
return !c || c < 1 ? 1 : Math.min(c, 6);
|
|
1908
2550
|
}
|
|
1909
|
-
function v(
|
|
1910
|
-
return
|
|
2551
|
+
function v(c) {
|
|
2552
|
+
return c.href ?? `#${c.id}`;
|
|
1911
2553
|
}
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
2554
|
+
function T(c, m) {
|
|
2555
|
+
const h = v(c);
|
|
2556
|
+
if (!h.startsWith("#"))
|
|
2557
|
+
return;
|
|
2558
|
+
const x = decodeURIComponent(h.slice(1));
|
|
2559
|
+
if (!x)
|
|
2560
|
+
return;
|
|
2561
|
+
const L = document.getElementById(x);
|
|
2562
|
+
if (!L)
|
|
2563
|
+
return;
|
|
2564
|
+
const D = Math.max(
|
|
2565
|
+
0,
|
|
2566
|
+
window.scrollY + L.getBoundingClientRect().top - n.scrollOffset
|
|
2567
|
+
);
|
|
2568
|
+
m != null && m.updateHistory && window.location.hash !== h && window.history.pushState(null, "", h), window.scrollTo({
|
|
2569
|
+
top: D,
|
|
2570
|
+
behavior: n.smooth ? "smooth" : "auto"
|
|
2571
|
+
});
|
|
2572
|
+
}
|
|
2573
|
+
function p(c, m) {
|
|
2574
|
+
const h = v(m);
|
|
2575
|
+
!n.smooth && n.scrollOffset <= 0 || !h.startsWith("#") || !decodeURIComponent(h.slice(1)) || (c.preventDefault(), T(m, {
|
|
2576
|
+
updateHistory: !0
|
|
2577
|
+
}));
|
|
2578
|
+
}
|
|
2579
|
+
return me(async () => {
|
|
2580
|
+
if (requestAnimationFrame(() => {
|
|
2581
|
+
l.value = !0;
|
|
2582
|
+
}), typeof window > "u" || !window.location.hash)
|
|
2583
|
+
return;
|
|
2584
|
+
const c = decodeURIComponent(window.location.hash), m = n.items.find((h) => v(h) === c);
|
|
2585
|
+
m && (await le(), requestAnimationFrame(() => {
|
|
2586
|
+
T(m);
|
|
2587
|
+
}));
|
|
2588
|
+
}), (c, m) => (d(), _("nav", N({
|
|
2589
|
+
class: o.value,
|
|
2590
|
+
style: i.value,
|
|
1915
2591
|
"aria-label": n.ariaLabel
|
|
1916
2592
|
}, r.value), [
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
])
|
|
1921
|
-
])) : O("", !0),
|
|
1922
|
-
x("ol", vn, [
|
|
1923
|
-
(c(!0), _(se, null, ie(n.items, (d) => (c(), _("li", {
|
|
1924
|
-
key: d.id,
|
|
2593
|
+
V("ol", Wn, [
|
|
2594
|
+
(d(!0), _(re, null, ue(n.items, (h) => (d(), _("li", {
|
|
2595
|
+
key: h.id,
|
|
1925
2596
|
class: "vf-table-of-contents__item",
|
|
1926
|
-
style:
|
|
2597
|
+
style: U({ "--vf-toc-level": String(g(h.level)) })
|
|
1927
2598
|
}, [
|
|
1928
|
-
|
|
1929
|
-
href: v(
|
|
1930
|
-
class:
|
|
2599
|
+
V("a", {
|
|
2600
|
+
href: v(h),
|
|
2601
|
+
class: P([
|
|
1931
2602
|
"vf-table-of-contents__link",
|
|
1932
|
-
n.activeId ===
|
|
2603
|
+
n.activeId === h.id && "vf-table-of-contents__link--active"
|
|
1933
2604
|
]),
|
|
1934
|
-
"aria-current": n.activeId ===
|
|
1935
|
-
|
|
2605
|
+
"aria-current": n.activeId === h.id ? "location" : void 0,
|
|
2606
|
+
onClick: (x) => p(x, h)
|
|
2607
|
+
}, F(h.label), 11, Un)
|
|
1936
2608
|
], 4))), 128))
|
|
1937
2609
|
])
|
|
1938
|
-
], 16,
|
|
2610
|
+
], 16, qn));
|
|
1939
2611
|
}
|
|
1940
|
-
}),
|
|
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({
|
|
2612
|
+
}), Ea = /* @__PURE__ */ M({
|
|
1964
2613
|
inheritAttrs: !1,
|
|
1965
2614
|
__name: "VfThemeSwitch",
|
|
1966
2615
|
props: {
|
|
@@ -1969,54 +2618,64 @@ const nt = {
|
|
|
1969
2618
|
label: { default: void 0 }
|
|
1970
2619
|
},
|
|
1971
2620
|
setup(t) {
|
|
1972
|
-
const n = t, e =
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
2621
|
+
const n = t, e = j(), l = ye(), { resolvedTheme: o, setTheme: i } = Ze(), r = a(() => !!(n.label || l.default)), g = A(!1);
|
|
2622
|
+
let v = null;
|
|
2623
|
+
ne(
|
|
2624
|
+
o,
|
|
2625
|
+
(p) => {
|
|
2626
|
+
g.value = p === "dark";
|
|
2627
|
+
},
|
|
2628
|
+
{ immediate: !0 }
|
|
2629
|
+
);
|
|
2630
|
+
function T(p) {
|
|
2631
|
+
if (g.value = p, typeof window > "u") {
|
|
2632
|
+
i(p ? "dark" : "light");
|
|
2633
|
+
return;
|
|
1976
2634
|
}
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
2635
|
+
v !== null && window.cancelAnimationFrame(v), v = window.requestAnimationFrame(() => {
|
|
2636
|
+
i(p ? "dark" : "light"), v = null;
|
|
2637
|
+
});
|
|
2638
|
+
}
|
|
2639
|
+
return se(() => {
|
|
2640
|
+
v !== null && typeof window < "u" && window.cancelAnimationFrame(v);
|
|
2641
|
+
}), (p, c) => (d(), q(Rn, N(y(e), {
|
|
2642
|
+
"model-value": g.value,
|
|
1981
2643
|
size: n.size,
|
|
1982
2644
|
disabled: n.disabled,
|
|
1983
|
-
label: n.label
|
|
2645
|
+
label: n.label,
|
|
2646
|
+
"onUpdate:modelValue": T
|
|
1984
2647
|
}), {
|
|
1985
|
-
thumb:
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
icon:
|
|
2648
|
+
thumb: G(({ checked: m }) => [
|
|
2649
|
+
O(p.$slots, "thumb", { checked: m }, () => [
|
|
2650
|
+
H(y(J), {
|
|
2651
|
+
icon: m ? y(W).moon : y(W).sun,
|
|
1989
2652
|
size: "0.5rem"
|
|
1990
2653
|
}, null, 8, ["icon"])
|
|
1991
2654
|
])
|
|
1992
2655
|
]),
|
|
1993
|
-
default:
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
]) :
|
|
2656
|
+
default: G(() => [
|
|
2657
|
+
r.value ? O(p.$slots, "default", { key: 0 }, () => [
|
|
2658
|
+
ve(F(n.label), 1)
|
|
2659
|
+
]) : E("", !0)
|
|
1997
2660
|
]),
|
|
1998
2661
|
_: 3
|
|
1999
|
-
}, 16, ["
|
|
2662
|
+
}, 16, ["model-value", "size", "disabled", "label"]));
|
|
2000
2663
|
}
|
|
2001
|
-
}),
|
|
2664
|
+
}), Aa = /* @__PURE__ */ M({
|
|
2002
2665
|
inheritAttrs: !1,
|
|
2003
2666
|
__name: "VfTag",
|
|
2004
2667
|
props: {
|
|
2005
2668
|
tone: { default: "neutral" }
|
|
2006
2669
|
},
|
|
2007
2670
|
setup(t) {
|
|
2008
|
-
const n = t, e =
|
|
2009
|
-
() =>
|
|
2671
|
+
const n = t, e = j(), l = a(
|
|
2672
|
+
() => K("vf-tag", n.tone !== "neutral" && `vf-tag--${n.tone}`)
|
|
2010
2673
|
);
|
|
2011
|
-
return (
|
|
2012
|
-
|
|
2674
|
+
return (o, i) => (d(), _("span", N({ class: l.value }, y(e)), [
|
|
2675
|
+
O(o.$slots, "default")
|
|
2013
2676
|
], 16));
|
|
2014
2677
|
}
|
|
2015
|
-
}),
|
|
2016
|
-
class: "vf-tabs__list",
|
|
2017
|
-
role: "tablist",
|
|
2018
|
-
"aria-orientation": "horizontal"
|
|
2019
|
-
}, _n = ["id", "aria-controls", "aria-selected", "disabled", "tabindex", "onClick", "onKeydown"], yn = ["id", "aria-labelledby"], Zn = /* @__PURE__ */ S({
|
|
2678
|
+
}), Xn = { class: "vf-tabs" }, Yn = ["id", "aria-controls", "aria-selected", "disabled", "tabindex", "onClick", "onKeydown"], Gn = ["id", "aria-labelledby"], Oa = /* @__PURE__ */ M({
|
|
2020
2679
|
__name: "VfTabs",
|
|
2021
2680
|
props: {
|
|
2022
2681
|
items: {},
|
|
@@ -2025,106 +2684,154 @@ const nt = {
|
|
|
2025
2684
|
},
|
|
2026
2685
|
emits: ["update:modelValue", "change"],
|
|
2027
2686
|
setup(t, { emit: n }) {
|
|
2028
|
-
const e = t,
|
|
2687
|
+
const e = t, l = n, o = ee({ prefix: "vf-tabs" }), i = A(null), r = A([]), g = A(!1), v = A({
|
|
2688
|
+
opacity: "0",
|
|
2689
|
+
transform: "translateX(0)",
|
|
2690
|
+
width: "0px"
|
|
2691
|
+
}), T = a(
|
|
2029
2692
|
() => {
|
|
2030
|
-
var
|
|
2031
|
-
return (
|
|
2693
|
+
var s;
|
|
2694
|
+
return (s = e.items.find((k) => !k.disabled)) == null ? void 0 : s.value;
|
|
2032
2695
|
}
|
|
2033
|
-
),
|
|
2034
|
-
() => e.modelValue ??
|
|
2696
|
+
), p = A(e.defaultValue ?? T.value), c = a(() => e.modelValue !== void 0), m = a(
|
|
2697
|
+
() => e.modelValue ?? p.value ?? T.value
|
|
2035
2698
|
);
|
|
2036
|
-
|
|
2699
|
+
let h = null;
|
|
2700
|
+
ne(
|
|
2037
2701
|
() => e.items,
|
|
2038
|
-
(
|
|
2039
|
-
!
|
|
2040
|
-
(
|
|
2041
|
-
) &&
|
|
2702
|
+
(s) => {
|
|
2703
|
+
!s.some(
|
|
2704
|
+
(f) => f.value === m.value && !f.disabled
|
|
2705
|
+
) && T.value && x(T.value);
|
|
2042
2706
|
},
|
|
2043
2707
|
{ deep: !0 }
|
|
2044
2708
|
);
|
|
2045
|
-
function
|
|
2046
|
-
|
|
2709
|
+
function x(s) {
|
|
2710
|
+
c.value || (p.value = s), l("update:modelValue", s), l("change", s);
|
|
2047
2711
|
}
|
|
2048
|
-
function
|
|
2049
|
-
|
|
2712
|
+
function L(s) {
|
|
2713
|
+
s.disabled || x(s.value);
|
|
2050
2714
|
}
|
|
2051
|
-
function
|
|
2052
|
-
return e.items.filter((
|
|
2715
|
+
function D() {
|
|
2716
|
+
return e.items.filter((s) => !s.disabled);
|
|
2053
2717
|
}
|
|
2054
|
-
function
|
|
2055
|
-
var
|
|
2056
|
-
const
|
|
2057
|
-
(
|
|
2718
|
+
function R(s) {
|
|
2719
|
+
var f;
|
|
2720
|
+
const k = e.items.findIndex((S) => S.value === s);
|
|
2721
|
+
(f = r.value[k]) == null || f.focus();
|
|
2058
2722
|
}
|
|
2059
|
-
function
|
|
2060
|
-
const
|
|
2061
|
-
(
|
|
2723
|
+
function I(s, k) {
|
|
2724
|
+
const f = D(), S = f.findIndex(
|
|
2725
|
+
($) => $.value === k.value
|
|
2062
2726
|
);
|
|
2063
|
-
if (
|
|
2064
|
-
if (
|
|
2065
|
-
|
|
2066
|
-
const
|
|
2067
|
-
|
|
2727
|
+
if (S !== -1) {
|
|
2728
|
+
if (s.key === "ArrowRight" || s.key === "ArrowDown") {
|
|
2729
|
+
s.preventDefault();
|
|
2730
|
+
const $ = f[(S + 1) % f.length];
|
|
2731
|
+
L($), R($.value);
|
|
2068
2732
|
return;
|
|
2069
2733
|
}
|
|
2070
|
-
if (
|
|
2071
|
-
|
|
2072
|
-
const
|
|
2073
|
-
|
|
2734
|
+
if (s.key === "ArrowLeft" || s.key === "ArrowUp") {
|
|
2735
|
+
s.preventDefault();
|
|
2736
|
+
const $ = f[(S - 1 + f.length) % f.length];
|
|
2737
|
+
L($), R($.value);
|
|
2074
2738
|
return;
|
|
2075
2739
|
}
|
|
2076
|
-
if (
|
|
2077
|
-
|
|
2078
|
-
const
|
|
2079
|
-
|
|
2740
|
+
if (s.key === "Home") {
|
|
2741
|
+
s.preventDefault();
|
|
2742
|
+
const $ = f[0];
|
|
2743
|
+
L($), R($.value);
|
|
2080
2744
|
return;
|
|
2081
2745
|
}
|
|
2082
|
-
if (
|
|
2083
|
-
|
|
2084
|
-
const
|
|
2085
|
-
|
|
2746
|
+
if (s.key === "End") {
|
|
2747
|
+
s.preventDefault();
|
|
2748
|
+
const $ = f[f.length - 1];
|
|
2749
|
+
L($), R($.value);
|
|
2086
2750
|
}
|
|
2087
2751
|
}
|
|
2088
2752
|
}
|
|
2089
|
-
function
|
|
2090
|
-
return `${
|
|
2753
|
+
function u(s) {
|
|
2754
|
+
return `${o.value}-tab-${s}`;
|
|
2091
2755
|
}
|
|
2092
|
-
function
|
|
2093
|
-
return `${
|
|
2756
|
+
function w(s) {
|
|
2757
|
+
return `${o.value}-panel-${s}`;
|
|
2758
|
+
}
|
|
2759
|
+
function B() {
|
|
2760
|
+
const s = e.items.findIndex(
|
|
2761
|
+
(f) => f.value === m.value
|
|
2762
|
+
), k = s >= 0 ? r.value[s] : null;
|
|
2763
|
+
if (!k) {
|
|
2764
|
+
v.value = {
|
|
2765
|
+
opacity: "0",
|
|
2766
|
+
transform: "translateX(0)",
|
|
2767
|
+
width: "0px"
|
|
2768
|
+
};
|
|
2769
|
+
return;
|
|
2770
|
+
}
|
|
2771
|
+
v.value = {
|
|
2772
|
+
opacity: "1",
|
|
2773
|
+
transform: `translateX(${k.offsetLeft}px)`,
|
|
2774
|
+
width: `${k.offsetWidth}px`
|
|
2775
|
+
};
|
|
2094
2776
|
}
|
|
2095
|
-
return (
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2777
|
+
return ne(
|
|
2778
|
+
() => [m.value, e.items],
|
|
2779
|
+
async () => {
|
|
2780
|
+
await le(), B();
|
|
2781
|
+
},
|
|
2782
|
+
{ deep: !0, immediate: !0 }
|
|
2783
|
+
), me(async () => {
|
|
2784
|
+
await le(), B(), requestAnimationFrame(() => {
|
|
2785
|
+
g.value = !0;
|
|
2786
|
+
}), typeof ResizeObserver < "u" && i.value && (h = new ResizeObserver(() => {
|
|
2787
|
+
B();
|
|
2788
|
+
}), h.observe(i.value)), typeof window < "u" && window.addEventListener("resize", B);
|
|
2789
|
+
}), se(() => {
|
|
2790
|
+
h == null || h.disconnect(), typeof window < "u" && window.removeEventListener("resize", B);
|
|
2791
|
+
}), (s, k) => (d(), _("div", Xn, [
|
|
2792
|
+
V("div", {
|
|
2793
|
+
ref_key: "listRef",
|
|
2794
|
+
ref: i,
|
|
2795
|
+
class: "vf-tabs__list",
|
|
2796
|
+
role: "tablist",
|
|
2797
|
+
"aria-orientation": "horizontal"
|
|
2798
|
+
}, [
|
|
2799
|
+
(d(!0), _(re, null, ue(t.items, (f, S) => (d(), _("button", {
|
|
2800
|
+
id: u(f.value),
|
|
2801
|
+
key: f.value,
|
|
2100
2802
|
ref_for: !0,
|
|
2101
|
-
ref: (
|
|
2102
|
-
r.value[
|
|
2803
|
+
ref: ($) => {
|
|
2804
|
+
r.value[S] = $;
|
|
2103
2805
|
},
|
|
2104
|
-
"aria-controls":
|
|
2105
|
-
"aria-selected":
|
|
2106
|
-
disabled:
|
|
2107
|
-
tabindex:
|
|
2806
|
+
"aria-controls": w(f.value),
|
|
2807
|
+
"aria-selected": m.value === f.value,
|
|
2808
|
+
disabled: f.disabled,
|
|
2809
|
+
tabindex: m.value === f.value ? 0 : -1,
|
|
2108
2810
|
class: "vf-tabs__tab",
|
|
2109
2811
|
role: "tab",
|
|
2110
2812
|
type: "button",
|
|
2111
|
-
onClick: (
|
|
2112
|
-
onKeydown: (
|
|
2113
|
-
}, F(
|
|
2114
|
-
|
|
2115
|
-
|
|
2813
|
+
onClick: ($) => L(f),
|
|
2814
|
+
onKeydown: ($) => I($, f)
|
|
2815
|
+
}, F(f.label), 41, Yn))), 128)),
|
|
2816
|
+
V("span", {
|
|
2817
|
+
"aria-hidden": "true",
|
|
2818
|
+
class: P(["vf-tabs__indicator", g.value && "vf-tabs__indicator--ready"]),
|
|
2819
|
+
style: U(v.value)
|
|
2820
|
+
}, null, 6)
|
|
2821
|
+
], 512),
|
|
2822
|
+
m.value ? (d(), _("div", {
|
|
2116
2823
|
key: 0,
|
|
2117
|
-
id:
|
|
2118
|
-
"aria-labelledby":
|
|
2824
|
+
id: w(m.value),
|
|
2825
|
+
"aria-labelledby": u(m.value),
|
|
2119
2826
|
class: "vf-tabs__panel",
|
|
2120
2827
|
role: "tabpanel",
|
|
2121
2828
|
tabindex: "0"
|
|
2122
2829
|
}, [
|
|
2123
|
-
|
|
2124
|
-
], 8,
|
|
2830
|
+
O(s.$slots, "panel", Be(Ie({ activeValue: m.value })))
|
|
2831
|
+
], 8, Gn)) : E("", !0)
|
|
2125
2832
|
]));
|
|
2126
2833
|
}
|
|
2127
|
-
}),
|
|
2834
|
+
}), Qn = ["value", "aria-invalid"], La = /* @__PURE__ */ M({
|
|
2128
2835
|
inheritAttrs: !1,
|
|
2129
2836
|
__name: "VfTextarea",
|
|
2130
2837
|
props: {
|
|
@@ -2134,23 +2841,23 @@ const nt = {
|
|
|
2134
2841
|
},
|
|
2135
2842
|
emits: ["update:modelValue"],
|
|
2136
2843
|
setup(t, { emit: n }) {
|
|
2137
|
-
const e = t,
|
|
2138
|
-
() =>
|
|
2844
|
+
const e = t, l = n, o = j(), i = a(
|
|
2845
|
+
() => K(
|
|
2139
2846
|
"vf-textarea",
|
|
2140
2847
|
e.size !== "md" && `vf-textarea--${e.size}`,
|
|
2141
2848
|
e.invalid && "vf-textarea--invalid"
|
|
2142
2849
|
)
|
|
2143
2850
|
);
|
|
2144
|
-
function
|
|
2145
|
-
|
|
2851
|
+
function r(g) {
|
|
2852
|
+
l("update:modelValue", g.target.value);
|
|
2146
2853
|
}
|
|
2147
|
-
return (
|
|
2148
|
-
class:
|
|
2854
|
+
return (g, v) => (d(), _("textarea", N({
|
|
2855
|
+
class: i.value,
|
|
2149
2856
|
value: e.modelValue,
|
|
2150
2857
|
"aria-invalid": e.invalid || void 0
|
|
2151
|
-
},
|
|
2858
|
+
}, y(o), { onInput: r }), null, 16, Qn));
|
|
2152
2859
|
}
|
|
2153
|
-
}),
|
|
2860
|
+
}), Jn = ["aria-describedby"], Zn = ["id"], Da = /* @__PURE__ */ M({
|
|
2154
2861
|
__name: "VfTooltip",
|
|
2155
2862
|
props: {
|
|
2156
2863
|
text: { default: void 0 },
|
|
@@ -2160,100 +2867,104 @@ const nt = {
|
|
|
2160
2867
|
disableTeleport: { type: Boolean, default: !1 }
|
|
2161
2868
|
},
|
|
2162
2869
|
setup(t) {
|
|
2163
|
-
const n = t, e =
|
|
2164
|
-
enter:
|
|
2165
|
-
leave:
|
|
2166
|
-
},
|
|
2870
|
+
const n = t, e = A(!1), l = ee({ prefix: "vf-tooltip" }), o = A(null), i = A(null), r = A(null), g = A(null), v = {
|
|
2871
|
+
enter: Z.fast,
|
|
2872
|
+
leave: Z.fast
|
|
2873
|
+
}, T = a(
|
|
2167
2874
|
() => n.disableTeleport || n.teleportTo === !1 || n.teleportTo === null
|
|
2168
|
-
),
|
|
2169
|
-
placement:
|
|
2170
|
-
middlewareData:
|
|
2171
|
-
styles:
|
|
2172
|
-
cleanup:
|
|
2173
|
-
} =
|
|
2875
|
+
), p = a(() => typeof n.teleportTo == "string" || typeof HTMLElement < "u" && n.teleportTo instanceof HTMLElement ? n.teleportTo : "body"), {
|
|
2876
|
+
placement: c,
|
|
2877
|
+
middlewareData: m,
|
|
2878
|
+
styles: h,
|
|
2879
|
+
cleanup: x
|
|
2880
|
+
} = Te(i, r, {
|
|
2174
2881
|
enabled: e,
|
|
2175
|
-
placement:
|
|
2176
|
-
middleware:
|
|
2882
|
+
placement: a(() => n.placement),
|
|
2883
|
+
middleware: a(
|
|
2177
2884
|
() => [
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2885
|
+
ge(10),
|
|
2886
|
+
we({ placements: ["top", "bottom"] }),
|
|
2887
|
+
ke(),
|
|
2888
|
+
g.value ? Ve(g.value) : void 0
|
|
2182
2889
|
].filter((s) => s !== void 0)
|
|
2183
2890
|
),
|
|
2184
2891
|
strategy: "fixed"
|
|
2185
|
-
}),
|
|
2892
|
+
}), L = a(() => [
|
|
2186
2893
|
"vf-tooltip__content",
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
]),
|
|
2190
|
-
const s =
|
|
2894
|
+
c.value.startsWith("bottom") && "vf-tooltip__content--bottom",
|
|
2895
|
+
c.value.startsWith("top") && "vf-tooltip__content--top"
|
|
2896
|
+
]), D = a(() => {
|
|
2897
|
+
const s = m.value.arrow;
|
|
2191
2898
|
return {
|
|
2192
2899
|
x: (s == null ? void 0 : s.x) !== void 0 && (s == null ? void 0 : s.baseX) !== void 0 ? s.x - s.baseX : 0,
|
|
2193
2900
|
y: (s == null ? void 0 : s.y) !== void 0 && (s == null ? void 0 : s.baseY) !== void 0 ? s.y - s.baseY : 0
|
|
2194
2901
|
};
|
|
2195
|
-
}),
|
|
2196
|
-
|
|
2197
|
-
|
|
2902
|
+
}), R = a(() => [
|
|
2903
|
+
"vf-tooltip__arrow",
|
|
2904
|
+
c.value.startsWith("bottom") && "vf-tooltip__arrow--bottom",
|
|
2905
|
+
c.value.startsWith("top") && "vf-tooltip__arrow--top"
|
|
2906
|
+
]), I = a(() => ({
|
|
2907
|
+
left: `${D.value.x}px`,
|
|
2908
|
+
top: `${D.value.y}px`
|
|
2198
2909
|
}));
|
|
2199
|
-
function
|
|
2200
|
-
|
|
2910
|
+
function u() {
|
|
2911
|
+
o.value !== null && (window.clearTimeout(o.value), o.value = null);
|
|
2201
2912
|
}
|
|
2202
|
-
function
|
|
2203
|
-
|
|
2913
|
+
function w() {
|
|
2914
|
+
u(), o.value = window.setTimeout(() => {
|
|
2204
2915
|
e.value = !0;
|
|
2205
2916
|
}, n.openDelay);
|
|
2206
2917
|
}
|
|
2207
|
-
function
|
|
2208
|
-
|
|
2918
|
+
function B() {
|
|
2919
|
+
u(), e.value = !1;
|
|
2209
2920
|
}
|
|
2210
|
-
return
|
|
2211
|
-
|
|
2212
|
-
}), (s,
|
|
2921
|
+
return se(() => {
|
|
2922
|
+
u(), x();
|
|
2923
|
+
}), (s, k) => (d(), _("span", {
|
|
2213
2924
|
class: "vf-tooltip",
|
|
2214
|
-
onMouseenter:
|
|
2215
|
-
onMouseleave:
|
|
2216
|
-
onFocusin:
|
|
2217
|
-
onFocusout:
|
|
2925
|
+
onMouseenter: w,
|
|
2926
|
+
onMouseleave: B,
|
|
2927
|
+
onFocusin: w,
|
|
2928
|
+
onFocusout: B
|
|
2218
2929
|
}, [
|
|
2219
|
-
|
|
2930
|
+
V("span", {
|
|
2220
2931
|
ref_key: "triggerRef",
|
|
2221
|
-
ref:
|
|
2932
|
+
ref: i,
|
|
2222
2933
|
class: "vf-tooltip__trigger",
|
|
2223
|
-
"aria-describedby": e.value ?
|
|
2934
|
+
"aria-describedby": e.value ? y(l) : void 0
|
|
2224
2935
|
}, [
|
|
2225
|
-
|
|
2226
|
-
], 8,
|
|
2227
|
-
(
|
|
2228
|
-
to:
|
|
2229
|
-
disabled:
|
|
2936
|
+
O(s.$slots, "default")
|
|
2937
|
+
], 8, Jn),
|
|
2938
|
+
(d(), q(he, {
|
|
2939
|
+
to: p.value,
|
|
2940
|
+
disabled: T.value
|
|
2230
2941
|
}, [
|
|
2231
|
-
|
|
2942
|
+
H(de, {
|
|
2232
2943
|
name: "vf-floating-transition",
|
|
2233
2944
|
appear: "",
|
|
2234
|
-
duration:
|
|
2945
|
+
duration: v
|
|
2235
2946
|
}, {
|
|
2236
|
-
default:
|
|
2237
|
-
e.value && (t.text || s.$slots.content) ? (
|
|
2947
|
+
default: G(() => [
|
|
2948
|
+
e.value && (t.text || s.$slots.content) ? (d(), _("span", {
|
|
2238
2949
|
key: 0,
|
|
2239
|
-
id:
|
|
2950
|
+
id: y(l),
|
|
2240
2951
|
ref_key: "contentRef",
|
|
2241
|
-
ref:
|
|
2242
|
-
class:
|
|
2243
|
-
style:
|
|
2952
|
+
ref: r,
|
|
2953
|
+
class: P(L.value),
|
|
2954
|
+
style: U(y(h)),
|
|
2244
2955
|
role: "tooltip"
|
|
2245
2956
|
}, [
|
|
2246
|
-
|
|
2247
|
-
|
|
2957
|
+
O(s.$slots, "content", {}, () => [
|
|
2958
|
+
ve(F(t.text), 1)
|
|
2248
2959
|
]),
|
|
2249
|
-
|
|
2960
|
+
V("span", {
|
|
2250
2961
|
ref_key: "arrowRef",
|
|
2251
|
-
ref:
|
|
2252
|
-
class: R
|
|
2253
|
-
style:
|
|
2962
|
+
ref: g,
|
|
2963
|
+
class: P(R.value),
|
|
2964
|
+
style: U(I.value),
|
|
2254
2965
|
"aria-hidden": "true"
|
|
2255
2966
|
}, null, 6)
|
|
2256
|
-
], 14,
|
|
2967
|
+
], 14, Zn)) : E("", !0)
|
|
2257
2968
|
]),
|
|
2258
2969
|
_: 3
|
|
2259
2970
|
})
|
|
@@ -2262,52 +2973,53 @@ const nt = {
|
|
|
2262
2973
|
}
|
|
2263
2974
|
});
|
|
2264
2975
|
export {
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2976
|
+
ua as VfAccordion,
|
|
2977
|
+
da as VfAlert,
|
|
2978
|
+
ca as VfBadge,
|
|
2979
|
+
fa as VfBreadcrumbs,
|
|
2980
|
+
va as VfButton,
|
|
2981
|
+
ma as VfCard,
|
|
2982
|
+
pa as VfCheckbox,
|
|
2983
|
+
ba as VfDialog,
|
|
2984
|
+
_a as VfDivider,
|
|
2985
|
+
ha as VfDrawer,
|
|
2986
|
+
ya as VfDropdown,
|
|
2987
|
+
Se as VfIconButton,
|
|
2988
|
+
ga as VfInput,
|
|
2989
|
+
wa as VfLink,
|
|
2990
|
+
ka as VfMenuBar,
|
|
2991
|
+
$a as VfNavMenu,
|
|
2992
|
+
Ta as VfPanel,
|
|
2993
|
+
Va as VfPopover,
|
|
2994
|
+
Ca as VfRadio,
|
|
2995
|
+
xa as VfSelect,
|
|
2996
|
+
Rn as VfSwitch,
|
|
2997
|
+
Ba as VfTable,
|
|
2998
|
+
Ia as VfTableOfContents,
|
|
2999
|
+
Oa as VfTabs,
|
|
3000
|
+
Aa as VfTag,
|
|
3001
|
+
La as VfTextarea,
|
|
3002
|
+
ia as VfThemeProvider,
|
|
3003
|
+
Ea as VfThemeSwitch,
|
|
3004
|
+
Da as VfTooltip,
|
|
3005
|
+
sa as VueForgeCore,
|
|
3006
|
+
za as createThemePreset,
|
|
3007
|
+
Ye as createVueForgeCore,
|
|
3008
|
+
sa as default,
|
|
3009
|
+
Pa as defaultThemePreset,
|
|
3010
|
+
Fa as toMaxWidthQuery,
|
|
3011
|
+
Ha as toMinWidthQuery,
|
|
3012
|
+
Na as useBreakpoint,
|
|
3013
|
+
Ka as useBreakpointValue,
|
|
3014
|
+
ja as useBreakpoints,
|
|
3015
|
+
$e as useClickOutside,
|
|
3016
|
+
be as useDisclosure,
|
|
3017
|
+
_e as useEscapeKey,
|
|
3018
|
+
Te as useFloating,
|
|
3019
|
+
De as useFocusTrap,
|
|
3020
|
+
ee as useId,
|
|
3021
|
+
Ae as useScrollLock,
|
|
3022
|
+
ra as useTableOfContents,
|
|
3023
|
+
Ze as useTheme,
|
|
3024
|
+
qa as vfBreakpoints
|
|
2313
3025
|
};
|