@codemonster-ru/vueforge-core 1.0.0 → 1.1.1

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 (36) hide show
  1. package/README.md +39 -1
  2. package/dist/breakpoints-hxAiWC8U.js +11 -0
  3. package/dist/components/dialog/VfDialog.vue.d.ts.map +1 -1
  4. package/dist/foundation/breakpoints.d.ts +13 -0
  5. package/dist/foundation/breakpoints.d.ts.map +1 -0
  6. package/dist/foundation/breakpoints.json.d.ts +11 -0
  7. package/dist/foundation/index.d.ts +10 -0
  8. package/dist/foundation/index.d.ts.map +1 -0
  9. package/dist/foundation/useBreakpoint.d.ts +7 -0
  10. package/dist/foundation/useBreakpoint.d.ts.map +1 -0
  11. package/dist/foundation/useBreakpointValue.d.ts +7 -0
  12. package/dist/foundation/useBreakpointValue.d.ts.map +1 -0
  13. package/dist/foundation/useBreakpoints.d.ts +4 -0
  14. package/dist/foundation/useBreakpoints.d.ts.map +1 -0
  15. package/dist/foundation/useScrollLock.d.ts +8 -0
  16. package/dist/foundation/useScrollLock.d.ts.map +1 -0
  17. package/dist/foundation-api.d.ts +2 -0
  18. package/dist/foundation-api.js +10 -0
  19. package/dist/foundation.css +2 -0
  20. package/dist/generated-breakpoints.css +9 -0
  21. package/dist/index.d.ts +3 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/public-D2viaiWv.js +202 -0
  24. package/dist/styles.css +1 -1
  25. package/dist/theme/default-preset.d.ts.map +1 -1
  26. package/dist/theme/public.d.ts +2 -0
  27. package/dist/theme/public.d.ts.map +1 -0
  28. package/dist/theme-api.d.ts +2 -0
  29. package/dist/theme-api.js +5 -0
  30. package/dist/theme.css +29 -0
  31. package/dist/tokens.css +97 -0
  32. package/dist/types/theme.d.ts +6 -0
  33. package/dist/types/theme.d.ts.map +1 -1
  34. package/dist/useScrollLock-B7pq1ybb.js +96 -0
  35. package/dist/vueforge-core.js +675 -852
  36. package/package.json +45 -3
