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