@codemonster-ru/vueforge-core 1.7.0 → 1.8.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 (63) 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/index.d.ts +4 -3
  10. package/dist/components/index.d.ts.map +1 -1
  11. package/dist/components/link/VfLink.vue.d.ts +4 -4
  12. package/dist/components/link/VfLink.vue.d.ts.map +1 -1
  13. package/dist/components/menu-bar/VfMenuBar.vue.d.ts +24 -0
  14. package/dist/components/menu-bar/VfMenuBar.vue.d.ts.map +1 -0
  15. package/dist/components/menu-bar/VfMenuBarItemNode.vue.d.ts +18 -0
  16. package/dist/components/menu-bar/VfMenuBarItemNode.vue.d.ts.map +1 -0
  17. package/dist/components/menu-bar/index.d.ts +2 -0
  18. package/dist/components/menu-bar/index.d.ts.map +1 -0
  19. package/dist/components/nav-menu/VfNavMenu.vue.d.ts +1 -1
  20. package/dist/components/nav-menu/VfNavMenu.vue.d.ts.map +1 -1
  21. package/dist/components/nav-menu/VfNavMenuItemNode.vue.d.ts.map +1 -1
  22. package/dist/components/select/VfSelect.vue.d.ts +31 -0
  23. package/dist/components/select/VfSelect.vue.d.ts.map +1 -0
  24. package/dist/components/select/index.d.ts +2 -0
  25. package/dist/components/select/index.d.ts.map +1 -0
  26. package/dist/components/{prose/VfProse.vue.d.ts → table/VfTable.vue.d.ts} +14 -5
  27. package/dist/components/table/VfTable.vue.d.ts.map +1 -0
  28. package/dist/components/table/index.d.ts +2 -0
  29. package/dist/components/table/index.d.ts.map +1 -0
  30. package/dist/components/table-of-contents/VfTableOfContents.vue.d.ts +5 -18
  31. package/dist/components/table-of-contents/VfTableOfContents.vue.d.ts.map +1 -1
  32. package/dist/components/tabs/VfTabs.vue.d.ts +6 -2
  33. package/dist/components/tabs/VfTabs.vue.d.ts.map +1 -1
  34. package/dist/components/theme-switch/VfThemeSwitch.vue.d.ts.map +1 -1
  35. package/dist/components/tooltip/VfTooltip.vue.d.ts.map +1 -1
  36. package/dist/index.d.ts +2 -2
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/providers/VfThemeProvider.vue.d.ts.map +1 -1
  39. package/dist/styles.css +1 -1
  40. package/dist/theme/default-preset-source.d.ts +10 -10
  41. package/dist/theme/default-preset-source.d.ts.map +1 -1
  42. package/dist/theme/utils.d.ts.map +1 -1
  43. package/dist/theme-api.js +1 -1
  44. package/dist/theme.css +26 -18
  45. package/dist/tokens.css +54 -54
  46. package/dist/types/components.d.ts +15 -3
  47. package/dist/types/components.d.ts.map +1 -1
  48. package/dist/types/theme.d.ts +12 -8
  49. package/dist/types/theme.d.ts.map +1 -1
  50. package/dist/{utils-T2JkaeUr.js → utils-BJVEoCfQ.js} +81 -76
  51. package/dist/vueforge-core.js +1956 -1254
  52. package/package.json +5 -2
  53. package/dist/components/heading/VfHeading.vue.d.ts +0 -26
  54. package/dist/components/heading/VfHeading.vue.d.ts.map +0 -1
  55. package/dist/components/heading/index.d.ts +0 -2
  56. package/dist/components/heading/index.d.ts.map +0 -1
  57. package/dist/components/prose/VfProse.vue.d.ts.map +0 -1
  58. package/dist/components/prose/index.d.ts +0 -2
  59. package/dist/components/prose/index.d.ts.map +0 -1
  60. package/dist/components/text/VfText.vue.d.ts +0 -28
  61. package/dist/components/text/VfText.vue.d.ts.map +0 -1
  62. package/dist/components/text/index.d.ts +0 -2
  63. 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-BJVEoCfQ.js";
