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