@codemonster-ru/vueforge-core 1.7.0 → 1.9.0

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