2
+ import { c as za, d as Pa } from "./utils-BJVEoCfQ.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 c, createElementBlock as _, createElementVNode as V, unref as y, toDisplayString as F, normalizeClass as P, createVNode as H, Transition as ce, 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), d = 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 = d.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
+ d,
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: d,
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 d() {
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
+ d(), !(!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
+ d();
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: d
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 d;
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 = (d = T[0]) == null ? void 0 : d.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 d(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) => (c(), _("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: d
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(ce, {
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) ? (c(), _("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" }, ca = /* @__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) => (c(), _("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 ? (c(), _("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
+ }), da = /* @__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) => (c(), _("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" }, ct = ["aria-current"], dt = {
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(([d]) => d !== "class"))
495
+ ), i = a(
496
+ () => n.items.some((d) => d.current)
497
+ );
498
+ function r(d, m) {
499
+ return d.current || !i.value && m === n.items.length - 1;
500
+ }
501
+ function g(d, m) {
502
+ return !d.disabled && !r(d, m) && (d.href || d.to);
503
+ }
504
+ function v(d) {
505
+ return d.rel ? d.rel : d.target === "_blank" ? "noopener noreferrer" : void 0;
506
+ }
507
+ function T(d) {
508
+ return d.to !== void 0 ? n.component ?? fe("RouterLink") : "a";
509
+ }
510
+ function p(d) {
511
+ return d.to !== void 0 ? {
512
+ to: d.to,
513
+ target: d.target,
514
+ rel: v(d)
515
+ } : {
516
+ href: d.href,
517
+ target: d.target,
518
+ rel: v(d)
519
+ };
520
+ }
521
+ return (d, m) => (c(), _("nav", N({
522
+ class: l.value,
523
+ "aria-label": n.ariaLabel
524
+ }, o.value), [
525
+ V("ol", ut, [
526
+ (c(!0), _(re, null, ue(n.items, (h, x) => (c(), _("li", {
527
+ key: `${h.label}-${x}`,
528
+ class: "vf-breadcrumbs__item"
529
+ }, [
530
+ g(h, x) ? (c(), 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)) : (c(), _("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, ct)),
543
+ x < n.items.length - 1 ? (c(), _("span", dt, [
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) => (c(), _("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) => (c(), _("section", N({ class: l.value }, y(e)), [
593
+ n.title || o.$slots.header ? (c(), _("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 ? (c(), _("div", pt, [
599
+ O(o.$slots, "default")
600
+ ])) : E("", !0),
601
+ o.$slots.footer ? (c(), _("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) => (c(), _("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 ? (c(), _("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) => (c(), _("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, d = {
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) => (c(), q(he, {
807
+ to: u.value,
808
+ disabled: R.value
728
809
  }, [
729
- q(oe, {
810
+ H(ce, {
730
811
  name: "vf-drawer-transition",
731
812
  appear: "",
732
- duration: T
813
+ duration: d
733
814
  }, {
734
- default: U(() => [
735
- h(d) ? (c(), _("div", H({
815
+ default: G(() => [
816
+ y(p) ? (c(), _("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", {}, () => [
835
+ t.title || $.$slots.header ? (c(), _("header", wt, [
836
+ V("div", null, [
837
+ O($.$slots, "header", {}, () => [
757
838
  t.title ? (c(), _("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 ? (c(), 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 ? (c(), _("div", Tt, [
858
+ O($.$slots, "default", { close: k })
859
+ ])) : E("", !0),
860
+ $.$slots.footer ? (c(), _("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, d = {
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) => (c(), q(he, {
964
+ to: h.value,
965
+ disabled: m.value
884
966
  }, [
885
- q(oe, {
967
+ H(ce, {
886
968
  name: "vf-dialog-transition",
887
969
  appear: "",
888
- duration: T
970
+ duration: d
889
971
  }, {
890
- default: U(() => [
891
- h(d) ? (c(), _("div", gt, [
892
- x("div", {
972
+ default: G(() => [
973
+ y(p) ? (c(), _("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", {}, () => [
989
+ t.title || t.description || s.$slots.header || s.$slots.description ? (c(), _("header", Bt, [
990
+ V("div", null, [
991
+ O(s.$slots, "header", {}, () => [
910
992
  t.title ? (c(), _("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", {}, () => [
998
+ O(s.$slots, "description", {}, () => [
917
999
  t.description ? (c(), _("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 ? (c(), 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 ? (c(), _("div", Ot, [
1019
+ O(s.$slots, "default", { close: u })
1020
+ ])) : E("", !0),
1021
+ s.$slots.footer ? (c(), _("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) => (c(), _("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 },
@@ -973,191 +1056,175 @@ const nt = {
973
1056
  },
974
1057
  emits: ["update:open", "openChange"],
975
1058
  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(
1059
+ 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 = {
1060
+ enter: Z.fast,
1061
+ leave: Z.fast
1062
+ }, p = a(
980
1063
  () => 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({
1064
+ ), d = a(() => typeof e.teleportTo == "string" || typeof HTMLElement < "u" && e.teleportTo instanceof HTMLElement ? e.teleportTo : "body"), m = be({
982
1065
  defaultOpen: e.defaultOpen,
983
- open: l(() => e.open),
984
- onOpenChange: ($) => {
985
- i("update:open", $), i("openChange", $);
1066
+ open: a(() => e.open),
1067
+ onOpenChange: (b) => {
1068
+ l("update:open", b), l("openChange", b);
986
1069
  }
987
- }), V = g.isOpen, A = l(() => [
1070
+ }), h = m.isOpen, x = a(() => [
988
1071
  "vf-dropdown__menu",
989
- o.value.startsWith("top") && "vf-dropdown__menu--top"
990
- ]), D = l(() => {
991
- const $ = y.value.arrow;
1072
+ u.value.startsWith("top") && "vf-dropdown__menu--top"
1073
+ ]), L = a(() => {
1074
+ const b = w.value.arrow;
992
1075
  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
1076
+ x: (b == null ? void 0 : b.x) !== void 0 && (b == null ? void 0 : b.baseX) !== void 0 ? b.x - b.baseX : 0,
1077
+ y: (b == null ? void 0 : b.y) !== void 0 && (b == null ? void 0 : b.baseY) !== void 0 ? b.y - b.baseY : 0
995
1078
  };
996
- }), z = l(() => ({
997
- left: `${D.value.x}px`,
998
- top: `${D.value.y}px`
999
- })), k = l(() => [
1079
+ }), D = a(() => ({
1080
+ left: `${L.value.x}px`,
1081
+ top: `${L.value.y}px`
1082
+ })), R = a(() => [
1000
1083
  "vf-dropdown__arrow",
1001
- o.value.startsWith("top") ? "vf-dropdown__arrow--top" : "vf-dropdown__arrow--bottom"
1002
- ]), m = l(
1084
+ u.value.startsWith("top") ? "vf-dropdown__arrow--top" : "vf-dropdown__arrow--bottom"
1085
+ ]), I = a(
1003
1086
  () => e.placement === "bottom-end" ? ["bottom-end", "top-end"] : ["bottom-start", "top-start"]
1004
1087
  ), {
1005
- placement: o,
1006
- middlewareData: y,
1007
- styles: p
1008
- } = ye(a, r, {
1009
- enabled: V,
1010
- placement: l(() => e.placement),
1011
- middleware: l(
1088
+ placement: u,
1089
+ middlewareData: w,
1090
+ styles: B
1091
+ } = Te(o, i, {
1092
+ enabled: h,
1093
+ placement: a(() => e.placement),
1094
+ middleware: a(
1012
1095
  () => [
1013
- pe(10),
1014
- me({ placements: m.value }),
1015
- he(),
1016
- u.value ? _e(u.value) : void 0
1017
- ].filter(($) => $ !== void 0)
1096
+ ge(10),
1097
+ we({ placements: I.value }),
1098
+ ke(),
1099
+ r.value ? Ve(r.value) : void 0
1100
+ ].filter((b) => b !== void 0)
1018
1101
  ),
1019
1102
  strategy: "fixed"
1020
1103
  });
1021
1104
  function s() {
1022
- var $;
1105
+ var b;
1023
1106
  return Array.from(
1024
- (($ = r.value) == null ? void 0 : $.querySelectorAll('[role="menuitem"]')) ?? []
1107
+ ((b = i.value) == null ? void 0 : b.querySelectorAll('[role="menuitem"]')) ?? []
1025
1108
  );
1026
1109
  }
1027
- async function E() {
1028
- var $;
1029
- await ne(), ($ = s()[0]) == null || $.focus();
1110
+ async function k() {
1111
+ var b;
1112
+ await le(), (b = s()[0]) == null || b.focus();
1030
1113
  }
1031
- function L($ = {}) {
1032
- g.open(), $.focusFirstItem && E();
1114
+ function f(b = {}) {
1115
+ m.open(), b.focusFirstItem && k();
1033
1116
  }
1034
- function M() {
1035
- var $;
1036
- g.close(), ($ = a.value) == null || $.focus();
1117
+ function S() {
1118
+ var b;
1119
+ m.close(), (b = o.value) == null || b.focus();
1037
1120
  }
1038
- function B() {
1039
- if (V.value) {
1040
- M();
1121
+ function $() {
1122
+ if (h.value) {
1123
+ S();
1041
1124
  return;
1042
1125
  }
1043
- L();
1126
+ f();
1044
1127
  }
1045
- function w($) {
1046
- ($.key === "ArrowDown" || $.key === "Enter" || $.key === " ") && ($.preventDefault(), L({ focusFirstItem: !0 }));
1128
+ function C(b) {
1129
+ (b.key === "ArrowDown" || b.key === "Enter" || b.key === " ") && (b.preventDefault(), f({ focusFirstItem: !0 }));
1047
1130
  }
1048
- function Z($) {
1049
- var ge, $e, ke, we;
1050
- const G = s(), be = G.findIndex(
1051
- (Le) => Le === document.activeElement
1131
+ function ie(b) {
1132
+ var ae, te, Q, de;
1133
+ const z = s(), Y = z.findIndex(
1134
+ (oe) => oe === document.activeElement
1052
1135
  );
1053
- if ($.key === "ArrowDown") {
1054
- $.preventDefault(), (ge = G[(be + 1 + G.length) % G.length]) == null || ge.focus();
1136
+ if (b.key === "ArrowDown") {
1137
+ b.preventDefault(), (ae = z[(Y + 1 + z.length) % z.length]) == null || ae.focus();
1055
1138
  return;
1056
1139
  }
1057
- if ($.key === "ArrowUp") {
1058
- $.preventDefault(), ($e = G[(be - 1 + G.length) % G.length]) == null || $e.focus();
1140
+ if (b.key === "ArrowUp") {
1141
+ b.preventDefault(), (te = z[(Y - 1 + z.length) % z.length]) == null || te.focus();
1059
1142
  return;
1060
1143
  }
1061
- if ($.key === "Home") {
1062
- $.preventDefault(), (ke = G[0]) == null || ke.focus();
1144
+ if (b.key === "Home") {
1145
+ b.preventDefault(), (Q = z[0]) == null || Q.focus();
1063
1146
  return;
1064
1147
  }
1065
- $.key === "End" && ($.preventDefault(), (we = G[G.length - 1]) == null || we.focus());
1148
+ b.key === "End" && (b.preventDefault(), (de = z[z.length - 1]) == null || de.focus());
1066
1149
  }
1067
- function de() {
1068
- e.closeOnSelect && M();
1150
+ function pe() {
1151
+ e.closeOnSelect && S();
1069
1152
  }
1070
- return Oe(
1071
- [a, r],
1153
+ return $e(
1154
+ [o, i],
1072
1155
  () => {
1073
- V.value && M();
1156
+ h.value && S();
1074
1157
  },
1075
1158
  {
1076
- enabled: V,
1159
+ enabled: h,
1077
1160
  event: "click"
1078
1161
  }
1079
- ), ve(
1080
- ($) => {
1081
- V.value && ($.preventDefault(), M());
1162
+ ), _e(
1163
+ (b) => {
1164
+ h.value && (b.preventDefault(), S());
1082
1165
  },
1083
1166
  {
1084
- enabled: V
1167
+ enabled: h
1085
1168
  }
1086
- ), ($, G) => (c(), _("div", Et, [
1087
- x("div", {
1088
- id: h(f),
1169
+ ), (b, z) => (c(), _("div", St, [
1170
+ V("div", {
1171
+ id: y(v),
1089
1172
  ref_key: "triggerRef",
1090
- ref: a,
1173
+ ref: o,
1091
1174
  class: "vf-dropdown__trigger",
1092
- "aria-controls": h(v),
1093
- "aria-expanded": h(V),
1175
+ "aria-controls": y(g),
1176
+ "aria-expanded": y(h),
1094
1177
  "aria-haspopup": "menu",
1095
1178
  tabindex: "0",
1096
- onClick: B,
1097
- onKeydown: w
1179
+ onClick: $,
1180
+ onKeydown: C
1098
1181
  }, [
1099
- C($.$slots, "trigger", {
1100
- open: h(V),
1101
- toggle: B
1182
+ O(b.$slots, "trigger", {
1183
+ open: y(h),
1184
+ toggle: $
1102
1185
  })
1103
- ], 40, Ot),
1104
- (c(), j(ue, {
1105
- to: T.value,
1106
- disabled: d.value
1186
+ ], 40, Mt),
1187
+ (c(), q(he, {
1188
+ to: d.value,
1189
+ disabled: p.value
1107
1190
  }, [
1108
- q(oe, {
1191
+ H(ce, {
1109
1192
  name: "vf-floating-transition",
1110
1193
  appear: "",
1111
- duration: b
1194
+ duration: T
1112
1195
  }, {
1113
- default: U(() => [
1114
- h(V) ? (c(), _("div", {
1196
+ default: G(() => [
1197
+ y(h) ? (c(), _("div", {
1115
1198
  key: 0,
1116
- id: h(v),
1199
+ id: y(g),
1117
1200
  ref_key: "menuRef",
1118
- ref: r,
1119
- class: R(A.value),
1120
- style: Y(h(p)),
1121
- "aria-labelledby": h(f),
1201
+ ref: i,
1202
+ class: P(x.value),
1203
+ style: U(y(B)),
1204
+ "aria-labelledby": y(v),
1122
1205
  role: "menu",
1123
- onClick: de,
1124
- onKeydown: Z
1206
+ onClick: pe,
1207
+ onKeydown: ie
1125
1208
  }, [
1126
- x("span", {
1209
+ V("span", {
1127
1210
  ref_key: "arrowRef",
1128
- ref: u,
1129
- class: R(k.value),
1130
- style: Y(z.value),
1211
+ ref: r,
1212
+ class: P(R.value),
1213
+ style: U(D.value),
1131
1214
  "aria-hidden": "true"
1132
1215
  }, null, 6),
1133
- C($.$slots, "default", {
1134
- close: M,
1135
- open: h(V)
1216
+ O(b.$slots, "default", {
1217
+ close: S,
1218
+ open: y(h)
1136
1219
  })
1137
- ], 46, At)) : O("", !0)
1220
+ ], 46, zt)) : E("", !0)
1138
1221
  ]),
1139
1222
  _: 3
1140
1223
  })
1141
1224
  ], 8, ["to", "disabled"]))
1142
1225
  ]));
1143
1226
  }
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({
1227
+ }), Pt = ["value", "aria-invalid"], ga = /* @__PURE__ */ M({
1161
1228
  inheritAttrs: !1,
1162
1229
  __name: "VfInput",
1163
1230
  props: {
@@ -1167,23 +1234,23 @@ const nt = {
1167
1234
  },
1168
1235
  emits: ["update:modelValue"],
1169
1236
  setup(t, { emit: n }) {
1170
- const e = t, i = n, a = N(), r = l(
1171
- () => P(
1237
+ const e = t, l = n, o = j(), i = a(
1238
+ () => K(
1172
1239
  "vf-input",
1173
1240
  e.size !== "md" && `vf-input--${e.size}`,
1174
1241
  e.invalid && "vf-input--invalid"
1175
1242
  )
1176
1243
  );
1177
- function u(v) {
1178
- i("update:modelValue", v.target.value);
1244
+ function r(g) {
1245
+ l("update:modelValue", g.target.value);
1179
1246
  }
1180
- return (v, f) => (c(), _("input", H({
1181
- class: r.value,
1247
+ return (g, v) => (c(), _("input", N({
1248
+ class: i.value,
1182
1249
  value: e.modelValue,
1183
1250
  "aria-invalid": e.invalid || void 0
1184
- }, h(a), { onInput: u }), null, 16, It));
1251
+ }, y(o), { onInput: r }), null, 16, Pt));
1185
1252
  }
1186
- }), Kn = /* @__PURE__ */ S({
1253
+ }), wa = /* @__PURE__ */ M({
1187
1254
  inheritAttrs: !1,
1188
1255
  __name: "VfLink",
1189
1256
  props: {
@@ -1191,53 +1258,347 @@ const nt = {
1191
1258
  to: { default: void 0 },
1192
1259
  target: { default: void 0 },
1193
1260
  rel: { default: void 0 },
1194
- underline: { type: Boolean, default: !1 },
1261
+ underline: { default: "none" },
1195
1262
  tone: { default: "default" },
1196
1263
  component: { default: void 0 }
1197
1264
  },
1198
1265
  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(
1266
+ 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(
1267
+ () => K(
1201
1268
  "vf-link",
1202
- n.underline && "vf-link--underline",
1269
+ n.underline === "hover" && "vf-link--underline-hover",
1270
+ n.underline === "always" && "vf-link--underline-always",
1203
1271
  n.tone === "muted" && "vf-link--muted"
1204
1272
  )
1205
- ), v = l(() => i.value ? {
1273
+ ), g = a(() => l.value ? {
1206
1274
  to: n.to,
1207
1275
  target: n.target,
1208
- rel: r.value
1276
+ rel: i.value
1209
1277
  } : {
1210
1278
  href: n.href,
1211
1279
  target: n.target,
1212
- rel: r.value
1213
- }), f = l(() => ({
1280
+ rel: i.value
1281
+ }), v = a(() => ({
1214
1282
  ...e,
1215
- ...v.value,
1216
- class: u.value
1283
+ ...g.value,
1284
+ class: r.value
1217
1285
  }));
1218
- return (b, d) => (c(), j(ae(a.value), Ve(xe(f.value)), {
1219
- default: U(() => [
1220
- C(b.$slots, "default")
1286
+ return (T, p) => (c(), q(fe(o.value), Be(Ie(v.value)), {
1287
+ default: G(() => [
1288
+ O(T.$slots, "default")
1221
1289
  ]),
1222
1290
  _: 3
1223
1291
  }, 16));
1224
1292
  }
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 = {
1293
+ }), Rt = ["aria-expanded", "disabled"], Ft = { class: "vf-menu-bar__item-content" }, Ht = {
1294
+ key: 0,
1295
+ class: "vf-menu-bar__leading-icon",
1296
+ "aria-hidden": "true"
1297
+ }, Nt = { class: "vf-menu-bar__label" }, Kt = {
1298
+ class: "vf-menu-bar__icon",
1299
+ "aria-hidden": "true"
1300
+ }, jt = { class: "vf-menu-bar__item-content" }, qt = {
1301
+ key: 0,
1302
+ class: "vf-menu-bar__leading-icon",
1303
+ "aria-hidden": "true"
1304
+ }, Wt = { class: "vf-menu-bar__label" }, Ut = ["aria-current", "disabled"], Xt = { class: "vf-menu-bar__item-content" }, Yt = {
1305
+ key: 0,
1306
+ class: "vf-menu-bar__leading-icon",
1307
+ "aria-hidden": "true"
1308
+ }, Gt = { class: "vf-menu-bar__label" }, Qt = {
1309
+ class: "vf-menu-bar__submenu-list",
1310
+ role: "menu"
1311
+ }, Jt = /* @__PURE__ */ M({
1312
+ name: "VfMenuBarItemNode",
1313
+ __name: "VfMenuBarItemNode",
1314
+ props: {
1315
+ item: {},
1316
+ depth: {},
1317
+ parentPath: {},
1318
+ activeValue: {},
1319
+ openPath: {},
1320
+ hoverEnabled: { type: Boolean }
1321
+ },
1322
+ emits: ["openPathChange", "select"],
1323
+ setup(t, { emit: n }) {
1324
+ const e = t, l = n, o = a(() => [...e.parentPath, e.item.value]), i = a(
1325
+ () => {
1326
+ var w;
1327
+ return e.item.kind !== "group" && !!((w = e.item.children) != null && w.length);
1328
+ }
1329
+ ), r = a(() => e.item.kind === "group"), g = a(
1330
+ () => e.item.href !== void 0 || e.item.to !== void 0
1331
+ ), v = a(() => e.activeValue === e.item.value), T = a(
1332
+ () => !v.value && R(e.item, e.activeValue)
1333
+ ), p = a(
1334
+ () => o.value.every((w, B) => e.openPath[B] === w)
1335
+ ), d = 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 ? {
1336
+ to: e.item.to,
1337
+ target: e.item.target,
1338
+ rel: m.value
1339
+ } : {
1340
+ href: e.item.href,
1341
+ target: e.item.target,
1342
+ rel: m.value
1343
+ });
1344
+ function x() {
1345
+ !i.value || e.item.disabled || l("openPathChange", o.value);
1346
+ }
1347
+ function L() {
1348
+ if (!(!i.value || e.item.disabled)) {
1349
+ if (p.value) {
1350
+ l("openPathChange", e.parentPath);
1351
+ return;
1352
+ }
1353
+ l("openPathChange", o.value);
1354
+ }
1355
+ }
1356
+ function D(w) {
1357
+ if (e.item.disabled) {
1358
+ w == null || w.preventDefault();
1359
+ return;
1360
+ }
1361
+ l("select", e.item);
1362
+ }
1363
+ function R(w, B) {
1364
+ var s;
1365
+ return !B || !((s = w.children) != null && s.length) ? !1 : w.children.some(
1366
+ (k) => k.value === B || R(k, B)
1367
+ );
1368
+ }
1369
+ function I(w) {
1370
+ if (i.value) {
1371
+ if (w.key === "Enter" || w.key === " " || w.key === "ArrowDown" || e.depth > 0 && w.key === "ArrowRight") {
1372
+ w.preventDefault(), x();
1373
+ return;
1374
+ }
1375
+ (w.key === "ArrowLeft" || w.key === "Escape") && e.depth > 0 && (w.preventDefault(), l("openPathChange", e.parentPath));
1376
+ }
1377
+ }
1378
+ function u() {
1379
+ e.hoverEnabled && x();
1380
+ }
1381
+ return (w, B) => {
1382
+ const s = Ee("VfMenuBarItemNode", !0);
1383
+ return c(), _("li", {
1384
+ class: P(["vf-menu-bar__node", [
1385
+ `vf-menu-bar__node--depth-${t.depth}`,
1386
+ i.value && "vf-menu-bar__node--branch",
1387
+ p.value && "vf-menu-bar__node--open"
1388
+ ]]),
1389
+ onMouseenter: u
1390
+ }, [
1391
+ r.value ? (c(), _("div", {
1392
+ key: 0,
1393
+ class: "vf-menu-bar__group",
1394
+ role: "presentation",
1395
+ style: U({ "--vf-menu-bar-depth": String(t.depth) })
1396
+ }, F(t.item.label), 5)) : i.value ? (c(), _("button", {
1397
+ key: 1,
1398
+ type: "button",
1399
+ class: P(["vf-menu-bar__item vf-menu-bar__item--branch", [
1400
+ t.depth === 0 && "vf-menu-bar__item--top",
1401
+ T.value && "vf-menu-bar__item--ancestor-active",
1402
+ p.value && "vf-menu-bar__item--open"
1403
+ ]]),
1404
+ style: U({ "--vf-menu-bar-depth": String(t.depth) }),
1405
+ "aria-expanded": p.value,
1406
+ "aria-haspopup": "menu",
1407
+ role: "menuitem",
1408
+ disabled: t.item.disabled,
1409
+ onClick: L,
1410
+ onKeydown: I
1411
+ }, [
1412
+ V("span", Ft, [
1413
+ t.item.leadingIcon ? (c(), _("span", Ht, [
1414
+ H(y(J), {
1415
+ icon: t.item.leadingIcon,
1416
+ size: "1rem"
1417
+ }, null, 8, ["icon"])
1418
+ ])) : E("", !0),
1419
+ V("span", Nt, F(t.item.label), 1)
1420
+ ]),
1421
+ V("span", Kt, [
1422
+ H(y(J), {
1423
+ icon: t.depth === 0 ? y(W).chevronDown : p.value ? y(W).minus : y(W).plus,
1424
+ size: "0.875rem"
1425
+ }, null, 8, ["icon"])
1426
+ ])
1427
+ ], 46, Rt)) : g.value ? (c(), q(fe(d.value), N({ key: 2 }, h.value, {
1428
+ class: ["vf-menu-bar__item", [
1429
+ t.depth === 0 && "vf-menu-bar__item--top",
1430
+ v.value && "vf-menu-bar__item--active",
1431
+ T.value && "vf-menu-bar__item--ancestor-active",
1432
+ t.item.disabled && "vf-menu-bar__item--disabled"
1433
+ ]],
1434
+ style: { "--vf-menu-bar-depth": String(t.depth) },
1435
+ "aria-current": v.value ? "page" : void 0,
1436
+ role: "menuitem",
1437
+ onClick: D
1438
+ }), {
1439
+ default: G(() => [
1440
+ V("span", jt, [
1441
+ t.item.leadingIcon ? (c(), _("span", qt, [
1442
+ H(y(J), {
1443
+ icon: t.item.leadingIcon,
1444
+ size: "1rem"
1445
+ }, null, 8, ["icon"])
1446
+ ])) : E("", !0),
1447
+ V("span", Wt, F(t.item.label), 1)
1448
+ ])
1449
+ ]),
1450
+ _: 1
1451
+ }, 16, ["class", "style", "aria-current"])) : (c(), _("button", {
1452
+ key: 3,
1453
+ type: "button",
1454
+ class: P(["vf-menu-bar__item", [
1455
+ t.depth === 0 && "vf-menu-bar__item--top",
1456
+ v.value && "vf-menu-bar__item--active",
1457
+ T.value && "vf-menu-bar__item--ancestor-active",
1458
+ t.item.disabled && "vf-menu-bar__item--disabled"
1459
+ ]]),
1460
+ style: U({ "--vf-menu-bar-depth": String(t.depth) }),
1461
+ "aria-current": v.value ? "page" : void 0,
1462
+ role: "menuitem",
1463
+ disabled: t.item.disabled,
1464
+ onClick: B[0] || (B[0] = (k) => D())
1465
+ }, [
1466
+ V("span", Xt, [
1467
+ t.item.leadingIcon ? (c(), _("span", Yt, [
1468
+ H(y(J), {
1469
+ icon: t.item.leadingIcon,
1470
+ size: "1rem"
1471
+ }, null, 8, ["icon"])
1472
+ ])) : E("", !0),
1473
+ V("span", Gt, F(t.item.label), 1)
1474
+ ])
1475
+ ], 14, Ut)),
1476
+ H(ce, {
1477
+ name: "vf-floating-transition",
1478
+ appear: ""
1479
+ }, {
1480
+ default: G(() => [
1481
+ i.value && p.value ? (c(), _("div", {
1482
+ key: 0,
1483
+ class: P([
1484
+ "vf-menu-bar__submenu",
1485
+ t.depth === 0 ? "vf-menu-bar__submenu--root" : "vf-menu-bar__submenu--nested"
1486
+ ])
1487
+ }, [
1488
+ V("ul", Qt, [
1489
+ (c(!0), _(re, null, ue(t.item.children, (k) => (c(), q(s, {
1490
+ key: k.value,
1491
+ item: k,
1492
+ depth: t.depth + 1,
1493
+ "parent-path": o.value,
1494
+ "active-value": t.activeValue,
1495
+ "open-path": t.openPath,
1496
+ "hover-enabled": !0,
1497
+ onOpenPathChange: B[1] || (B[1] = (f) => l("openPathChange", f)),
1498
+ onSelect: B[2] || (B[2] = (f) => l("select", f))
1499
+ }, null, 8, ["item", "depth", "parent-path", "active-value", "open-path"]))), 128))
1500
+ ])
1501
+ ], 2)) : E("", !0)
1502
+ ]),
1503
+ _: 1
1504
+ })
1505
+ ], 34);
1506
+ };
1507
+ }
1508
+ }), Zt = ["aria-label"], en = {
1509
+ class: "vf-menu-bar__list",
1510
+ role: "menubar"
1511
+ }, ka = /* @__PURE__ */ M({
1512
+ __name: "VfMenuBar",
1513
+ props: {
1514
+ items: {},
1515
+ modelValue: { default: void 0 },
1516
+ defaultValue: { default: void 0 },
1517
+ ariaLabel: { default: "Menu bar" }
1518
+ },
1519
+ emits: ["update:modelValue", "change", "select"],
1520
+ setup(t, { emit: n }) {
1521
+ const e = t, l = n, o = A(null), i = A(e.defaultValue), r = A([]), g = a(() => e.modelValue ?? i.value);
1522
+ let v;
1523
+ function T(x) {
1524
+ e.modelValue === void 0 && (i.value = x), l("update:modelValue", x), l("change", x);
1525
+ }
1526
+ function p(x) {
1527
+ T(x.value), r.value = [], l("select", x);
1528
+ }
1529
+ function d(x) {
1530
+ h(), r.value = x;
1531
+ }
1532
+ function m() {
1533
+ h(), v = setTimeout(() => {
1534
+ r.value = [], v = void 0;
1535
+ }, 120);
1536
+ }
1537
+ function h() {
1538
+ v !== void 0 && (clearTimeout(v), v = void 0);
1539
+ }
1540
+ return $e(
1541
+ o,
1542
+ () => {
1543
+ r.value = [];
1544
+ },
1545
+ {
1546
+ enabled: a(() => r.value.length > 0)
1547
+ }
1548
+ ), _e(
1549
+ (x) => {
1550
+ r.value.length !== 0 && (x.preventDefault(), r.value = []);
1551
+ },
1552
+ {
1553
+ enabled: a(() => r.value.length > 0)
1554
+ }
1555
+ ), ne(
1556
+ () => e.items,
1557
+ () => {
1558
+ r.value = [];
1559
+ },
1560
+ { deep: !0 }
1561
+ ), se(() => {
1562
+ h();
1563
+ }), (x, L) => (c(), _("nav", {
1564
+ ref_key: "rootRef",
1565
+ ref: o,
1566
+ class: "vf-menu-bar",
1567
+ "aria-label": t.ariaLabel,
1568
+ onMouseenter: h,
1569
+ onMouseleave: m
1570
+ }, [
1571
+ V("ul", en, [
1572
+ (c(!0), _(re, null, ue(t.items, (D) => (c(), q(Jt, {
1573
+ key: D.value,
1574
+ item: D,
1575
+ depth: 0,
1576
+ "parent-path": [],
1577
+ "active-value": g.value,
1578
+ "open-path": r.value,
1579
+ "hover-enabled": r.value.length > 0,
1580
+ onOpenPathChange: d,
1581
+ onSelect: p
1582
+ }, null, 8, ["item", "active-value", "open-path", "hover-enabled"]))), 128))
1583
+ ])
1584
+ ], 40, Zt));
1585
+ }
1586
+ }), 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
1587
  key: 0,
1227
1588
  class: "vf-nav-menu__leading-icon",
1228
1589
  "aria-hidden": "true"
1229
- }, Nt = { class: "vf-nav-menu__label" }, Ht = { class: "vf-nav-menu__item-content" }, Rt = {
1590
+ }, rn = { class: "vf-nav-menu__label" }, un = { class: "vf-nav-menu__item-content" }, cn = {
1230
1591
  key: 0,
1231
1592
  class: "vf-nav-menu__leading-icon",
1232
1593
  "aria-hidden": "true"
1233
- }, Ft = { class: "vf-nav-menu__label" }, Kt = ["aria-current", "disabled"], jt = { class: "vf-nav-menu__item-content" }, qt = {
1594
+ }, dn = { class: "vf-nav-menu__label" }, fn = ["aria-current", "disabled"], vn = { class: "vf-nav-menu__item-content" }, mn = {
1234
1595
  key: 0,
1235
1596
  class: "vf-nav-menu__leading-icon",
1236
1597
  "aria-hidden": "true"
1237
- }, Ut = { class: "vf-nav-menu__label" }, Wt = {
1598
+ }, pn = { class: "vf-nav-menu__label" }, hn = {
1238
1599
  key: 4,
1239
1600
  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({
1601
+ }, bn = { class: "vf-nav-menu__list vf-nav-menu__list--nested" }, _n = /* @__PURE__ */ M({
1241
1602
  name: "VfNavMenuItemNode",
1242
1603
  __name: "VfNavMenuItemNode",
1243
1604
  props: {
@@ -1249,14 +1610,16 @@ const nt = {
1249
1610
  },
1250
1611
  emits: ["toggle", "select"],
1251
1612
  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(
1613
+ const e = t, l = n, o = a(() => {
1614
+ var k;
1615
+ return !!((k = e.item.children) != null && k.length);
1616
+ }), i = a(() => e.item.kind === "group"), r = a(
1256
1617
  () => e.expandedValues.includes(e.item.value)
1257
- ), v = l(() => e.activeValue === e.item.value), f = l(
1618
+ ), g = a(() => e.activeValue === e.item.value), v = a(
1619
+ () => !g.value && L(e.item, e.activeValue)
1620
+ ), T = a(
1258
1621
  () => 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 ? {
1622
+ ), p = a(() => e.item.to !== void 0 ? fe("RouterLink") : "a"), d = a(() => e.item.rel ? e.item.rel : e.item.target === "_blank" ? "noopener noreferrer" : void 0), m = a(() => e.item.to !== void 0 ? {
1260
1623
  to: e.item.to,
1261
1624
  target: e.item.target,
1262
1625
  rel: d.value
@@ -1265,186 +1628,198 @@ const nt = {
1265
1628
  target: e.item.target,
1266
1629
  rel: d.value
1267
1630
  });
1268
- function g() {
1269
- e.item.disabled || i("toggle", {
1631
+ function h() {
1632
+ e.item.disabled || l("toggle", {
1270
1633
  value: e.item.value,
1271
1634
  parentPath: e.parentPath
1272
1635
  });
1273
1636
  }
1274
- function V(p) {
1637
+ function x(k) {
1275
1638
  if (e.item.disabled) {
1276
- p == null || p.preventDefault();
1639
+ k == null || k.preventDefault();
1277
1640
  return;
1278
1641
  }
1279
- i("select", e.item);
1642
+ l("select", e.item);
1643
+ }
1644
+ function L(k, f) {
1645
+ var S;
1646
+ return !f || !((S = k.children) != null && S.length) ? !1 : k.children.some(
1647
+ ($) => $.value === f || L($, f)
1648
+ );
1280
1649
  }
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;
1650
+ function D(k) {
1651
+ const f = k;
1652
+ 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;
1284
1653
  }
1285
- function D(p) {
1286
- const s = A(p);
1287
- s.style.overflow = "hidden", s.style.height = "0", s.style.opacity = "0";
1654
+ function R(k) {
1655
+ const f = D(k);
1656
+ f.style.overflow = "hidden", f.style.height = "0", f.style.opacity = "0";
1288
1657
  }
1289
- function z(p) {
1290
- const s = A(p);
1658
+ function I(k) {
1659
+ const f = D(k);
1291
1660
  requestAnimationFrame(() => {
1292
- s.style.height = `${s.scrollHeight}px`, s.style.opacity = "1";
1661
+ f.style.height = `${f.scrollHeight}px`, f.style.opacity = "1";
1293
1662
  });
1294
1663
  }
1295
- function k(p) {
1296
- const s = p;
1297
- s.style.transition = "", s.style.overflow = "", s.style.height = "", s.style.opacity = "";
1664
+ function u(k) {
1665
+ const f = k;
1666
+ f.style.transition = "", f.style.overflow = "", f.style.height = "", f.style.opacity = "";
1298
1667
  }
1299
- function m(p) {
1300
- const s = A(p);
1301
- s.style.overflow = "hidden", s.style.height = `${s.scrollHeight}px`, s.style.opacity = "1";
1668
+ function w(k) {
1669
+ const f = D(k);
1670
+ f.style.overflow = "hidden", f.style.height = `${f.scrollHeight}px`, f.style.opacity = "1";
1302
1671
  }
1303
- function o(p) {
1304
- const s = p;
1305
- s.offsetHeight, requestAnimationFrame(() => {
1306
- s.style.height = "0", s.style.opacity = "0";
1672
+ function B(k) {
1673
+ const f = k;
1674
+ f.offsetHeight, requestAnimationFrame(() => {
1675
+ f.style.height = "0", f.style.opacity = "0";
1307
1676
  });
1308
1677
  }
1309
- function y(p) {
1310
- const s = p;
1311
- s.style.transition = "", s.style.overflow = "", s.style.height = "", s.style.opacity = "";
1678
+ function s(k) {
1679
+ const f = k;
1680
+ f.style.transition = "", f.style.overflow = "", f.style.height = "", f.style.opacity = "";
1312
1681
  }
1313
- return (p, s) => {
1314
- const E = Pe("VfNavMenuItemNode", !0);
1315
- return c(), _("li", Lt, [
1316
- r.value ? (c(), _("div", {
1682
+ return (k, f) => {
1683
+ const S = Ee("VfNavMenuItemNode", !0);
1684
+ return c(), _("li", tn, [
1685
+ i.value ? (c(), _("div", {
1317
1686
  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) })
1687
+ class: P(["vf-nav-menu__group", `vf-nav-menu__group--level-${t.level}`]),
1688
+ style: U({ "--vf-nav-menu-level": String(t.level) })
1320
1689
  }, [
1321
- x("span", St, [
1322
- x("span", Dt, F(t.item.label), 1)
1690
+ V("span", nn, [
1691
+ V("span", an, F(t.item.label), 1)
1323
1692
  ])
1324
- ], 6)) : a.value ? (c(), _("button", {
1693
+ ], 6)) : o.value ? (c(), _("button", {
1325
1694
  key: 1,
1326
- class: R([
1695
+ class: P([
1327
1696
  "vf-nav-menu__item",
1328
1697
  "vf-nav-menu__item--branch",
1329
- u.value && "vf-nav-menu__item--expanded"
1698
+ !t.item.leadingIcon && "vf-nav-menu__item--icon-offset",
1699
+ v.value && "vf-nav-menu__item--ancestor-active",
1700
+ r.value && "vf-nav-menu__item--expanded"
1330
1701
  ]),
1331
- style: Y({ "--vf-nav-menu-level": String(t.level) }),
1332
- "aria-expanded": u.value,
1702
+ style: U({ "--vf-nav-menu-level": String(t.level) }),
1703
+ "aria-expanded": r.value,
1333
1704
  disabled: t.item.disabled,
1334
1705
  type: "button",
1335
- onClick: g
1706
+ onClick: h
1336
1707
  }, [
1337
- x("span", Mt, [
1338
- t.item.leadingIcon ? (c(), _("span", Pt, [
1339
- q(h(ee), {
1708
+ V("span", ln, [
1709
+ t.item.leadingIcon ? (c(), _("span", sn, [
1710
+ H(y(J), {
1340
1711
  icon: t.item.leadingIcon,
1341
1712
  size: "1rem"
1342
1713
  }, null, 8, ["icon"])
1343
- ])) : O("", !0),
1344
- x("span", Nt, F(t.item.label), 1)
1714
+ ])) : E("", !0),
1715
+ V("span", rn, F(t.item.label), 1)
1345
1716
  ]),
1346
- x("span", {
1347
- class: R(["vf-nav-menu__icon", u.value && "vf-nav-menu__icon--open"]),
1717
+ V("span", {
1718
+ class: P(["vf-nav-menu__icon", r.value && "vf-nav-menu__icon--open"]),
1348
1719
  "aria-hidden": "true"
1349
1720
  }, [
1350
- q(h(ee), {
1351
- icon: h(W).chevronDown,
1721
+ H(y(J), {
1722
+ icon: y(W).chevronDown,
1352
1723
  size: "0.875rem"
1353
1724
  }, null, 8, ["icon"])
1354
1725
  ], 2)
1355
- ], 14, zt)) : f.value ? (c(), j(ae(b.value), H({ key: 2 }, T.value, {
1726
+ ], 14, on)) : T.value ? (c(), q(fe(p.value), N({ key: 2 }, m.value, {
1356
1727
  class: [
1357
1728
  "vf-nav-menu__item",
1358
- v.value && "vf-nav-menu__item--active",
1729
+ !t.item.leadingIcon && "vf-nav-menu__item--icon-offset",
1730
+ g.value && "vf-nav-menu__item--active",
1731
+ v.value && "vf-nav-menu__item--ancestor-active",
1359
1732
  t.item.disabled && "vf-nav-menu__item--disabled"
1360
1733
  ],
1361
1734
  style: { "--vf-nav-menu-level": String(t.level) },
1362
- "aria-current": v.value ? "page" : void 0,
1363
- onClick: V
1735
+ "aria-current": g.value ? "page" : void 0,
1736
+ onClick: x
1364
1737
  }), {
1365
- default: U(() => [
1366
- x("span", Ht, [
1367
- t.item.leadingIcon ? (c(), _("span", Rt, [
1368
- q(h(ee), {
1738
+ default: G(() => [
1739
+ V("span", un, [
1740
+ t.item.leadingIcon ? (c(), _("span", cn, [
1741
+ H(y(J), {
1369
1742
  icon: t.item.leadingIcon,
1370
1743
  size: "1rem"
1371
1744
  }, null, 8, ["icon"])
1372
- ])) : O("", !0),
1373
- x("span", Ft, F(t.item.label), 1)
1745
+ ])) : E("", !0),
1746
+ V("span", dn, F(t.item.label), 1)
1374
1747
  ])
1375
1748
  ]),
1376
1749
  _: 1
1377
1750
  }, 16, ["class", "style", "aria-current"])) : (c(), _("button", {
1378
1751
  key: 3,
1379
- class: R([
1752
+ class: P([
1380
1753
  "vf-nav-menu__item",
1381
- v.value && "vf-nav-menu__item--active",
1754
+ !t.item.leadingIcon && "vf-nav-menu__item--icon-offset",
1755
+ g.value && "vf-nav-menu__item--active",
1756
+ v.value && "vf-nav-menu__item--ancestor-active",
1382
1757
  t.item.disabled && "vf-nav-menu__item--disabled"
1383
1758
  ]),
1384
- style: Y({ "--vf-nav-menu-level": String(t.level) }),
1385
- "aria-current": v.value ? "page" : void 0,
1759
+ style: U({ "--vf-nav-menu-level": String(t.level) }),
1760
+ "aria-current": g.value ? "page" : void 0,
1386
1761
  disabled: t.item.disabled,
1387
1762
  type: "button",
1388
- onClick: s[0] || (s[0] = (L) => V())
1763
+ onClick: f[0] || (f[0] = ($) => x())
1389
1764
  }, [
1390
- x("span", jt, [
1391
- t.item.leadingIcon ? (c(), _("span", qt, [
1392
- q(h(ee), {
1765
+ V("span", vn, [
1766
+ t.item.leadingIcon ? (c(), _("span", mn, [
1767
+ H(y(J), {
1393
1768
  icon: t.item.leadingIcon,
1394
1769
  size: "1rem"
1395
1770
  }, null, 8, ["icon"])
1396
- ])) : O("", !0),
1397
- x("span", Ut, F(t.item.label), 1)
1771
+ ])) : E("", !0),
1772
+ V("span", pn, F(t.item.label), 1)
1398
1773
  ])
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,
1774
+ ], 14, fn)),
1775
+ o.value && i.value ? (c(), _("ul", hn, [
1776
+ (c(!0), _(re, null, ue(t.item.children, ($) => (c(), q(S, {
1777
+ key: $.value,
1778
+ item: $,
1404
1779
  level: t.level + 1,
1405
1780
  "parent-path": [...t.parentPath, t.item.value],
1406
1781
  "active-value": t.activeValue,
1407
1782
  "expanded-values": t.expandedValues,
1408
- onToggle: s[1] || (s[1] = (M) => i("toggle", M)),
1409
- onSelect: s[2] || (s[2] = (M) => i("select", M))
1783
+ onToggle: f[1] || (f[1] = (C) => l("toggle", C)),
1784
+ onSelect: f[2] || (f[2] = (C) => l("select", C))
1410
1785
  }, null, 8, ["item", "level", "parent-path", "active-value", "expanded-values"]))), 128))
1411
- ])) : a.value ? (c(), j(oe, {
1786
+ ])) : o.value ? (c(), q(ce, {
1412
1787
  key: 5,
1413
- onBeforeEnter: D,
1414
- onEnter: z,
1415
- onAfterEnter: k,
1416
- onBeforeLeave: m,
1417
- onLeave: o,
1418
- onAfterLeave: y
1788
+ onBeforeEnter: R,
1789
+ onEnter: I,
1790
+ onAfterEnter: u,
1791
+ onBeforeLeave: w,
1792
+ onLeave: B,
1793
+ onAfterLeave: s
1419
1794
  }, {
1420
- default: U(() => [
1421
- u.value ? (c(), _("div", {
1795
+ default: G(() => [
1796
+ r.value ? (c(), _("div", {
1422
1797
  key: 0,
1423
- class: R([
1798
+ class: P([
1424
1799
  "vf-nav-menu__collapse",
1425
1800
  `vf-nav-menu__collapse--level-${t.level}`
1426
1801
  ])
1427
1802
  }, [
1428
- x("ul", Yt, [
1429
- (c(!0), _(se, null, ie(t.item.children, (L) => (c(), j(E, {
1430
- key: L.value,
1431
- item: L,
1803
+ V("ul", bn, [
1804
+ (c(!0), _(re, null, ue(t.item.children, ($) => (c(), q(S, {
1805
+ key: $.value,
1806
+ item: $,
1432
1807
  level: t.level + 1,
1433
1808
  "parent-path": [...t.parentPath, t.item.value],
1434
1809
  "active-value": t.activeValue,
1435
1810
  "expanded-values": t.expandedValues,
1436
- onToggle: s[3] || (s[3] = (M) => i("toggle", M)),
1437
- onSelect: s[4] || (s[4] = (M) => i("select", M))
1811
+ onToggle: f[3] || (f[3] = (C) => l("toggle", C)),
1812
+ onSelect: f[4] || (f[4] = (C) => l("select", C))
1438
1813
  }, null, 8, ["item", "level", "parent-path", "active-value", "expanded-values"]))), 128))
1439
1814
  ])
1440
- ], 2)) : O("", !0)
1815
+ ], 2)) : E("", !0)
1441
1816
  ]),
1442
1817
  _: 1
1443
- })) : O("", !0)
1818
+ })) : E("", !0)
1444
1819
  ]);
1445
1820
  };
1446
1821
  }
1447
- }), Gt = ["aria-label"], Qt = { class: "vf-nav-menu__list" }, jn = /* @__PURE__ */ S({
1822
+ }), yn = ["aria-label"], gn = { class: "vf-nav-menu__list" }, $a = /* @__PURE__ */ M({
1448
1823
  __name: "VfNavMenu",
1449
1824
  props: {
1450
1825
  items: {},
@@ -1455,114 +1830,114 @@ const nt = {
1455
1830
  },
1456
1831
  emits: ["update:modelValue", "change", "select"],
1457
1832
  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) => {
1833
+ const e = t, l = n, o = A(e.defaultValue), i = a(() => e.modelValue ?? o.value), r = A([]);
1834
+ function g(u, w) {
1835
+ return u.some(
1836
+ (B) => {
1462
1837
  var s;
1463
- return y(p) || ((s = p.children) != null && s.length ? v(p.children, y) : !1);
1838
+ return w(B) || ((s = B.children) != null && s.length ? g(B.children, w) : !1);
1464
1839
  }
1465
1840
  );
1466
1841
  }
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);
1842
+ const v = a(
1843
+ () => g(e.items, (u) => u.kind === "group")
1844
+ ), T = a(
1845
+ () => g(e.items, (u) => !!u.leadingIcon)
1846
+ ), p = a(() => !v.value && !T.value);
1847
+ function d(u) {
1848
+ var w;
1849
+ return u.kind !== "group" && !!((w = u.children) != null && w.length);
1475
1850
  }
1476
- function g(o, y, p = []) {
1851
+ function m(u, w, B = []) {
1477
1852
  var s;
1478
- if (!y)
1853
+ if (!w)
1479
1854
  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
1855
+ for (const k of u) {
1856
+ if (k.value === w)
1857
+ return B;
1858
+ if ((s = k.children) != null && s.length) {
1859
+ const f = m(k.children, w, [
1860
+ ...B,
1861
+ k.value
1487
1862
  ]);
1488
- if (L.length)
1489
- return L;
1863
+ if (f.length)
1864
+ return f;
1490
1865
  }
1491
1866
  }
1492
1867
  return [];
1493
1868
  }
1494
- function V() {
1495
- const o = g(e.items, r.value);
1496
- u.value = Array.from(
1497
- /* @__PURE__ */ new Set([...u.value, ...o])
1869
+ function h() {
1870
+ const u = m(e.items, i.value);
1871
+ r.value = Array.from(
1872
+ /* @__PURE__ */ new Set([...r.value, ...u])
1498
1873
  );
1499
1874
  }
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) : [];
1875
+ function x(u, w) {
1876
+ var f;
1877
+ if (!w.length)
1878
+ return u;
1879
+ const [B, ...s] = w, k = u.find((S) => S.value === B);
1880
+ return (f = k == null ? void 0 : k.children) != null && f.length ? x(k.children, s) : [];
1506
1881
  }
1507
- function D(o) {
1508
- return o.flatMap((y) => {
1882
+ function L(u) {
1883
+ return u.flatMap((w) => {
1509
1884
  var s;
1510
- const p = (s = y.children) != null && s.length ? D(y.children) : [];
1511
- return T(y) ? [y.value, ...p] : p;
1885
+ const B = (s = w.children) != null && s.length ? L(w.children) : [];
1886
+ return d(w) ? [w.value, ...B] : B;
1512
1887
  });
1513
1888
  }
1514
- function z(o) {
1515
- e.modelValue === void 0 && (a.value = o), i("update:modelValue", o), i("change", o);
1889
+ function D(u) {
1890
+ e.modelValue === void 0 && (o.value = u), l("update:modelValue", u), l("change", u);
1516
1891
  }
1517
- function k(o) {
1518
- z(o.value), u.value = Array.from(
1892
+ function R(u) {
1893
+ D(u.value), r.value = Array.from(
1519
1894
  /* @__PURE__ */ new Set([
1520
- ...u.value,
1521
- ...g(e.items, o.value)
1895
+ ...r.value,
1896
+ ...m(e.items, u.value)
1522
1897
  ])
1523
- ), i("select", o);
1898
+ ), l("select", u);
1524
1899
  }
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
1900
+ function I(u) {
1901
+ const { value: w, parentPath: B } = u;
1902
+ if (r.value.includes(w)) {
1903
+ r.value = r.value.filter(
1904
+ (s) => s !== w
1530
1905
  );
1531
1906
  return;
1532
1907
  }
1533
1908
  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)
1909
+ const k = x(e.items, B).filter((f) => f.value !== w && d(f)).flatMap((f) => L([f]));
1910
+ r.value = r.value.filter(
1911
+ (f) => !k.includes(f)
1537
1912
  );
1538
1913
  }
1539
- u.value = [...u.value, y];
1914
+ r.value = [...r.value, w];
1540
1915
  }
1541
- return J(
1542
- () => [e.items, r.value],
1916
+ return ne(
1917
+ () => [e.items, i.value],
1543
1918
  () => {
1544
- V();
1919
+ h();
1545
1920
  },
1546
1921
  { immediate: !0, deep: !0 }
1547
- ), (o, y) => (c(), _("nav", {
1548
- class: R(["vf-nav-menu", d.value && "vf-nav-menu--simple"]),
1922
+ ), (u, w) => (c(), _("nav", {
1923
+ class: P(["vf-nav-menu", p.value && "vf-nav-menu--simple"]),
1549
1924
  "aria-label": t.ariaLabel
1550
1925
  }, [
1551
- x("ul", Qt, [
1552
- (c(!0), _(se, null, ie(t.items, (p) => (c(), j(Xt, {
1553
- key: p.value,
1554
- item: p,
1926
+ V("ul", gn, [
1927
+ (c(!0), _(re, null, ue(t.items, (B) => (c(), q(_n, {
1928
+ key: B.value,
1929
+ item: B,
1555
1930
  level: 0,
1556
1931
  "parent-path": [],
1557
- "active-value": r.value,
1558
- "expanded-values": u.value,
1559
- onToggle: m,
1560
- onSelect: k
1932
+ "active-value": i.value,
1933
+ "expanded-values": r.value,
1934
+ onToggle: I,
1935
+ onSelect: R
1561
1936
  }, null, 8, ["item", "active-value", "expanded-values"]))), 128))
1562
1937
  ])
1563
- ], 10, Gt));
1938
+ ], 10, yn));
1564
1939
  }
1565
- }), Jt = { key: 0 }, Zt = { class: "vf-panel__title" }, qn = /* @__PURE__ */ S({
1940
+ }), wn = { key: 0 }, kn = { class: "vf-panel__title" }, Ta = /* @__PURE__ */ M({
1566
1941
  inheritAttrs: !1,
1567
1942
  __name: "VfPanel",
1568
1943
  props: {
@@ -1570,19 +1945,19 @@ const nt = {
1570
1945
  subtle: { type: Boolean, default: !1 }
1571
1946
  },
1572
1947
  setup(t) {
1573
- const n = t, e = N(), i = l(
1574
- () => P("vf-panel", n.subtle && "vf-panel--subtle")
1948
+ const n = t, e = j(), l = a(
1949
+ () => K("vf-panel", n.subtle && "vf-panel--subtle")
1575
1950
  );
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)
1951
+ return (o, i) => (c(), _("section", N({ class: l.value }, y(e)), [
1952
+ n.title || o.$slots.header ? (c(), _("header", wn, [
1953
+ O(o.$slots, "header", {}, () => [
1954
+ V("h3", kn, F(n.title), 1)
1580
1955
  ])
1581
- ])) : O("", !0),
1582
- C(a.$slots, "default")
1956
+ ])) : E("", !0),
1957
+ O(o.$slots, "default")
1583
1958
  ], 16));
1584
1959
  }
1585
- }), en = { class: "vf-popover" }, tn = ["id", "aria-controls", "aria-expanded"], nn = ["id", "aria-labelledby"], Un = /* @__PURE__ */ S({
1960
+ }), $n = { class: "vf-popover" }, Tn = ["id", "aria-controls", "aria-expanded"], Vn = ["id", "aria-labelledby"], Va = /* @__PURE__ */ M({
1586
1961
  __name: "VfPopover",
1587
1962
  props: {
1588
1963
  open: { type: Boolean, default: void 0 },
@@ -1595,172 +1970,157 @@ const nt = {
1595
1970
  },
1596
1971
  emits: ["update:open", "openChange"],
1597
1972
  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(
1973
+ 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 = {
1974
+ enter: Z.fast,
1975
+ leave: Z.fast
1976
+ }, p = a(
1602
1977
  () => 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({
1978
+ ), d = a(() => typeof e.teleportTo == "string" || typeof HTMLElement < "u" && e.teleportTo instanceof HTMLElement ? e.teleportTo : "body"), m = be({
1604
1979
  defaultOpen: e.defaultOpen,
1605
- open: l(() => e.open),
1606
- onOpenChange: (w) => {
1607
- i("update:open", w), i("openChange", w);
1980
+ open: a(() => e.open),
1981
+ onOpenChange: (C) => {
1982
+ l("update:open", C), l("openChange", C);
1608
1983
  }
1609
- }), V = g.isOpen, A = l(
1984
+ }), h = m.isOpen, x = a(
1610
1985
  () => e.placement === "bottom-end" ? ["bottom-end", "top-end"] : ["bottom-start", "top-start"]
1611
1986
  ), {
1612
- placement: D,
1613
- middlewareData: z,
1614
- styles: k
1615
- } = ye(a, r, {
1616
- enabled: V,
1617
- placement: l(() => e.placement),
1618
- middleware: l(
1987
+ placement: L,
1988
+ middlewareData: D,
1989
+ styles: R
1990
+ } = Te(o, i, {
1991
+ enabled: h,
1992
+ placement: a(() => e.placement),
1993
+ middleware: a(
1619
1994
  () => [
1620
- pe(10),
1621
- me({ placements: A.value }),
1622
- he(),
1623
- u.value ? _e(u.value) : void 0
1624
- ].filter((w) => w !== void 0)
1995
+ ge(10),
1996
+ we({ placements: x.value }),
1997
+ ke(),
1998
+ r.value ? Ve(r.value) : void 0
1999
+ ].filter((C) => C !== void 0)
1625
2000
  ),
1626
2001
  strategy: "fixed"
1627
- }), m = l(() => [
2002
+ }), I = a(() => [
1628
2003
  "vf-popover__content",
1629
- D.value.startsWith("top") && "vf-popover__content--top"
1630
- ]), o = l(() => {
1631
- const w = z.value.arrow;
2004
+ L.value.startsWith("top") && "vf-popover__content--top"
2005
+ ]), u = a(() => {
2006
+ const C = D.value.arrow;
1632
2007
  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
2008
+ x: (C == null ? void 0 : C.x) !== void 0 && (C == null ? void 0 : C.baseX) !== void 0 ? C.x - C.baseX : 0,
2009
+ y: (C == null ? void 0 : C.y) !== void 0 && (C == null ? void 0 : C.baseY) !== void 0 ? C.y - C.baseY : 0
1635
2010
  };
1636
- }), y = l(() => ({
1637
- left: `${o.value.x}px`,
1638
- top: `${o.value.y}px`
1639
- })), p = l(() => [
2011
+ }), w = a(() => ({
2012
+ left: `${u.value.x}px`,
2013
+ top: `${u.value.y}px`
2014
+ })), B = a(() => [
1640
2015
  "vf-popover__arrow",
1641
- D.value.startsWith("top") ? "vf-popover__arrow--top" : "vf-popover__arrow--bottom"
2016
+ L.value.startsWith("top") ? "vf-popover__arrow--top" : "vf-popover__arrow--bottom"
1642
2017
  ]);
1643
2018
  async function s() {
1644
- var Z, de;
1645
- await ne();
1646
- const w = (Z = r.value) == null ? void 0 : Z.querySelector(
2019
+ var ie, pe;
2020
+ await le();
2021
+ const C = (ie = i.value) == null ? void 0 : ie.querySelector(
1647
2022
  "[autofocus], [data-autofocus]"
1648
2023
  );
1649
- if (w) {
1650
- w.focus();
2024
+ if (C) {
2025
+ C.focus();
1651
2026
  return;
1652
2027
  }
1653
- (de = r.value) == null || de.focus();
2028
+ (pe = i.value) == null || pe.focus();
1654
2029
  }
1655
- function E() {
1656
- g.open(), s();
2030
+ function k() {
2031
+ m.open(), s();
1657
2032
  }
1658
- function L() {
1659
- var w;
1660
- g.close(), (w = a.value) == null || w.focus();
2033
+ function f() {
2034
+ var C;
2035
+ m.close(), (C = o.value) == null || C.focus();
1661
2036
  }
1662
- function M() {
1663
- if (V.value) {
1664
- L();
2037
+ function S() {
2038
+ if (h.value) {
2039
+ f();
1665
2040
  return;
1666
2041
  }
1667
- E();
2042
+ k();
1668
2043
  }
1669
- function B(w) {
1670
- (w.key === "Enter" || w.key === " ") && (w.preventDefault(), M()), w.key === "ArrowDown" && (w.preventDefault(), E());
2044
+ function $(C) {
2045
+ (C.key === "Enter" || C.key === " ") && (C.preventDefault(), S()), C.key === "ArrowDown" && (C.preventDefault(), k());
1671
2046
  }
1672
- return Oe(
1673
- [a, r],
2047
+ return $e(
2048
+ [o, i],
1674
2049
  () => {
1675
- V.value && e.closeOnOutsideClick && L();
2050
+ h.value && e.closeOnOutsideClick && f();
1676
2051
  },
1677
2052
  {
1678
- enabled: V,
2053
+ enabled: h,
1679
2054
  event: "click"
1680
2055
  }
1681
- ), ve(
1682
- (w) => {
1683
- !V.value || !e.closeOnEscape || (w.preventDefault(), L());
2056
+ ), _e(
2057
+ (C) => {
2058
+ !h.value || !e.closeOnEscape || (C.preventDefault(), f());
1684
2059
  },
1685
2060
  {
1686
- enabled: V
2061
+ enabled: h
1687
2062
  }
1688
- ), (w, Z) => (c(), _("div", en, [
1689
- x("div", {
1690
- id: h(f),
2063
+ ), (C, ie) => (c(), _("div", $n, [
2064
+ V("div", {
2065
+ id: y(v),
1691
2066
  ref_key: "triggerRef",
1692
- ref: a,
2067
+ ref: o,
1693
2068
  class: "vf-popover__trigger",
1694
- "aria-controls": h(v),
1695
- "aria-expanded": h(V),
2069
+ "aria-controls": y(g),
2070
+ "aria-expanded": y(h),
1696
2071
  "aria-haspopup": "dialog",
1697
2072
  tabindex: "0",
1698
- onClick: M,
1699
- onKeydown: B
2073
+ onClick: S,
2074
+ onKeydown: $
1700
2075
  }, [
1701
- C(w.$slots, "trigger", {
1702
- open: h(V),
1703
- toggle: M
2076
+ O(C.$slots, "trigger", {
2077
+ open: y(h),
2078
+ toggle: S
1704
2079
  })
1705
- ], 40, tn),
1706
- (c(), j(ue, {
1707
- to: T.value,
1708
- disabled: d.value
2080
+ ], 40, Tn),
2081
+ (c(), q(he, {
2082
+ to: d.value,
2083
+ disabled: p.value
1709
2084
  }, [
1710
- q(oe, {
2085
+ H(ce, {
1711
2086
  name: "vf-floating-transition",
1712
2087
  appear: "",
1713
- duration: b
2088
+ duration: T
1714
2089
  }, {
1715
- default: U(() => [
1716
- h(V) ? (c(), _("section", {
2090
+ default: G(() => [
2091
+ y(h) ? (c(), _("section", {
1717
2092
  key: 0,
1718
- id: h(v),
2093
+ id: y(g),
1719
2094
  ref_key: "contentRef",
1720
- ref: r,
1721
- class: R(m.value),
1722
- style: Y(h(k)),
1723
- "aria-labelledby": h(f),
2095
+ ref: i,
2096
+ class: P(I.value),
2097
+ style: U(y(R)),
2098
+ "aria-labelledby": y(v),
1724
2099
  role: "dialog",
1725
2100
  tabindex: "-1"
1726
2101
  }, [
1727
- x("span", {
2102
+ V("span", {
1728
2103
  ref_key: "arrowRef",
1729
- ref: u,
1730
- class: R(p.value),
1731
- style: Y(y.value),
2104
+ ref: r,
2105
+ class: P(B.value),
2106
+ style: U(w.value),
1732
2107
  "aria-hidden": "true"
1733
2108
  }, null, 6),
1734
- C(w.$slots, "default", {
1735
- open: h(V),
1736
- close: L
2109
+ O(C.$slots, "default", {
2110
+ open: y(h),
2111
+ close: f
1737
2112
  })
1738
- ], 14, nn)) : O("", !0)
2113
+ ], 14, Vn)) : E("", !0)
1739
2114
  ]),
1740
2115
  _: 3
1741
2116
  })
1742
2117
  ], 8, ["to", "disabled"]))
1743
2118
  ]));
1744
2119
  }
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 = {
2120
+ }), Cn = ["checked", "disabled", "value", "aria-invalid"], xn = {
1761
2121
  key: 0,
1762
2122
  class: "vf-radio__content"
1763
- }, Yn = /* @__PURE__ */ S({
2123
+ }, Ca = /* @__PURE__ */ M({
1764
2124
  inheritAttrs: !1,
1765
2125
  __name: "VfRadio",
1766
2126
  props: {
@@ -1773,55 +2133,272 @@ const nt = {
1773
2133
  },
1774
2134
  emits: ["update:modelValue", "change"],
1775
2135
  setup(t, { emit: n }) {
1776
- const e = t, i = n, a = N(), r = l(() => e.modelValue === e.value), u = l(
1777
- () => P(
2136
+ const e = t, l = n, o = j(), i = a(() => e.modelValue === e.value), r = a(
2137
+ () => K(
1778
2138
  "vf-radio",
1779
2139
  `vf-radio--${e.size}`,
1780
- r.value && "vf-radio--checked",
2140
+ i.value && "vf-radio--checked",
1781
2141
  e.invalid && "vf-radio--invalid",
1782
2142
  e.disabled && "vf-radio--disabled",
1783
- a.class
2143
+ o.class
1784
2144
  )
1785
- ), v = l(() => a.style), f = l(
2145
+ ), g = a(() => o.style), v = a(
1786
2146
  () => Object.fromEntries(
1787
- Object.entries(a).filter(([d]) => d !== "class" && d !== "style")
2147
+ Object.entries(o).filter(([p]) => p !== "class" && p !== "style")
1788
2148
  )
1789
2149
  );
1790
- function b(d) {
1791
- d.target.checked && (i("update:modelValue", e.value), i("change", e.value));
2150
+ function T(p) {
2151
+ p.target.checked && (l("update:modelValue", e.value), l("change", e.value));
1792
2152
  }
1793
- return (d, T) => (c(), _("label", {
1794
- class: R(u.value),
1795
- style: Y(v.value)
2153
+ return (p, d) => (c(), _("label", {
2154
+ class: P(r.value),
2155
+ style: U(g.value)
1796
2156
  }, [
1797
- x("input", H({
2157
+ V("input", N({
1798
2158
  class: "vf-radio__input",
1799
2159
  type: "radio",
1800
- checked: r.value,
2160
+ checked: i.value,
1801
2161
  disabled: e.disabled,
1802
2162
  value: e.value,
1803
2163
  "aria-invalid": e.invalid || void 0
1804
- }, f.value, { onChange: b }), null, 16, an),
1805
- T[0] || (T[0] = x("span", {
2164
+ }, v.value, { onChange: T }), null, 16, Cn),
2165
+ d[0] || (d[0] = V("span", {
1806
2166
  class: "vf-radio__control",
1807
2167
  "aria-hidden": "true"
1808
2168
  }, [
1809
- x("span", { class: "vf-radio__dot" })
2169
+ V("span", { class: "vf-radio__dot" })
1810
2170
  ], -1)),
1811
- t.label || d.$slots.default ? (c(), _("span", on, [
1812
- C(d.$slots, "default", {}, () => [
1813
- le(F(t.label), 1)
2171
+ t.label || p.$slots.default ? (c(), _("span", xn, [
2172
+ O(p.$slots, "default", {}, () => [
2173
+ ve(F(t.label), 1)
1814
2174
  ])
1815
- ])) : O("", !0)
2175
+ ])) : E("", !0)
1816
2176
  ], 6));
1817
2177
  }
1818
- }), ln = ["checked", "disabled"], sn = {
2178
+ }), Bn = { class: "vf-select-wrap" }, In = ["name", "value"], En = ["id", "aria-controls", "aria-expanded", "aria-invalid", "disabled"], An = { class: "vf-select__value" }, On = {
2179
+ class: "vf-select__icon",
2180
+ "aria-hidden": "true"
2181
+ }, Ln = ["id", "aria-labelledby"], Dn = ["aria-selected", "disabled", "onClick"], xa = /* @__PURE__ */ M({
2182
+ inheritAttrs: !1,
2183
+ __name: "VfSelect",
2184
+ props: {
2185
+ modelValue: { default: "" },
2186
+ options: {},
2187
+ size: { default: "md" },
2188
+ invalid: { type: Boolean, default: !1 },
2189
+ placeholder: { default: void 0 },
2190
+ disabled: { type: Boolean, default: !1 },
2191
+ placement: { default: "bottom-start" },
2192
+ teleportTo: { type: [String, null, Boolean], default: void 0 },
2193
+ disableTeleport: { type: Boolean, default: !1 }
2194
+ },
2195
+ emits: ["update:modelValue"],
2196
+ setup(t, { emit: n }) {
2197
+ 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 = {
2198
+ enter: Z.fast,
2199
+ leave: Z.fast
2200
+ }, p = be(), d = p.isOpen, m = a(
2201
+ () => e.options.find((b) => b.value === e.modelValue)
2202
+ ), h = a(
2203
+ () => K(
2204
+ "vf-select",
2205
+ e.size !== "md" && `vf-select--${e.size}`,
2206
+ e.invalid && "vf-select--invalid",
2207
+ d.value && "vf-select--open",
2208
+ !m.value && e.placeholder && "vf-select--placeholder"
2209
+ )
2210
+ ), x = a(() => m.value ? m.value.label : e.placeholder ?? ""), L = a(
2211
+ () => e.disableTeleport || e.teleportTo === !1 || e.teleportTo === null
2212
+ ), D = a(() => typeof e.teleportTo == "string" || typeof HTMLElement < "u" && e.teleportTo instanceof HTMLElement ? e.teleportTo : "body"), R = a(
2213
+ () => e.placement === "bottom-end" ? ["bottom-end", "top-end"] : ["bottom-start", "top-start"]
2214
+ ), { placement: I, styles: u } = Te(
2215
+ i,
2216
+ r,
2217
+ {
2218
+ enabled: d,
2219
+ placement: a(() => e.placement),
2220
+ middleware: a(
2221
+ () => [
2222
+ ge(2),
2223
+ we({ placements: R.value }),
2224
+ ke()
2225
+ ]
2226
+ ),
2227
+ strategy: "fixed"
2228
+ }
2229
+ ), w = a(() => [
2230
+ "vf-dropdown__menu",
2231
+ "vf-select__menu",
2232
+ I.value.startsWith("top") && "vf-dropdown__menu--top"
2233
+ ]), B = a(() => ({
2234
+ ...u.value,
2235
+ minWidth: i.value ? `${i.value.offsetWidth}px` : void 0
2236
+ }));
2237
+ function s() {
2238
+ var b;
2239
+ return Array.from(
2240
+ ((b = r.value) == null ? void 0 : b.querySelectorAll('[role="option"]')) ?? []
2241
+ );
2242
+ }
2243
+ async function k(b = {}) {
2244
+ await le(), await new Promise((Q) => {
2245
+ window.requestAnimationFrame(() => Q());
2246
+ });
2247
+ const z = s(), Y = e.options.findIndex(
2248
+ (Q) => Q.value === e.modelValue && !Q.disabled
2249
+ ), ae = z[Math.max(Y, 0)];
2250
+ if (!ae)
2251
+ return;
2252
+ const te = r.value;
2253
+ if (te) {
2254
+ const Q = ae.offsetTop, de = Q + ae.offsetHeight, oe = 8, Ce = te.scrollTop, Me = Ce + te.clientHeight;
2255
+ Q - oe < Ce ? te.scrollTop = Math.max(Q - oe, 0) : de + oe > Me && (te.scrollTop = de - te.clientHeight + oe);
2256
+ }
2257
+ b.focus && ae.focus();
2258
+ }
2259
+ function f(b = {}) {
2260
+ e.disabled || (p.open(), k({ focus: b.focusSelected }));
2261
+ }
2262
+ function S(b = {}) {
2263
+ var z;
2264
+ p.close(), b.restoreFocus !== !1 && ((z = i.value) == null || z.focus());
2265
+ }
2266
+ function $() {
2267
+ if (d.value) {
2268
+ S();
2269
+ return;
2270
+ }
2271
+ f();
2272
+ }
2273
+ function C(b, z = {}) {
2274
+ b.disabled || (l("update:modelValue", b.value), S({ restoreFocus: z.restoreFocus }));
2275
+ }
2276
+ function ie(b) {
2277
+ e.disabled || (b.key === "ArrowDown" || b.key === "ArrowUp" || b.key === "Enter" || b.key === " ") && (b.preventDefault(), f({ focusSelected: !0 }));
2278
+ }
2279
+ function pe(b) {
2280
+ var ae, te, Q, de;
2281
+ const z = s(), Y = z.findIndex(
2282
+ (oe) => oe === document.activeElement
2283
+ );
2284
+ if (b.key === "ArrowDown") {
2285
+ b.preventDefault(), (ae = z[(Y + 1 + z.length) % z.length]) == null || ae.focus();
2286
+ return;
2287
+ }
2288
+ if (b.key === "ArrowUp") {
2289
+ b.preventDefault(), (te = z[(Y - 1 + z.length) % z.length]) == null || te.focus();
2290
+ return;
2291
+ }
2292
+ if (b.key === "Home") {
2293
+ b.preventDefault(), (Q = z[0]) == null || Q.focus();
2294
+ return;
2295
+ }
2296
+ if (b.key === "End") {
2297
+ b.preventDefault(), (de = z[z.length - 1]) == null || de.focus();
2298
+ return;
2299
+ }
2300
+ if (b.key === "Escape") {
2301
+ b.preventDefault(), S();
2302
+ return;
2303
+ }
2304
+ if (b.key === "Enter" || b.key === " ") {
2305
+ const oe = e.options[Y];
2306
+ if (!oe)
2307
+ return;
2308
+ b.preventDefault(), C(oe, { restoreFocus: !0 });
2309
+ }
2310
+ }
2311
+ return $e(
2312
+ [i, r],
2313
+ () => {
2314
+ d.value && S({ restoreFocus: !1 });
2315
+ },
2316
+ {
2317
+ enabled: d,
2318
+ event: "click"
2319
+ }
2320
+ ), _e(
2321
+ (b) => {
2322
+ d.value && (b.preventDefault(), S());
2323
+ },
2324
+ {
2325
+ enabled: d
2326
+ }
2327
+ ), (b, z) => (c(), _("div", Bn, [
2328
+ typeof y(o).name == "string" ? (c(), _("input", {
2329
+ key: 0,
2330
+ type: "hidden",
2331
+ name: y(o).name,
2332
+ value: e.modelValue
2333
+ }, null, 8, In)) : E("", !0),
2334
+ V("button", {
2335
+ id: typeof y(o).id == "string" ? y(o).id : y(g),
2336
+ ref_key: "triggerRef",
2337
+ ref: i,
2338
+ type: "button",
2339
+ class: P(h.value),
2340
+ "aria-controls": y(v),
2341
+ "aria-expanded": y(d),
2342
+ "aria-haspopup": "listbox",
2343
+ "aria-invalid": e.invalid || void 0,
2344
+ disabled: e.disabled,
2345
+ onClick: $,
2346
+ onKeydown: ie
2347
+ }, [
2348
+ V("span", An, F(x.value), 1),
2349
+ V("span", On, [
2350
+ H(y(J), {
2351
+ icon: y(W).chevronDown,
2352
+ size: "1rem"
2353
+ }, null, 8, ["icon"])
2354
+ ])
2355
+ ], 42, En),
2356
+ (c(), q(he, {
2357
+ to: D.value,
2358
+ disabled: L.value
2359
+ }, [
2360
+ H(ce, {
2361
+ name: "vf-floating-transition",
2362
+ appear: "",
2363
+ duration: T
2364
+ }, {
2365
+ default: G(() => [
2366
+ y(d) ? (c(), _("div", {
2367
+ key: 0,
2368
+ id: y(v),
2369
+ ref_key: "menuRef",
2370
+ ref: r,
2371
+ class: P(w.value),
2372
+ style: U(B.value),
2373
+ "aria-labelledby": typeof y(o).id == "string" ? y(o).id : y(g),
2374
+ role: "listbox",
2375
+ onKeydown: pe
2376
+ }, [
2377
+ (c(!0), _(re, null, ue(e.options, (Y) => (c(), _("button", {
2378
+ key: Y.value,
2379
+ type: "button",
2380
+ class: P(["vf-dropdown__item vf-select__option", [
2381
+ Y.value === e.modelValue && "vf-select__option--selected"
2382
+ ]]),
2383
+ role: "option",
2384
+ "aria-selected": Y.value === e.modelValue,
2385
+ disabled: Y.disabled,
2386
+ onClick: (ae) => C(Y, { restoreFocus: !1 })
2387
+ }, F(Y.label), 11, Dn))), 128))
2388
+ ], 46, Ln)) : E("", !0)
2389
+ ]),
2390
+ _: 1
2391
+ })
2392
+ ], 8, ["to", "disabled"]))
2393
+ ]));
2394
+ }
2395
+ }), Sn = ["checked", "disabled"], Mn = {
1819
2396
  class: "vf-switch__control",
1820
2397
  "aria-hidden": "true"
1821
- }, rn = { class: "vf-switch__thumb" }, un = {
2398
+ }, zn = { class: "vf-switch__thumb" }, Pn = {
1822
2399
  key: 0,
1823
2400
  class: "vf-switch__content"
1824
- }, cn = /* @__PURE__ */ S({
2401
+ }, Rn = /* @__PURE__ */ M({
1825
2402
  inheritAttrs: !1,
1826
2403
  __name: "VfSwitch",
1827
2404
  props: {
@@ -1832,135 +2409,197 @@ const nt = {
1832
2409
  },
1833
2410
  emits: ["update:modelValue", "change"],
1834
2411
  setup(t, { emit: n }) {
1835
- const e = t, i = n, a = N(), r = fe(), u = l(
1836
- () => P(
2412
+ const e = t, l = n, o = j(), i = ye(), r = a(
2413
+ () => K(
1837
2414
  "vf-switch",
1838
2415
  `vf-switch--${e.size}`,
1839
2416
  e.modelValue && "vf-switch--checked",
1840
2417
  e.disabled && "vf-switch--disabled",
1841
- a.class
2418
+ o.class
1842
2419
  )
1843
- ), v = l(() => a.style), f = l(() => {
1844
- var V;
2420
+ ), g = a(() => o.style), v = a(() => {
2421
+ var h;
1845
2422
  if (e.label)
1846
2423
  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;
2424
+ const d = ((h = i.default) == null ? void 0 : h.call(i, {})) ?? [];
2425
+ function m(x) {
2426
+ 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
2427
  }
1851
- return T.some((A) => g(A));
1852
- }), b = l(
2428
+ return d.some((x) => m(x));
2429
+ }), T = a(
1853
2430
  () => Object.fromEntries(
1854
- Object.entries(a).filter(([T]) => T !== "class" && T !== "style")
2431
+ Object.entries(o).filter(([d]) => d !== "class" && d !== "style")
1855
2432
  )
1856
2433
  );
1857
- function d(T) {
1858
- const g = T.target.checked;
1859
- i("update:modelValue", g), i("change", g);
2434
+ function p(d) {
2435
+ const m = d.target.checked;
2436
+ l("update:modelValue", m), l("change", m);
1860
2437
  }
1861
- return (T, g) => (c(), _("label", {
1862
- class: R(u.value),
1863
- style: Y(v.value)
2438
+ return (d, m) => (c(), _("label", {
2439
+ class: P(r.value),
2440
+ style: U(g.value)
1864
2441
  }, [
1865
- x("input", H({
2442
+ V("input", N({
1866
2443
  class: "vf-switch__input",
1867
2444
  type: "checkbox",
1868
2445
  role: "switch",
1869
2446
  checked: e.modelValue,
1870
2447
  disabled: e.disabled
1871
- }, b.value, { onChange: d }), null, 16, ln),
1872
- x("span", sn, [
1873
- x("span", rn, [
1874
- C(T.$slots, "thumb", {
2448
+ }, T.value, { onChange: p }), null, 16, Sn),
2449
+ V("span", Mn, [
2450
+ V("span", zn, [
2451
+ O(d.$slots, "thumb", {
1875
2452
  checked: e.modelValue
1876
2453
  })
1877
2454
  ])
1878
2455
  ]),
1879
- f.value ? (c(), _("span", un, [
1880
- C(T.$slots, "default", {}, () => [
1881
- le(F(t.label), 1)
2456
+ v.value ? (c(), _("span", Pn, [
2457
+ O(d.$slots, "default", {}, () => [
2458
+ ve(F(t.label), 1)
1882
2459
  ])
1883
- ])) : O("", !0)
2460
+ ])) : E("", !0)
1884
2461
  ], 6));
1885
2462
  }
1886
- }), dn = ["aria-label"], fn = {
2463
+ }), Fn = { class: "vf-table-scroll" }, Hn = {
1887
2464
  key: 0,
1888
- class: "vf-table-of-contents__title"
1889
- }, vn = { class: "vf-table-of-contents__list" }, pn = ["href", "aria-current"], Xn = /* @__PURE__ */ S({
2465
+ class: "vf-table__caption"
2466
+ }, Nn = {
2467
+ key: 1,
2468
+ class: "vf-table__head"
2469
+ }, Kn = {
2470
+ key: 2,
2471
+ class: "vf-table__body"
2472
+ }, jn = {
2473
+ key: 3,
2474
+ class: "vf-table__foot"
2475
+ }, Ba = /* @__PURE__ */ M({
2476
+ inheritAttrs: !1,
2477
+ __name: "VfTable",
2478
+ props: {
2479
+ caption: { default: void 0 },
2480
+ compact: { type: Boolean, default: !1 },
2481
+ striped: { type: Boolean, default: !1 },
2482
+ stickyHeader: { type: Boolean, default: !1 }
2483
+ },
2484
+ setup(t) {
2485
+ const n = t, e = j(), l = a(
2486
+ () => K(
2487
+ "vf-table",
2488
+ n.compact && "vf-table--compact",
2489
+ n.striped && "vf-table--striped",
2490
+ n.stickyHeader && "vf-table--sticky-header"
2491
+ )
2492
+ );
2493
+ return (o, i) => (c(), _("div", N({ class: "vf-table-wrap" }, y(e)), [
2494
+ V("div", Fn, [
2495
+ V("table", {
2496
+ class: P(l.value)
2497
+ }, [
2498
+ n.caption || o.$slots.caption ? (c(), _("caption", Hn, [
2499
+ O(o.$slots, "caption", {}, () => [
2500
+ ve(F(n.caption), 1)
2501
+ ])
2502
+ ])) : E("", !0),
2503
+ o.$slots.header ? (c(), _("thead", Nn, [
2504
+ O(o.$slots, "header")
2505
+ ])) : E("", !0),
2506
+ o.$slots.default ? (c(), _("tbody", Kn, [
2507
+ O(o.$slots, "default")
2508
+ ])) : E("", !0),
2509
+ o.$slots.footer ? (c(), _("tfoot", jn, [
2510
+ O(o.$slots, "footer")
2511
+ ])) : E("", !0)
2512
+ ], 2)
2513
+ ])
2514
+ ], 16));
2515
+ }
2516
+ }), qn = ["aria-label"], Wn = { class: "vf-table-of-contents__list" }, Un = ["href", "aria-current", "onClick"], Ia = /* @__PURE__ */ M({
1890
2517
  inheritAttrs: !1,
1891
2518
  __name: "VfTableOfContents",
1892
2519
  props: {
1893
2520
  items: {},
1894
2521
  activeId: { default: void 0 },
1895
2522
  ariaLabel: { default: "Table of contents" },
1896
- label: { default: void 0 }
2523
+ smooth: { type: Boolean, default: !1 },
2524
+ scrollOffset: { default: 0 }
1897
2525
  },
1898
2526
  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(
2527
+ const n = t, e = j(), l = A(!1), o = a(
2528
+ () => K(
2529
+ "vf-table-of-contents",
2530
+ l.value && "vf-table-of-contents--ready",
2531
+ e.class
2532
+ )
2533
+ ), i = a(() => e.style), r = a(
1902
2534
  () => Object.fromEntries(
1903
- Object.entries(e).filter(([f]) => f !== "class" && f !== "style")
2535
+ Object.entries(e).filter(([d]) => d !== "class" && d !== "style")
1904
2536
  )
1905
2537
  );
1906
- function u(f) {
1907
- return !f || f < 1 ? 1 : Math.min(f, 6);
2538
+ function g(d) {
2539
+ return !d || d < 1 ? 1 : Math.min(d, 6);
1908
2540
  }
1909
- function v(f) {
1910
- return f.href ?? `#${f.id}`;
2541
+ function v(d) {
2542
+ return d.href ?? `#${d.id}`;
1911
2543
  }
1912
- return (f, b) => (c(), _("nav", H({
1913
- class: i.value,
1914
- style: a.value,
2544
+ function T(d, m) {
2545
+ const h = v(d);
2546
+ if (!h.startsWith("#"))
2547
+ return;
2548
+ const x = decodeURIComponent(h.slice(1));
2549
+ if (!x)
2550
+ return;
2551
+ const L = document.getElementById(x);
2552
+ if (!L)
2553
+ return;
2554
+ const D = Math.max(
2555
+ 0,
2556
+ window.scrollY + L.getBoundingClientRect().top - n.scrollOffset
2557
+ );
2558
+ m != null && m.updateHistory && window.location.hash !== h && window.history.pushState(null, "", h), window.scrollTo({
2559
+ top: D,
2560
+ behavior: n.smooth ? "smooth" : "auto"
2561
+ });
2562
+ }
2563
+ function p(d, m) {
2564
+ const h = v(m);
2565
+ !n.smooth && n.scrollOffset <= 0 || !h.startsWith("#") || !decodeURIComponent(h.slice(1)) || (d.preventDefault(), T(m, {
2566
+ updateHistory: !0
2567
+ }));
2568
+ }
2569
+ return me(async () => {
2570
+ if (requestAnimationFrame(() => {
2571
+ l.value = !0;
2572
+ }), typeof window > "u" || !window.location.hash)
2573
+ return;
2574
+ const d = decodeURIComponent(window.location.hash), m = n.items.find((h) => v(h) === d);
2575
+ m && (await le(), requestAnimationFrame(() => {
2576
+ T(m);
2577
+ }));
2578
+ }), (d, m) => (c(), _("nav", N({
2579
+ class: o.value,
2580
+ style: i.value,
1915
2581
  "aria-label": n.ariaLabel
1916
2582
  }, 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,
2583
+ V("ol", Wn, [
2584
+ (c(!0), _(re, null, ue(n.items, (h) => (c(), _("li", {
2585
+ key: h.id,
1925
2586
  class: "vf-table-of-contents__item",
1926
- style: Y({ "--vf-toc-level": String(u(d.level)) })
2587
+ style: U({ "--vf-toc-level": String(g(h.level)) })
1927
2588
  }, [
1928
- x("a", {
1929
- href: v(d),
1930
- class: R([
2589
+ V("a", {
2590
+ href: v(h),
2591
+ class: P([
1931
2592
  "vf-table-of-contents__link",
1932
- n.activeId === d.id && "vf-table-of-contents__link--active"
2593
+ n.activeId === h.id && "vf-table-of-contents__link--active"
1933
2594
  ]),
1934
- "aria-current": n.activeId === d.id ? "location" : void 0
1935
- }, F(d.label), 11, pn)
2595
+ "aria-current": n.activeId === h.id ? "location" : void 0,
2596
+ onClick: (x) => p(x, h)
2597
+ }, F(h.label), 11, Un)
1936
2598
  ], 4))), 128))
1937
2599
  ])
1938
- ], 16, dn));
2600
+ ], 16, qn));
1939
2601
  }
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({
2602
+ }), Ea = /* @__PURE__ */ M({
1964
2603
  inheritAttrs: !1,
1965
2604
  __name: "VfThemeSwitch",
1966
2605
  props: {
@@ -1969,54 +2608,64 @@ const nt = {
1969
2608
  label: { default: void 0 }
1970
2609
  },
1971
2610
  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");
2611
+ const n = t, e = j(), l = ye(), { resolvedTheme: o, setTheme: i } = Ze(), r = a(() => !!(n.label || l.default)), g = A(!1);
2612
+ let v = null;
2613
+ ne(
2614
+ o,
2615
+ (p) => {
2616
+ g.value = p === "dark";
2617
+ },
2618
+ { immediate: !0 }
2619
+ );
2620
+ function T(p) {
2621
+ if (g.value = p, typeof window > "u") {
2622
+ i(p ? "dark" : "light");
2623
+ return;
1976
2624
  }
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),
2625
+ v !== null && window.cancelAnimationFrame(v), v = window.requestAnimationFrame(() => {
2626
+ i(p ? "dark" : "light"), v = null;
2627
+ });
2628
+ }
2629
+ return se(() => {
2630
+ v !== null && typeof window < "u" && window.cancelAnimationFrame(v);
2631
+ }), (p, d) => (c(), q(Rn, N(y(e), {
2632
+ "model-value": g.value,
1981
2633
  size: n.size,
1982
2634
  disabled: n.disabled,
1983
- label: n.label
2635
+ label: n.label,
2636
+ "onUpdate:modelValue": T
1984
2637
  }), {
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,
2638
+ thumb: G(({ checked: m }) => [
2639
+ O(p.$slots, "thumb", { checked: m }, () => [
2640
+ H(y(J), {
2641
+ icon: m ? y(W).moon : y(W).sun,
1989
2642
  size: "0.5rem"
1990
2643
  }, null, 8, ["icon"])
1991
2644
  ])
1992
2645
  ]),
1993
- default: U(() => [
1994
- u.value ? C(f.$slots, "default", { key: 0 }, () => [
1995
- le(F(n.label), 1)
1996
- ]) : O("", !0)
2646
+ default: G(() => [
2647
+ r.value ? O(p.$slots, "default", { key: 0 }, () => [
2648
+ ve(F(n.label), 1)
2649
+ ]) : E("", !0)
1997
2650
  ]),
1998
2651
  _: 3
1999
- }, 16, ["modelValue", "size", "disabled", "label"]));
2652
+ }, 16, ["model-value", "size", "disabled", "label"]));
2000
2653
  }
2001
- }), Jn = /* @__PURE__ */ S({
2654
+ }), Aa = /* @__PURE__ */ M({
2002
2655
  inheritAttrs: !1,
2003
2656
  __name: "VfTag",
2004
2657
  props: {
2005
2658
  tone: { default: "neutral" }
2006
2659
  },
2007
2660
  setup(t) {
2008
- const n = t, e = N(), i = l(
2009
- () => P("vf-tag", n.tone !== "neutral" && `vf-tag--${n.tone}`)
2661
+ const n = t, e = j(), l = a(
2662
+ () => K("vf-tag", n.tone !== "neutral" && `vf-tag--${n.tone}`)
2010
2663
  );
2011
- return (a, r) => (c(), _("span", H({ class: i.value }, h(e)), [
2012
- C(a.$slots, "default")
2664
+ return (o, i) => (c(), _("span", N({ class: l.value }, y(e)), [
2665
+ O(o.$slots, "default")
2013
2666
  ], 16));
2014
2667
  }
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({
2668
+ }), Xn = { class: "vf-tabs" }, Yn = ["id", "aria-controls", "aria-selected", "disabled", "tabindex", "onClick", "onKeydown"], Gn = ["id", "aria-labelledby"], Oa = /* @__PURE__ */ M({
2020
2669
  __name: "VfTabs",
2021
2670
  props: {
2022
2671
  items: {},
@@ -2025,106 +2674,154 @@ const nt = {
2025
2674
  },
2026
2675
  emits: ["update:modelValue", "change"],
2027
2676
  setup(t, { emit: n }) {
2028
- const e = t, i = n, a = Q({ prefix: "vf-tabs" }), r = I([]), u = l(
2677
+ const e = t, l = n, o = ee({ prefix: "vf-tabs" }), i = A(null), r = A([]), g = A(!1), v = A({
2678
+ opacity: "0",
2679
+ transform: "translateX(0)",
2680
+ width: "0px"
2681
+ }), T = a(
2029
2682
  () => {
2030
- var k;
2031
- return (k = e.items.find((m) => !m.disabled)) == null ? void 0 : k.value;
2683
+ var s;
2684
+ return (s = e.items.find((k) => !k.disabled)) == null ? void 0 : s.value;
2032
2685
  }
2033
- ), v = I(e.defaultValue ?? u.value), f = l(() => e.modelValue !== void 0), b = l(
2034
- () => e.modelValue ?? v.value ?? u.value
2686
+ ), p = A(e.defaultValue ?? T.value), d = a(() => e.modelValue !== void 0), m = a(
2687
+ () => e.modelValue ?? p.value ?? T.value
2035
2688
  );
2036
- J(
2689
+ let h = null;
2690
+ ne(
2037
2691
  () => e.items,
2038
- (k) => {
2039
- !k.some(
2040
- (o) => o.value === b.value && !o.disabled
2041
- ) && u.value && d(u.value);
2692
+ (s) => {
2693
+ !s.some(
2694
+ (f) => f.value === m.value && !f.disabled
2695
+ ) && T.value && x(T.value);
2042
2696
  },
2043
2697
  { deep: !0 }
2044
2698
  );
2045
- function d(k) {
2046
- f.value || (v.value = k), i("update:modelValue", k), i("change", k);
2699
+ function x(s) {
2700
+ d.value || (p.value = s), l("update:modelValue", s), l("change", s);
2047
2701
  }
2048
- function T(k) {
2049
- k.disabled || d(k.value);
2702
+ function L(s) {
2703
+ s.disabled || x(s.value);
2050
2704
  }
2051
- function g() {
2052
- return e.items.filter((k) => !k.disabled);
2705
+ function D() {
2706
+ return e.items.filter((s) => !s.disabled);
2053
2707
  }
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();
2708
+ function R(s) {
2709
+ var f;
2710
+ const k = e.items.findIndex((S) => S.value === s);
2711
+ (f = r.value[k]) == null || f.focus();
2058
2712
  }
2059
- function A(k, m) {
2060
- const o = g(), y = o.findIndex(
2061
- (p) => p.value === m.value
2713
+ function I(s, k) {
2714
+ const f = D(), S = f.findIndex(
2715
+ ($) => $.value === k.value
2062
2716
  );
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);
2717
+ if (S !== -1) {
2718
+ if (s.key === "ArrowRight" || s.key === "ArrowDown") {
2719
+ s.preventDefault();
2720
+ const $ = f[(S + 1) % f.length];
2721
+ L($), R($.value);
2068
2722
  return;
2069
2723
  }
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);
2724
+ if (s.key === "ArrowLeft" || s.key === "ArrowUp") {
2725
+ s.preventDefault();
2726
+ const $ = f[(S - 1 + f.length) % f.length];
2727
+ L($), R($.value);
2074
2728
  return;
2075
2729
  }
2076
- if (k.key === "Home") {
2077
- k.preventDefault();
2078
- const p = o[0];
2079
- T(p), V(p.value);
2730
+ if (s.key === "Home") {
2731
+ s.preventDefault();
2732
+ const $ = f[0];
2733
+ L($), R($.value);
2080
2734
  return;
2081
2735
  }
2082
- if (k.key === "End") {
2083
- k.preventDefault();
2084
- const p = o[o.length - 1];
2085
- T(p), V(p.value);
2736
+ if (s.key === "End") {
2737
+ s.preventDefault();
2738
+ const $ = f[f.length - 1];
2739
+ L($), R($.value);
2086
2740
  }
2087
2741
  }
2088
2742
  }
2089
- function D(k) {
2090
- return `${a.value}-tab-${k}`;
2743
+ function u(s) {
2744
+ return `${o.value}-tab-${s}`;
2091
2745
  }
2092
- function z(k) {
2093
- return `${a.value}-panel-${k}`;
2746
+ function w(s) {
2747
+ return `${o.value}-panel-${s}`;
2094
2748
  }
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,
2749
+ function B() {
2750
+ const s = e.items.findIndex(
2751
+ (f) => f.value === m.value
2752
+ ), k = s >= 0 ? r.value[s] : null;
2753
+ if (!k) {
2754
+ v.value = {
2755
+ opacity: "0",
2756
+ transform: "translateX(0)",
2757
+ width: "0px"
2758
+ };
2759
+ return;
2760
+ }
2761
+ v.value = {
2762
+ opacity: "1",
2763
+ transform: `translateX(${k.offsetLeft}px)`,
2764
+ width: `${k.offsetWidth}px`
2765
+ };
2766
+ }
2767
+ return ne(
2768
+ () => [m.value, e.items],
2769
+ async () => {
2770
+ await le(), B();
2771
+ },
2772
+ { deep: !0, immediate: !0 }
2773
+ ), me(async () => {
2774
+ await le(), B(), requestAnimationFrame(() => {
2775
+ g.value = !0;
2776
+ }), typeof ResizeObserver < "u" && i.value && (h = new ResizeObserver(() => {
2777
+ B();
2778
+ }), h.observe(i.value)), typeof window < "u" && window.addEventListener("resize", B);
2779
+ }), se(() => {
2780
+ h == null || h.disconnect(), typeof window < "u" && window.removeEventListener("resize", B);
2781
+ }), (s, k) => (c(), _("div", Xn, [
2782
+ V("div", {
2783
+ ref_key: "listRef",
2784
+ ref: i,
2785
+ class: "vf-tabs__list",
2786
+ role: "tablist",
2787
+ "aria-orientation": "horizontal"
2788
+ }, [
2789
+ (c(!0), _(re, null, ue(t.items, (f, S) => (c(), _("button", {
2790
+ id: u(f.value),
2791
+ key: f.value,
2100
2792
  ref_for: !0,
2101
- ref: (p) => {
2102
- r.value[y] = p;
2793
+ ref: ($) => {
2794
+ r.value[S] = $;
2103
2795
  },
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,
2796
+ "aria-controls": w(f.value),
2797
+ "aria-selected": m.value === f.value,
2798
+ disabled: f.disabled,
2799
+ tabindex: m.value === f.value ? 0 : -1,
2108
2800
  class: "vf-tabs__tab",
2109
2801
  role: "tab",
2110
2802
  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", {
2803
+ onClick: ($) => L(f),
2804
+ onKeydown: ($) => I($, f)
2805
+ }, F(f.label), 41, Yn))), 128)),
2806
+ V("span", {
2807
+ "aria-hidden": "true",
2808
+ class: P(["vf-tabs__indicator", g.value && "vf-tabs__indicator--ready"]),
2809
+ style: U(v.value)
2810
+ }, null, 6)
2811
+ ], 512),
2812
+ m.value ? (c(), _("div", {
2116
2813
  key: 0,
2117
- id: z(b.value),
2118
- "aria-labelledby": D(b.value),
2814
+ id: w(m.value),
2815
+ "aria-labelledby": u(m.value),
2119
2816
  class: "vf-tabs__panel",
2120
2817
  role: "tabpanel",
2121
2818
  tabindex: "0"
2122
2819
  }, [
2123
- C(k.$slots, "panel", Ve(xe({ activeValue: b.value })))
2124
- ], 8, yn)) : O("", !0)
2820
+ O(s.$slots, "panel", Be(Ie({ activeValue: m.value })))
2821
+ ], 8, Gn)) : E("", !0)
2125
2822
  ]));
2126
2823
  }
2127
- }), bn = ["value", "aria-invalid"], ea = /* @__PURE__ */ S({
2824
+ }), Qn = ["value", "aria-invalid"], La = /* @__PURE__ */ M({
2128
2825
  inheritAttrs: !1,
2129
2826
  __name: "VfTextarea",
2130
2827
  props: {
@@ -2134,23 +2831,23 @@ const nt = {
2134
2831
  },
2135
2832
  emits: ["update:modelValue"],
2136
2833
  setup(t, { emit: n }) {
2137
- const e = t, i = n, a = N(), r = l(
2138
- () => P(
2834
+ const e = t, l = n, o = j(), i = a(
2835
+ () => K(
2139
2836
  "vf-textarea",
2140
2837
  e.size !== "md" && `vf-textarea--${e.size}`,
2141
2838
  e.invalid && "vf-textarea--invalid"
2142
2839
  )
2143
2840
  );
2144
- function u(v) {
2145
- i("update:modelValue", v.target.value);
2841
+ function r(g) {
2842
+ l("update:modelValue", g.target.value);
2146
2843
  }
2147
- return (v, f) => (c(), _("textarea", H({
2148
- class: r.value,
2844
+ return (g, v) => (c(), _("textarea", N({
2845
+ class: i.value,
2149
2846
  value: e.modelValue,
2150
2847
  "aria-invalid": e.invalid || void 0
2151
- }, h(a), { onInput: u }), null, 16, bn));
2848
+ }, y(o), { onInput: r }), null, 16, Qn));
2152
2849
  }
2153
- }), gn = ["aria-describedby"], $n = ["id"], ta = /* @__PURE__ */ S({
2850
+ }), Jn = ["aria-describedby"], Zn = ["id"], Da = /* @__PURE__ */ M({
2154
2851
  __name: "VfTooltip",
2155
2852
  props: {
2156
2853
  text: { default: void 0 },
@@ -2160,100 +2857,104 @@ const nt = {
2160
2857
  disableTeleport: { type: Boolean, default: !1 }
2161
2858
  },
2162
2859
  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(
2860
+ const n = t, e = A(!1), l = ee({ prefix: "vf-tooltip" }), o = A(null), i = A(null), r = A(null), g = A(null), v = {
2861
+ enter: Z.fast,
2862
+ leave: Z.fast
2863
+ }, T = a(
2167
2864
  () => 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, {
2865
+ ), p = a(() => typeof n.teleportTo == "string" || typeof HTMLElement < "u" && n.teleportTo instanceof HTMLElement ? n.teleportTo : "body"), {
2866
+ placement: d,
2867
+ middlewareData: m,
2868
+ styles: h,
2869
+ cleanup: x
2870
+ } = Te(i, r, {
2174
2871
  enabled: e,
2175
- placement: l(() => n.placement),
2176
- middleware: l(
2872
+ placement: a(() => n.placement),
2873
+ middleware: a(
2177
2874
  () => [
2178
- pe(10),
2179
- me({ placements: ["top", "bottom"] }),
2180
- he(),
2181
- v.value ? _e(v.value) : void 0
2875
+ ge(10),
2876
+ we({ placements: ["top", "bottom"] }),
2877
+ ke(),
2878
+ g.value ? Ve(g.value) : void 0
2182
2879
  ].filter((s) => s !== void 0)
2183
2880
  ),
2184
2881
  strategy: "fixed"
2185
- }), D = l(() => [
2882
+ }), L = a(() => [
2186
2883
  "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;
2884
+ d.value.startsWith("bottom") && "vf-tooltip__content--bottom",
2885
+ d.value.startsWith("top") && "vf-tooltip__content--top"
2886
+ ]), D = a(() => {
2887
+ const s = m.value.arrow;
2191
2888
  return {
2192
2889
  x: (s == null ? void 0 : s.x) !== void 0 && (s == null ? void 0 : s.baseX) !== void 0 ? s.x - s.baseX : 0,
2193
2890
  y: (s == null ? void 0 : s.y) !== void 0 && (s == null ? void 0 : s.baseY) !== void 0 ? s.y - s.baseY : 0
2194
2891
  };
2195
- }), k = l(() => ["vf-tooltip__arrow"]), m = l(() => ({
2196
- left: `${z.value.x}px`,
2197
- top: `${z.value.y}px`
2892
+ }), R = a(() => [
2893
+ "vf-tooltip__arrow",
2894
+ d.value.startsWith("bottom") && "vf-tooltip__arrow--bottom",
2895
+ d.value.startsWith("top") && "vf-tooltip__arrow--top"
2896
+ ]), I = a(() => ({
2897
+ left: `${D.value.x}px`,
2898
+ top: `${D.value.y}px`
2198
2899
  }));
2199
- function o() {
2200
- a.value !== null && (window.clearTimeout(a.value), a.value = null);
2900
+ function u() {
2901
+ o.value !== null && (window.clearTimeout(o.value), o.value = null);
2201
2902
  }
2202
- function y() {
2203
- o(), a.value = window.setTimeout(() => {
2903
+ function w() {
2904
+ u(), o.value = window.setTimeout(() => {
2204
2905
  e.value = !0;
2205
2906
  }, n.openDelay);
2206
2907
  }
2207
- function p() {
2208
- o(), e.value = !1;
2908
+ function B() {
2909
+ u(), e.value = !1;
2209
2910
  }
2210
- return te(() => {
2211
- o(), A();
2212
- }), (s, E) => (c(), _("span", {
2911
+ return se(() => {
2912
+ u(), x();
2913
+ }), (s, k) => (c(), _("span", {
2213
2914
  class: "vf-tooltip",
2214
- onMouseenter: y,
2215
- onMouseleave: p,
2216
- onFocusin: y,
2217
- onFocusout: p
2915
+ onMouseenter: w,
2916
+ onMouseleave: B,
2917
+ onFocusin: w,
2918
+ onFocusout: B
2218
2919
  }, [
2219
- x("span", {
2920
+ V("span", {
2220
2921
  ref_key: "triggerRef",
2221
- ref: r,
2922
+ ref: i,
2222
2923
  class: "vf-tooltip__trigger",
2223
- "aria-describedby": e.value ? h(i) : void 0
2924
+ "aria-describedby": e.value ? y(l) : void 0
2224
2925
  }, [
2225
- C(s.$slots, "default")
2226
- ], 8, gn),
2227
- (c(), j(ue, {
2228
- to: d.value,
2229
- disabled: b.value
2926
+ O(s.$slots, "default")
2927
+ ], 8, Jn),
2928
+ (c(), q(he, {
2929
+ to: p.value,
2930
+ disabled: T.value
2230
2931
  }, [
2231
- q(oe, {
2932
+ H(ce, {
2232
2933
  name: "vf-floating-transition",
2233
2934
  appear: "",
2234
- duration: f
2935
+ duration: v
2235
2936
  }, {
2236
- default: U(() => [
2937
+ default: G(() => [
2237
2938
  e.value && (t.text || s.$slots.content) ? (c(), _("span", {
2238
2939
  key: 0,
2239
- id: h(i),
2940
+ id: y(l),
2240
2941
  ref_key: "contentRef",
2241
- ref: u,
2242
- class: R(D.value),
2243
- style: Y(h(V)),
2942
+ ref: r,
2943
+ class: P(L.value),
2944
+ style: U(y(h)),
2244
2945
  role: "tooltip"
2245
2946
  }, [
2246
- C(s.$slots, "content", {}, () => [
2247
- le(F(t.text), 1)
2947
+ O(s.$slots, "content", {}, () => [
2948
+ ve(F(t.text), 1)
2248
2949
  ]),
2249
- x("span", {
2950
+ V("span", {
2250
2951
  ref_key: "arrowRef",
2251
- ref: v,
2252
- class: R(k.value),
2253
- style: Y(m.value),
2952
+ ref: g,
2953
+ class: P(R.value),
2954
+ style: U(I.value),
2254
2955
  "aria-hidden": "true"
2255
2956
  }, null, 6)
2256
- ], 14, $n)) : O("", !0)
2957
+ ], 14, Zn)) : E("", !0)
2257
2958
  ]),
2258
2959
  _: 3
2259
2960
  })
@@ -2262,52 +2963,53 @@ const nt = {
2262
2963
  }
2263
2964
  });
2264
2965
  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
2966
+ ua as VfAccordion,
2967
+ ca as VfAlert,
2968
+ da as VfBadge,
2969
+ fa as VfBreadcrumbs,
2970
+ va as VfButton,
2971
+ ma as VfCard,
2972
+ pa as VfCheckbox,
2973
+ ba as VfDialog,
2974
+ _a as VfDivider,
2975
+ ha as VfDrawer,
2976
+ ya as VfDropdown,
2977
+ Se as VfIconButton,
2978
+ ga as VfInput,
2979
+ wa as VfLink,
2980
+ ka as VfMenuBar,
2981
+ $a as VfNavMenu,
2982
+ Ta as VfPanel,
2983
+ Va as VfPopover,
2984
+ Ca as VfRadio,
2985
+ xa as VfSelect,
2986
+ Rn as VfSwitch,
2987
+ Ba as VfTable,
2988
+ Ia as VfTableOfContents,
2989
+ Oa as VfTabs,
2990
+ Aa as VfTag,
2991
+ La as VfTextarea,
2992
+ ia as VfThemeProvider,
2993
+ Ea as VfThemeSwitch,
2994
+ Da as VfTooltip,
2995
+ sa as VueForgeCore,
2996
+ za as createThemePreset,
2997
+ Ye as createVueForgeCore,
2998
+ sa as default,
2999
+ Pa as defaultThemePreset,
3000
+ Fa as toMaxWidthQuery,
3001
+ Ha as toMinWidthQuery,
3002
+ Na as useBreakpoint,
3003
+ Ka as useBreakpointValue,
3004
+ ja as useBreakpoints,
3005
+ $e as useClickOutside,
3006
+ be as useDisclosure,
3007
+ _e as useEscapeKey,
3008
+ Te as useFloating,
3009
+ De as useFocusTrap,
3010
+ ee as useId,
3011
+ Ae as useScrollLock,
3012
+ ra as useTableOfContents,
3013
+ Ze as useTheme,
3014
+ qa as vfBreakpoints
2313
3015
  };