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