@@ -1,345 +1,167 @@
1
- import { defineComponent as C, ref as x, inject as ge, computed as s, watch as W, onMounted as q, onBeforeUnmount as G, provide as Te, renderSlot as k, toValue as P, nextTick as Q, openBlock as m, createElementBlock as h, createElementVNode as S, unref as c, toDisplayString as R, normalizeClass as K, createVNode as ee, createCommentVNode as E, useAttrs as F, mergeProps as M, createTextVNode as he, useSlots as Se, createBlock as Y, Teleport as Z, normalizeStyle as j, Fragment as Ve, renderList as Ce, normalizeProps as Ee, guardReactiveProps as Oe } from "vue";
2
- import { VueIconify as te, icons as N } from "@codemonster-ru/vueiconify";
3
- import { autoUpdate as Be, computePosition as Ie, offset as oe, flip as ne, shift as ae, arrow as re } from "@codemonster-ru/floater.js";
4
- const ye = Symbol("VueForgeConfig"), De = {
5
- name: "vueforge-default",
6
- tokens: {
7
- colorBg: "#fcfcfd",
8
- colorSurface: "#ffffff",
9
- colorSurfaceMuted: "#f5f7fb",
10
- colorText: "#172033",
11
- colorMuted: "#69738a",
12
- colorBorder: "#d8e0ef",
13
- colorPrimary: "#0b63f6",
14
- colorPrimaryContrast: "#ffffff",
15
- colorPrimarySoft: "color-mix(in srgb, var(--vf-color-primary) 12%, var(--vf-color-surface))",
16
- colorPrimaryBorderSoft: "color-mix(in srgb, var(--vf-color-primary) 22%, var(--vf-color-border))",
17
- colorFocusRing: "color-mix(in srgb, var(--vf-color-primary) 52%, var(--vf-color-surface))",
18
- colorSuccess: "#16a34a",
19
- colorDanger: "#dc2626",
20
- colorSuccessSoft: "color-mix(in srgb, var(--vf-color-success) 12%, var(--vf-color-surface))",
21
- colorDangerSoft: "color-mix(in srgb, var(--vf-color-danger) 12%, var(--vf-color-surface))",
22
- colorSuccessBorderSoft: "color-mix(in srgb, var(--vf-color-success) 24%, var(--vf-color-border))",
23
- colorDangerBorderSoft: "color-mix(in srgb, var(--vf-color-danger) 24%, var(--vf-color-border))",
24
- radius: "0.75rem",
25
- radiusControl: "calc(var(--vf-radius) - 0.125rem)",
26
- radiusControlTight: "calc(var(--vf-radius) - 0.25rem)",
27
- radiusSurface: "var(--vf-radius)",
28
- radiusOverlay: "calc(var(--vf-radius) + 0.125rem)",
29
- controlHeightSm: "1.75rem",
30
- controlHeightMd: "2.25rem",
31
- controlHeightLg: "2.5rem",
32
- controlFontSizeSm: "0.875rem",
33
- controlFontSizeMd: "0.9375rem",
34
- controlFontSizeLg: "1rem",
35
- buttonPaddingSm: "0.25rem 0.55rem",
36
- buttonPaddingMd: "0.375rem 0.75rem",
37
- buttonPaddingLg: "0.5rem 0.875rem",
38
- buttonGap: "0.5rem",
39
- fieldPaddingSm: "0.25rem 0.55rem",
40
- fieldPaddingMd: "0.375rem 0.65rem",
41
- fieldPaddingLg: "0.5rem 0.75rem",
42
- textareaMinHeightSm: "4.5rem",
43
- textareaMinHeightMd: "6rem",
44
- textareaMinHeightLg: "7rem",
45
- overlayPadding: "0.875rem",
46
- overlayGap: "0.75rem",
47
- overlayViewportPadding: "1rem",
48
- menuPadding: "0.4rem",
49
- menuGap: "0.2rem",
50
- menuMinWidth: "12rem",
51
- surfacePadding: "0.95rem",
52
- surfaceGap: "0.625rem",
53
- surfacePaddingCompact: "0.7rem",
54
- surfaceGapCompact: "0.5rem",
55
- sectionPadding: "0.75rem 0.9rem",
56
- sectionGap: "0.75rem",
57
- tabsGap: "0.875rem",
58
- tabsListGap: "0.375rem",
59
- tabsListPadding: "0.25rem",
60
- tabsTabPaddingInline: "0.8rem",
61
- tabsPanelPaddingTop: "0.75rem",
62
- badgeHeight: "1.625rem",
63
- badgePadding: "0.2rem 0.55rem",
64
- badgeGap: "0.375rem",
65
- badgeRadius: "999px",
66
- badgeFontSize: "0.8125rem",
67
- badgeLineHeight: "1.2",
68
- tagHeight: "1.75rem",
69
- tagPadding: "0.25rem 0.6rem",
70
- tagFontSize: "0.8125rem",
71
- tagLineHeight: "1.2",
72
- tooltipPadding: "0.45rem 0.65rem",
73
- tooltipMaxWidth: "16rem",
74
- tooltipFontSize: "0.8125rem",
75
- tooltipLineHeight: "1.4",
76
- dialogWidthSm: "28rem",
77
- dialogWidthMd: "36rem",
78
- dialogWidthLg: "48rem",
79
- dialogMaxHeight: "min(85vh, 48rem)",
80
- dialogTitleFontSize: "1.125rem",
81
- dialogHeaderGap: "0.75rem",
82
- dialogActionsGap: "0.5rem",
83
- popoverWidth: "min(100vw - 2rem, 22rem)",
84
- floatingArrowSize: "0.625rem",
85
- overlayBackdrop: "rgba(15, 23, 42, 0.56)",
86
- overlayBackdropBlur: "6px",
87
- alertPrimarySoft: "color-mix(in srgb, var(--vf-color-primary) 8%, var(--vf-color-surface))",
88
- alertPrimaryBorderSoft: "color-mix(in srgb, var(--vf-color-primary) 22%, var(--vf-color-border))",
89
- alertContentGap: "0.25rem",
90
- alertTitleFontSize: "0.9375rem",
91
- cardTitleFontSize: "1rem",
92
- panelTitleFontSize: "0.9375rem",
93
- textLineHeight: "1.5",
94
- headingLineHeight: "1.3",
95
- tabsLineHeight: "1.2",
96
- spacing: "1rem",
97
- shadow: "none"
98
- },
99
- dark: {
100
- colorBg: "#0f172a",
101
- colorSurface: "#162033",
102
- colorSurfaceMuted: "#1b2840",
103
- colorText: "#eff4ff",
104
- colorMuted: "#9fb0cf",
105
- colorBorder: "#2d405f",
106
- colorPrimary: "#6ea8fe",
107
- colorPrimaryContrast: "#081120",
108
- colorPrimarySoft: "color-mix(in srgb, var(--vf-color-primary) 12%, var(--vf-color-surface))",
109
- colorPrimaryBorderSoft: "color-mix(in srgb, var(--vf-color-primary) 22%, var(--vf-color-border))",
110
- colorFocusRing: "color-mix(in srgb, var(--vf-color-primary) 52%, var(--vf-color-surface))",
111
- colorSuccess: "#4ade80",
112
- colorDanger: "#f87171",
113
- colorSuccessSoft: "color-mix(in srgb, var(--vf-color-success) 12%, var(--vf-color-surface))",
114
- colorDangerSoft: "color-mix(in srgb, var(--vf-color-danger) 12%, var(--vf-color-surface))",
115
- colorSuccessBorderSoft: "color-mix(in srgb, var(--vf-color-success) 24%, var(--vf-color-border))",
116
- colorDangerBorderSoft: "color-mix(in srgb, var(--vf-color-danger) 24%, var(--vf-color-border))",
117
- shadow: "none"
118
- }
119
- }, _e = "vf-theme", be = "data-vf-theme";
120
- function Pe(e) {
121
- return e === "light" || e === "dark" || e === "system";
122
- }
123
- function Ae(e, o) {
124
- return e === "system" ? o : e;
125
- }
126
- const $e = "vf", ze = "vf-theme-preset", Le = ":root";
127
- function Fe(e) {
128
- return e.replace(/[A-Z]/g, (o) => `-${o.toLowerCase()}`);
129
- }
130
- function ve(...e) {
131
- return Object.assign({}, ...e);
132
- }
133
- function Ft(e) {
134
- return e;
135
- }
136
- function Me(e = {}) {
137
- const o = e.prefix ?? $e, t = e.rootSelector ?? Le, a = e.attribute ?? be;
138
- return {
139
- prefix: o,
140
- rootSelector: t,
141
- darkModeSelector: e.darkModeSelector ?? `${t}[${a}='dark']`,
142
- attribute: a,
143
- storageKey: e.storageKey ?? _e,
144
- styleId: e.styleId ?? ze
145
- };
146
- }
147
- function He(e = {}) {
148
- const o = e.preset ?? De, t = e.extend, a = ve(o.tokens, t, e.light), n = ve(o.tokens, o.dark, t, e.dark);
149
- return {
150
- name: o.name,
151
- light: a,
152
- dark: n
153
- };
154
- }
155
- function Re(e = {}) {
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() {
156
10
  return {
157
- preset: He(e),
158
- options: Me(e.options)
159
- };
160
- }
161
- function pe(e, o = $e) {
162
- return Object.fromEntries(
163
- Object.entries(e).map(([t, a]) => [`--${o}-${Fe(t)}`, a])
164
- );
165
- }
166
- function me(e) {
167
- return Object.entries(e).map(([o, t]) => ` ${o}: ${t};`).join(`
168
- `);
169
- }
170
- function Ke(e) {
171
- const { preset: o, options: t } = e, a = me(pe(o.light, t.prefix)), n = me(pe(o.dark, t.prefix));
172
- return [
173
- `${t.rootSelector} {
174
- ${a}
175
- }`,
176
- `${t.darkModeSelector} {
177
- ${n}
178
- }`
179
- ].join(`
180
-
181
- `);
182
- }
183
- function Ge(e, o = document) {
184
- const t = e.options.styleId, a = o.getElementById(t) ?? Object.assign(o.createElement("style"), { id: t });
185
- return a.textContent = Ke(e), a.parentNode || o.head.appendChild(a), a;
186
- }
187
- function We() {
188
- return {
189
- install(o, t = {}) {
190
- const a = Re(t.theme);
191
- o.provide(ye, { theme: a }), typeof document < "u" && Ge(a);
11
+ install(t, e = {}) {
12
+ const s = be(e.theme);
13
+ t.provide(me, { theme: s }), typeof document < "u" && ge(s);
192
14
  }
193
15
  };
194
16
  }
195
- const Mt = We(), we = Symbol("VfThemeContext"), Ht = /* @__PURE__ */ C({
17
+ const It = Se(), _e = Symbol("VfThemeContext"), Et = /* @__PURE__ */ D({
196
18
  __name: "VfThemeProvider",
197
19
  props: {
198
20
  defaultTheme: { default: "system" },
199
21
  storageKey: {},
200
22
  attribute: {}
201
23
  },
202
- setup(e) {
203
- const o = e, t = x(o.defaultTheme), a = x("light"), n = x(null), r = ge(ye, null), u = s(() => Ae(t.value, a.value)), v = s(
204
- () => o.storageKey ?? (r == null ? void 0 : r.theme.options.storageKey) ?? _e
205
- ), g = s(
206
- () => o.attribute ?? (r == null ? void 0 : r.theme.options.attribute) ?? be
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
207
29
  );
208
- function w() {
30
+ function b() {
209
31
  if (typeof window > "u")
210
32
  return;
211
- const _ = window.localStorage.getItem(v.value);
212
- Pe(_) && (t.value = _);
33
+ const y = window.localStorage.getItem(f.value);
34
+ Ve(y) && (e.value = y);
213
35
  }
214
- function f(_) {
215
- typeof document > "u" || document.documentElement.setAttribute(g.value, _);
36
+ function u(y) {
37
+ typeof document > "u" || document.documentElement.setAttribute(_.value, y);
216
38
  }
217
- function $(_) {
218
- var I;
219
- if (_) {
220
- a.value = _.matches ? "dark" : "light";
39
+ function V(y) {
40
+ var B;
41
+ if (y) {
42
+ s.value = y.matches ? "dark" : "light";
221
43
  return;
222
44
  }
223
- a.value = (I = n.value) != null && I.matches ? "dark" : "light";
45
+ s.value = (B = n.value) != null && B.matches ? "dark" : "light";
224
46
  }
225
- function T(_) {
226
- t.value = _;
47
+ function k(y) {
48
+ e.value = y;
227
49
  }
228
- function V() {
229
- const _ = u.value === "dark" ? "light" : "dark";
230
- t.value = _;
50
+ function O() {
51
+ const y = d.value === "dark" ? "light" : "dark";
52
+ e.value = y;
231
53
  }
232
- return W(t, (_) => {
233
- typeof window > "u" || window.localStorage.setItem(v.value, _);
54
+ return W(e, (y) => {
55
+ typeof window > "u" || window.localStorage.setItem(f.value, y);
234
56
  }), W(
235
- u,
236
- (_) => {
237
- f(_);
57
+ d,
58
+ (y) => {
59
+ u(y);
238
60
  },
239
61
  { immediate: !0 }
240
- ), q(() => {
241
- w(), n.value = window.matchMedia("(prefers-color-scheme: dark)"), $(), n.value.addEventListener("change", $);
242
- }), G(() => {
243
- var _;
244
- (_ = n.value) == null || _.removeEventListener("change", $);
245
- }), Te(we, {
246
- mode: t,
247
- resolvedTheme: u,
248
- setTheme: T,
249
- toggleTheme: V
250
- }), (_, I) => k(_.$slots, "default");
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, {
68
+ mode: e,
69
+ resolvedTheme: d,
70
+ setTheme: k,
71
+ toggleTheme: O
72
+ }), (y, B) => $(y.$slots, "default");
251
73
  }
252
74
  });
253
- function ke(e, o, t = {}) {
254
- const a = t.event ?? "pointerdown", n = (r) => {
255
- if (P(t.enabled) === !1)
75
+ function he(o, t, e = {}) {
76
+ const s = e.event ?? "pointerdown", n = (l) => {
77
+ if (A(e.enabled) === !1)
256
78
  return;
257
- const u = r.target;
258
- if (!(u instanceof Node))
79
+ const d = l.target;
80
+ if (!(d instanceof Node))
259
81
  return;
260
- const v = Array.isArray(e) ? e.map((g) => g.value).filter((g) => g instanceof HTMLElement) : [e.value].filter((g) => g instanceof HTMLElement);
261
- v.length === 0 || v.some((g) => g.contains(u)) || o(r);
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);
262
84
  };
263
- q(() => {
264
- document.addEventListener(a, n);
265
- }), G(() => {
266
- document.removeEventListener(a, n);
85
+ Q(() => {
86
+ document.addEventListener(s, n);
87
+ }), N(() => {
88
+ document.removeEventListener(s, n);
267
89
  });
268
90
  }
269
- function J(e = {}) {
270
- const o = s(() => P(e.open) !== void 0), t = x(e.defaultOpen ?? !1), a = s(() => o.value ? !!P(e.open) : t.value);
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);
271
93
  W(
272
- () => P(e.open),
273
- (r) => {
274
- r !== void 0 && (t.value = r);
94
+ () => A(o.open),
95
+ (l) => {
96
+ l !== void 0 && (e.value = l);
275
97
  }
276
98
  );
277
- function n(r) {
278
- var u;
279
- o.value || (t.value = r), (u = e.onOpenChange) == null || u.call(e, r);
99
+ function n(l) {
100
+ var d;
101
+ t.value || (e.value = l), (d = o.onOpenChange) == null || d.call(o, l);
280
102
  }
281
103
  return {
282
- isOpen: a,
104
+ isOpen: s,
283
105
  open: () => n(!0),
284
106
  close: () => n(!1),
285
- toggle: () => n(!a.value),
107
+ toggle: () => n(!s.value),
286
108
  setOpen: n
287
109
  };
288
110
  }
289
- function le(e, o = {}) {
290
- const t = o.event ?? "keydown", a = (n) => {
291
- P(o.enabled) === !1 || n.key !== "Escape" || e(n);
111
+ function le(o, t = {}) {
112
+ const e = t.event ?? "keydown", s = (n) => {
113
+ A(t.enabled) === !1 || n.key !== "Escape" || o(n);
292
114
  };
293
- q(() => {
294
- document.addEventListener(t, a);
295
- }), G(() => {
296
- document.removeEventListener(t, a);
115
+ Q(() => {
116
+ document.addEventListener(e, s);
117
+ }), N(() => {
118
+ document.removeEventListener(e, s);
297
119
  });
298
120
  }
299
- function se(e, o, t = {}) {
300
- const a = x(0), n = x(0), r = x(P(t.placement) ?? "bottom"), u = x({}), v = x(null);
301
- let g = 0;
302
- const w = s(() => ({
303
- left: `${a.value}px`,
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`,
304
126
  top: `${n.value}px`
305
127
  }));
306
- async function f() {
307
- if (!e.value || !o.value)
128
+ async function u() {
129
+ if (!o.value || !t.value)
308
130
  return;
309
- const T = await Ie(e.value, o.value, {
310
- placement: P(t.placement) ?? r.value,
311
- middleware: P(t.middleware),
312
- strategy: P(t.strategy)
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)
313
135
  });
314
- a.value = T.x, n.value = T.y, r.value = T.placement, u.value = T.middlewareData ?? {};
136
+ s.value = k.x, n.value = k.y, l.value = k.placement, d.value = k.middlewareData ?? {};
315
137
  }
316
- function $() {
317
- var T;
318
- (T = v.value) == null || T.call(v), v.value = null;
138
+ function V() {
139
+ var k;
140
+ (k = f.value) == null || k.call(f), f.value = null;
319
141
  }
320
142
  return W(
321
- [() => P(t.enabled) !== !1, e, o],
322
- async ([T]) => {
323
- g += 1;
324
- const V = g;
325
- $(), !(!T || !e.value || !o.value) && (await Q(), !(V !== g || P(t.enabled) === !1 || !e.value || !o.value) && (await f(), !(V !== g || P(t.enabled) === !1 || !e.value || !o.value) && (v.value = Be(e.value, () => {
326
- f();
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();
327
149
  }))));
328
150
  },
329
151
  { immediate: !0 }
330
- ), G(() => {
331
- $();
152
+ ), N(() => {
153
+ V();
332
154
  }), {
333
- x: a,
155
+ x: s,
334
156
  y: n,
335
- placement: r,
336
- middlewareData: u,
337
- styles: w,
338
- update: f,
339
- cleanup: $
157
+ placement: l,
158
+ middlewareData: d,
159
+ styles: b,
160
+ update: u,
161
+ cleanup: V
340
162
  };
341
163
  }
342
- const je = [
164
+ const ze = [
343
165
  "a[href]",
344
166
  "button:not([disabled])",
345
167
  "input:not([disabled])",
@@ -347,53 +169,53 @@ const je = [
347
169
  "textarea:not([disabled])",
348
170
  '[tabindex]:not([tabindex="-1"])'
349
171
  ].join(", ");
350
- function Ue(e) {
351
- return Array.from(e.querySelectorAll(je)).filter(
352
- (o) => !o.hasAttribute("hidden") && o.getAttribute("aria-hidden") !== "true"
172
+ function Pe(o) {
173
+ return Array.from(o.querySelectorAll(ze)).filter(
174
+ (t) => !t.hasAttribute("hidden") && t.getAttribute("aria-hidden") !== "true"
353
175
  );
354
176
  }
355
- function Ne(e, o = {}) {
356
- const t = (a) => {
357
- if (a.key !== "Tab" || P(o.enabled) === !1)
177
+ function Fe(o, t = {}) {
178
+ const e = (s) => {
179
+ if (s.key !== "Tab" || A(t.enabled) === !1)
358
180
  return;
359
- const n = e.value;
181
+ const n = o.value;
360
182
  if (!n)
361
183
  return;
362
- const r = Ue(n);
363
- if (r.length === 0) {
364
- a.preventDefault(), n.focus();
184
+ const l = Pe(n);
185
+ if (l.length === 0) {
186
+ s.preventDefault(), n.focus();
365
187
  return;
366
188
  }
367
- const u = r[0], v = r[r.length - 1], g = document.activeElement;
368
- if (a.shiftKey) {
369
- (g === u || g === n) && (a.preventDefault(), v.focus());
189
+ const d = l[0], f = l[l.length - 1], _ = document.activeElement;
190
+ if (s.shiftKey) {
191
+ (_ === d || _ === n) && (s.preventDefault(), f.focus());
370
192
  return;
371
193
  }
372
- g === v && (a.preventDefault(), u.focus());
194
+ _ === f && (s.preventDefault(), d.focus());
373
195
  };
374
- q(() => {
375
- document.addEventListener("keydown", t);
376
- }), G(() => {
377
- document.removeEventListener("keydown", t);
196
+ Q(() => {
197
+ document.addEventListener("keydown", e);
198
+ }), N(() => {
199
+ document.removeEventListener("keydown", e);
378
200
  });
379
201
  }
380
- let Ye = 0;
381
- function H(e = {}) {
382
- const o = `${e.prefix ?? "vf"}-${++Ye}`;
383
- return s(() => P(e.providedId) ?? o);
202
+ let Ke = 0;
203
+ function K(o = {}) {
204
+ const t = `${o.prefix ?? "vf"}-${++Ke}`;
205
+ return r(() => A(o.providedId) ?? t);
384
206
  }
385
- function Rt() {
386
- const e = ge(we);
387
- if (!e)
207
+ function Bt() {
208
+ const o = pe(_e);
209
+ if (!o)
388
210
  throw new Error("useTheme must be used inside VfThemeProvider.");
389
211
  return {
390
- theme: e.mode,
391
- resolvedTheme: e.resolvedTheme,
392
- setTheme: e.setTheme,
393
- toggleTheme: e.toggleTheme
212
+ theme: o.mode,
213
+ resolvedTheme: o.resolvedTheme,
214
+ setTheme: o.setTheme,
215
+ toggleTheme: o.toggleTheme
394
216
  };
395
217
  }
396
- const Xe = { class: "vf-accordion" }, qe = ["id", "aria-controls", "aria-expanded", "disabled"], Qe = ["id", "aria-labelledby"], Kt = /* @__PURE__ */ C({
218
+ const Le = { class: "vf-accordion" }, Re = ["id", "aria-controls", "aria-expanded", "disabled"], Me = ["id", "aria-labelledby"], At = /* @__PURE__ */ D({
397
219
  __name: "VfAccordion",
398
220
  props: {
399
221
  open: { type: Boolean, default: void 0 },
@@ -402,113 +224,113 @@ const Xe = { class: "vf-accordion" }, qe = ["id", "aria-controls", "aria-expande
402
224
  disabled: { type: Boolean, default: !1 }
403
225
  },
404
226
  emits: ["update:open", "openChange"],
405
- setup(e, { emit: o }) {
406
- const t = e, a = o, n = H({ prefix: "vf-accordion-trigger" }), r = H({ prefix: "vf-accordion-content" }), u = J({
407
- defaultOpen: t.defaultOpen,
408
- open: s(() => t.open),
409
- onOpenChange: (f) => {
410
- a("update:open", f), a("openChange", f);
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({
229
+ defaultOpen: e.defaultOpen,
230
+ open: r(() => e.open),
231
+ onOpenChange: (u) => {
232
+ s("update:open", u), s("openChange", u);
411
233
  }
412
- }), v = u.isOpen;
413
- function g() {
414
- t.disabled || u.toggle();
234
+ }), f = d.isOpen;
235
+ function _() {
236
+ e.disabled || d.toggle();
415
237
  }
416
- function w(f) {
417
- (f.key === "Enter" || f.key === " ") && (f.preventDefault(), g());
238
+ function b(u) {
239
+ (u.key === "Enter" || u.key === " ") && (u.preventDefault(), _());
418
240
  }
419
- return (f, $) => (m(), h("section", Xe, [
420
- S("button", {
241
+ return (u, V) => (m(), h("section", Le, [
242
+ C("button", {
421
243
  id: c(n),
422
- "aria-controls": c(r),
423
- "aria-expanded": c(v),
424
- disabled: e.disabled,
244
+ "aria-controls": c(l),
245
+ "aria-expanded": c(f),
246
+ disabled: o.disabled,
425
247
  class: "vf-accordion__trigger",
426
248
  type: "button",
427
- onClick: g,
428
- onKeydown: w
249
+ onClick: _,
250
+ onKeydown: b
429
251
  }, [
430
- k(f.$slots, "trigger", { open: c(v) }, () => [
431
- S("span", null, R(e.title), 1)
252
+ $(u.$slots, "trigger", { open: c(f) }, () => [
253
+ C("span", null, R(o.title), 1)
432
254
  ]),
433
- S("span", {
255
+ C("span", {
434
256
  "aria-hidden": "true",
435
- class: K(["vf-accordion__icon", c(v) && "vf-accordion__icon--open"])
257
+ class: M(["vf-accordion__icon", c(f) && "vf-accordion__icon--open"])
436
258
  }, [
437
259
  ee(c(te), {
438
- icon: c(N).chevronDown,
260
+ icon: c(H).chevronDown,
439
261
  size: "0.875rem"
440
262
  }, null, 8, ["icon"])
441
263
  ], 2)
442
- ], 40, qe),
443
- c(v) ? (m(), h("div", {
264
+ ], 40, Re),
265
+ c(f) ? (m(), h("div", {
444
266
  key: 0,
445
- id: c(r),
267
+ id: c(l),
446
268
  "aria-labelledby": c(n),
447
269
  class: "vf-accordion__content",
448
270
  role: "region"
449
271
  }, [
450
- k(f.$slots, "default", { open: c(v) })
451
- ], 8, Qe)) : E("", !0)
272
+ $(u.$slots, "default", { open: c(f) })
273
+ ], 8, Me)) : I("", !0)
452
274
  ]));
453
275
  }
454
276
  });
455
- function A(...e) {
456
- return e.filter(Boolean).join(" ");
277
+ function S(...o) {
278
+ return o.filter(Boolean).join(" ");
457
279
  }
458
- const Ze = {
280
+ const Ne = {
459
281
  class: "vf-alert__icon",
460
282
  "aria-hidden": "true"
461
- }, Je = { class: "vf-alert__content" }, et = {
283
+ }, We = { class: "vf-alert__content" }, Ue = {
462
284
  key: 0,
463
285
  class: "vf-alert__title"
464
- }, tt = { class: "vf-alert__body" }, Gt = /* @__PURE__ */ C({
286
+ }, Ye = { class: "vf-alert__body" }, St = /* @__PURE__ */ D({
465
287
  inheritAttrs: !1,
466
288
  __name: "VfAlert",
467
289
  props: {
468
290
  tone: { default: "primary" },
469
291
  title: { default: void 0 }
470
292
  },
471
- setup(e) {
472
- const o = e, t = F(), a = s(
473
- () => A("vf-alert", o.tone !== "primary" && `vf-alert--${o.tone}`)
474
- ), n = s(() => o.tone === "success" ? N.checkCircle : o.tone === "danger" ? N.warning : N.info);
475
- return (r, u) => (m(), h("section", M({
476
- class: a.value,
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,
477
299
  role: "alert"
478
- }, c(t)), [
479
- S("div", Ze, [
300
+ }, c(e)), [
301
+ C("div", Ne, [
480
302
  ee(c(te), {
481
303
  icon: n.value,
482
304
  size: "2rem"
483
305
  }, null, 8, ["icon"])
484
306
  ]),
485
- S("div", Je, [
486
- o.title || r.$slots.title ? (m(), h("p", et, [
487
- k(r.$slots, "title", {}, () => [
488
- he(R(o.title), 1)
307
+ C("div", We, [
308
+ t.title || l.$slots.title ? (m(), h("p", Ue, [
309
+ $(l.$slots, "title", {}, () => [
310
+ ve(R(t.title), 1)
489
311
  ])
490
- ])) : E("", !0),
491
- S("div", tt, [
492
- k(r.$slots, "default")
312
+ ])) : I("", !0),
313
+ C("div", Ye, [
314
+ $(l.$slots, "default")
493
315
  ])
494
316
  ])
495
317
  ], 16));
496
318
  }
497
- }), Wt = /* @__PURE__ */ C({
319
+ }), zt = /* @__PURE__ */ D({
498
320
  inheritAttrs: !1,
499
321
  __name: "VfBadge",
500
322
  props: {
501
323
  tone: { default: "neutral" }
502
324
  },
503
- setup(e) {
504
- const o = e, t = F(), a = s(
505
- () => A("vf-badge", o.tone !== "neutral" && `vf-badge--${o.tone}`)
325
+ setup(o) {
326
+ const t = o, e = P(), s = r(
327
+ () => S("vf-badge", t.tone !== "neutral" && `vf-badge--${t.tone}`)
506
328
  );
507
- return (n, r) => (m(), h("span", M({ class: a.value }, c(t)), [
508
- k(n.$slots, "default")
329
+ return (n, l) => (m(), h("span", F({ class: s.value }, c(e)), [
330
+ $(n.$slots, "default")
509
331
  ], 16));
510
332
  }
511
- }), ot = ["type"], jt = /* @__PURE__ */ C({
333
+ }), He = ["type"], Pt = /* @__PURE__ */ D({
512
334
  inheritAttrs: !1,
513
335
  __name: "VfButton",
514
336
  props: {
@@ -517,49 +339,49 @@ const Ze = {
517
339
  block: { type: Boolean, default: !1 },
518
340
  type: { default: "button" }
519
341
  },
520
- setup(e) {
521
- const o = e, t = F(), a = s(
522
- () => A(
342
+ setup(o) {
343
+ const t = o, e = P(), s = r(
344
+ () => S(
523
345
  "vf-button",
524
- o.variant !== "primary" && `vf-button--${o.variant}`,
525
- o.size !== "md" && `vf-button--${o.size}`,
526
- o.block && "vf-button--block"
346
+ t.variant !== "primary" && `vf-button--${t.variant}`,
347
+ t.size !== "md" && `vf-button--${t.size}`,
348
+ t.block && "vf-button--block"
527
349
  )
528
350
  );
529
- return (n, r) => (m(), h("button", M({
530
- class: a.value,
531
- type: o.type
532
- }, c(t)), [
533
- k(n.$slots, "default")
534
- ], 16, ot));
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));
535
357
  }
536
- }), nt = { key: 0 }, at = { class: "vf-card__title" }, rt = {
358
+ }), Xe = { key: 0 }, qe = { class: "vf-card__title" }, je = {
537
359
  key: 1,
538
360
  class: "vf-card__body"
539
- }, lt = { key: 2 }, Ut = /* @__PURE__ */ C({
361
+ }, Qe = { key: 2 }, Ft = /* @__PURE__ */ D({
540
362
  inheritAttrs: !1,
541
363
  __name: "VfCard",
542
364
  props: {
543
365
  title: { default: void 0 },
544
366
  compact: { type: Boolean, default: !1 }
545
367
  },
546
- setup(e) {
547
- const o = e, t = F(), a = s(() => A("vf-card", o.compact && "vf-card--compact"));
548
- return (n, r) => (m(), h("section", M({ class: a.value }, c(t)), [
549
- o.title || n.$slots.header ? (m(), h("header", nt, [
550
- k(n.$slots, "header", {}, () => [
551
- S("h3", at, R(o.title), 1)
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)
552
374
  ])
553
- ])) : E("", !0),
554
- n.$slots.default ? (m(), h("div", rt, [
555
- k(n.$slots, "default")
556
- ])) : E("", !0),
557
- n.$slots.footer ? (m(), h("footer", lt, [
558
- k(n.$slots, "footer")
559
- ])) : E("", !0)
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)
560
382
  ], 16));
561
383
  }
562
- }), st = ["type"], it = /* @__PURE__ */ C({
384
+ }), Ge = ["type"], Je = /* @__PURE__ */ D({
563
385
  inheritAttrs: !1,
564
386
  __name: "VfIconButton",
565
387
  props: {
@@ -568,38 +390,38 @@ const Ze = {
568
390
  size: { default: "md" },
569
391
  type: { default: "button" }
570
392
  },
571
- setup(e) {
572
- const o = e, t = F(), a = s(
573
- () => A(
393
+ setup(o) {
394
+ const t = o, e = P(), s = r(
395
+ () => S(
574
396
  "vf-icon-button",
575
- o.variant !== "ghost" && `vf-icon-button--${o.variant}`,
576
- o.size !== "md" && `vf-icon-button--${o.size}`
397
+ t.variant !== "ghost" && `vf-icon-button--${t.variant}`,
398
+ t.size !== "md" && `vf-icon-button--${t.size}`
577
399
  )
578
- ), n = s(() => o.size === "sm" ? "0.875rem" : o.size === "lg" ? "1.125rem" : "1rem");
579
- return (r, u) => (m(), h("button", M({
580
- class: a.value,
581
- type: o.type
582
- }, c(t)), [
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)), [
583
405
  ee(c(te), {
584
- icon: o.icon,
406
+ icon: t.icon,
585
407
  size: n.value,
586
408
  "aria-hidden": "true"
587
409
  }, null, 8, ["icon", "size"])
588
- ], 16, st));
410
+ ], 16, Ge));
589
411
  }
590
- }), ct = {
412
+ }), Ze = {
591
413
  key: 0,
592
414
  class: "vf-dialog"
593
- }, ut = ["aria-describedby", "aria-labelledby"], dt = {
415
+ }, et = ["aria-describedby", "aria-labelledby"], tt = {
594
416
  key: 0,
595
417
  class: "vf-dialog__header"
596
- }, ft = ["id"], vt = ["id"], pt = { class: "vf-dialog__actions" }, mt = {
418
+ }, ot = ["id"], nt = ["id"], at = { class: "vf-dialog__actions" }, st = {
597
419
  key: 1,
598
420
  class: "vf-dialog__body"
599
- }, gt = {
421
+ }, lt = {
600
422
  key: 2,
601
423
  class: "vf-dialog__footer"
602
- }, Nt = /* @__PURE__ */ C({
424
+ }, Kt = /* @__PURE__ */ D({
603
425
  __name: "VfDialog",
604
426
  props: {
605
427
  open: { type: Boolean, default: void 0 },
@@ -612,138 +434,132 @@ const Ze = {
612
434
  closable: { type: Boolean, default: !0 }
613
435
  },
614
436
  emits: ["update:open", "openChange"],
615
- setup(e, { emit: o }) {
616
- const t = e, a = o, n = x(null), r = x(null), u = x(null), v = Se(), g = H({ prefix: "vf-dialog-title" }), w = H({ prefix: "vf-dialog-description" }), f = J({
617
- defaultOpen: t.defaultOpen,
618
- open: s(() => t.open),
619
- onOpenChange: (y) => {
620
- a("update:open", y), a("openChange", y);
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({
439
+ defaultOpen: e.defaultOpen,
440
+ open: r(() => e.open),
441
+ onOpenChange: (a) => {
442
+ s("update:open", a), s("openChange", a);
621
443
  }
622
- }), $ = f.isOpen, T = s(
623
- () => A("vf-dialog__content", t.size !== "md" && `vf-dialog__content--${t.size}`)
624
- ), V = s(() => !!v.header), _ = s(() => !!v.description), I = s(
625
- () => t.title || V.value ? g.value : void 0
626
- ), D = s(
627
- () => t.description || _.value ? w.value : void 0
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
628
450
  );
629
- function d() {
630
- f.close();
451
+ function x() {
452
+ b.close();
631
453
  }
632
- function O() {
633
- t.closeOnOverlayClick && d();
454
+ function p() {
455
+ e.closeOnOverlayClick && x();
634
456
  }
635
- function l() {
636
- const y = n.value;
637
- if (!y)
457
+ function E() {
458
+ const a = n.value;
459
+ if (!a)
638
460
  return;
639
- const z = y.querySelector("[autofocus], [data-autofocus]");
640
- if (z) {
641
- z.focus();
461
+ const T = a.querySelector("[autofocus], [data-autofocus]");
462
+ if (T) {
463
+ T.focus();
642
464
  return;
643
465
  }
644
- y.focus();
645
- }
646
- function B() {
647
- typeof document > "u" || (u.value === null && (u.value = document.body.style.overflow), document.body.style.overflow = "hidden");
648
- }
649
- function b() {
650
- typeof document > "u" || (document.body.style.overflow = u.value ?? "", u.value = null);
466
+ a.focus();
651
467
  }
652
468
  return le(
653
- (y) => {
654
- !t.closeOnEscape || !$.value || (y.preventDefault(), d());
469
+ (a) => {
470
+ !e.closeOnEscape || !u.value || (a.preventDefault(), x());
655
471
  },
656
472
  {
657
- enabled: $
473
+ enabled: u
658
474
  }
659
- ), Ne(n, {
660
- enabled: $
661
- }), W(
662
- $,
663
- async (y) => {
664
- var z;
475
+ ), Fe(n, {
476
+ enabled: u
477
+ }), Ee(u), W(
478
+ u,
479
+ async (a) => {
480
+ var T;
665
481
  if (!(typeof document > "u")) {
666
- if (y) {
667
- r.value = document.activeElement instanceof HTMLElement ? document.activeElement : null, B(), await Q(), l();
482
+ if (a) {
483
+ l.value = document.activeElement instanceof HTMLElement ? document.activeElement : null, await G(), E();
668
484
  return;
669
485
  }
670
- b(), (z = r.value) == null || z.focus();
486
+ (T = l.value) == null || T.focus();
671
487
  }
672
488
  },
673
489
  { immediate: !0 }
674
- ), G(() => {
675
- var y;
676
- $.value && (b(), (y = r.value) == null || y.focus());
677
- }), (y, z) => (m(), Y(Z, { to: "body" }, [
678
- c($) ? (m(), h("div", ct, [
679
- S("div", {
490
+ ), N(() => {
491
+ 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", {
680
496
  class: "vf-dialog__overlay",
681
497
  "aria-hidden": "true",
682
- onClick: O
498
+ onClick: p
683
499
  }),
684
- S("section", {
500
+ C("section", {
685
501
  ref_key: "contentRef",
686
502
  ref: n,
687
- class: K(T.value),
688
- "aria-describedby": D.value,
689
- "aria-labelledby": I.value,
503
+ class: M(V.value),
504
+ "aria-describedby": B.value,
505
+ "aria-labelledby": y.value,
690
506
  "aria-modal": "true",
691
507
  role: "dialog",
692
508
  tabindex: "-1"
693
509
  }, [
694
- e.title || e.description || y.$slots.header || y.$slots.description ? (m(), h("header", dt, [
695
- S("div", null, [
696
- k(y.$slots, "header", {}, () => [
697
- e.title ? (m(), h("h2", {
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", {
698
514
  key: 0,
699
- id: c(g),
515
+ id: c(f),
700
516
  class: "vf-dialog__title"
701
- }, R(e.title), 9, ft)) : E("", !0)
517
+ }, R(o.title), 9, ot)) : I("", !0)
702
518
  ]),
703
- k(y.$slots, "description", {}, () => [
704
- e.description ? (m(), h("p", {
519
+ $(a.$slots, "description", {}, () => [
520
+ o.description ? (m(), h("p", {
705
521
  key: 0,
706
- id: c(w),
522
+ id: c(_),
707
523
  class: "vf-dialog__description"
708
- }, R(e.description), 9, vt)) : E("", !0)
524
+ }, R(o.description), 9, nt)) : I("", !0)
709
525
  ])
710
526
  ]),
711
- S("div", pt, [
712
- k(y.$slots, "actions", { close: d }),
713
- t.closable ? (m(), Y(it, {
527
+ C("div", at, [
528
+ $(a.$slots, "actions", { close: x }),
529
+ e.closable ? (m(), X(Je, {
714
530
  key: 0,
715
- icon: c(N).xmark,
531
+ icon: c(H).xmark,
716
532
  "aria-label": "Close dialog",
717
533
  size: "sm",
718
- onClick: d
719
- }, null, 8, ["icon"])) : E("", !0)
534
+ onClick: x
535
+ }, null, 8, ["icon"])) : I("", !0)
720
536
  ])
721
- ])) : E("", !0),
722
- y.$slots.default ? (m(), h("div", mt, [
723
- k(y.$slots, "default", { close: d })
724
- ])) : E("", !0),
725
- y.$slots.footer ? (m(), h("footer", gt, [
726
- k(y.$slots, "footer", { close: d })
727
- ])) : E("", !0)
728
- ], 10, ut)
729
- ])) : E("", !0)
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)
730
546
  ]));
731
547
  }
732
- }), ht = ["aria-orientation", "role"], Yt = /* @__PURE__ */ C({
548
+ }), rt = ["aria-orientation", "role"], Lt = /* @__PURE__ */ D({
733
549
  inheritAttrs: !1,
734
550
  __name: "VfDivider",
735
551
  props: {
736
552
  orientation: { default: "horizontal" }
737
553
  },
738
- setup(e) {
739
- const o = e, t = F(), a = s(() => o.orientation === "vertical"), n = s(() => A("vf-divider", `vf-divider--${o.orientation}`));
740
- return (r, u) => (m(), h("div", M({
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({
741
557
  class: n.value,
742
- "aria-orientation": o.orientation,
743
- role: a.value ? "separator" : void 0
744
- }, c(t)), null, 16, ht));
558
+ "aria-orientation": t.orientation,
559
+ role: s.value ? "separator" : void 0
560
+ }, c(e)), null, 16, rt));
745
561
  }
746
- }), yt = { class: "vf-dropdown" }, _t = ["id", "aria-controls", "aria-expanded"], bt = ["id", "aria-labelledby"], Xt = /* @__PURE__ */ C({
562
+ }), it = { class: "vf-dropdown" }, ut = ["id", "aria-controls", "aria-expanded"], ct = ["id", "aria-labelledby"], Rt = /* @__PURE__ */ D({
747
563
  __name: "VfDropdown",
748
564
  props: {
749
565
  open: { type: Boolean, default: void 0 },
@@ -752,148 +568,148 @@ const Ze = {
752
568
  closeOnSelect: { type: Boolean, default: !0 }
753
569
  },
754
570
  emits: ["update:open", "openChange"],
755
- setup(e, { emit: o }) {
756
- const t = e, a = o, n = x(null), r = x(null), u = x(null), v = H({ prefix: "vf-dropdown-menu" }), g = H({ prefix: "vf-dropdown-trigger" }), w = J({
757
- defaultOpen: t.defaultOpen,
758
- open: s(() => t.open),
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({
573
+ defaultOpen: e.defaultOpen,
574
+ open: r(() => e.open),
759
575
  onOpenChange: (i) => {
760
- a("update:open", i), a("openChange", i);
576
+ s("update:open", i), s("openChange", i);
761
577
  }
762
- }), f = w.isOpen, $ = s(() => [
578
+ }), u = b.isOpen, V = r(() => [
763
579
  "vf-dropdown__menu",
764
- D.value.startsWith("top") && "vf-dropdown__menu--top"
765
- ]), T = s(() => {
766
- const i = d.value.arrow;
580
+ x.value.startsWith("top") && "vf-dropdown__menu--top"
581
+ ]), k = r(() => {
582
+ const i = p.value.arrow;
767
583
  return {
768
584
  x: (i == null ? void 0 : i.x) !== void 0 && (i == null ? void 0 : i.baseX) !== void 0 ? i.x - i.baseX : 0,
769
585
  y: (i == null ? void 0 : i.y) !== void 0 && (i == null ? void 0 : i.baseY) !== void 0 ? i.y - i.baseY : 0
770
586
  };
771
- }), V = s(() => ({
772
- left: `${T.value.x}px`,
773
- top: `${T.value.y}px`
774
- })), _ = s(() => [
587
+ }), O = r(() => ({
588
+ left: `${k.value.x}px`,
589
+ top: `${k.value.y}px`
590
+ })), y = r(() => [
775
591
  "vf-dropdown__arrow",
776
- D.value.startsWith("top") ? "vf-dropdown__arrow--top" : "vf-dropdown__arrow--bottom"
777
- ]), I = s(
778
- () => t.placement === "bottom-end" ? ["bottom-end", "top-end"] : ["bottom-start", "top-start"]
779
- ), { placement: D, middlewareData: d, styles: O } = se(n, r, {
780
- enabled: f,
781
- placement: s(() => t.placement),
782
- middleware: s(
783
- () => [oe(10), ne({ placements: I.value }), ae(), u.value ? re(u.value) : void 0].filter(
592
+ x.value.startsWith("top") ? "vf-dropdown__arrow--top" : "vf-dropdown__arrow--bottom"
593
+ ]), B = r(
594
+ () => 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(
784
600
  (i) => i !== void 0
785
601
  )
786
602
  ),
787
603
  strategy: "fixed"
788
604
  });
789
- function l() {
605
+ function a() {
790
606
  var i;
791
- return Array.from(((i = r.value) == null ? void 0 : i.querySelectorAll('[role="menuitem"]')) ?? []);
607
+ return Array.from(((i = l.value) == null ? void 0 : i.querySelectorAll('[role="menuitem"]')) ?? []);
792
608
  }
793
- async function B() {
609
+ async function T() {
794
610
  var i;
795
- await Q(), (i = l()[0]) == null || i.focus();
611
+ await G(), (i = a()[0]) == null || i.focus();
796
612
  }
797
- function b(i = {}) {
798
- w.open(), i.focusFirstItem && B();
613
+ function g(i = {}) {
614
+ b.open(), i.focusFirstItem && T();
799
615
  }
800
- function y() {
616
+ function L() {
801
617
  var i;
802
- w.close(), (i = n.value) == null || i.focus();
618
+ b.close(), (i = n.value) == null || i.focus();
803
619
  }
804
- function z() {
805
- if (f.value) {
806
- y();
620
+ function q() {
621
+ if (u.value) {
622
+ L();
807
623
  return;
808
624
  }
809
- b();
625
+ g();
810
626
  }
811
- function p(i) {
812
- (i.key === "ArrowDown" || i.key === "Enter" || i.key === " ") && (i.preventDefault(), b({ focusFirstItem: !0 }));
627
+ function v(i) {
628
+ (i.key === "ArrowDown" || i.key === "Enter" || i.key === " ") && (i.preventDefault(), g({ focusFirstItem: !0 }));
813
629
  }
814
- function U(i) {
815
- var ce, ue, de, fe;
816
- const L = l(), ie = L.findIndex((xe) => xe === document.activeElement);
630
+ function Y(i) {
631
+ var ue, ce, de, fe;
632
+ const z = a(), ie = z.findIndex((ye) => ye === document.activeElement);
817
633
  if (i.key === "ArrowDown") {
818
- i.preventDefault(), (ce = L[(ie + 1 + L.length) % L.length]) == null || ce.focus();
634
+ i.preventDefault(), (ue = z[(ie + 1 + z.length) % z.length]) == null || ue.focus();
819
635
  return;
820
636
  }
821
637
  if (i.key === "ArrowUp") {
822
- i.preventDefault(), (ue = L[(ie - 1 + L.length) % L.length]) == null || ue.focus();
638
+ i.preventDefault(), (ce = z[(ie - 1 + z.length) % z.length]) == null || ce.focus();
823
639
  return;
824
640
  }
825
641
  if (i.key === "Home") {
826
- i.preventDefault(), (de = L[0]) == null || de.focus();
642
+ i.preventDefault(), (de = z[0]) == null || de.focus();
827
643
  return;
828
644
  }
829
- i.key === "End" && (i.preventDefault(), (fe = L[L.length - 1]) == null || fe.focus());
645
+ i.key === "End" && (i.preventDefault(), (fe = z[z.length - 1]) == null || fe.focus());
830
646
  }
831
- function X() {
832
- t.closeOnSelect && y();
647
+ function j() {
648
+ e.closeOnSelect && L();
833
649
  }
834
- return ke(
835
- [n, r],
650
+ return he(
651
+ [n, l],
836
652
  () => {
837
- f.value && y();
653
+ u.value && L();
838
654
  },
839
655
  {
840
- enabled: f,
656
+ enabled: u,
841
657
  event: "click"
842
658
  }
843
659
  ), le(
844
660
  (i) => {
845
- f.value && (i.preventDefault(), y());
661
+ u.value && (i.preventDefault(), L());
846
662
  },
847
663
  {
848
- enabled: f
664
+ enabled: u
849
665
  }
850
- ), (i, L) => (m(), h("div", yt, [
851
- S("div", {
852
- id: c(g),
666
+ ), (i, z) => (m(), h("div", it, [
667
+ C("div", {
668
+ id: c(_),
853
669
  ref_key: "triggerRef",
854
670
  ref: n,
855
671
  class: "vf-dropdown__trigger",
856
- "aria-controls": c(v),
857
- "aria-expanded": c(f),
672
+ "aria-controls": c(f),
673
+ "aria-expanded": c(u),
858
674
  "aria-haspopup": "menu",
859
675
  tabindex: "0",
860
- onClick: z,
861
- onKeydown: p
676
+ onClick: q,
677
+ onKeydown: v
862
678
  }, [
863
- k(i.$slots, "trigger", {
864
- open: c(f),
865
- toggle: z
679
+ $(i.$slots, "trigger", {
680
+ open: c(u),
681
+ toggle: q
866
682
  })
867
- ], 40, _t),
868
- (m(), Y(Z, { to: "body" }, [
869
- c(f) ? (m(), h("div", {
683
+ ], 40, ut),
684
+ (m(), X(J, { to: "body" }, [
685
+ c(u) ? (m(), h("div", {
870
686
  key: 0,
871
- id: c(v),
687
+ id: c(f),
872
688
  ref_key: "menuRef",
873
- ref: r,
874
- class: K($.value),
875
- style: j(c(O)),
876
- "aria-labelledby": c(g),
689
+ ref: l,
690
+ class: M(V.value),
691
+ style: U(c(E)),
692
+ "aria-labelledby": c(_),
877
693
  role: "menu",
878
- onClick: X,
879
- onKeydown: U
694
+ onClick: j,
695
+ onKeydown: Y
880
696
  }, [
881
- S("span", {
697
+ C("span", {
882
698
  ref_key: "arrowRef",
883
- ref: u,
884
- class: K(_.value),
885
- style: j(V.value),
699
+ ref: d,
700
+ class: M(y.value),
701
+ style: U(O.value),
886
702
  "aria-hidden": "true"
887
703
  }, null, 6),
888
- k(i.$slots, "default", {
889
- close: y,
890
- open: c(f)
704
+ $(i.$slots, "default", {
705
+ close: L,
706
+ open: c(u)
891
707
  })
892
- ], 46, bt)) : E("", !0)
708
+ ], 46, ct)) : I("", !0)
893
709
  ]))
894
710
  ]));
895
711
  }
896
- }), $t = ["value", "aria-invalid"], qt = /* @__PURE__ */ C({
712
+ }), dt = ["value", "aria-invalid"], Mt = /* @__PURE__ */ D({
897
713
  inheritAttrs: !1,
898
714
  __name: "VfInput",
899
715
  props: {
@@ -902,24 +718,24 @@ const Ze = {
902
718
  invalid: { type: Boolean, default: !1 }
903
719
  },
904
720
  emits: ["update:modelValue"],
905
- setup(e, { emit: o }) {
906
- const t = e, a = o, n = F(), r = s(
907
- () => A(
721
+ setup(o, { emit: t }) {
722
+ const e = o, s = t, n = P(), l = r(
723
+ () => S(
908
724
  "vf-input",
909
- t.size !== "md" && `vf-input--${t.size}`,
910
- t.invalid && "vf-input--invalid"
725
+ e.size !== "md" && `vf-input--${e.size}`,
726
+ e.invalid && "vf-input--invalid"
911
727
  )
912
728
  );
913
- function u(v) {
914
- a("update:modelValue", v.target.value);
729
+ function d(f) {
730
+ s("update:modelValue", f.target.value);
915
731
  }
916
- return (v, g) => (m(), h("input", M({
917
- class: r.value,
918
- value: t.modelValue,
919
- "aria-invalid": t.invalid || void 0
920
- }, c(n), { onInput: u }), null, 16, $t));
732
+ return (f, _) => (m(), h("input", F({
733
+ class: l.value,
734
+ value: e.modelValue,
735
+ "aria-invalid": e.invalid || void 0
736
+ }, c(n), { onInput: d }), null, 16, dt));
921
737
  }
922
- }), wt = ["href", "target", "rel"], Qt = /* @__PURE__ */ C({
738
+ }), ft = ["href", "target", "rel"], Nt = /* @__PURE__ */ D({
923
739
  inheritAttrs: !1,
924
740
  __name: "VfLink",
925
741
  props: {
@@ -929,42 +745,42 @@ const Ze = {
929
745
  underline: { type: Boolean, default: !1 },
930
746
  tone: { default: "default" }
931
747
  },
932
- setup(e) {
933
- const o = e, t = F(), a = s(() => o.rel ? o.rel : o.target === "_blank" ? "noopener noreferrer" : void 0), n = s(
934
- () => A(
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(
935
751
  "vf-link",
936
- o.underline && "vf-link--underline",
937
- o.tone === "muted" && "vf-link--muted"
752
+ t.underline && "vf-link--underline",
753
+ t.tone === "muted" && "vf-link--muted"
938
754
  )
939
755
  );
940
- return (r, u) => (m(), h("a", M({
756
+ return (l, d) => (m(), h("a", F({
941
757
  class: n.value,
942
- href: o.href,
943
- target: o.target,
944
- rel: a.value
945
- }, c(t)), [
946
- k(r.$slots, "default")
947
- ], 16, wt));
758
+ href: t.href,
759
+ target: t.target,
760
+ rel: s.value
761
+ }, c(e)), [
762
+ $(l.$slots, "default")
763
+ ], 16, ft));
948
764
  }
949
- }), kt = { key: 0 }, xt = { class: "vf-panel__title" }, Zt = /* @__PURE__ */ C({
765
+ }), pt = { key: 0 }, vt = { class: "vf-panel__title" }, Wt = /* @__PURE__ */ D({
950
766
  inheritAttrs: !1,
951
767
  __name: "VfPanel",
952
768
  props: {
953
769
  title: { default: void 0 },
954
770
  subtle: { type: Boolean, default: !1 }
955
771
  },
956
- setup(e) {
957
- const o = e, t = F(), a = s(() => A("vf-panel", o.subtle && "vf-panel--subtle"));
958
- return (n, r) => (m(), h("section", M({ class: a.value }, c(t)), [
959
- o.title || n.$slots.header ? (m(), h("header", kt, [
960
- k(n.$slots, "header", {}, () => [
961
- S("h3", xt, R(o.title), 1)
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)
962
778
  ])
963
- ])) : E("", !0),
964
- k(n.$slots, "default")
779
+ ])) : I("", !0),
780
+ $(n.$slots, "default")
965
781
  ], 16));
966
782
  }
967
- }), Tt = { class: "vf-popover" }, St = ["id", "aria-controls", "aria-expanded"], Vt = ["id", "aria-labelledby"], Jt = /* @__PURE__ */ C({
783
+ }), mt = { class: "vf-popover" }, _t = ["id", "aria-controls", "aria-expanded"], ht = ["id", "aria-labelledby"], Ut = /* @__PURE__ */ D({
968
784
  __name: "VfPopover",
969
785
  props: {
970
786
  open: { type: Boolean, default: void 0 },
@@ -974,147 +790,147 @@ const Ze = {
974
790
  closeOnEscape: { type: Boolean, default: !0 }
975
791
  },
976
792
  emits: ["update:open", "openChange"],
977
- setup(e, { emit: o }) {
978
- const t = e, a = o, n = x(null), r = x(null), u = x(null), v = H({ prefix: "vf-popover-content" }), g = H({ prefix: "vf-popover-trigger" }), w = J({
979
- defaultOpen: t.defaultOpen,
980
- open: s(() => t.open),
981
- onOpenChange: (p) => {
982
- a("update:open", p), a("openChange", p);
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({
795
+ defaultOpen: e.defaultOpen,
796
+ open: r(() => e.open),
797
+ onOpenChange: (v) => {
798
+ s("update:open", v), s("openChange", v);
983
799
  }
984
- }), f = w.isOpen, $ = s(
985
- () => t.placement === "bottom-end" ? ["bottom-end", "top-end"] : ["bottom-start", "top-start"]
986
- ), { placement: T, middlewareData: V, styles: _ } = se(n, r, {
987
- enabled: f,
988
- placement: s(() => t.placement),
989
- middleware: s(
990
- () => [oe(10), ne({ placements: $.value }), ae(), u.value ? re(u.value) : void 0].filter(
991
- (p) => p !== void 0
800
+ }), u = b.isOpen, V = r(
801
+ () => 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
992
808
  )
993
809
  ),
994
810
  strategy: "fixed"
995
- }), I = s(() => [
811
+ }), B = r(() => [
996
812
  "vf-popover__content",
997
- T.value.startsWith("top") && "vf-popover__content--top"
998
- ]), D = s(() => {
999
- const p = V.value.arrow;
813
+ k.value.startsWith("top") && "vf-popover__content--top"
814
+ ]), x = r(() => {
815
+ const v = O.value.arrow;
1000
816
  return {
1001
- x: (p == null ? void 0 : p.x) !== void 0 && (p == null ? void 0 : p.baseX) !== void 0 ? p.x - p.baseX : 0,
1002
- y: (p == null ? void 0 : p.y) !== void 0 && (p == null ? void 0 : p.baseY) !== void 0 ? p.y - p.baseY : 0
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
1003
819
  };
1004
- }), d = s(() => ({
1005
- left: `${D.value.x}px`,
1006
- top: `${D.value.y}px`
1007
- })), O = s(() => [
820
+ }), p = r(() => ({
821
+ left: `${x.value.x}px`,
822
+ top: `${x.value.y}px`
823
+ })), E = r(() => [
1008
824
  "vf-popover__arrow",
1009
- T.value.startsWith("top") ? "vf-popover__arrow--top" : "vf-popover__arrow--bottom"
825
+ k.value.startsWith("top") ? "vf-popover__arrow--top" : "vf-popover__arrow--bottom"
1010
826
  ]);
1011
- async function l() {
1012
- var U, X;
1013
- await Q();
1014
- const p = (U = r.value) == null ? void 0 : U.querySelector("[autofocus], [data-autofocus]");
1015
- if (p) {
1016
- p.focus();
827
+ 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();
1017
833
  return;
1018
834
  }
1019
- (X = r.value) == null || X.focus();
835
+ (j = l.value) == null || j.focus();
1020
836
  }
1021
- function B() {
1022
- w.open(), l();
837
+ function T() {
838
+ b.open(), a();
1023
839
  }
1024
- function b() {
1025
- var p;
1026
- w.close(), (p = n.value) == null || p.focus();
840
+ function g() {
841
+ var v;
842
+ b.close(), (v = n.value) == null || v.focus();
1027
843
  }
1028
- function y() {
1029
- if (f.value) {
1030
- b();
844
+ function L() {
845
+ if (u.value) {
846
+ g();
1031
847
  return;
1032
848
  }
1033
- B();
849
+ T();
1034
850
  }
1035
- function z(p) {
1036
- (p.key === "Enter" || p.key === " ") && (p.preventDefault(), y()), p.key === "ArrowDown" && (p.preventDefault(), B());
851
+ function q(v) {
852
+ (v.key === "Enter" || v.key === " ") && (v.preventDefault(), L()), v.key === "ArrowDown" && (v.preventDefault(), T());
1037
853
  }
1038
- return ke(
1039
- [n, r],
854
+ return he(
855
+ [n, l],
1040
856
  () => {
1041
- f.value && t.closeOnOutsideClick && b();
857
+ u.value && e.closeOnOutsideClick && g();
1042
858
  },
1043
859
  {
1044
- enabled: f,
860
+ enabled: u,
1045
861
  event: "click"
1046
862
  }
1047
863
  ), le(
1048
- (p) => {
1049
- !f.value || !t.closeOnEscape || (p.preventDefault(), b());
864
+ (v) => {
865
+ !u.value || !e.closeOnEscape || (v.preventDefault(), g());
1050
866
  },
1051
867
  {
1052
- enabled: f
868
+ enabled: u
1053
869
  }
1054
- ), (p, U) => (m(), h("div", Tt, [
1055
- S("div", {
1056
- id: c(g),
870
+ ), (v, Y) => (m(), h("div", mt, [
871
+ C("div", {
872
+ id: c(_),
1057
873
  ref_key: "triggerRef",
1058
874
  ref: n,
1059
875
  class: "vf-popover__trigger",
1060
- "aria-controls": c(v),
1061
- "aria-expanded": c(f),
876
+ "aria-controls": c(f),
877
+ "aria-expanded": c(u),
1062
878
  "aria-haspopup": "dialog",
1063
879
  tabindex: "0",
1064
- onClick: y,
1065
- onKeydown: z
880
+ onClick: L,
881
+ onKeydown: q
1066
882
  }, [
1067
- k(p.$slots, "trigger", {
1068
- open: c(f),
1069
- toggle: y
883
+ $(v.$slots, "trigger", {
884
+ open: c(u),
885
+ toggle: L
1070
886
  })
1071
- ], 40, St),
1072
- (m(), Y(Z, { to: "body" }, [
1073
- c(f) ? (m(), h("section", {
887
+ ], 40, _t),
888
+ (m(), X(J, { to: "body" }, [
889
+ c(u) ? (m(), h("section", {
1074
890
  key: 0,
1075
- id: c(v),
891
+ id: c(f),
1076
892
  ref_key: "contentRef",
1077
- ref: r,
1078
- class: K(I.value),
1079
- style: j(c(_)),
1080
- "aria-labelledby": c(g),
893
+ ref: l,
894
+ class: M(B.value),
895
+ style: U(c(y)),
896
+ "aria-labelledby": c(_),
1081
897
  role: "dialog",
1082
898
  tabindex: "-1"
1083
899
  }, [
1084
- S("span", {
900
+ C("span", {
1085
901
  ref_key: "arrowRef",
1086
- ref: u,
1087
- class: K(O.value),
1088
- style: j(d.value),
902
+ ref: d,
903
+ class: M(E.value),
904
+ style: U(p.value),
1089
905
  "aria-hidden": "true"
1090
906
  }, null, 6),
1091
- k(p.$slots, "default", {
1092
- open: c(f),
1093
- close: b
907
+ $(v.$slots, "default", {
908
+ open: c(u),
909
+ close: g
1094
910
  })
1095
- ], 14, Vt)) : E("", !0)
911
+ ], 14, ht)) : I("", !0)
1096
912
  ]))
1097
913
  ]));
1098
914
  }
1099
- }), eo = /* @__PURE__ */ C({
915
+ }), Yt = /* @__PURE__ */ D({
1100
916
  inheritAttrs: !1,
1101
917
  __name: "VfTag",
1102
918
  props: {
1103
919
  tone: { default: "neutral" }
1104
920
  },
1105
- setup(e) {
1106
- const o = e, t = F(), a = s(
1107
- () => A("vf-tag", o.tone !== "neutral" && `vf-tag--${o.tone}`)
921
+ setup(o) {
922
+ const t = o, e = P(), s = r(
923
+ () => S("vf-tag", t.tone !== "neutral" && `vf-tag--${t.tone}`)
1108
924
  );
1109
- return (n, r) => (m(), h("span", M({ class: a.value }, c(t)), [
1110
- k(n.$slots, "default")
925
+ return (n, l) => (m(), h("span", F({ class: s.value }, c(e)), [
926
+ $(n.$slots, "default")
1111
927
  ], 16));
1112
928
  }
1113
- }), Ct = { class: "vf-tabs" }, Et = {
929
+ }), yt = { class: "vf-tabs" }, bt = {
1114
930
  class: "vf-tabs__list",
1115
931
  role: "tablist",
1116
932
  "aria-orientation": "horizontal"
1117
- }, Ot = ["id", "aria-controls", "aria-selected", "disabled", "tabindex", "onClick", "onKeydown"], Bt = ["id", "aria-labelledby"], to = /* @__PURE__ */ C({
933
+ }, gt = ["id", "aria-controls", "aria-selected", "disabled", "tabindex", "onClick", "onKeydown"], $t = ["id", "aria-labelledby"], Ht = /* @__PURE__ */ D({
1118
934
  __name: "VfTabs",
1119
935
  props: {
1120
936
  items: {},
@@ -1122,99 +938,99 @@ const Ze = {
1122
938
  defaultValue: { default: void 0 }
1123
939
  },
1124
940
  emits: ["update:modelValue", "change"],
1125
- setup(e, { emit: o }) {
1126
- const t = e, a = o, n = H({ prefix: "vf-tabs" }), r = x([]), u = s(() => {
1127
- var d;
1128
- return (d = t.items.find((O) => !O.disabled)) == null ? void 0 : d.value;
1129
- }), v = x(t.defaultValue ?? u.value), g = s(() => t.modelValue !== void 0), w = s(() => t.modelValue ?? v.value ?? u.value);
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);
1130
946
  W(
1131
- () => t.items,
1132
- (d) => {
1133
- !d.some((l) => l.value === w.value && !l.disabled) && u.value && f(u.value);
947
+ () => e.items,
948
+ (p) => {
949
+ !p.some((a) => a.value === b.value && !a.disabled) && d.value && u(d.value);
1134
950
  },
1135
951
  { deep: !0 }
1136
952
  );
1137
- function f(d) {
1138
- g.value || (v.value = d), a("update:modelValue", d), a("change", d);
953
+ function u(p) {
954
+ _.value || (f.value = p), s("update:modelValue", p), s("change", p);
1139
955
  }
1140
- function $(d) {
1141
- d.disabled || f(d.value);
956
+ function V(p) {
957
+ p.disabled || u(p.value);
1142
958
  }
1143
- function T() {
1144
- return t.items.filter((d) => !d.disabled);
959
+ function k() {
960
+ return e.items.filter((p) => !p.disabled);
1145
961
  }
1146
- function V(d) {
1147
- var l;
1148
- const O = t.items.findIndex((B) => B.value === d);
1149
- (l = r.value[O]) == null || l.focus();
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();
1150
966
  }
1151
- function _(d, O) {
1152
- const l = T(), B = l.findIndex((b) => b.value === O.value);
1153
- if (B !== -1) {
1154
- if (d.key === "ArrowRight" || d.key === "ArrowDown") {
1155
- d.preventDefault();
1156
- const b = l[(B + 1) % l.length];
1157
- $(b), V(b.value);
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);
1158
974
  return;
1159
975
  }
1160
- if (d.key === "ArrowLeft" || d.key === "ArrowUp") {
1161
- d.preventDefault();
1162
- const b = l[(B - 1 + l.length) % l.length];
1163
- $(b), V(b.value);
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);
1164
980
  return;
1165
981
  }
1166
- if (d.key === "Home") {
1167
- d.preventDefault();
1168
- const b = l[0];
1169
- $(b), V(b.value);
982
+ if (p.key === "Home") {
983
+ p.preventDefault();
984
+ const g = a[0];
985
+ V(g), O(g.value);
1170
986
  return;
1171
987
  }
1172
- if (d.key === "End") {
1173
- d.preventDefault();
1174
- const b = l[l.length - 1];
1175
- $(b), V(b.value);
988
+ if (p.key === "End") {
989
+ p.preventDefault();
990
+ const g = a[a.length - 1];
991
+ V(g), O(g.value);
1176
992
  }
1177
993
  }
1178
994
  }
1179
- function I(d) {
1180
- return `${n.value}-tab-${d}`;
995
+ function B(p) {
996
+ return `${n.value}-tab-${p}`;
1181
997
  }
1182
- function D(d) {
1183
- return `${n.value}-panel-${d}`;
998
+ function x(p) {
999
+ return `${n.value}-panel-${p}`;
1184
1000
  }
1185
- return (d, O) => (m(), h("div", Ct, [
1186
- S("div", Et, [
1187
- (m(!0), h(Ve, null, Ce(e.items, (l, B) => (m(), h("button", {
1188
- id: I(l.value),
1189
- key: l.value,
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,
1190
1006
  ref_for: !0,
1191
- ref: (b) => {
1192
- r.value[B] = b;
1007
+ ref: (g) => {
1008
+ l.value[T] = g;
1193
1009
  },
1194
- "aria-controls": D(l.value),
1195
- "aria-selected": w.value === l.value,
1196
- disabled: l.disabled,
1197
- tabindex: w.value === l.value ? 0 : -1,
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,
1198
1014
  class: "vf-tabs__tab",
1199
1015
  role: "tab",
1200
1016
  type: "button",
1201
- onClick: (b) => $(l),
1202
- onKeydown: (b) => _(b, l)
1203
- }, R(l.label), 41, Ot))), 128))
1017
+ onClick: (g) => V(a),
1018
+ onKeydown: (g) => y(g, a)
1019
+ }, R(a.label), 41, gt))), 128))
1204
1020
  ]),
1205
- w.value ? (m(), h("div", {
1021
+ b.value ? (m(), h("div", {
1206
1022
  key: 0,
1207
- id: D(w.value),
1208
- "aria-labelledby": I(w.value),
1023
+ id: x(b.value),
1024
+ "aria-labelledby": B(b.value),
1209
1025
  class: "vf-tabs__panel",
1210
1026
  role: "tabpanel",
1211
1027
  tabindex: "0"
1212
1028
  }, [
1213
- k(d.$slots, "panel", Ee(Oe({ activeValue: w.value })))
1214
- ], 8, Bt)) : E("", !0)
1029
+ $(p.$slots, "panel", De(Ie({ activeValue: b.value })))
1030
+ ], 8, $t)) : I("", !0)
1215
1031
  ]));
1216
1032
  }
1217
- }), It = ["value", "aria-invalid"], oo = /* @__PURE__ */ C({
1033
+ }), wt = ["value", "aria-invalid"], Xt = /* @__PURE__ */ D({
1218
1034
  inheritAttrs: !1,
1219
1035
  __name: "VfTextarea",
1220
1036
  props: {
@@ -1223,142 +1039,149 @@ const Ze = {
1223
1039
  invalid: { type: Boolean, default: !1 }
1224
1040
  },
1225
1041
  emits: ["update:modelValue"],
1226
- setup(e, { emit: o }) {
1227
- const t = e, a = o, n = F(), r = s(
1228
- () => A(
1042
+ setup(o, { emit: t }) {
1043
+ const e = o, s = t, n = P(), l = r(
1044
+ () => S(
1229
1045
  "vf-textarea",
1230
- t.size !== "md" && `vf-textarea--${t.size}`,
1231
- t.invalid && "vf-textarea--invalid"
1046
+ e.size !== "md" && `vf-textarea--${e.size}`,
1047
+ e.invalid && "vf-textarea--invalid"
1232
1048
  )
1233
1049
  );
1234
- function u(v) {
1235
- a("update:modelValue", v.target.value);
1050
+ function d(f) {
1051
+ s("update:modelValue", f.target.value);
1236
1052
  }
1237
- return (v, g) => (m(), h("textarea", M({
1238
- class: r.value,
1239
- value: t.modelValue,
1240
- "aria-invalid": t.invalid || void 0
1241
- }, c(n), { onInput: u }), null, 16, It));
1053
+ return (f, _) => (m(), h("textarea", F({
1054
+ class: l.value,
1055
+ value: e.modelValue,
1056
+ "aria-invalid": e.invalid || void 0
1057
+ }, c(n), { onInput: d }), null, 16, wt));
1242
1058
  }
1243
- }), Dt = ["aria-describedby"], Pt = ["id"], no = /* @__PURE__ */ C({
1059
+ }), kt = ["aria-describedby"], Vt = ["id"], qt = /* @__PURE__ */ D({
1244
1060
  __name: "VfTooltip",
1245
1061
  props: {
1246
1062
  text: { default: void 0 },
1247
1063
  placement: { default: "top" },
1248
1064
  openDelay: { default: 80 }
1249
1065
  },
1250
- setup(e) {
1251
- const o = e, t = x(!1), a = H({ prefix: "vf-tooltip" }), n = x(null), r = x(null), u = x(null), v = x(null), { placement: g, middlewareData: w, styles: f, cleanup: $ } = se(
1252
- r,
1253
- u,
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,
1254
1070
  {
1255
- enabled: t,
1256
- placement: s(() => o.placement),
1257
- middleware: s(
1258
- () => [oe(10), ne({ placements: ["top", "bottom"] }), ae(), v.value ? re(v.value) : void 0].filter(
1259
- (l) => l !== void 0
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
1260
1076
  )
1261
1077
  ),
1262
1078
  strategy: "fixed"
1263
1079
  }
1264
- ), T = s(
1080
+ ), k = r(
1265
1081
  () => [
1266
1082
  "vf-tooltip__content",
1267
- g.value.startsWith("bottom") && "vf-tooltip__content--bottom",
1268
- g.value.startsWith("top") && "vf-tooltip__content--top"
1083
+ _.value.startsWith("bottom") && "vf-tooltip__content--bottom",
1084
+ _.value.startsWith("top") && "vf-tooltip__content--top"
1269
1085
  ]
1270
- ), V = s(() => {
1271
- const l = w.value.arrow;
1086
+ ), O = r(() => {
1087
+ const a = b.value.arrow;
1272
1088
  return {
1273
- x: (l == null ? void 0 : l.x) !== void 0 && (l == null ? void 0 : l.baseX) !== void 0 ? l.x - l.baseX : 0,
1274
- y: (l == null ? void 0 : l.y) !== void 0 && (l == null ? void 0 : l.baseY) !== void 0 ? l.y - l.baseY : 0
1089
+ x: (a == null ? void 0 : a.x) !== void 0 && (a == null ? void 0 : a.baseX) !== void 0 ? a.x - a.baseX : 0,
1090
+ y: (a == null ? void 0 : a.y) !== void 0 && (a == null ? void 0 : a.baseY) !== void 0 ? a.y - a.baseY : 0
1275
1091
  };
1276
- }), _ = s(() => ["vf-tooltip__arrow"]), I = s(() => ({
1277
- left: `${V.value.x}px`,
1278
- top: `${V.value.y}px`
1092
+ }), y = r(() => ["vf-tooltip__arrow"]), B = r(() => ({
1093
+ left: `${O.value.x}px`,
1094
+ top: `${O.value.y}px`
1279
1095
  }));
1280
- function D() {
1096
+ function x() {
1281
1097
  n.value !== null && (window.clearTimeout(n.value), n.value = null);
1282
1098
  }
1283
- function d() {
1284
- D(), n.value = window.setTimeout(() => {
1285
- t.value = !0;
1286
- }, o.openDelay);
1099
+ function p() {
1100
+ x(), n.value = window.setTimeout(() => {
1101
+ e.value = !0;
1102
+ }, t.openDelay);
1287
1103
  }
1288
- function O() {
1289
- D(), t.value = !1;
1104
+ function E() {
1105
+ x(), e.value = !1;
1290
1106
  }
1291
- return G(() => {
1292
- D(), $();
1293
- }), (l, B) => (m(), h("span", {
1107
+ return N(() => {
1108
+ x(), V();
1109
+ }), (a, T) => (m(), h("span", {
1294
1110
  class: "vf-tooltip",
1295
- onMouseenter: d,
1296
- onMouseleave: O,
1297
- onFocusin: d,
1298
- onFocusout: O
1111
+ onMouseenter: p,
1112
+ onMouseleave: E,
1113
+ onFocusin: p,
1114
+ onFocusout: E
1299
1115
  }, [
1300
- S("span", {
1116
+ C("span", {
1301
1117
  ref_key: "triggerRef",
1302
- ref: r,
1118
+ ref: l,
1303
1119
  class: "vf-tooltip__trigger",
1304
- "aria-describedby": t.value ? c(a) : void 0
1120
+ "aria-describedby": e.value ? c(s) : void 0
1305
1121
  }, [
1306
- k(l.$slots, "default")
1307
- ], 8, Dt),
1308
- (m(), Y(Z, { to: "body" }, [
1309
- t.value && (e.text || l.$slots.content) ? (m(), h("span", {
1122
+ $(a.$slots, "default")
1123
+ ], 8, kt),
1124
+ (m(), X(J, { to: "body" }, [
1125
+ e.value && (o.text || a.$slots.content) ? (m(), h("span", {
1310
1126
  key: 0,
1311
- id: c(a),
1127
+ id: c(s),
1312
1128
  ref_key: "contentRef",
1313
- ref: u,
1314
- class: K(T.value),
1315
- style: j(c(f)),
1129
+ ref: d,
1130
+ class: M(k.value),
1131
+ style: U(c(u)),
1316
1132
  role: "tooltip"
1317
1133
  }, [
1318
- k(l.$slots, "content", {}, () => [
1319
- he(R(e.text), 1)
1134
+ $(a.$slots, "content", {}, () => [
1135
+ ve(R(o.text), 1)
1320
1136
  ]),
1321
- S("span", {
1137
+ C("span", {
1322
1138
  ref_key: "arrowRef",
1323
- ref: v,
1324
- class: K(_.value),
1325
- style: j(I.value),
1139
+ ref: f,
1140
+ class: M(y.value),
1141
+ style: U(B.value),
1326
1142
  "aria-hidden": "true"
1327
1143
  }, null, 6)
1328
- ], 14, Pt)) : E("", !0)
1144
+ ], 14, Vt)) : I("", !0)
1329
1145
  ]))
1330
1146
  ], 32));
1331
1147
  }
1332
1148
  });
1333
1149
  export {
1334
- Kt as VfAccordion,
1335
- Gt as VfAlert,
1336
- Wt as VfBadge,
1337
- jt as VfButton,
1338
- Ut as VfCard,
1339
- Nt as VfDialog,
1340
- Yt as VfDivider,
1341
- Xt as VfDropdown,
1342
- it as VfIconButton,
1343
- qt as VfInput,
1344
- Qt as VfLink,
1345
- Zt as VfPanel,
1346
- Jt as VfPopover,
1347
- to as VfTabs,
1348
- eo as VfTag,
1349
- oo as VfTextarea,
1350
- Ht as VfThemeProvider,
1351
- no as VfTooltip,
1352
- Mt as VueForge,
1353
- Ft as createThemePreset,
1354
- We as createVueForge,
1355
- Mt as default,
1356
- De as defaultThemePreset,
1357
- ke as useClickOutside,
1358
- J as useDisclosure,
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,
1359
1180
  le as useEscapeKey,
1360
- se as useFloating,
1361
- Ne as useFocusTrap,
1362
- H as useId,
1363
- Rt as useTheme
1181
+ re as useFloating,
1182
+ Fe as useFocusTrap,
1183
+ K as useId,
1184
+ Ee as useScrollLock,
1185
+ Bt as useTheme,
1186
+ so as vfBreakpoints
1364
1187
  };