@codemonster-ru/vueforge 0.11.0 → 0.13.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.
package/dist/index.ts.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { defineComponent as j, ref as P, computed as B, watch as ne, resolveComponent as Le, openBlock as m, createElementBlock as k, normalizeClass as L, renderSlot as _, Fragment as ce, createTextVNode as ae, toDisplayString as X, createBlock as I, withCtx as te, createCommentVNode as $, createElementVNode as R, renderList as Ve, withKeys as re, withModifiers as le, unref as ie, createVNode as We, nextTick as _e, onMounted as Oe, onBeforeUnmount as $e, Teleport as xe, withDirectives as ke, vShow as Ce, reactive as Ke, createSlots as Ge, useSlots as Ue } from "vue";
2
- import { useRoute as qe, useRouter as Ze } from "vue-router";
1
+ import { defineComponent as I, ref as P, computed as y, watch as ne, resolveComponent as We, openBlock as g, createElementBlock as k, normalizeClass as V, renderSlot as w, Fragment as ce, createTextVNode as Q, toDisplayString as A, createBlock as N, withCtx as oe, createCommentVNode as z, createElementVNode as S, renderList as He, withKeys as ae, withModifiers as le, unref as ie, createVNode as Ie, nextTick as we, onMounted as Oe, onBeforeUnmount as $e, Teleport as xe, withDirectives as ve, vShow as pe, provide as Ee, inject as Be, reactive as Ze, createSlots as Je, useSlots as Qe } from "vue";
2
+ import { useRoute as et, useRouter as tt } from "vue-router";
3
3
  import { CmIcon as de } from "@codemonster-ru/vueiconify";
4
- const Je = ["href", "aria-disabled", "tabindex"], He = /* @__PURE__ */ j({
4
+ const ot = ["href", "aria-disabled", "tabindex"], Pe = /* @__PURE__ */ I({
5
5
  __name: "link",
6
6
  props: {
7
7
  to: { default: void 0 },
@@ -15,96 +15,96 @@ const Je = ["href", "aria-disabled", "tabindex"], He = /* @__PURE__ */ j({
15
15
  },
16
16
  emits: ["click", "active", "update:active", "onActive"],
17
17
  setup(t, { emit: e }) {
18
- const r = e, o = t, l = qe(), c = Ze(), i = P(null), u = B(() => o.href ?? o.url), n = B(() => o.as ? o.as === "router-link" && !o.to ? "a" : o.as : o.type === "router-link" || o.type === "a" ? o.type === "router-link" && !o.to ? "a" : o.type : o.to ? "router-link" : "a"), d = B(() => o.to), a = B(() => o.to ? c.resolve(o.to) : null), s = B(() => {
19
- if (n.value !== "router-link")
18
+ const r = e, o = t, a = et(), c = tt(), i = P(null), d = y(() => o.href ?? o.url), l = y(() => o.as ? o.as === "router-link" && !o.to ? "a" : o.as : o.type === "router-link" || o.type === "a" ? o.type === "router-link" && !o.to ? "a" : o.type : o.to ? "router-link" : "a"), u = y(() => o.to), s = y(() => o.to ? c.resolve(o.to) : null), n = y(() => {
19
+ if (l.value !== "router-link")
20
20
  return !1;
21
- const p = a.value;
22
- return p ? p.name ? l.matched.some(({ name: C }) => C === p.name) : p.fullPath ? l.fullPath === p.fullPath : l.path === p.path : !1;
23
- }), v = B(() => o.active === void 0 ? s.value : o.active), f = (p) => {
21
+ const v = s.value;
22
+ return v ? v.name ? a.matched.some(({ name: C }) => C === v.name) : v.fullPath ? a.fullPath === v.fullPath : a.path === v.path : !1;
23
+ }), f = y(() => o.active === void 0 ? n.value : o.active), p = (v) => {
24
24
  if (!o.disabled) {
25
- r("click", p);
25
+ r("click", v);
26
26
  return;
27
27
  }
28
- p.preventDefault(), p.stopPropagation();
28
+ v.preventDefault(), v.stopPropagation();
29
29
  };
30
- return ne(s, (p) => {
31
- p && (r("active"), r("onActive")), r("update:active", p);
32
- }), (p, C) => {
33
- const b = Le("router-link");
34
- return n.value === "a" ? (m(), k("a", {
30
+ return ne(n, (v) => {
31
+ v && (r("active"), r("onActive")), r("update:active", v);
32
+ }), (v, C) => {
33
+ const h = We("router-link");
34
+ return l.value === "a" ? (g(), k("a", {
35
35
  key: 0,
36
- href: u.value,
37
- class: L(["vf-link", { "vf-link_active": v.value, "vf-link_disabled": p.disabled }]),
38
- "aria-disabled": p.disabled,
39
- tabindex: p.disabled ? -1 : void 0,
40
- onClick: f
36
+ href: d.value,
37
+ class: V(["vf-link", { "vf-link_active": f.value, "vf-link_disabled": v.disabled }]),
38
+ "aria-disabled": v.disabled,
39
+ tabindex: v.disabled ? -1 : void 0,
40
+ onClick: p
41
41
  }, [
42
- p.$slots.default ? _(p.$slots, "default", { key: 0 }) : (m(), k(ce, { key: 1 }, [
43
- ae(X(p.label), 1)
42
+ v.$slots.default ? w(v.$slots, "default", { key: 0 }) : (g(), k(ce, { key: 1 }, [
43
+ Q(A(v.label), 1)
44
44
  ], 64))
45
- ], 10, Je)) : (m(), I(b, {
45
+ ], 10, ot)) : (g(), N(h, {
46
46
  key: 1,
47
47
  ref_key: "link",
48
48
  ref: i,
49
- to: d.value,
50
- class: L(["vf-link", { "vf-link_active": v.value }]),
51
- "aria-disabled": p.disabled,
52
- tabindex: p.disabled ? -1 : void 0,
49
+ to: u.value,
50
+ class: V(["vf-link", { "vf-link_active": f.value }]),
51
+ "aria-disabled": v.disabled,
52
+ tabindex: v.disabled ? -1 : void 0,
53
53
  "active-class": "vf-link_partially-active",
54
54
  "exact-active-class": "vf-link_active",
55
- onClick: f
55
+ onClick: p
56
56
  }, {
57
- default: te(() => [
58
- p.$slots.default ? _(p.$slots, "default", { key: 0 }) : (m(), k(ce, { key: 1 }, [
59
- ae(X(p.label), 1)
57
+ default: oe(() => [
58
+ v.$slots.default ? w(v.$slots, "default", { key: 0 }) : (g(), k(ce, { key: 1 }, [
59
+ Q(A(v.label), 1)
60
60
  ], 64))
61
61
  ]),
62
62
  _: 3
63
63
  }, 8, ["to", "class", "aria-disabled", "tabindex"]));
64
64
  };
65
65
  }
66
- }), Qe = (t, e) => {
66
+ }), rt = (t, e) => {
67
67
  const r = t.__vccOpts || t;
68
- for (const [o, l] of e)
69
- r[o] = l;
68
+ for (const [o, a] of e)
69
+ r[o] = a;
70
70
  return r;
71
- }, et = {}, tt = { class: "vf-card" }, ot = {
71
+ }, at = {}, lt = { class: "vf-card" }, nt = {
72
72
  key: 0,
73
73
  class: "vf-card__default"
74
- }, rt = {
74
+ }, st = {
75
75
  key: 1,
76
76
  class: "vf-card__header"
77
- }, lt = {
77
+ }, it = {
78
78
  key: 2,
79
79
  class: "vf-card__body"
80
- }, nt = {
80
+ }, dt = {
81
81
  key: 3,
82
82
  class: "vf-card__footer"
83
83
  };
84
- function at(t, e) {
85
- return m(), k("div", tt, [
86
- t.$slots.default ? (m(), k("div", ot, [
87
- _(t.$slots, "default")
88
- ])) : $("", !0),
89
- t.$slots.header ? (m(), k("div", rt, [
90
- _(t.$slots, "header")
91
- ])) : $("", !0),
92
- t.$slots.body ? (m(), k("div", lt, [
93
- _(t.$slots, "body")
94
- ])) : $("", !0),
95
- t.$slots.footer ? (m(), k("div", nt, [
96
- _(t.$slots, "footer")
97
- ])) : $("", !0)
84
+ function ct(t, e) {
85
+ return g(), k("div", lt, [
86
+ t.$slots.default ? (g(), k("div", nt, [
87
+ w(t.$slots, "default")
88
+ ])) : z("", !0),
89
+ t.$slots.header ? (g(), k("div", st, [
90
+ w(t.$slots, "header")
91
+ ])) : z("", !0),
92
+ t.$slots.body ? (g(), k("div", it, [
93
+ w(t.$slots, "body")
94
+ ])) : z("", !0),
95
+ t.$slots.footer ? (g(), k("div", dt, [
96
+ w(t.$slots, "footer")
97
+ ])) : z("", !0)
98
98
  ]);
99
99
  }
100
- const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
100
+ const ut = /* @__PURE__ */ rt(at, [["render", ct]]), ft = {
101
101
  class: "vf-menu__list",
102
102
  role: "menu"
103
- }, dt = {
103
+ }, vt = {
104
104
  key: 1,
105
105
  class: "vf-menu__separator",
106
106
  role: "separator"
107
- }, ct = ["aria-expanded", "onClick", "onKeydown"], So = /* @__PURE__ */ j({
107
+ }, pt = ["aria-expanded", "onClick", "onKeydown"], Do = /* @__PURE__ */ I({
108
108
  name: "VfMenu",
109
109
  __name: "menu",
110
110
  props: {
@@ -113,87 +113,87 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
113
113
  },
114
114
  emits: ["active", "onActive"],
115
115
  setup(t, { emit: e }) {
116
- const r = e, o = t, l = P([]), c = (a, s) => `${a.label ?? a.to ?? a.href ?? a.url ?? "item"}_${s.toString()}`, i = (a) => a.to ? "router-link" : "a", u = (a) => a.map((s) => ({
117
- ...s,
118
- items: s.items ? u(s.items) : void 0
119
- })), n = (a) => {
120
- a.items && a.items.length ? (l.value.map((s) => {
121
- s !== a && (s.subMenuVisible = !1);
122
- }), a.subMenuVisible = !a.subMenuVisible) : Object.prototype.hasOwnProperty.call(a, "command") && typeof a.command == "function" && a.command();
123
- }, d = (a) => {
124
- var s;
125
- for (const v in l.value) {
126
- const f = l.value[v];
127
- Object.prototype.hasOwnProperty.call(f, "items") && ((s = f.items) != null && s.some((p) => p === a) ? (f.active = !0, f.subMenuVisible = !0) : (f.active = !1, f.subMenuVisible = !1));
116
+ const r = e, o = t, a = P([]), c = (s, n) => `${s.label ?? s.to ?? s.href ?? s.url ?? "item"}_${n.toString()}`, i = (s) => s.to ? "router-link" : "a", d = (s) => s.map((n) => ({
117
+ ...n,
118
+ items: n.items ? d(n.items) : void 0
119
+ })), l = (s) => {
120
+ s.items && s.items.length ? (a.value.map((n) => {
121
+ n !== s && (n.subMenuVisible = !1);
122
+ }), s.subMenuVisible = !s.subMenuVisible) : Object.prototype.hasOwnProperty.call(s, "command") && typeof s.command == "function" && s.command();
123
+ }, u = (s) => {
124
+ var n;
125
+ for (const f in a.value) {
126
+ const p = a.value[f];
127
+ Object.prototype.hasOwnProperty.call(p, "items") && ((n = p.items) != null && n.some((v) => v === s) ? (p.active = !0, p.subMenuVisible = !0) : (p.active = !1, p.subMenuVisible = !1));
128
128
  }
129
- r("active", a), r("onActive", a);
129
+ r("active", s), r("onActive", s);
130
130
  };
131
131
  return ne(
132
132
  () => o.items,
133
- (a) => {
134
- l.value = u(a);
133
+ (s) => {
134
+ a.value = d(s);
135
135
  },
136
136
  { deep: !0, immediate: !0 }
137
- ), (a, s) => {
138
- const v = Le("VfMenu");
139
- return m(), k("div", {
140
- class: L(["vf-menu", `vf-menu_${a.orientation}`])
137
+ ), (s, n) => {
138
+ const f = We("VfMenu");
139
+ return g(), k("div", {
140
+ class: V(["vf-menu", `vf-menu_${s.orientation}`])
141
141
  }, [
142
- R("ul", it, [
143
- (m(!0), k(ce, null, Ve(l.value, (f, p) => (m(), k("li", {
144
- key: c(f, p),
142
+ S("ul", ft, [
143
+ (g(!0), k(ce, null, He(a.value, (p, v) => (g(), k("li", {
144
+ key: c(p, v),
145
145
  class: "vf-menu__item",
146
146
  role: "none"
147
147
  }, [
148
- a.$slots[c(f, p)] ? _(a.$slots, c(f, p), {
148
+ s.$slots[c(p, v)] ? w(s.$slots, c(p, v), {
149
149
  key: 0,
150
- item: { ...f, class: "vf-menu__link" }
151
- }) : f.separator ? (m(), k("hr", dt)) : f.items && f.items.length ? (m(), k(ce, { key: 2 }, [
152
- R("div", {
153
- class: L(["vf-menu__parent", { "vf-menu__parent_active": f.active }]),
150
+ item: { ...p, class: "vf-menu__link" }
151
+ }) : p.separator ? (g(), k("hr", vt)) : p.items && p.items.length ? (g(), k(ce, { key: 2 }, [
152
+ S("div", {
153
+ class: V(["vf-menu__parent", { "vf-menu__parent_active": p.active }]),
154
154
  role: "menuitem",
155
155
  tabindex: "0",
156
- "aria-expanded": f.subMenuVisible ? "true" : "false",
157
- onClick: (C) => n(f),
156
+ "aria-expanded": p.subMenuVisible ? "true" : "false",
157
+ onClick: (C) => l(p),
158
158
  onKeydown: [
159
- re(le((C) => n(f), ["prevent"]), ["enter"]),
160
- re(le((C) => n(f), ["prevent"]), ["space"])
159
+ ae(le((C) => l(p), ["prevent"]), ["enter"]),
160
+ ae(le((C) => l(p), ["prevent"]), ["space"])
161
161
  ]
162
162
  }, [
163
- f.icon ? (m(), I(ie(de), {
163
+ p.icon ? (g(), N(ie(de), {
164
164
  key: 0,
165
- icon: f.icon,
165
+ icon: p.icon,
166
166
  class: "vf-menu__icon"
167
- }, null, 8, ["icon"])) : $("", !0),
168
- ae(" " + X(f.label) + " ", 1),
169
- We(ie(de), { icon: "chevronDown" })
170
- ], 42, ct),
171
- f.items ? (m(), I(v, {
167
+ }, null, 8, ["icon"])) : z("", !0),
168
+ Q(" " + A(p.label) + " ", 1),
169
+ Ie(ie(de), { icon: "chevronDown" })
170
+ ], 42, pt),
171
+ p.items ? (g(), N(f, {
172
172
  key: 0,
173
- items: f.items,
174
- class: L(["vf-menu__submenu", { "vf-menu__submenu_visible": f.subMenuVisible }]),
175
- onOnActive: d
176
- }, null, 8, ["items", "class"])) : $("", !0)
177
- ], 64)) : (m(), I(He, {
173
+ items: p.items,
174
+ class: V(["vf-menu__submenu", { "vf-menu__submenu_visible": p.subMenuVisible }]),
175
+ onOnActive: u
176
+ }, null, 8, ["items", "class"])) : z("", !0)
177
+ ], 64)) : (g(), N(Pe, {
178
178
  key: 3,
179
- to: f.to,
180
- href: f.href ?? f.url,
181
- as: i(f),
179
+ to: p.to,
180
+ href: p.href ?? p.url,
181
+ as: i(p),
182
182
  class: "vf-menu__link",
183
- active: f.active,
184
- disabled: f.disabled,
183
+ active: p.active,
184
+ disabled: p.disabled,
185
185
  role: "menuitem",
186
- "aria-disabled": f.disabled ? "true" : "false",
187
- onClick: (C) => n(f),
188
- onActive: (C) => d(f)
186
+ "aria-disabled": p.disabled ? "true" : "false",
187
+ onClick: (C) => l(p),
188
+ onActive: (C) => u(p)
189
189
  }, {
190
- default: te(() => [
191
- f.icon ? (m(), I(ie(de), {
190
+ default: oe(() => [
191
+ p.icon ? (g(), N(ie(de), {
192
192
  key: 0,
193
- icon: f.icon,
193
+ icon: p.icon,
194
194
  class: "vf-menu__icon"
195
- }, null, 8, ["icon"])) : $("", !0),
196
- ae(" " + X(f.label), 1)
195
+ }, null, 8, ["icon"])) : z("", !0),
196
+ Q(" " + A(p.label), 1)
197
197
  ]),
198
198
  _: 2
199
199
  }, 1032, ["to", "href", "as", "active", "disabled", "aria-disabled", "onClick", "onActive"]))
@@ -202,7 +202,7 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
202
202
  ], 2);
203
203
  };
204
204
  }
205
- }), ut = ["type", "disabled"], To = /* @__PURE__ */ j({
205
+ }), bt = ["type", "disabled"], Ko = /* @__PURE__ */ I({
206
206
  __name: "button",
207
207
  props: {
208
208
  to: { default: void 0 },
@@ -221,70 +221,70 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
221
221
  disabled: { type: Boolean, default: !1 }
222
222
  },
223
223
  setup(t) {
224
- const e = t, r = ["button", "submit", "reset"], o = (a) => !!a && r.includes(a), l = B(() => e.as ? e.as === "button" : !(e.to || e.href || e.url || e.type && !o(e.type))), c = B(() => o(e.type) ? e.type : "button"), i = B(() => e.as === "link" ? e.to ? "router-link" : "a" : e.type && !o(e.type) ? e.type === "router-link" && e.to ? "router-link" : "a" : e.to ? "router-link" : "a"), u = B(() => {
225
- let a = ["vf-button", `vf-button_${e.severity}`];
226
- return ["top", "bottom"].includes(e.iconPos) && a.push("vf-button_vertical"), e.variant === "text" && a.push("vf-button_text"), e.variant === "outlined" && a.push("vf-button_outlined"), ["small", "large"].indexOf(e.size) > -1 && a.push(`vf-button_${e.size}`), (e.loading || e.disabled) && a.push("vf-button_disabled"), e.rounded && a.push("vf-button_rounded"), a;
227
- }), n = B(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]), d = B(() => ["vf-button__label"]);
228
- return (a, s) => l.value ? (m(), k("button", {
224
+ const e = t, r = ["button", "submit", "reset"], o = (s) => !!s && r.includes(s), a = y(() => e.as ? e.as === "button" : !(e.to || e.href || e.url || e.type && !o(e.type))), c = y(() => o(e.type) ? e.type : "button"), i = y(() => e.as === "link" ? e.to ? "router-link" : "a" : e.type && !o(e.type) ? e.type === "router-link" && e.to ? "router-link" : "a" : e.to ? "router-link" : "a"), d = y(() => {
225
+ let s = ["vf-button", `vf-button_${e.severity}`];
226
+ return ["top", "bottom"].includes(e.iconPos) && s.push("vf-button_vertical"), e.variant === "text" && s.push("vf-button_text"), e.variant === "outlined" && s.push("vf-button_outlined"), ["small", "large"].indexOf(e.size) > -1 && s.push(`vf-button_${e.size}`), (e.loading || e.disabled) && s.push("vf-button_disabled"), e.rounded && s.push("vf-button_rounded"), s;
227
+ }), l = y(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]), u = y(() => ["vf-button__label"]);
228
+ return (s, n) => a.value ? (g(), k("button", {
229
229
  key: 0,
230
230
  type: c.value,
231
- class: L(u.value),
231
+ class: V(d.value),
232
232
  disabled: e.loading || e.disabled
233
233
  }, [
234
- e.icon && !e.loading ? (m(), I(ie(de), {
234
+ e.icon && !e.loading ? (g(), N(ie(de), {
235
235
  key: 0,
236
236
  icon: e.icon,
237
- class: L(n.value)
238
- }, null, 8, ["icon", "class"])) : $("", !0),
239
- e.loading ? (m(), I(ie(de), {
237
+ class: V(l.value)
238
+ }, null, 8, ["icon", "class"])) : z("", !0),
239
+ e.loading ? (g(), N(ie(de), {
240
240
  key: 1,
241
241
  icon: "circleNotch",
242
- class: L(n.value),
242
+ class: V(l.value),
243
243
  spin: ""
244
- }, null, 8, ["class"])) : $("", !0),
245
- a.$slots.default ? (m(), k("span", {
244
+ }, null, 8, ["class"])) : z("", !0),
245
+ s.$slots.default ? (g(), k("span", {
246
246
  key: 2,
247
- class: L(d.value)
247
+ class: V(u.value)
248
248
  }, [
249
- _(a.$slots, "default")
250
- ], 2)) : a.label ? (m(), k("span", {
249
+ w(s.$slots, "default")
250
+ ], 2)) : s.label ? (g(), k("span", {
251
251
  key: 3,
252
- class: L(d.value)
253
- }, X(a.label), 3)) : $("", !0)
254
- ], 10, ut)) : (m(), I(He, {
252
+ class: V(u.value)
253
+ }, A(s.label), 3)) : z("", !0)
254
+ ], 10, bt)) : (g(), N(Pe, {
255
255
  key: 1,
256
256
  to: e.to,
257
257
  href: e.href ?? e.url,
258
258
  as: i.value,
259
- class: L(u.value),
259
+ class: V(d.value),
260
260
  disabled: e.loading || e.disabled
261
261
  }, {
262
- default: te(() => [
263
- e.icon ? (m(), I(ie(de), {
262
+ default: oe(() => [
263
+ e.icon ? (g(), N(ie(de), {
264
264
  key: 0,
265
265
  icon: e.icon,
266
- class: L(n.value)
267
- }, null, 8, ["icon", "class"])) : $("", !0),
268
- a.$slots.default ? (m(), k("span", {
266
+ class: V(l.value)
267
+ }, null, 8, ["icon", "class"])) : z("", !0),
268
+ s.$slots.default ? (g(), k("span", {
269
269
  key: 1,
270
- class: L(d.value)
270
+ class: V(u.value)
271
271
  }, [
272
- _(a.$slots, "default")
273
- ], 2)) : a.label ? (m(), k("span", {
272
+ w(s.$slots, "default")
273
+ ], 2)) : s.label ? (g(), k("span", {
274
274
  key: 2,
275
- class: L(d.value)
276
- }, X(a.label), 3)) : $("", !0)
275
+ class: V(u.value)
276
+ }, A(s.label), 3)) : z("", !0)
277
277
  ]),
278
278
  _: 3
279
279
  }, 8, ["to", "href", "as", "class", "disabled"]));
280
280
  }
281
- }), ft = {
281
+ }), gt = {
282
282
  key: 0,
283
283
  class: "vf-input__prefix"
284
- }, vt = ["type", "value", "placeholder", "disabled", "readonly"], pt = {
284
+ }, mt = ["type", "value", "placeholder", "disabled", "readonly"], ht = {
285
285
  key: 1,
286
286
  class: "vf-input__suffix"
287
- }, Ro = /* @__PURE__ */ j({
287
+ }, No = /* @__PURE__ */ I({
288
288
  __name: "input",
289
289
  props: {
290
290
  modelValue: { default: "" },
@@ -297,37 +297,37 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
297
297
  },
298
298
  emits: ["update:modelValue", "input", "change", "focus", "blur"],
299
299
  setup(t, { emit: e }) {
300
- const r = e, o = t, l = B(() => {
301
- const d = ["vf-input", `vf-input_${o.variant}`];
302
- return o.size !== "normal" && d.push(`vf-input_${o.size}`), o.disabled && d.push("vf-input_disabled"), d;
303
- }), c = (d) => {
304
- const a = d.target;
305
- r("update:modelValue", a.value), r("input", d);
306
- }, i = (d) => r("change", d), u = (d) => r("focus", d), n = (d) => r("blur", d);
307
- return (d, a) => (m(), k("div", {
308
- class: L(l.value)
300
+ const r = e, o = t, a = y(() => {
301
+ const u = ["vf-input", `vf-input_${o.variant}`];
302
+ return o.size !== "normal" && u.push(`vf-input_${o.size}`), o.disabled && u.push("vf-input_disabled"), u;
303
+ }), c = (u) => {
304
+ const s = u.target;
305
+ r("update:modelValue", s.value), r("input", u);
306
+ }, i = (u) => r("change", u), d = (u) => r("focus", u), l = (u) => r("blur", u);
307
+ return (u, s) => (g(), k("div", {
308
+ class: V(a.value)
309
309
  }, [
310
- d.$slots.prefix ? (m(), k("span", ft, [
311
- _(d.$slots, "prefix")
312
- ])) : $("", !0),
313
- R("input", {
310
+ u.$slots.prefix ? (g(), k("span", gt, [
311
+ w(u.$slots, "prefix")
312
+ ])) : z("", !0),
313
+ S("input", {
314
314
  class: "vf-input__control",
315
- type: d.type,
316
- value: d.modelValue,
317
- placeholder: d.placeholder,
318
- disabled: d.disabled,
319
- readonly: d.readonly,
315
+ type: u.type,
316
+ value: u.modelValue,
317
+ placeholder: u.placeholder,
318
+ disabled: u.disabled,
319
+ readonly: u.readonly,
320
320
  onInput: c,
321
321
  onChange: i,
322
- onFocus: u,
323
- onBlur: n
324
- }, null, 40, vt),
325
- d.$slots.suffix ? (m(), k("span", pt, [
326
- _(d.$slots, "suffix")
327
- ])) : $("", !0)
322
+ onFocus: d,
323
+ onBlur: l
324
+ }, null, 40, mt),
325
+ u.$slots.suffix ? (g(), k("span", ht, [
326
+ w(u.$slots, "suffix")
327
+ ])) : z("", !0)
328
328
  ], 2));
329
329
  }
330
- }), gt = ["value", "placeholder", "disabled", "readonly", "rows"], Lo = /* @__PURE__ */ j({
330
+ }), yt = ["value", "placeholder", "disabled", "readonly", "rows"], Xo = /* @__PURE__ */ I({
331
331
  __name: "textarea",
332
332
  props: {
333
333
  modelValue: { default: "" },
@@ -340,31 +340,31 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
340
340
  },
341
341
  emits: ["update:modelValue", "input", "change", "focus", "blur"],
342
342
  setup(t, { emit: e }) {
343
- const r = e, o = t, l = B(() => {
344
- const d = ["vf-textarea", `vf-textarea_${o.variant}`];
345
- return o.size !== "normal" && d.push(`vf-textarea_${o.size}`), o.disabled && d.push("vf-textarea_disabled"), d;
346
- }), c = (d) => {
347
- const a = d.target;
348
- r("update:modelValue", a.value), r("input", d);
349
- }, i = (d) => r("change", d), u = (d) => r("focus", d), n = (d) => r("blur", d);
350
- return (d, a) => (m(), k("div", {
351
- class: L(l.value)
343
+ const r = e, o = t, a = y(() => {
344
+ const u = ["vf-textarea", `vf-textarea_${o.variant}`];
345
+ return o.size !== "normal" && u.push(`vf-textarea_${o.size}`), o.disabled && u.push("vf-textarea_disabled"), u;
346
+ }), c = (u) => {
347
+ const s = u.target;
348
+ r("update:modelValue", s.value), r("input", u);
349
+ }, i = (u) => r("change", u), d = (u) => r("focus", u), l = (u) => r("blur", u);
350
+ return (u, s) => (g(), k("div", {
351
+ class: V(a.value)
352
352
  }, [
353
- R("textarea", {
353
+ S("textarea", {
354
354
  class: "vf-textarea__control",
355
- value: d.modelValue,
356
- placeholder: d.placeholder,
357
- disabled: d.disabled,
358
- readonly: d.readonly,
359
- rows: d.rows,
355
+ value: u.modelValue,
356
+ placeholder: u.placeholder,
357
+ disabled: u.disabled,
358
+ readonly: u.readonly,
359
+ rows: u.rows,
360
360
  onInput: c,
361
361
  onChange: i,
362
- onFocus: u,
363
- onBlur: n
364
- }, null, 40, gt)
362
+ onFocus: d,
363
+ onBlur: l
364
+ }, null, 40, yt)
365
365
  ], 2));
366
366
  }
367
- }), ze = [
367
+ }), Ve = [
368
368
  "top",
369
369
  "top-start",
370
370
  "top-end",
@@ -387,16 +387,16 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
387
387
  }
388
388
  return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth ? t : q(t.parentNode);
389
389
  };
390
- function ht(t) {
390
+ function kt(t) {
391
391
  return typeof window > "u" ? !1 : window.getComputedStyle(t).position === "fixed";
392
392
  }
393
- const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q = (t, e) => mt(t, e) === "fixed", A = (t, e, r = {}) => {
394
- const o = t.getBoundingClientRect(), l = e ? e.offsetParent : null, c = e ? Q(r, e) : !1;
395
- if (l && !c) {
396
- const i = l.getBoundingClientRect(), u = l.scrollLeft, n = l.scrollTop;
393
+ const Ct = (t, e) => t.strategy ? t.strategy : kt(e) ? "fixed" : "absolute", ee = (t, e) => Ct(t, e) === "fixed", D = (t, e, r = {}) => {
394
+ const o = t.getBoundingClientRect(), a = e ? e.offsetParent : null, c = e ? ee(r, e) : !1;
395
+ if (a && !c) {
396
+ const i = a.getBoundingClientRect(), d = a.scrollLeft, l = a.scrollTop;
397
397
  return {
398
- left: o.left - i.left + u,
399
- top: o.top - i.top + n,
398
+ left: o.left - i.left + d,
399
+ top: o.top - i.top + l,
400
400
  width: o.width,
401
401
  height: o.height
402
402
  };
@@ -407,15 +407,15 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
407
407
  width: o.width,
408
408
  height: o.height
409
409
  };
410
- }, oe = (t, e) => {
410
+ }, re = (t, e) => {
411
411
  var r;
412
412
  return (r = t.middleware) == null ? void 0 : r.find((o) => o.name === e);
413
- }, Ee = (t, e) => !!oe(t, e), bt = (t) => {
413
+ }, Ae = (t, e) => !!re(t, e), _t = (t) => {
414
414
  const e = q(t);
415
415
  let r = "";
416
416
  return e !== null && ((e.dataset.scrollTop === void 0 || e.scrollTop === +e.dataset.scrollTop) && (e.dataset.scrollTop = "0"), (e.dataset.scrollLeft === void 0 || e.scrollLeft === +e.dataset.scrollLeft) && (e.dataset.scrollLeft = "0"), e.scrollTop > +e.dataset.scrollTop ? r = "bottom" : e.scrollTop < +e.dataset.scrollTop ? r = "top" : e.scrollLeft > +e.dataset.scrollLeft ? r = "right" : e.scrollLeft < +e.dataset.scrollLeft && (r = "left"), e.dataset.scrollTop = e.scrollTop <= 0 ? "0" : e.scrollTop.toString(), e.dataset.scrollLeft = e.scrollLeft <= 0 ? "0" : e.scrollLeft.toString()), r;
417
- }, he = (t) => t.scrollLeft + t.clientWidth, me = (t) => t.scrollTop + t.clientHeight, K = (t, e, r = null, o = {}, l) => {
418
- if (r === null && typeof window < "u" && Q(o, e))
417
+ }, he = (t) => t.scrollLeft + t.clientWidth, ye = (t) => t.scrollTop + t.clientHeight, j = (t, e, r = null, o = {}, a) => {
418
+ if (r === null && typeof window < "u" && ee(o, e))
419
419
  return t;
420
420
  let c = 0;
421
421
  if (r === null) {
@@ -423,9 +423,9 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
423
423
  c = i ? i.scrollTop : 0;
424
424
  }
425
425
  return t - c;
426
- }, G = (t, e, r = null, o = {}, l) => {
426
+ }, G = (t, e, r = null, o = {}, a) => {
427
427
  let c;
428
- if (r === null && typeof window < "u" && Q(o, e))
428
+ if (r === null && typeof window < "u" && ee(o, e))
429
429
  c = window.innerWidth;
430
430
  else if (r === null) {
431
431
  const i = q(e);
@@ -433,18 +433,18 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
433
433
  } else
434
434
  c = r.getBoundingClientRect().width;
435
435
  return -(t + e.clientWidth - c);
436
- }, Z = (t, e, r = null, o = {}, l) => {
436
+ }, Z = (t, e, r = null, o = {}, a) => {
437
437
  let c;
438
- if (r === null && typeof window < "u" && Q(o, e))
438
+ if (r === null && typeof window < "u" && ee(o, e))
439
439
  c = window.innerHeight;
440
440
  else if (r === null) {
441
441
  const i = q(e);
442
- c = i ? me(i) : 0;
442
+ c = i ? ye(i) : 0;
443
443
  } else
444
444
  c = r.getBoundingClientRect().height;
445
445
  return -(t + e.clientHeight - c);
446
- }, U = (t, e, r = null, o = {}, l) => {
447
- if (r === null && typeof window < "u" && Q(o, e))
446
+ }, U = (t, e, r = null, o = {}, a) => {
447
+ if (r === null && typeof window < "u" && ee(o, e))
448
448
  return t;
449
449
  let c = 0;
450
450
  if (r === null) {
@@ -452,34 +452,34 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
452
452
  c = i ? i.scrollLeft : 0;
453
453
  }
454
454
  return t - c;
455
- }, Se = ({
455
+ }, Te = ({
456
456
  options: t,
457
457
  primaryX: e,
458
458
  primaryY: r,
459
459
  floating: o,
460
- placement: l,
460
+ placement: a,
461
461
  reference: c,
462
462
  scrollDirection: i
463
463
  }) => {
464
- const u = be(c, o, l, t), n = oe(t, "offset");
465
- if (n) {
466
- const d = n.fn({
467
- x: u.x,
468
- y: u.y,
464
+ const d = ke(c, o, a, t), l = re(t, "offset");
465
+ if (l) {
466
+ const u = l.fn({
467
+ x: d.x,
468
+ y: d.y,
469
469
  options: t,
470
470
  primaryX: e,
471
471
  primaryY: r,
472
472
  floating: o,
473
- placement: l,
473
+ placement: a,
474
474
  reference: c,
475
475
  scrollDirection: i
476
476
  });
477
- u.x = d.x, u.y = d.y;
477
+ d.x = u.x, d.y = u.y;
478
478
  }
479
- return Wt(u, o, c, t) ? {
480
- x: u.x,
481
- y: u.y,
482
- placement: l
479
+ return Et(d, o, c, t) ? {
480
+ x: d.x,
481
+ y: d.y,
482
+ placement: a
483
483
  } : !1;
484
484
  }, Me = (t) => ({
485
485
  name: "flip",
@@ -488,295 +488,295 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
488
488
  x: e,
489
489
  y: r,
490
490
  options: o,
491
- primaryX: l,
491
+ primaryX: a,
492
492
  primaryY: c,
493
493
  floating: i,
494
- placement: u,
495
- reference: n,
496
- scrollDirection: d
494
+ placement: d,
495
+ reference: l,
496
+ scrollDirection: u
497
497
  }) => {
498
- var a;
499
- const s = {
498
+ var s;
499
+ const n = {
500
500
  x: e,
501
501
  y: r,
502
- placement: u
503
- }, v = {
502
+ placement: d
503
+ }, f = {
504
504
  ...o,
505
- middleware: (a = o.middleware) == null ? void 0 : a.filter((z) => z.name !== "shift")
506
- }, f = (t == null ? void 0 : t.placements) ?? ze, p = !(t != null && t.placements), C = p ? ze : f;
507
- let b = !1;
508
- const x = (z) => {
509
- if (b)
505
+ middleware: (s = o.middleware) == null ? void 0 : s.filter(($) => $.name !== "shift")
506
+ }, p = (t == null ? void 0 : t.placements) ?? Ve, v = !(t != null && t.placements), C = v ? Ve : p;
507
+ let h = !1;
508
+ const F = ($) => {
509
+ if (h)
510
510
  return;
511
- const S = Se({
512
- options: v,
513
- primaryX: l,
511
+ const T = Te({
512
+ options: f,
513
+ primaryX: a,
514
514
  primaryY: c,
515
515
  floating: i,
516
- placement: z,
517
- reference: n,
518
- scrollDirection: d
516
+ placement: $,
517
+ reference: l,
518
+ scrollDirection: u
519
519
  });
520
- S && (s.x = S.x, s.y = S.y, s.placement = S.placement, b = !0);
521
- }, V = Ht(n, i, v);
522
- if (!p && f.includes(u) && x(u), b || C.forEach(x), !b) {
523
- const z = f.reduce(
524
- (S, w) => {
525
- const F = Se({
526
- options: v,
527
- primaryX: l,
520
+ T && (n.x = T.x, n.y = T.y, n.placement = T.placement, h = !0);
521
+ }, R = At(l, i, f);
522
+ if (!v && p.includes(d) && F(d), h || C.forEach(F), !h) {
523
+ const $ = p.reduce(
524
+ (T, x) => {
525
+ const B = Te({
526
+ options: f,
527
+ primaryX: a,
528
528
  primaryY: c,
529
529
  floating: i,
530
- placement: w,
531
- reference: n,
532
- scrollDirection: d
530
+ placement: x,
531
+ reference: l,
532
+ scrollDirection: u
533
533
  });
534
- if (!F)
535
- return S;
536
- const O = fe(w), W = V[O];
537
- return !S || W > S.space ? { result: F, space: W } : S;
534
+ if (!B)
535
+ return T;
536
+ const H = fe(x), L = R[H];
537
+ return !T || L > T.space ? { result: B, space: L } : T;
538
538
  },
539
539
  null
540
540
  );
541
- z && (s.x = z.result.x, s.y = z.result.y, s.placement = z.result.placement, b = !0);
541
+ $ && (n.x = $.result.x, n.y = $.result.y, n.placement = $.result.placement, h = !0);
542
542
  }
543
- if (!b && f.length > 0) {
544
- const z = fe(u);
545
- let S = z, w = V[z];
546
- f.forEach((h) => {
547
- const g = fe(h), y = V[g];
548
- y > w && (w = y, S = g);
543
+ if (!h && p.length > 0) {
544
+ const $ = fe(d);
545
+ let T = $, x = R[$];
546
+ p.forEach((m) => {
547
+ const b = fe(m), _ = R[b];
548
+ _ > x && (x = _, T = b);
549
549
  });
550
- const F = Ot(S, u, f), O = be(n, i, F, v), W = oe(v, "offset");
551
- if (W) {
552
- const h = W.fn({
553
- x: O.x,
554
- y: O.y,
555
- options: v,
556
- primaryX: l,
550
+ const B = Pt(T, d, p), H = ke(l, i, B, f), L = re(f, "offset");
551
+ if (L) {
552
+ const m = L.fn({
553
+ x: H.x,
554
+ y: H.y,
555
+ options: f,
556
+ primaryX: a,
557
557
  primaryY: c,
558
558
  floating: i,
559
- placement: F,
560
- reference: n,
561
- scrollDirection: d
559
+ placement: B,
560
+ reference: l,
561
+ scrollDirection: u
562
562
  });
563
- O.x = h.x, O.y = h.y;
563
+ H.x = m.x, H.y = m.y;
564
564
  }
565
- s.x = O.x, s.y = O.y, s.placement = O.placement;
565
+ n.x = H.x, n.y = H.y, n.placement = H.placement;
566
566
  }
567
- return s;
567
+ return n;
568
568
  }
569
- }), Pe = (t, e, r, o, l) => {
570
- var c, i, u;
571
- let n = 0;
572
- o.startsWith("right") ? n = -t : o.startsWith("left") && (n = t);
573
- const d = oe(e, "arrow"), a = oe(e, "shift");
574
- if (d) {
575
- const s = ((c = d.params) == null ? void 0 : c.arrow).getBoundingClientRect();
576
- o.startsWith("right") ? n -= s.width / 2 : o.startsWith("left") && (n += s.width / 2);
569
+ }), De = (t, e, r, o, a) => {
570
+ var c, i, d;
571
+ let l = 0;
572
+ o.startsWith("right") ? l = -t : o.startsWith("left") && (l = t);
573
+ const u = re(e, "arrow"), s = re(e, "shift");
574
+ if (u) {
575
+ const n = ((c = u.params) == null ? void 0 : c.arrow).getBoundingClientRect();
576
+ o.startsWith("right") ? l -= n.width / 2 : o.startsWith("left") && (l += n.width / 2);
577
577
  }
578
- if (Ee(e, "shift") && d) {
579
- let s = null, v = 0;
580
- a && (s = (i = a.params) == null ? void 0 : i.parent);
581
- const f = (u = d.params) == null ? void 0 : u.arrow;
582
- v = f.getBoundingClientRect().width / 2, v += kt(f), v -= t, o.startsWith("right") ? G(r - n, l, s, e) <= t ? G(r, l, s, e) > 0 ? n = t - G(r, l, s, e) : n = t : U(r - n - v, l, s, e) <= t && (U(r - n - v, l, s, e) >= 0 ? (n = -t - (U(r - n - v, l, s, e) + t), s && (n = -t)) : n = -t) : o.startsWith("left") ? G(r - n + v, l, s, e) <= t ? (n = t + G(r - v, l, s, e), n <= t && (n = t)) : U(r - n, l, s, e) <= t && (n = -t + U(r, l, s, e), n <= -t && (n = -t)) : G(r - n, l, s, e) <= t ? G(r - n, l, s, e) <= t && G(r, l, s, e) > 0 ? n = t - G(r, l, s, e) : n = t : U(r - n, l, s, e) <= t && (U(r - n, l, s, e) <= t && U(r, l, s, e) > 0 ? n = -(t - U(r, l, s, e)) : n = -t);
578
+ if (Ae(e, "shift") && u) {
579
+ let n = null, f = 0;
580
+ s && (n = (i = s.params) == null ? void 0 : i.parent);
581
+ const p = (d = u.params) == null ? void 0 : d.arrow;
582
+ f = p.getBoundingClientRect().width / 2, f += $t(p), f -= t, o.startsWith("right") ? G(r - l, a, n, e) <= t ? G(r, a, n, e) > 0 ? l = t - G(r, a, n, e) : l = t : U(r - l - f, a, n, e) <= t && (U(r - l - f, a, n, e) >= 0 ? (l = -t - (U(r - l - f, a, n, e) + t), n && (l = -t)) : l = -t) : o.startsWith("left") ? G(r - l + f, a, n, e) <= t ? (l = t + G(r - f, a, n, e), l <= t && (l = t)) : U(r - l, a, n, e) <= t && (l = -t + U(r, a, n, e), l <= -t && (l = -t)) : G(r - l, a, n, e) <= t ? G(r - l, a, n, e) <= t && G(r, a, n, e) > 0 ? l = t - G(r, a, n, e) : l = t : U(r - l, a, n, e) <= t && (U(r - l, a, n, e) <= t && U(r, a, n, e) > 0 ? l = -(t - U(r, a, n, e)) : l = -t);
583
583
  }
584
- return n;
585
- }, Ae = (t, e, r, o, l) => {
586
- var c, i, u;
587
- let n = 0;
588
- o.startsWith("top") ? n = t : o.startsWith("bottom") && (n = -t);
589
- const d = oe(e, "arrow"), a = oe(e, "shift");
590
- if (d) {
591
- const s = ((c = d.params) == null ? void 0 : c.arrow).getBoundingClientRect();
592
- o.startsWith("top") ? n += s.height / 2 : o.startsWith("bottom") && (n -= s.height / 2);
584
+ return l;
585
+ }, Ke = (t, e, r, o, a) => {
586
+ var c, i, d;
587
+ let l = 0;
588
+ o.startsWith("top") ? l = t : o.startsWith("bottom") && (l = -t);
589
+ const u = re(e, "arrow"), s = re(e, "shift");
590
+ if (u) {
591
+ const n = ((c = u.params) == null ? void 0 : c.arrow).getBoundingClientRect();
592
+ o.startsWith("top") ? l += n.height / 2 : o.startsWith("bottom") && (l -= n.height / 2);
593
593
  }
594
- if (Ee(e, "shift") && d) {
595
- let s = null, v = 0;
596
- a && (s = (i = a.params) == null ? void 0 : i.parent);
597
- const f = (u = d.params) == null ? void 0 : u.arrow;
598
- v = f.getBoundingClientRect().height / 2, v += Ct(f), v -= t, o.startsWith("top") ? K(r - n, l, s, e) <= t ? K(r, l, s, e) >= 0 ? n = -(t - K(r, l, s, e)) : n = -t : Z(r - n + v, l, s, e) <= t && (n = t + Z(r - v, l, s, e), n <= t && (n = t)) : o.startsWith("bottom") ? K(r - n - v, l, s, e) <= t ? K(r - n - v, l, s, e) >= 0 ? (n = -t - (K(r - n - v, l, s, e) + t), s && (n = -t)) : n = -t : Z(r - n, l, s, e) <= t && (Z(r, l, s, e) >= 0 ? n = t - Z(r, l, s, e) : n = t) : K(r - n, l, s, e) <= t ? K(r - n, l, s, e) >= 0 ? n = -(t - K(r - n, l, s, e)) : n = -t : Z(r - n, l, s, e) <= t && (Z(r - n, l, s, e) >= 0 ? n = t - Z(r - n, l, s, e) : n = t);
594
+ if (Ae(e, "shift") && u) {
595
+ let n = null, f = 0;
596
+ s && (n = (i = s.params) == null ? void 0 : i.parent);
597
+ const p = (d = u.params) == null ? void 0 : d.arrow;
598
+ f = p.getBoundingClientRect().height / 2, f += xt(p), f -= t, o.startsWith("top") ? j(r - l, a, n, e) <= t ? j(r, a, n, e) >= 0 ? l = -(t - j(r, a, n, e)) : l = -t : Z(r - l + f, a, n, e) <= t && (l = t + Z(r - f, a, n, e), l <= t && (l = t)) : o.startsWith("bottom") ? j(r - l - f, a, n, e) <= t ? j(r - l - f, a, n, e) >= 0 ? (l = -t - (j(r - l - f, a, n, e) + t), n && (l = -t)) : l = -t : Z(r - l, a, n, e) <= t && (Z(r, a, n, e) >= 0 ? l = t - Z(r, a, n, e) : l = t) : j(r - l, a, n, e) <= t ? j(r - l, a, n, e) >= 0 ? l = -(t - j(r - l, a, n, e)) : l = -t : Z(r - l, a, n, e) <= t && (Z(r - l, a, n, e) >= 0 ? l = t - Z(r - l, a, n, e) : l = t);
599
599
  }
600
- return n;
601
- }, De = (t) => ({
600
+ return l;
601
+ }, Ne = (t) => ({
602
602
  name: "offset",
603
603
  params: { value: t },
604
604
  fn: ({
605
605
  x: e,
606
606
  y: r,
607
607
  options: o,
608
- primaryX: l,
608
+ primaryX: a,
609
609
  primaryY: c,
610
610
  floating: i,
611
- placement: u
611
+ placement: d
612
612
  }) => ({
613
- x: e - Pe(t, o, l, u, i),
614
- y: r - Ae(t, o, c, u, i),
615
- placement: u
613
+ x: e - De(t, o, a, d, i),
614
+ y: r - Ke(t, o, c, d, i),
615
+ placement: d
616
616
  })
617
- }), yt = (t) => ({
617
+ }), wt = (t) => ({
618
618
  name: "shift",
619
619
  params: t,
620
620
  fn: ({
621
621
  x: e,
622
622
  y: r,
623
623
  options: o,
624
- primaryX: l,
624
+ primaryX: a,
625
625
  primaryY: c,
626
626
  floating: i,
627
- placement: u,
628
- reference: n
627
+ placement: d,
628
+ reference: l
629
629
  }) => {
630
- var d;
631
- const a = {
630
+ var u;
631
+ const s = {
632
632
  x: e,
633
633
  y: r,
634
- placement: u
635
- }, s = o.middleware || [], v = s.findIndex((y) => y.name === "shift"), f = s.findIndex((y) => y.name === "offset"), p = f !== -1 && (v === -1 || f > v), C = s.find((y) => y.name === "offset"), b = C ? (d = C.params) == null ? void 0 : d.value : 0, x = p ? Pe(b, o, l, u, i) : 0, V = p ? Ae(b, o, c, u, i) : 0, z = e - x, S = r - V;
636
- let w = z, F = S;
637
- const O = C ? Math.abs(b) : 0, W = O, h = O;
638
- if (Q(o, i) && typeof window < "u") {
639
- const y = W, T = window.innerWidth - i.clientWidth - W, H = T < y ? y : T, E = h, D = window.innerHeight - i.clientHeight - h, M = D < E ? E : D;
640
- w < y ? w = y : w > H && (w = H), F < E ? F = E : F > M && (F = M), p ? (a.x = e + (w - z), a.y = r + (F - S)) : (a.x = w, a.y = F);
641
- const N = W, Y = window.innerWidth - i.clientWidth - W, ee = h, ue = window.innerHeight - i.clientHeight - h, se = p ? N + x : N, ve = p ? Y + x : Y, pe = p ? ee + V : ee, ge = p ? ue + V : ue;
642
- return a.x < se ? a.x = se : a.x > ve && (a.x = ve), a.y < pe ? a.y = pe : a.y > ge && (a.y = ge), a;
634
+ placement: d
635
+ }, n = o.middleware || [], f = n.findIndex((_) => _.name === "shift"), p = n.findIndex((_) => _.name === "offset"), v = p !== -1 && (f === -1 || p > f), C = n.find((_) => _.name === "offset"), h = C ? (u = C.params) == null ? void 0 : u.value : 0, F = v ? De(h, o, a, d, i) : 0, R = v ? Ke(h, o, c, d, i) : 0, $ = e - F, T = r - R;
636
+ let x = $, B = T;
637
+ const H = C ? Math.abs(h) : 0, L = H, m = H;
638
+ if (ee(o, i) && typeof window < "u") {
639
+ const _ = L, W = window.innerWidth - i.clientWidth - L, O = W < _ ? _ : W, E = m, K = window.innerHeight - i.clientHeight - m, M = K < E ? E : K;
640
+ x < _ ? x = _ : x > O && (x = O), B < E ? B = E : B > M && (B = M), v ? (s.x = e + (x - $), s.y = r + (B - T)) : (s.x = x, s.y = B);
641
+ const Y = L, X = window.innerWidth - i.clientWidth - L, te = m, ue = window.innerHeight - i.clientHeight - m, se = v ? Y + F : Y, be = v ? X + F : X, ge = v ? te + R : te, me = v ? ue + R : ue;
642
+ return s.x < se ? s.x = se : s.x > be && (s.x = be), s.y < ge ? s.y = ge : s.y > me && (s.y = me), s;
643
643
  }
644
- const g = q(i);
645
- if (g !== null) {
646
- const y = A(n, i, o), T = y.left, H = y.left + y.width, E = y.top, D = y.top + y.height, M = g.scrollLeft + W, N = he(g) - i.clientWidth - W, Y = N < M ? M : N, ee = g.scrollTop + h, ue = me(g) - i.clientHeight - h, se = ue < ee ? ee : ue, ve = g.scrollLeft, pe = he(g), ge = g.scrollTop, Ne = me(g);
647
- H <= ve ? w = M : T >= pe && (w = Y), D <= ge ? F = ee : E >= Ne && (F = se), F < ee ? F = ee : F > se && (F = se), w < M ? w = M : w > Y && (w = Y);
644
+ const b = q(i);
645
+ if (b !== null) {
646
+ const _ = D(l, i, o), W = _.left, O = _.left + _.width, E = _.top, K = _.top + _.height, M = b.scrollLeft + L, Y = he(b) - i.clientWidth - L, X = Y < M ? M : Y, te = b.scrollTop + m, ue = ye(b) - i.clientHeight - m, se = ue < te ? te : ue, be = b.scrollLeft, ge = he(b), me = b.scrollTop, qe = ye(b);
647
+ O <= be ? x = M : W >= ge && (x = X), K <= me ? B = te : E >= qe && (B = se), B < te ? B = te : B > se && (B = se), x < M ? x = M : x > X && (x = X);
648
648
  }
649
- if (p ? (a.x = e + (w - z), a.y = r + (F - S)) : (a.x = w, a.y = F), g !== null) {
650
- const y = g.scrollLeft + W, T = he(g) - i.clientWidth - W, H = g.scrollTop + h, E = me(g) - i.clientHeight - h, D = p ? y + x : y, M = p ? T + x : T, N = p ? H + V : H, Y = p ? E + V : E;
651
- a.x < D ? a.x = D : a.x > M && (a.x = M), a.y < N ? a.y = N : a.y > Y && (a.y = Y);
649
+ if (v ? (s.x = e + (x - $), s.y = r + (B - T)) : (s.x = x, s.y = B), b !== null) {
650
+ const _ = b.scrollLeft + L, W = he(b) - i.clientWidth - L, O = b.scrollTop + m, E = ye(b) - i.clientHeight - m, K = v ? _ + F : _, M = v ? W + F : W, Y = v ? O + R : O, X = v ? E + R : E;
651
+ s.x < K ? s.x = K : s.x > M && (s.x = M), s.y < Y ? s.y = Y : s.y > X && (s.y = X);
652
652
  }
653
- return a;
653
+ return s;
654
654
  }
655
- }), kt = (t) => t.getBoundingClientRect().width !== t.clientWidth ? (t.getBoundingClientRect().width - t.clientWidth) / 2 : 0, Ct = (t) => t.getBoundingClientRect().height !== t.clientHeight ? (t.getBoundingClientRect().height - t.clientHeight) / 2 : 0, Ie = (t, e) => {
655
+ }), $t = (t) => t.getBoundingClientRect().width !== t.clientWidth ? (t.getBoundingClientRect().width - t.clientWidth) / 2 : 0, xt = (t) => t.getBoundingClientRect().height !== t.clientHeight ? (t.getBoundingClientRect().height - t.clientHeight) / 2 : 0, Xe = (t, e) => {
656
656
  const r = q(t), o = [];
657
657
  if (r !== null) {
658
- const l = () => e();
659
- r.addEventListener("scroll", l, !1), o.push(() => r.removeEventListener("scroll", l, !1));
658
+ const a = () => e();
659
+ r.addEventListener("scroll", a, !1), o.push(() => r.removeEventListener("scroll", a, !1));
660
660
  }
661
661
  if (typeof window < "u") {
662
- const l = () => e(), c = () => e();
663
- window.addEventListener("scroll", l, !1), window.addEventListener("resize", c, !1), o.push(() => window.removeEventListener("scroll", l, !1)), o.push(() => window.removeEventListener("resize", c, !1));
662
+ const a = () => e(), c = () => e();
663
+ window.addEventListener("scroll", a, !1), window.addEventListener("resize", c, !1), o.push(() => window.removeEventListener("scroll", a, !1)), o.push(() => window.removeEventListener("resize", c, !1));
664
664
  }
665
665
  if (typeof ResizeObserver < "u" && t instanceof HTMLElement) {
666
- const l = new ResizeObserver(() => e());
667
- l.observe(t), o.push(() => l.disconnect());
666
+ const a = new ResizeObserver(() => e());
667
+ a.observe(t), o.push(() => a.disconnect());
668
668
  }
669
- return () => o.forEach((l) => l());
670
- }, wt = (t, e, r = {}) => {
671
- const o = A(t, e, r);
669
+ return () => o.forEach((a) => a());
670
+ }, Bt = (t, e, r = {}) => {
671
+ const o = D(t, e, r);
672
672
  return {
673
673
  x: o.left - e.getBoundingClientRect().width / 2 + o.width / 2,
674
674
  y: o.top - e.getBoundingClientRect().height,
675
675
  placement: "top"
676
676
  };
677
- }, _t = (t, e, r = {}) => {
678
- const o = A(t, e, r);
677
+ }, Ft = (t, e, r = {}) => {
678
+ const o = D(t, e, r);
679
679
  return {
680
680
  x: o.left,
681
681
  y: o.top - e.getBoundingClientRect().height,
682
682
  placement: "top-start"
683
683
  };
684
- }, $t = (t, e, r = {}) => {
685
- const o = A(t, e, r);
684
+ }, zt = (t, e, r = {}) => {
685
+ const o = D(t, e, r);
686
686
  return {
687
687
  x: o.left - e.getBoundingClientRect().width + o.width,
688
688
  y: o.top - e.getBoundingClientRect().height,
689
689
  placement: "top-end"
690
690
  };
691
- }, xt = (t, e, r = {}) => {
692
- const o = A(t, e, r);
691
+ }, St = (t, e, r = {}) => {
692
+ const o = D(t, e, r);
693
693
  return {
694
694
  x: o.left + o.width,
695
695
  y: o.top - e.getBoundingClientRect().height / 2 + o.height / 2,
696
696
  placement: "right"
697
697
  };
698
- }, Ft = (t, e, r = {}) => {
699
- const o = A(t, e, r);
698
+ }, Vt = (t, e, r = {}) => {
699
+ const o = D(t, e, r);
700
700
  return {
701
701
  x: o.left + o.width,
702
702
  y: o.top,
703
703
  placement: "right-start"
704
704
  };
705
- }, Bt = (t, e, r = {}) => {
706
- const o = A(t, e, r);
705
+ }, Tt = (t, e, r = {}) => {
706
+ const o = D(t, e, r);
707
707
  return {
708
708
  x: o.left + o.width,
709
709
  y: o.top + o.height - e.getBoundingClientRect().height,
710
710
  placement: "right-end"
711
711
  };
712
- }, zt = (t, e, r = {}) => {
713
- const o = A(t, e, r);
712
+ }, Rt = (t, e, r = {}) => {
713
+ const o = D(t, e, r);
714
714
  return {
715
715
  x: o.left + o.width / 2 - e.getBoundingClientRect().width / 2,
716
716
  y: o.top + o.height,
717
717
  placement: "bottom"
718
718
  };
719
- }, St = (t, e, r = {}) => {
720
- const o = A(t, e, r);
719
+ }, Lt = (t, e, r = {}) => {
720
+ const o = D(t, e, r);
721
721
  return {
722
722
  x: o.left,
723
723
  y: o.top + o.height,
724
724
  placement: "bottom-start"
725
725
  };
726
- }, Tt = (t, e, r = {}) => {
727
- const o = A(t, e, r);
726
+ }, Wt = (t, e, r = {}) => {
727
+ const o = D(t, e, r);
728
728
  return {
729
729
  x: o.left - e.getBoundingClientRect().width + o.width,
730
730
  y: o.top + o.height,
731
731
  placement: "bottom-end"
732
732
  };
733
- }, Rt = (t, e, r = {}) => {
734
- const o = A(t, e, r);
733
+ }, Ht = (t, e, r = {}) => {
734
+ const o = D(t, e, r);
735
735
  return {
736
736
  x: o.left - e.getBoundingClientRect().width,
737
737
  y: o.top + o.height / 2 - e.getBoundingClientRect().height / 2,
738
738
  placement: "left"
739
739
  };
740
- }, Lt = (t, e, r = {}) => {
741
- const o = A(t, e, r);
740
+ }, It = (t, e, r = {}) => {
741
+ const o = D(t, e, r);
742
742
  return {
743
743
  x: o.left - e.getBoundingClientRect().width,
744
744
  y: o.top,
745
745
  placement: "left-start"
746
746
  };
747
- }, Vt = (t, e, r = {}) => {
748
- const o = A(t, e, r);
747
+ }, Ot = (t, e, r = {}) => {
748
+ const o = D(t, e, r);
749
749
  return {
750
750
  x: o.left - e.getBoundingClientRect().width,
751
751
  y: o.top + o.height - e.getBoundingClientRect().height,
752
752
  placement: "left-end"
753
753
  };
754
- }, be = (t, e, r, o = {}) => {
754
+ }, ke = (t, e, r, o = {}) => {
755
755
  switch (r) {
756
756
  case "top":
757
- return wt(t, e, o);
757
+ return Bt(t, e, o);
758
758
  case "top-start":
759
- return _t(t, e, o);
759
+ return Ft(t, e, o);
760
760
  case "top-end":
761
- return $t(t, e, o);
761
+ return zt(t, e, o);
762
762
  case "right":
763
- return xt(t, e, o);
763
+ return St(t, e, o);
764
764
  case "right-start":
765
- return Ft(t, e, o);
765
+ return Vt(t, e, o);
766
766
  case "right-end":
767
- return Bt(t, e, o);
767
+ return Tt(t, e, o);
768
768
  case "bottom":
769
- return zt(t, e, o);
769
+ return Rt(t, e, o);
770
770
  case "bottom-start":
771
- return St(t, e, o);
771
+ return Lt(t, e, o);
772
772
  case "bottom-end":
773
- return Tt(t, e, o);
773
+ return Wt(t, e, o);
774
774
  case "left":
775
- return Rt(t, e, o);
775
+ return Ht(t, e, o);
776
776
  case "left-start":
777
- return Lt(t, e, o);
777
+ return It(t, e, o);
778
778
  case "left-end":
779
- return Vt(t, e, o);
779
+ return Ot(t, e, o);
780
780
  default:
781
781
  return {
782
782
  x: 0,
@@ -784,25 +784,25 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
784
784
  placement: ""
785
785
  };
786
786
  }
787
- }, Wt = (t, e, r, o = {}) => {
788
- if (Q(o, e)) {
787
+ }, Et = (t, e, r, o = {}) => {
788
+ if (ee(o, e)) {
789
789
  if (typeof window > "u")
790
790
  return !0;
791
- const s = t.x, v = t.y, f = s + e.clientWidth, p = v + e.clientHeight;
792
- return s >= 0 && v >= 0 && f <= window.innerWidth && p <= window.innerHeight;
791
+ const n = t.x, f = t.y, p = n + e.clientWidth, v = f + e.clientHeight;
792
+ return n >= 0 && f >= 0 && p <= window.innerWidth && v <= window.innerHeight;
793
793
  }
794
794
  if (q(r) !== null)
795
- return K(t.y, e, null, o) > 0 && G(t.x, e, null, o) > 0 && Z(t.y, e, null, o) > 0 && U(t.x, e, null, o) > 0;
795
+ return j(t.y, e, null, o) > 0 && G(t.x, e, null, o) > 0 && Z(t.y, e, null, o) > 0 && U(t.x, e, null, o) > 0;
796
796
  if (typeof window > "u")
797
797
  return !0;
798
- const l = window.innerWidth, c = window.innerHeight, i = (r instanceof HTMLElement ? r.offsetParent : null) || e.offsetParent;
798
+ const a = window.innerWidth, c = window.innerHeight, i = (r instanceof HTMLElement ? r.offsetParent : null) || e.offsetParent;
799
799
  if (i) {
800
- const s = i.getBoundingClientRect(), v = s.left + t.x, f = s.top + t.y, p = v + e.clientWidth, C = f + e.clientHeight;
801
- return v >= 0 && f >= 0 && p <= l && C <= c;
800
+ const n = i.getBoundingClientRect(), f = n.left + t.x, p = n.top + t.y, v = f + e.clientWidth, C = p + e.clientHeight;
801
+ return f >= 0 && p >= 0 && v <= a && C <= c;
802
802
  }
803
- const u = t.x, n = t.y, d = u + e.clientWidth, a = n + e.clientHeight;
804
- return u >= 0 && n >= 0 && d <= l && a <= c;
805
- }, fe = (t) => t.startsWith("right") ? "right" : t.startsWith("left") ? "left" : t.startsWith("top") ? "top" : "bottom", Ot = (t, e, r) => fe(e) === t && r.includes(e) ? e : r.find((o) => fe(o) === t) ?? r[0], Ht = (t, e, r = {}) => {
803
+ const d = t.x, l = t.y, u = d + e.clientWidth, s = l + e.clientHeight;
804
+ return d >= 0 && l >= 0 && u <= a && s <= c;
805
+ }, fe = (t) => t.startsWith("right") ? "right" : t.startsWith("left") ? "left" : t.startsWith("top") ? "top" : "bottom", Pt = (t, e, r) => fe(e) === t && r.includes(e) ? e : r.find((o) => fe(o) === t) ?? r[0], At = (t, e, r = {}) => {
806
806
  if (typeof window > "u")
807
807
  return {
808
808
  top: 0,
@@ -810,51 +810,51 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
810
810
  bottom: 0,
811
811
  left: 0
812
812
  };
813
- const o = Q(r, e) ? null : q(t), l = t.getBoundingClientRect(), c = o ? o.getBoundingClientRect() : {
813
+ const o = ee(r, e) ? null : q(t), a = t.getBoundingClientRect(), c = o ? o.getBoundingClientRect() : {
814
814
  top: 0,
815
815
  left: 0,
816
816
  right: window.innerWidth,
817
817
  bottom: window.innerHeight
818
818
  };
819
819
  return {
820
- top: l.top - c.top,
821
- right: c.right - l.right,
822
- bottom: c.bottom - l.bottom,
823
- left: l.left - c.left
820
+ top: a.top - c.top,
821
+ right: c.right - a.right,
822
+ bottom: c.bottom - a.bottom,
823
+ left: a.left - c.left
824
824
  };
825
- }, Xe = (t, e, r = {}) => new Promise((o) => {
826
- var l, c;
827
- const i = r.placement ? r.placement : "bottom", u = {
825
+ }, Ye = (t, e, r = {}) => new Promise((o) => {
826
+ var a, c;
827
+ const i = r.placement ? r.placement : "bottom", d = {
828
828
  x: 0,
829
829
  y: 0,
830
830
  placement: i,
831
831
  middlewareData: {}
832
- }, n = be(t, e, i, r);
833
- u.x = n.x, u.y = n.y, u.placement = n.placement;
834
- const d = u.x, a = u.y, s = bt(t);
835
- (l = r.middleware) == null || l.forEach((C) => {
836
- const b = C.fn({
837
- x: u.x,
838
- y: u.y,
832
+ }, l = ke(t, e, i, r);
833
+ d.x = l.x, d.y = l.y, d.placement = l.placement;
834
+ const u = d.x, s = d.y, n = _t(t);
835
+ (a = r.middleware) == null || a.forEach((C) => {
836
+ const h = C.fn({
837
+ x: d.x,
838
+ y: d.y,
839
839
  options: r,
840
- primaryX: d,
841
- primaryY: a,
840
+ primaryX: u,
841
+ primaryY: s,
842
842
  floating: e,
843
- placement: u.placement,
843
+ placement: d.placement,
844
844
  reference: t,
845
- scrollDirection: s
845
+ scrollDirection: n
846
846
  });
847
- u.x = b.x, u.y = b.y, u.placement = b.placement, C.name === "arrow" && (b.baseX = b.x, b.baseY = b.y, b.x = b.arrowX ?? b.x, b.y = b.arrowY ?? b.y), u.middlewareData[C.name] = b;
847
+ d.x = h.x, d.y = h.y, d.placement = h.placement, C.name === "arrow" && (h.baseX = h.x, h.baseY = h.y, h.x = h.arrowX ?? h.x, h.y = h.arrowY ?? h.y), d.middlewareData[C.name] = h;
848
848
  });
849
- const v = be(t, e, u.placement, r), f = oe(r, "offset"), p = f ? (c = f.params) == null ? void 0 : c.value : 0;
850
- if (Number.isFinite(u.x) || (u.x = v.x), !Number.isFinite(u.y))
851
- if (Q(r, e)) {
852
- const C = t.getBoundingClientRect(), b = e.getBoundingClientRect().height;
853
- u.placement.startsWith("top") ? u.y = C.top - b - p : u.placement.startsWith("bottom") ? u.y = C.bottom + p : u.y = v.y;
849
+ const f = ke(t, e, d.placement, r), p = re(r, "offset"), v = p ? (c = p.params) == null ? void 0 : c.value : 0;
850
+ if (Number.isFinite(d.x) || (d.x = f.x), !Number.isFinite(d.y))
851
+ if (ee(r, e)) {
852
+ const C = t.getBoundingClientRect(), h = e.getBoundingClientRect().height;
853
+ d.placement.startsWith("top") ? d.y = C.top - h - v : d.placement.startsWith("bottom") ? d.y = C.bottom + v : d.y = f.y;
854
854
  } else
855
- u.y = v.y;
856
- o(u);
857
- }), Et = ["disabled", "aria-expanded", "onKeydown"], Mt = ["data-placement"], Pt = ["disabled", "aria-selected", "onClick"], Vo = /* @__PURE__ */ j({
855
+ d.y = f.y;
856
+ o(d);
857
+ }), Mt = ["disabled", "aria-expanded", "onKeydown"], Dt = ["data-placement"], Kt = ["disabled", "aria-selected", "onClick"], Yo = /* @__PURE__ */ I({
858
858
  __name: "select",
859
859
  props: {
860
860
  modelValue: { default: void 0 },
@@ -869,136 +869,136 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
869
869
  emits: ["update:modelValue", "change", "focus", "blur"],
870
870
  setup(t, { emit: e }) {
871
871
  let r = 0;
872
- const o = e, l = t, c = P(null), i = P(null), u = P(null), n = P(!1), d = P("bottom"), a = P("bottom"), s = `vf-select-panel-${++r}`;
873
- let v = null;
874
- const f = B(() => l.options.map((g) => ({
875
- label: g[l.optionLabel],
876
- value: g[l.optionValue],
877
- disabled: g.disabled
878
- }))), p = B(() => f.value.find((g) => g.value === l.modelValue)), C = B(() => {
879
- var g;
880
- return ((g = p.value) == null ? void 0 : g.label) ?? "";
881
- }), b = B(() => {
882
- const g = ["vf-select", `vf-select_${l.variant}`, n.value ? "vf-select_open" : ""];
883
- return l.size !== "normal" && g.push(`vf-select_${l.size}`), l.disabled && g.push("vf-select_disabled"), g.filter(Boolean);
884
- }), x = (g) => g.value === l.modelValue, V = (g) => {
885
- g.disabled || (o("update:modelValue", g.value), o("change", g.value), w());
886
- }, z = (g) => o("focus", g), S = (g) => o("blur", g), w = () => {
887
- n.value = !1, d.value = "bottom", a.value = "bottom";
888
- }, F = () => {
889
- l.disabled || (n.value = !n.value, n.value && (d.value = "bottom", a.value = "bottom"));
890
- }, O = async () => {
891
- var g, y;
892
- n.value || (n.value = !0, await _e()), (y = (g = u.value) == null ? void 0 : g.querySelector(".vf-select__option:not(.is-disabled)")) == null || y.focus();
893
- }, W = (g) => {
894
- var T;
895
- if (!n.value || !c.value)
872
+ const o = e, a = t, c = P(null), i = P(null), d = P(null), l = P(!1), u = P("bottom"), s = P("bottom"), n = `vf-select-panel-${++r}`;
873
+ let f = null;
874
+ const p = y(() => a.options.map((b) => ({
875
+ label: b[a.optionLabel],
876
+ value: b[a.optionValue],
877
+ disabled: b.disabled
878
+ }))), v = y(() => p.value.find((b) => b.value === a.modelValue)), C = y(() => {
879
+ var b;
880
+ return ((b = v.value) == null ? void 0 : b.label) ?? "";
881
+ }), h = y(() => {
882
+ const b = ["vf-select", `vf-select_${a.variant}`, l.value ? "vf-select_open" : ""];
883
+ return a.size !== "normal" && b.push(`vf-select_${a.size}`), a.disabled && b.push("vf-select_disabled"), b.filter(Boolean);
884
+ }), F = (b) => b.value === a.modelValue, R = (b) => {
885
+ b.disabled || (o("update:modelValue", b.value), o("change", b.value), x());
886
+ }, $ = (b) => o("focus", b), T = (b) => o("blur", b), x = () => {
887
+ l.value = !1, u.value = "bottom", s.value = "bottom";
888
+ }, B = () => {
889
+ a.disabled || (l.value = !l.value, l.value && (u.value = "bottom", s.value = "bottom"));
890
+ }, H = async () => {
891
+ var b, _;
892
+ l.value || (l.value = !0, await we()), (_ = (b = d.value) == null ? void 0 : b.querySelector(".vf-select__option:not(.is-disabled)")) == null || _.focus();
893
+ }, L = (b) => {
894
+ var W;
895
+ if (!l.value || !c.value)
896
896
  return;
897
- const y = g.target;
898
- c.value.contains(y) || (T = u.value) != null && T.contains(y) || w();
899
- }, h = () => {
900
- if (!i.value || !u.value)
897
+ const _ = b.target;
898
+ c.value.contains(_) || (W = d.value) != null && W.contains(_) || x();
899
+ }, m = () => {
900
+ if (!i.value || !d.value)
901
901
  return;
902
- const g = i.value, y = u.value, T = async () => {
902
+ const b = i.value, _ = d.value, W = async () => {
903
903
  const {
904
904
  x: M,
905
- y: N,
906
- placement: Y
907
- } = await Xe(g, y, {
908
- placement: d.value,
905
+ y: Y,
906
+ placement: X
907
+ } = await Ye(b, _, {
908
+ placement: u.value,
909
909
  strategy: "fixed",
910
- middleware: [De(2), Me({ placements: ["bottom", "top"] })]
910
+ middleware: [Ne(2), Me({ placements: ["bottom", "top"] })]
911
911
  });
912
- a.value = Y ?? d.value, y.style.minWidth = `${g.getBoundingClientRect().width}px`, y.style.left = `${M}px`, y.style.top = `${N}px`;
913
- }, H = async () => {
914
- await T();
915
- }, E = Ie(g, () => {
916
- H();
917
- }), D = () => {
918
- H();
912
+ s.value = X ?? u.value, _.style.minWidth = `${b.getBoundingClientRect().width}px`, _.style.left = `${M}px`, _.style.top = `${Y}px`;
913
+ }, O = async () => {
914
+ await W();
915
+ }, E = Xe(b, () => {
916
+ O();
917
+ }), K = () => {
918
+ O();
919
919
  };
920
- document.addEventListener("scroll", D, !0), window.addEventListener("resize", D, !1), v = {
921
- update: H,
920
+ document.addEventListener("scroll", K, !0), window.addEventListener("resize", K, !1), f = {
921
+ update: O,
922
922
  destroy: () => {
923
- E(), document.removeEventListener("scroll", D, !0), window.removeEventListener("resize", D, !1);
923
+ E(), document.removeEventListener("scroll", K, !0), window.removeEventListener("resize", K, !1);
924
924
  }
925
- }, v.update();
925
+ }, f.update();
926
926
  };
927
- return ne(n, async (g) => {
928
- if (!g) {
929
- v && (v.destroy(), v = null);
927
+ return ne(l, async (b) => {
928
+ if (!b) {
929
+ f && (f.destroy(), f = null);
930
930
  return;
931
931
  }
932
- await _e(), v || h(), v == null || v.update();
932
+ await we(), f || m(), f == null || f.update();
933
933
  }), ne(
934
- () => l.options,
934
+ () => a.options,
935
935
  () => {
936
- v == null || v.update();
936
+ f == null || f.update();
937
937
  },
938
938
  { deep: !0 }
939
939
  ), Oe(() => {
940
- document.addEventListener("click", W);
940
+ document.addEventListener("click", L);
941
941
  }), $e(() => {
942
- document.removeEventListener("click", W), v == null || v.destroy(), v = null;
943
- }), (g, y) => (m(), k("div", {
942
+ document.removeEventListener("click", L), f == null || f.destroy(), f = null;
943
+ }), (b, _) => (g(), k("div", {
944
944
  ref_key: "root",
945
945
  ref: c,
946
- class: L(b.value)
946
+ class: V(h.value)
947
947
  }, [
948
- R("button", {
948
+ S("button", {
949
949
  ref_key: "trigger",
950
950
  ref: i,
951
951
  class: "vf-select__control",
952
952
  type: "button",
953
- disabled: g.disabled,
954
- "aria-expanded": n.value,
955
- "aria-controls": s,
953
+ disabled: b.disabled,
954
+ "aria-expanded": l.value,
955
+ "aria-controls": n,
956
956
  "aria-haspopup": "listbox",
957
- onClick: F,
957
+ onClick: B,
958
958
  onKeydown: [
959
- re(le(O, ["prevent"]), ["down"]),
960
- re(le(F, ["prevent"]), ["enter"]),
961
- re(le(w, ["prevent"]), ["esc"])
959
+ ae(le(H, ["prevent"]), ["down"]),
960
+ ae(le(B, ["prevent"]), ["enter"]),
961
+ ae(le(x, ["prevent"]), ["esc"])
962
962
  ],
963
- onFocus: z,
964
- onBlur: S
963
+ onFocus: $,
964
+ onBlur: T
965
965
  }, [
966
- R("span", {
967
- class: L(["vf-select__label", { "vf-select__label_placeholder": !C.value }])
968
- }, X(C.value || g.placeholder), 3),
969
- y[0] || (y[0] = R("span", {
966
+ S("span", {
967
+ class: V(["vf-select__label", { "vf-select__label_placeholder": !C.value }])
968
+ }, A(C.value || b.placeholder), 3),
969
+ _[0] || (_[0] = S("span", {
970
970
  class: "vf-select__chevron",
971
971
  "aria-hidden": "true"
972
972
  }, "▾", -1))
973
- ], 40, Et),
974
- (m(), I(xe, { to: "body" }, [
975
- ke(R("div", {
976
- id: s,
973
+ ], 40, Mt),
974
+ (g(), N(xe, { to: "body" }, [
975
+ ve(S("div", {
976
+ id: n,
977
977
  ref_key: "panel",
978
- ref: u,
978
+ ref: d,
979
979
  class: "vf-select__panel",
980
980
  role: "listbox",
981
- "data-placement": a.value
981
+ "data-placement": s.value
982
982
  }, [
983
- (m(!0), k(ce, null, Ve(f.value, (T) => (m(), k("button", {
984
- key: T.value,
985
- class: L(["vf-select__option", { "is-active": x(T), "is-disabled": T.disabled }]),
983
+ (g(!0), k(ce, null, He(p.value, (W) => (g(), k("button", {
984
+ key: W.value,
985
+ class: V(["vf-select__option", { "is-active": F(W), "is-disabled": W.disabled }]),
986
986
  type: "button",
987
987
  role: "option",
988
- disabled: T.disabled,
989
- "aria-selected": x(T),
990
- onClick: (H) => V(T)
991
- }, X(T.label), 11, Pt))), 128))
992
- ], 8, Mt), [
993
- [Ce, n.value]
988
+ disabled: W.disabled,
989
+ "aria-selected": F(W),
990
+ onClick: (O) => R(W)
991
+ }, A(W.label), 11, Kt))), 128))
992
+ ], 8, Dt), [
993
+ [pe, l.value]
994
994
  ])
995
995
  ]))
996
996
  ], 2));
997
997
  }
998
- }), At = ["checked", "disabled"], Dt = {
998
+ }), Nt = ["checked", "disabled"], Xt = {
999
999
  key: 0,
1000
1000
  class: "vf-checkbox__label"
1001
- }, Wo = /* @__PURE__ */ j({
1001
+ }, jo = /* @__PURE__ */ I({
1002
1002
  __name: "checkbox",
1003
1003
  props: {
1004
1004
  modelValue: { type: Boolean, default: !1 },
@@ -1008,35 +1008,217 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
1008
1008
  },
1009
1009
  emits: ["update:modelValue", "change"],
1010
1010
  setup(t, { emit: e }) {
1011
- const r = e, o = t, l = B(() => {
1011
+ const r = e, o = t, a = y(() => {
1012
1012
  const i = ["vf-checkbox", `vf-checkbox_${o.variant}`];
1013
1013
  return o.disabled && i.push("vf-checkbox_disabled"), i;
1014
1014
  }), c = (i) => {
1015
- const u = i.target;
1016
- r("update:modelValue", u.checked), r("change", i);
1015
+ const d = i.target;
1016
+ r("update:modelValue", d.checked), r("change", i);
1017
1017
  };
1018
- return (i, u) => (m(), k("label", {
1019
- class: L(l.value)
1018
+ return (i, d) => (g(), k("label", {
1019
+ class: V(a.value)
1020
1020
  }, [
1021
- R("input", {
1021
+ S("input", {
1022
1022
  class: "vf-checkbox__control",
1023
1023
  type: "checkbox",
1024
1024
  checked: i.modelValue,
1025
1025
  disabled: i.disabled,
1026
1026
  onChange: c
1027
- }, null, 40, At),
1028
- u[0] || (u[0] = R("span", { class: "vf-checkbox__box" }, null, -1)),
1029
- i.label || i.$slots.default ? (m(), k("span", Dt, [
1030
- _(i.$slots, "default", {}, () => [
1031
- ae(X(i.label), 1)
1027
+ }, null, 40, Nt),
1028
+ d[0] || (d[0] = S("span", { class: "vf-checkbox__box" }, null, -1)),
1029
+ i.label || i.$slots.default ? (g(), k("span", Xt, [
1030
+ w(i.$slots, "default", {}, () => [
1031
+ Q(A(i.label), 1)
1032
1032
  ])
1033
- ])) : $("", !0)
1033
+ ])) : z("", !0)
1034
1034
  ], 2));
1035
1035
  }
1036
- }), It = ["checked", "disabled"], Xt = {
1036
+ }), je = Symbol("VueForgeRadioGroup"), Yt = ["aria-disabled", "aria-label", "aria-labelledby"], Go = /* @__PURE__ */ I({
1037
+ __name: "radio-group",
1038
+ props: {
1039
+ modelValue: { type: [String, Number, Boolean, null], default: void 0 },
1040
+ name: {},
1041
+ disabled: { type: Boolean, default: !1 },
1042
+ variant: { default: "filled" },
1043
+ direction: { default: "vertical" },
1044
+ ariaLabel: {},
1045
+ ariaLabelledby: {}
1046
+ },
1047
+ emits: ["update:modelValue", "change"],
1048
+ setup(t, { emit: e }) {
1049
+ const r = e, o = t, a = y(() => {
1050
+ const d = ["vf-radio-group"];
1051
+ return o.direction === "horizontal" && d.push("vf-radio-group_horizontal"), d;
1052
+ }), c = (d, l) => {
1053
+ r("update:modelValue", d), r("change", d, l);
1054
+ }, i = {
1055
+ name: y(() => o.name),
1056
+ modelValue: y(() => o.modelValue),
1057
+ disabled: y(() => o.disabled),
1058
+ variant: y(() => o.variant),
1059
+ onChange: c
1060
+ };
1061
+ return Ee(je, i), (d, l) => (g(), k("div", {
1062
+ class: V(a.value),
1063
+ role: "radiogroup",
1064
+ "aria-disabled": d.disabled || void 0,
1065
+ "aria-label": d.ariaLabel || void 0,
1066
+ "aria-labelledby": d.ariaLabelledby || void 0
1067
+ }, [
1068
+ w(d.$slots, "default")
1069
+ ], 10, Yt));
1070
+ }
1071
+ }), jt = ["name", "value", "checked", "disabled"], Gt = {
1072
+ key: 0,
1073
+ class: "vf-radio__label"
1074
+ }, Uo = /* @__PURE__ */ I({
1075
+ __name: "radio-button",
1076
+ props: {
1077
+ modelValue: { type: [String, Number, Boolean, null], default: void 0 },
1078
+ value: { type: [String, Number, Boolean, null], default: void 0 },
1079
+ label: { default: "" },
1080
+ disabled: { type: Boolean, default: !1 },
1081
+ name: {},
1082
+ variant: { default: "filled" }
1083
+ },
1084
+ emits: ["update:modelValue", "change"],
1085
+ setup(t, { emit: e }) {
1086
+ const r = e, o = t, a = Be(je, null), c = y(() => a ? a.modelValue.value : o.modelValue), i = y(() => a ? a.name.value : o.name), d = y(() => a ? a.variant.value : o.variant), l = y(() => (a ? a.disabled.value : !1) || o.disabled), u = y(() => c.value === o.value), s = y(() => {
1087
+ const f = ["vf-radio", `vf-radio_${d.value}`];
1088
+ return l.value && f.push("vf-radio_disabled"), f;
1089
+ }), n = (f) => {
1090
+ l.value || (a ? a.onChange(o.value, f) : r("update:modelValue", o.value), r("change", o.value, f));
1091
+ };
1092
+ return (f, p) => (g(), k("label", {
1093
+ class: V(s.value)
1094
+ }, [
1095
+ S("input", {
1096
+ class: "vf-radio__control",
1097
+ type: "radio",
1098
+ name: i.value,
1099
+ value: f.value,
1100
+ checked: u.value,
1101
+ disabled: l.value,
1102
+ onChange: n
1103
+ }, null, 40, jt),
1104
+ p[0] || (p[0] = S("span", { class: "vf-radio__circle" }, null, -1)),
1105
+ f.label || f.$slots.default ? (g(), k("span", Gt, [
1106
+ w(f.$slots, "default", {}, () => [
1107
+ Q(A(f.label), 1)
1108
+ ])
1109
+ ])) : z("", !0)
1110
+ ], 2));
1111
+ }
1112
+ }), Fe = Symbol("VueForgeTabs"), Ut = ["aria-orientation", "aria-label", "aria-labelledby"], qt = { class: "vf-tabs__panels" }, qo = /* @__PURE__ */ I({
1113
+ __name: "tabs",
1114
+ props: {
1115
+ modelValue: { default: void 0 },
1116
+ disabled: { type: Boolean, default: !1 },
1117
+ orientation: { default: "horizontal" },
1118
+ ariaLabel: {},
1119
+ ariaLabelledby: {}
1120
+ },
1121
+ emits: ["update:modelValue", "change"],
1122
+ setup(t, { emit: e }) {
1123
+ let r = 0;
1124
+ const o = e, a = t, c = ++r, i = (v) => String(v).toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, ""), d = y(() => {
1125
+ const v = ["vf-tabs"];
1126
+ return a.orientation === "vertical" && v.push("vf-tabs_vertical"), a.disabled && v.push("vf-tabs_disabled"), v;
1127
+ }), l = P(null), u = () => l.value ? Array.from(l.value.querySelectorAll('[role="tab"]:not([disabled])')) : [], s = (v) => {
1128
+ v && (v.focus(), v.click());
1129
+ }, n = (v) => {
1130
+ if (a.disabled)
1131
+ return;
1132
+ const C = a.orientation === "horizontal", h = v.key, F = C ? ["ArrowRight"] : ["ArrowDown"], R = C ? ["ArrowLeft"] : ["ArrowUp"];
1133
+ if (![...F, ...R, "Home", "End"].includes(h))
1134
+ return;
1135
+ const $ = u();
1136
+ if (!$.length)
1137
+ return;
1138
+ const T = $.findIndex((L) => L.getAttribute("aria-selected") === "true"), x = $.findIndex((L) => L === document.activeElement), B = x >= 0 ? x : Math.max(T, 0);
1139
+ let H = B;
1140
+ F.includes(h) ? H = (B + 1) % $.length : R.includes(h) ? H = (B - 1 + $.length) % $.length : h === "Home" ? H = 0 : h === "End" && (H = $.length - 1), v.preventDefault(), s($[H]);
1141
+ }, f = (v, C) => {
1142
+ o("update:modelValue", v), o("change", v, C);
1143
+ }, p = {
1144
+ activeValue: y(() => a.modelValue),
1145
+ disabled: y(() => a.disabled),
1146
+ orientation: y(() => a.orientation),
1147
+ onChange: f,
1148
+ getTabId: (v) => `vf-tab-${c}-${i(v)}`,
1149
+ getPanelId: (v) => `vf-tabpanel-${c}-${i(v)}`
1150
+ };
1151
+ return Ee(Fe, p), (v, C) => (g(), k("div", {
1152
+ class: V(d.value)
1153
+ }, [
1154
+ S("div", {
1155
+ ref_key: "list",
1156
+ ref: l,
1157
+ class: "vf-tabs__list",
1158
+ role: "tablist",
1159
+ "aria-orientation": v.orientation,
1160
+ "aria-label": v.ariaLabel || void 0,
1161
+ "aria-labelledby": v.ariaLabelledby || void 0,
1162
+ onKeydown: n
1163
+ }, [
1164
+ w(v.$slots, "tabs")
1165
+ ], 40, Ut),
1166
+ S("div", qt, [
1167
+ w(v.$slots, "panels")
1168
+ ])
1169
+ ], 2));
1170
+ }
1171
+ }), Zt = ["id", "aria-selected", "aria-controls", "disabled", "tabindex"], Zo = /* @__PURE__ */ I({
1172
+ __name: "tab",
1173
+ props: {
1174
+ value: {},
1175
+ label: { default: "" },
1176
+ disabled: { type: Boolean, default: !1 }
1177
+ },
1178
+ emits: ["change"],
1179
+ setup(t, { emit: e }) {
1180
+ const r = e, o = t, a = Be(Fe, null), c = y(() => (a == null ? void 0 : a.activeValue.value) === o.value), i = y(() => ((a == null ? void 0 : a.disabled.value) ?? !1) || o.disabled), d = y(() => a ? a.getTabId(o.value) : void 0), l = y(() => a ? a.getPanelId(o.value) : void 0), u = y(() => i.value ? -1 : c.value ? 0 : -1), s = (n) => {
1181
+ !a || i.value || (a.onChange(o.value, n), r("change", o.value, n));
1182
+ };
1183
+ return (n, f) => (g(), k("button", {
1184
+ id: d.value,
1185
+ class: V(["vf-tab", { "vf-tab_active": c.value, "vf-tab_disabled": i.value }]),
1186
+ type: "button",
1187
+ role: "tab",
1188
+ "aria-selected": c.value,
1189
+ "aria-controls": l.value,
1190
+ disabled: i.value,
1191
+ tabindex: u.value,
1192
+ onClick: s
1193
+ }, [
1194
+ w(n.$slots, "default", {}, () => [
1195
+ Q(A(n.label), 1)
1196
+ ])
1197
+ ], 10, Zt));
1198
+ }
1199
+ }), Jt = ["id", "aria-labelledby"], Jo = /* @__PURE__ */ I({
1200
+ __name: "tab-panel",
1201
+ props: {
1202
+ value: {}
1203
+ },
1204
+ setup(t) {
1205
+ const e = t, r = Be(Fe, null), o = y(() => (r == null ? void 0 : r.activeValue.value) === e.value), a = y(() => r ? r.getTabId(e.value) : void 0), c = y(() => r ? r.getPanelId(e.value) : void 0);
1206
+ return (i, d) => ve((g(), k("div", {
1207
+ id: c.value,
1208
+ class: "vf-tab-panel",
1209
+ role: "tabpanel",
1210
+ tabindex: "0",
1211
+ "aria-labelledby": a.value
1212
+ }, [
1213
+ w(i.$slots, "default")
1214
+ ], 8, Jt)), [
1215
+ [pe, o.value]
1216
+ ]);
1217
+ }
1218
+ }), Qt = ["checked", "disabled"], eo = {
1037
1219
  key: 0,
1038
1220
  class: "vf-switch__label"
1039
- }, Oo = /* @__PURE__ */ j({
1221
+ }, Qo = /* @__PURE__ */ I({
1040
1222
  __name: "switch",
1041
1223
  props: {
1042
1224
  modelValue: { type: Boolean, default: !1 },
@@ -1045,113 +1227,113 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
1045
1227
  },
1046
1228
  emits: ["update:modelValue", "change"],
1047
1229
  setup(t, { emit: e }) {
1048
- const r = e, o = t, l = B(() => {
1230
+ const r = e, o = t, a = y(() => {
1049
1231
  const i = ["vf-switch"];
1050
1232
  return o.disabled && i.push("vf-switch_disabled"), i;
1051
1233
  }), c = (i) => {
1052
- const u = i.target;
1053
- r("update:modelValue", u.checked), r("change", i);
1234
+ const d = i.target;
1235
+ r("update:modelValue", d.checked), r("change", i);
1054
1236
  };
1055
- return (i, u) => (m(), k("label", {
1056
- class: L(l.value)
1237
+ return (i, d) => (g(), k("label", {
1238
+ class: V(a.value)
1057
1239
  }, [
1058
- R("input", {
1240
+ S("input", {
1059
1241
  class: "vf-switch__control",
1060
1242
  type: "checkbox",
1061
1243
  checked: i.modelValue,
1062
1244
  disabled: i.disabled,
1063
1245
  onChange: c
1064
- }, null, 40, It),
1065
- u[0] || (u[0] = R("span", { class: "vf-switch__track" }, [
1066
- R("span", { class: "vf-switch__thumb" })
1246
+ }, null, 40, Qt),
1247
+ d[0] || (d[0] = S("span", { class: "vf-switch__track" }, [
1248
+ S("span", { class: "vf-switch__thumb" })
1067
1249
  ], -1)),
1068
- i.label || i.$slots.default ? (m(), k("span", Xt, [
1069
- _(i.$slots, "default", {}, () => [
1070
- ae(X(i.label), 1)
1250
+ i.label || i.$slots.default ? (g(), k("span", eo, [
1251
+ w(i.$slots, "default", {}, () => [
1252
+ Q(A(i.label), 1)
1071
1253
  ])
1072
- ])) : $("", !0)
1254
+ ])) : z("", !0)
1073
1255
  ], 2));
1074
1256
  }
1075
- }), Yt = { class: "vf-popover" }, jt = ["aria-expanded", "onKeydown"], Ho = /* @__PURE__ */ j({
1257
+ }), to = { class: "vf-popover" }, oo = ["aria-expanded", "onKeydown"], er = /* @__PURE__ */ I({
1076
1258
  __name: "popover",
1077
1259
  emits: ["click", "onClick"],
1078
1260
  setup(t, { expose: e, emit: r }) {
1079
- const o = r, l = Ke({ visible: !1 });
1261
+ const o = r, a = Ze({ visible: !1 });
1080
1262
  let c = 0;
1081
- const i = `vf-popover-panel-${++c}`, u = () => l.visible = !0, n = () => l.visible = !1, d = () => l.visible = !l.visible, a = () => {
1082
- d(), o("click"), o("onClick");
1263
+ const i = `vf-popover-panel-${++c}`, d = () => a.visible = !0, l = () => a.visible = !1, u = () => a.visible = !a.visible, s = () => {
1264
+ u(), o("click"), o("onClick");
1083
1265
  };
1084
- return e({ show: u, hide: n, toggle: d }), (s, v) => (m(), k("div", Yt, [
1085
- R("div", {
1266
+ return e({ show: d, hide: l, toggle: u }), (n, f) => (g(), k("div", to, [
1267
+ S("div", {
1086
1268
  class: "vf-popover__button",
1087
1269
  role: "button",
1088
1270
  tabindex: "0",
1089
1271
  "aria-haspopup": "dialog",
1090
- "aria-expanded": l.visible,
1272
+ "aria-expanded": a.visible,
1091
1273
  "aria-controls": i,
1092
- onClick: a,
1274
+ onClick: s,
1093
1275
  onKeydown: [
1094
- re(le(a, ["prevent"]), ["enter"]),
1095
- re(le(a, ["prevent"]), ["space"])
1276
+ ae(le(s, ["prevent"]), ["enter"]),
1277
+ ae(le(s, ["prevent"]), ["space"])
1096
1278
  ]
1097
1279
  }, [
1098
- _(s.$slots, "button")
1099
- ], 40, jt),
1100
- ke(We(st, {
1280
+ w(n.$slots, "button")
1281
+ ], 40, oo),
1282
+ ve(Ie(ut, {
1101
1283
  id: i,
1102
1284
  class: "vf-popover__wrapper"
1103
- }, Ge({
1104
- default: te(() => [
1105
- v[0] || (v[0] = R("div", { class: "vf-popover__arrow" }, null, -1))
1285
+ }, Je({
1286
+ default: oe(() => [
1287
+ f[0] || (f[0] = S("div", { class: "vf-popover__arrow" }, null, -1))
1106
1288
  ]),
1107
1289
  _: 2
1108
1290
  }, [
1109
- s.$slots.default ? {
1291
+ n.$slots.default ? {
1110
1292
  name: "default",
1111
- fn: te(() => [
1112
- _(s.$slots, "default")
1293
+ fn: oe(() => [
1294
+ w(n.$slots, "default")
1113
1295
  ]),
1114
1296
  key: "0"
1115
1297
  } : void 0,
1116
- s.$slots.header || s.$slots.popoverHeader ? {
1298
+ n.$slots.header || n.$slots.popoverHeader ? {
1117
1299
  name: "header",
1118
- fn: te(() => [
1119
- _(s.$slots, "header"),
1120
- s.$slots.header ? $("", !0) : _(s.$slots, "popoverHeader", { key: 0 })
1300
+ fn: oe(() => [
1301
+ w(n.$slots, "header"),
1302
+ n.$slots.header ? z("", !0) : w(n.$slots, "popoverHeader", { key: 0 })
1121
1303
  ]),
1122
1304
  key: "1"
1123
1305
  } : void 0,
1124
- s.$slots.body || s.$slots.popoverBody ? {
1306
+ n.$slots.body || n.$slots.popoverBody ? {
1125
1307
  name: "body",
1126
- fn: te(() => [
1127
- _(s.$slots, "body"),
1128
- s.$slots.body ? $("", !0) : _(s.$slots, "popoverBody", { key: 0 })
1308
+ fn: oe(() => [
1309
+ w(n.$slots, "body"),
1310
+ n.$slots.body ? z("", !0) : w(n.$slots, "popoverBody", { key: 0 })
1129
1311
  ]),
1130
1312
  key: "2"
1131
1313
  } : void 0,
1132
- s.$slots.footer || s.$slots.popoverFooter ? {
1314
+ n.$slots.footer || n.$slots.popoverFooter ? {
1133
1315
  name: "footer",
1134
- fn: te(() => [
1135
- _(s.$slots, "footer"),
1136
- s.$slots.footer ? $("", !0) : _(s.$slots, "popoverFooter", { key: 0 })
1316
+ fn: oe(() => [
1317
+ w(n.$slots, "footer"),
1318
+ n.$slots.footer ? z("", !0) : w(n.$slots, "popoverFooter", { key: 0 })
1137
1319
  ]),
1138
1320
  key: "3"
1139
1321
  } : void 0
1140
1322
  ]), 1536), [
1141
- [Ce, l.visible]
1323
+ [pe, a.visible]
1142
1324
  ])
1143
1325
  ]));
1144
1326
  }
1145
- }), Nt = ["aria-labelledby", "aria-describedby"], Kt = {
1327
+ }), ro = ["aria-labelledby", "aria-describedby"], ao = {
1146
1328
  key: 0,
1147
1329
  class: "vf-modal__header"
1148
- }, Gt = {
1330
+ }, lo = {
1149
1331
  key: 0,
1150
1332
  class: "vf-modal__title"
1151
- }, Ut = {
1333
+ }, no = {
1152
1334
  key: 3,
1153
1335
  class: "vf-modal__footer"
1154
- }, Eo = /* @__PURE__ */ j({
1336
+ }, tr = /* @__PURE__ */ I({
1155
1337
  __name: "modal",
1156
1338
  props: {
1157
1339
  modelValue: { type: Boolean, default: !1 },
@@ -1164,112 +1346,112 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
1164
1346
  },
1165
1347
  emits: ["update:modelValue", "open", "close"],
1166
1348
  setup(t, { expose: e, emit: r }) {
1167
- const o = r, l = t;
1168
- let c = 0, i = 0, u = "", n = null;
1169
- const d = P(null), a = Ue(), s = `vf-modal-title-${++c}`, v = `vf-modal-body-${c}`, f = B(() => !!l.title || !!a.header), p = B(() => !!a.body || !!a.default), C = B(() => {
1170
- const h = ["vf-modal"];
1171
- return l.size !== "md" && h.push(`vf-modal_${l.size}`), h;
1172
- }), b = () => o("update:modelValue", !0), x = () => {
1349
+ const o = r, a = t;
1350
+ let c = 0, i = 0, d = "", l = null;
1351
+ const u = P(null), s = Qe(), n = `vf-modal-title-${++c}`, f = `vf-modal-body-${c}`, p = y(() => !!a.title || !!s.header), v = y(() => !!s.body || !!s.default), C = y(() => {
1352
+ const m = ["vf-modal"];
1353
+ return a.size !== "md" && m.push(`vf-modal_${a.size}`), m;
1354
+ }), h = () => o("update:modelValue", !0), F = () => {
1173
1355
  o("update:modelValue", !1), o("close");
1174
- }, V = () => {
1175
- l.closeOnOverlay && x();
1176
- }, z = (h) => {
1177
- !l.modelValue || !l.closeOnEsc || h.key === "Escape" && (h.preventDefault(), x());
1178
- }, S = () => d.value ? Array.from(d.value.querySelectorAll('a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter((g) => !g.hasAttribute("disabled") && !g.getAttribute("aria-hidden")) : [], w = () => {
1179
- var g;
1180
- const h = S();
1181
- h.length ? h[0].focus() : (g = d.value) == null || g.focus();
1182
- }, F = (h) => {
1356
+ }, R = () => {
1357
+ a.closeOnOverlay && F();
1358
+ }, $ = (m) => {
1359
+ !a.modelValue || !a.closeOnEsc || m.key === "Escape" && (m.preventDefault(), F());
1360
+ }, T = () => u.value ? Array.from(u.value.querySelectorAll('a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter((b) => !b.hasAttribute("disabled") && !b.getAttribute("aria-hidden")) : [], x = () => {
1361
+ var b;
1362
+ const m = T();
1363
+ m.length ? m[0].focus() : (b = u.value) == null || b.focus();
1364
+ }, B = (m) => {
1183
1365
  var E;
1184
- if (h.key !== "Tab")
1366
+ if (m.key !== "Tab")
1185
1367
  return;
1186
- const g = S();
1187
- if (!g.length) {
1188
- h.preventDefault(), (E = d.value) == null || E.focus();
1368
+ const b = T();
1369
+ if (!b.length) {
1370
+ m.preventDefault(), (E = u.value) == null || E.focus();
1189
1371
  return;
1190
1372
  }
1191
- const y = g[0], T = g[g.length - 1], H = document.activeElement;
1192
- if (h.shiftKey && H === y) {
1193
- h.preventDefault(), T.focus();
1373
+ const _ = b[0], W = b[b.length - 1], O = document.activeElement;
1374
+ if (m.shiftKey && O === _) {
1375
+ m.preventDefault(), W.focus();
1194
1376
  return;
1195
1377
  }
1196
- !h.shiftKey && H === T && (h.preventDefault(), y.focus());
1197
- }, O = () => {
1198
- !l.lockScroll || typeof document > "u" || (i === 0 && (u = document.body.style.overflow, document.body.style.overflow = "hidden"), i += 1);
1199
- }, W = () => {
1200
- !l.lockScroll || typeof document > "u" || (i = Math.max(0, i - 1), i === 0 && (document.body.style.overflow = u));
1378
+ !m.shiftKey && O === W && (m.preventDefault(), _.focus());
1379
+ }, H = () => {
1380
+ !a.lockScroll || typeof document > "u" || (i === 0 && (d = document.body.style.overflow, document.body.style.overflow = "hidden"), i += 1);
1381
+ }, L = () => {
1382
+ !a.lockScroll || typeof document > "u" || (i = Math.max(0, i - 1), i === 0 && (document.body.style.overflow = d));
1201
1383
  };
1202
1384
  return ne(
1203
- () => l.modelValue,
1204
- async (h) => {
1205
- h ? (typeof document < "u" && (n = document.activeElement), O(), o("open"), await _e(), w(), typeof document < "u" && document.addEventListener("keydown", z)) : (W(), typeof document < "u" && (document.removeEventListener("keydown", z), n == null || n.focus()));
1385
+ () => a.modelValue,
1386
+ async (m) => {
1387
+ m ? (typeof document < "u" && (l = document.activeElement), H(), o("open"), await we(), x(), typeof document < "u" && document.addEventListener("keydown", $)) : (L(), typeof document < "u" && (document.removeEventListener("keydown", $), l == null || l.focus()));
1206
1388
  },
1207
1389
  { immediate: !0 }
1208
1390
  ), $e(() => {
1209
- W(), typeof document < "u" && document.removeEventListener("keydown", z);
1210
- }), e({ open: b, close: x }), (h, g) => (m(), I(xe, { to: "body" }, [
1211
- ke(R("div", {
1212
- class: L(C.value),
1391
+ L(), typeof document < "u" && document.removeEventListener("keydown", $);
1392
+ }), e({ open: h, close: F }), (m, b) => (g(), N(xe, { to: "body" }, [
1393
+ ve(S("div", {
1394
+ class: V(C.value),
1213
1395
  role: "presentation"
1214
1396
  }, [
1215
- R("div", {
1397
+ S("div", {
1216
1398
  class: "vf-modal__overlay",
1217
- onClick: V
1399
+ onClick: R
1218
1400
  }),
1219
- R("div", {
1401
+ S("div", {
1220
1402
  ref_key: "panel",
1221
- ref: d,
1403
+ ref: u,
1222
1404
  class: "vf-modal__panel",
1223
1405
  role: "dialog",
1224
1406
  "aria-modal": "true",
1225
- "aria-labelledby": f.value ? s : void 0,
1226
- "aria-describedby": p.value ? v : void 0,
1407
+ "aria-labelledby": p.value ? n : void 0,
1408
+ "aria-describedby": v.value ? f : void 0,
1227
1409
  tabindex: "-1",
1228
- onKeydown: F
1410
+ onKeydown: B
1229
1411
  }, [
1230
- f.value ? (m(), k("div", Kt, [
1231
- R("div", {
1232
- id: s,
1412
+ p.value ? (g(), k("div", ao, [
1413
+ S("div", {
1414
+ id: n,
1233
1415
  class: "vf-modal__header-content"
1234
1416
  }, [
1235
- _(h.$slots, "header", {}, () => [
1236
- h.title ? (m(), k("h3", Gt, X(h.title), 1)) : $("", !0)
1417
+ w(m.$slots, "header", {}, () => [
1418
+ m.title ? (g(), k("h3", lo, A(m.title), 1)) : z("", !0)
1237
1419
  ])
1238
1420
  ])
1239
- ])) : $("", !0),
1240
- h.showClose ? _(h.$slots, "close", {
1421
+ ])) : z("", !0),
1422
+ m.showClose ? w(m.$slots, "close", {
1241
1423
  key: 1,
1242
- close: x
1424
+ close: F
1243
1425
  }, () => [
1244
- R("button", {
1426
+ S("button", {
1245
1427
  type: "button",
1246
1428
  class: "vf-modal__close",
1247
1429
  "aria-label": "Close",
1248
- onClick: x
1430
+ onClick: F
1249
1431
  }, "×")
1250
- ]) : $("", !0),
1251
- h.$slots.body || h.$slots.default ? (m(), k("div", {
1432
+ ]) : z("", !0),
1433
+ m.$slots.body || m.$slots.default ? (g(), k("div", {
1252
1434
  key: 2,
1253
- id: v,
1435
+ id: f,
1254
1436
  class: "vf-modal__body"
1255
1437
  }, [
1256
- _(h.$slots, "body"),
1257
- h.$slots.body ? $("", !0) : _(h.$slots, "default", { key: 0 })
1258
- ])) : $("", !0),
1259
- h.$slots.footer ? (m(), k("div", Ut, [
1260
- _(h.$slots, "footer")
1261
- ])) : $("", !0)
1262
- ], 40, Nt)
1438
+ w(m.$slots, "body"),
1439
+ m.$slots.body ? z("", !0) : w(m.$slots, "default", { key: 0 })
1440
+ ])) : z("", !0),
1441
+ m.$slots.footer ? (g(), k("div", no, [
1442
+ w(m.$slots, "footer")
1443
+ ])) : z("", !0)
1444
+ ], 40, ro)
1263
1445
  ], 2), [
1264
- [Ce, h.modelValue]
1446
+ [pe, m.modelValue]
1265
1447
  ])
1266
1448
  ]));
1267
1449
  }
1268
- }), qt = ["data-placement"], Zt = { class: "vf-tooltip__content" }, Jt = {
1450
+ }), so = ["data-placement"], io = { class: "vf-tooltip__content" }, co = {
1269
1451
  key: 0,
1270
1452
  class: "vf-tooltip__arrow",
1271
1453
  "aria-hidden": "true"
1272
- }, Mo = /* @__PURE__ */ j({
1454
+ }, or = /* @__PURE__ */ I({
1273
1455
  __name: "tooltip",
1274
1456
  props: {
1275
1457
  text: { default: "" },
@@ -1280,152 +1462,152 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
1280
1462
  setup(t) {
1281
1463
  const e = t;
1282
1464
  let r = 0;
1283
- const o = P(null), l = P(null), c = P(!1), i = P("top"), u = `vf-tooltip-${++r}`;
1284
- let n = null;
1285
- const d = () => {
1465
+ const o = P(null), a = P(null), c = P(!1), i = P("top"), d = `vf-tooltip-${++r}`;
1466
+ let l = null;
1467
+ const u = () => {
1286
1468
  e.disabled || (c.value = !0);
1287
- }, a = () => {
1288
- c.value = !1;
1289
1469
  }, s = () => {
1290
- if (!o.value || !l.value)
1470
+ c.value = !1;
1471
+ }, n = () => {
1472
+ if (!o.value || !a.value)
1291
1473
  return;
1292
- const f = o.value, p = l.value, C = async () => {
1474
+ const p = o.value, v = a.value, C = async () => {
1293
1475
  const {
1294
- x: z,
1295
- y: S,
1296
- placement: w
1297
- } = await Xe(f, p, {
1476
+ x: $,
1477
+ y: T,
1478
+ placement: x
1479
+ } = await Ye(p, v, {
1298
1480
  placement: e.placement,
1299
1481
  strategy: "fixed",
1300
- middleware: [De(8), Me(), yt()]
1482
+ middleware: [Ne(8), Me(), wt()]
1301
1483
  });
1302
- i.value = w ?? e.placement, p.style.left = `${z}px`, p.style.top = `${S}px`;
1303
- }, b = async () => {
1484
+ i.value = x ?? e.placement, v.style.left = `${$}px`, v.style.top = `${T}px`;
1485
+ }, h = async () => {
1304
1486
  await C();
1305
- }, x = Ie(f, () => {
1306
- b();
1307
- }), V = () => {
1308
- b();
1487
+ }, F = Xe(p, () => {
1488
+ h();
1489
+ }), R = () => {
1490
+ h();
1309
1491
  };
1310
- document.addEventListener("scroll", V, !0), window.addEventListener("resize", V, !1), n = {
1311
- update: b,
1492
+ document.addEventListener("scroll", R, !0), window.addEventListener("resize", R, !1), l = {
1493
+ update: h,
1312
1494
  destroy: () => {
1313
- x(), document.removeEventListener("scroll", V, !0), window.removeEventListener("resize", V, !1);
1495
+ F(), document.removeEventListener("scroll", R, !0), window.removeEventListener("resize", R, !1);
1314
1496
  }
1315
- }, n.update();
1497
+ }, l.update();
1316
1498
  };
1317
- ne(c, async (f) => {
1318
- if (!f) {
1319
- n && (n.destroy(), n = null);
1499
+ ne(c, async (p) => {
1500
+ if (!p) {
1501
+ l && (l.destroy(), l = null);
1320
1502
  return;
1321
1503
  }
1322
- n || s(), n == null || n.update();
1504
+ l || n(), l == null || l.update();
1323
1505
  }), Oe(() => {
1324
- c.value && s();
1506
+ c.value && n();
1325
1507
  }), $e(() => {
1326
- n == null || n.destroy(), n = null;
1508
+ l == null || l.destroy(), l = null;
1327
1509
  });
1328
- const v = B(() => !!e.text || !!(l.value && l.value.textContent));
1329
- return ne(v, (f) => {
1330
- f || (c.value = !1);
1331
- }), (f, p) => (m(), k(ce, null, [
1332
- R("span", {
1510
+ const f = y(() => !!e.text || !!(a.value && a.value.textContent));
1511
+ return ne(f, (p) => {
1512
+ p || (c.value = !1);
1513
+ }), (p, v) => (g(), k(ce, null, [
1514
+ S("span", {
1333
1515
  ref_key: "trigger",
1334
1516
  ref: o,
1335
1517
  class: "vf-tooltip__trigger",
1336
- "aria-describedby": u,
1337
- onMouseenter: d,
1338
- onMouseleave: a,
1339
- onFocus: d,
1340
- onBlur: a
1518
+ "aria-describedby": d,
1519
+ onMouseenter: u,
1520
+ onMouseleave: s,
1521
+ onFocus: u,
1522
+ onBlur: s
1341
1523
  }, [
1342
- _(f.$slots, "default")
1524
+ w(p.$slots, "default")
1343
1525
  ], 544),
1344
- (m(), I(xe, { to: "body" }, [
1345
- ke(R("div", {
1346
- id: u,
1526
+ (g(), N(xe, { to: "body" }, [
1527
+ ve(S("div", {
1528
+ id: d,
1347
1529
  ref_key: "panel",
1348
- ref: l,
1530
+ ref: a,
1349
1531
  class: "vf-tooltip",
1350
1532
  role: "tooltip",
1351
1533
  "data-placement": i.value
1352
1534
  }, [
1353
- R("span", Zt, [
1354
- _(f.$slots, "content", {}, () => [
1355
- ae(X(f.text), 1)
1535
+ S("span", io, [
1536
+ w(p.$slots, "content", {}, () => [
1537
+ Q(A(p.text), 1)
1356
1538
  ])
1357
1539
  ]),
1358
- f.arrow ? (m(), k("span", Jt)) : $("", !0)
1359
- ], 8, qt), [
1360
- [Ce, c.value]
1540
+ p.arrow ? (g(), k("span", co)) : z("", !0)
1541
+ ], 8, so), [
1542
+ [pe, c.value]
1361
1543
  ])
1362
1544
  ]))
1363
1545
  ], 64));
1364
1546
  }
1365
- }), Qt = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], eo = (t) => {
1547
+ }), uo = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], fo = (t) => {
1366
1548
  const e = t.replace(/([A-Z])/g, "-$1");
1367
1549
  return e.charAt(0).toUpperCase() + e.slice(1);
1368
- }, to = (t) => t.filter((e) => !Qt.includes(e)).map((e) => eo(e)).join("-").toLowerCase(), we = (t) => t.join("."), oo = (t) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t), Fe = (t) => {
1369
- if (!oo(t))
1550
+ }, vo = (t) => t.filter((e) => !uo.includes(e)).map((e) => fo(e)).join("-").toLowerCase(), _e = (t) => t.join("."), po = (t) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t), ze = (t) => {
1551
+ if (!po(t))
1370
1552
  return null;
1371
1553
  if (t.length === 4) {
1372
1554
  const e = t[1], r = t[2], o = t[3];
1373
1555
  return `#${e}${e}${r}${r}${o}${o}`;
1374
1556
  }
1375
1557
  return t.toLowerCase();
1376
- }, Ye = (t) => {
1377
- const e = Fe(t);
1558
+ }, Ge = (t) => {
1559
+ const e = ze(t);
1378
1560
  if (!e)
1379
1561
  return [0, 0, 0];
1380
- const r = parseInt(e.slice(1), 16), o = r >> 16 & 255, l = r >> 8 & 255, c = r & 255;
1381
- return [o, l, c];
1382
- }, Te = (t) => {
1383
- const [e, r, o] = Ye(t);
1562
+ const r = parseInt(e.slice(1), 16), o = r >> 16 & 255, a = r >> 8 & 255, c = r & 255;
1563
+ return [o, a, c];
1564
+ }, Re = (t) => {
1565
+ const [e, r, o] = Ge(t);
1384
1566
  return `${e}, ${r}, ${o}`;
1385
- }, ro = (t, e, r) => {
1386
- const o = t / 255, l = e / 255, c = r / 255, i = Math.max(o, l, c), u = Math.min(o, l, c), n = i - u;
1387
- let d = 0, a = 0;
1388
- const s = (i + u) / 2;
1389
- if (n !== 0) {
1390
- switch (a = n / (1 - Math.abs(2 * s - 1)), i) {
1567
+ }, bo = (t, e, r) => {
1568
+ const o = t / 255, a = e / 255, c = r / 255, i = Math.max(o, a, c), d = Math.min(o, a, c), l = i - d;
1569
+ let u = 0, s = 0;
1570
+ const n = (i + d) / 2;
1571
+ if (l !== 0) {
1572
+ switch (s = l / (1 - Math.abs(2 * n - 1)), i) {
1391
1573
  case o:
1392
- d = (l - c) / n % 6;
1574
+ u = (a - c) / l % 6;
1393
1575
  break;
1394
- case l:
1395
- d = (c - o) / n + 2;
1576
+ case a:
1577
+ u = (c - o) / l + 2;
1396
1578
  break;
1397
1579
  case c:
1398
- d = (o - l) / n + 4;
1580
+ u = (o - a) / l + 4;
1399
1581
  break;
1400
1582
  }
1401
- d *= 60, d < 0 && (d += 360);
1583
+ u *= 60, u < 0 && (u += 360);
1402
1584
  }
1403
- return [d, a * 100, s * 100];
1404
- }, lo = (t, e, r) => {
1405
- const o = e / 100, l = r / 100, c = (1 - Math.abs(2 * l - 1)) * o, i = c * (1 - Math.abs(t / 60 % 2 - 1)), u = l - c / 2;
1406
- let n = 0, d = 0, a = 0;
1407
- t >= 0 && t < 60 ? (n = c, d = i, a = 0) : t >= 60 && t < 120 ? (n = i, d = c, a = 0) : t >= 120 && t < 180 ? (n = 0, d = c, a = i) : t >= 180 && t < 240 ? (n = 0, d = i, a = c) : t >= 240 && t < 300 ? (n = i, d = 0, a = c) : (n = c, d = 0, a = i);
1408
- const s = Math.round((n + u) * 255), v = Math.round((d + u) * 255), f = Math.round((a + u) * 255);
1409
- return [s, v, f];
1410
- }, no = (t, e, r) => `#${[t, e, r].map((o) => o.toString(16).padStart(2, "0")).join("")}`, ao = (t, e, r) => Math.min(r, Math.max(e, t)), so = (t, e) => {
1411
- const r = Fe(t);
1585
+ return [u, s * 100, n * 100];
1586
+ }, go = (t, e, r) => {
1587
+ const o = e / 100, a = r / 100, c = (1 - Math.abs(2 * a - 1)) * o, i = c * (1 - Math.abs(t / 60 % 2 - 1)), d = a - c / 2;
1588
+ let l = 0, u = 0, s = 0;
1589
+ t >= 0 && t < 60 ? (l = c, u = i, s = 0) : t >= 60 && t < 120 ? (l = i, u = c, s = 0) : t >= 120 && t < 180 ? (l = 0, u = c, s = i) : t >= 180 && t < 240 ? (l = 0, u = i, s = c) : t >= 240 && t < 300 ? (l = i, u = 0, s = c) : (l = c, u = 0, s = i);
1590
+ const n = Math.round((l + d) * 255), f = Math.round((u + d) * 255), p = Math.round((s + d) * 255);
1591
+ return [n, f, p];
1592
+ }, mo = (t, e, r) => `#${[t, e, r].map((o) => o.toString(16).padStart(2, "0")).join("")}`, ho = (t, e, r) => Math.min(r, Math.max(e, t)), yo = (t, e) => {
1593
+ const r = ze(t);
1412
1594
  if (!r)
1413
1595
  return t;
1414
- const [o, l, c] = Ye(r), [i, u, n] = ro(o, l, c), a = (e - 5) * 7, s = ao(n + a, 0, 100), [v, f, p] = lo(i, u, s);
1415
- return no(v, f, p);
1416
- }, ye = (t) => !!t && typeof t == "object" && !Array.isArray(t), Be = (t, e) => {
1596
+ const [o, a, c] = Ge(r), [i, d, l] = bo(o, a, c), s = (e - 5) * 7, n = ho(l + s, 0, 100), [f, p, v] = go(i, d, n);
1597
+ return mo(f, p, v);
1598
+ }, Ce = (t) => !!t && typeof t == "object" && !Array.isArray(t), Se = (t, e) => {
1417
1599
  if (!e)
1418
1600
  return { ...t };
1419
1601
  const r = { ...t };
1420
1602
  for (const o in e) {
1421
- const l = e[o], c = t[o];
1422
- ye(c) && ye(l) ? r[o] = Be(c, l) : r[o] = l;
1603
+ const a = e[o], c = t[o];
1604
+ Ce(c) && Ce(a) ? r[o] = Se(c, a) : r[o] = a;
1423
1605
  }
1424
1606
  return r;
1425
- }, io = (t) => {
1607
+ }, ko = (t) => {
1426
1608
  if (!t)
1427
1609
  return null;
1428
- if (ye(t) && "preset" in t) {
1610
+ if (Ce(t) && "preset" in t) {
1429
1611
  const e = t;
1430
1612
  return {
1431
1613
  preset: e.preset ?? {},
@@ -1436,42 +1618,42 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
1436
1618
  };
1437
1619
  }
1438
1620
  return { preset: t };
1439
- }, co = (t) => {
1440
- const e = [], r = [], o = [], l = [], c = (n) => o.push(n), i = (n) => l.push(n), u = (n, d) => {
1441
- if (!(!n || typeof n != "object"))
1442
- for (const a in n) {
1443
- const s = n[a], v = d.concat([a]);
1444
- if (ye(s)) {
1445
- u(s, v);
1621
+ }, Co = (t) => {
1622
+ const e = [], r = [], o = [], a = [], c = (l) => o.push(l), i = (l) => a.push(l), d = (l, u) => {
1623
+ if (!(!l || typeof l != "object"))
1624
+ for (const s in l) {
1625
+ const n = l[s], f = u.concat([s]);
1626
+ if (Ce(n)) {
1627
+ d(n, f);
1446
1628
  continue;
1447
1629
  }
1448
- if (s && typeof s == "object") {
1449
- i(`Theme value "${we(v)}" is not a plain object or string and will be ignored.`);
1630
+ if (n && typeof n == "object") {
1631
+ i(`Theme value "${_e(f)}" is not a plain object or string and will be ignored.`);
1450
1632
  continue;
1451
1633
  }
1452
- if (typeof s != "string") {
1453
- i(`Theme value "${we(v)}" is not a string and will be ignored.`);
1634
+ if (typeof n != "string") {
1635
+ i(`Theme value "${_e(f)}" is not a string and will be ignored.`);
1454
1636
  continue;
1455
1637
  }
1456
- const p = v.includes("colorScheme") && v.includes("dark") ? r : e, C = to(v);
1457
- if (p.push(`--vf-${C}: ${s}`), v.includes("colors")) {
1458
- const b = Fe(s);
1459
- if (!b) {
1638
+ const v = f.includes("colorScheme") && f.includes("dark") ? r : e, C = vo(f);
1639
+ if (v.push(`--vf-${C}: ${n}`), f.includes("colors")) {
1640
+ const h = ze(n);
1641
+ if (!h) {
1460
1642
  c(
1461
- `Theme color "${we(v)}" is not hex. Shade variables will not be generated for it.`
1643
+ `Theme color "${_e(f)}" is not hex. Shade variables will not be generated for it.`
1462
1644
  );
1463
1645
  continue;
1464
1646
  }
1465
- if (p.push(`--vf-${C}-rgb: ${Te(b)}`), a !== "white")
1466
- for (let x = 1; x < 10; ++x) {
1467
- const V = so(b, x);
1468
- p.push(`--vf-${C}-${x}00: ${V}`), p.push(`--vf-${C}-${x}00-rgb: ${Te(V)}`);
1647
+ if (v.push(`--vf-${C}-rgb: ${Re(h)}`), s !== "white")
1648
+ for (let F = 1; F < 10; ++F) {
1649
+ const R = yo(h, F);
1650
+ v.push(`--vf-${C}-${F}00: ${R}`), v.push(`--vf-${C}-${F}00-rgb: ${Re(R)}`);
1469
1651
  }
1470
1652
  }
1471
1653
  }
1472
1654
  };
1473
- return u(t, []), { baseVars: e, darkVars: r, warnings: o, errors: l };
1474
- }, uo = (t) => {
1655
+ return d(t, []), { baseVars: e, darkVars: r, warnings: o, errors: a };
1656
+ }, _o = (t) => {
1475
1657
  if (typeof document > "u")
1476
1658
  return null;
1477
1659
  const e = document.getElementById(t);
@@ -1479,48 +1661,48 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
1479
1661
  return e;
1480
1662
  const r = document.createElement("style");
1481
1663
  return r.id = t, document.head.appendChild(r), r;
1482
- }, fo = (t) => ({
1664
+ }, wo = (t) => ({
1483
1665
  selector: t.selector ?? ":root",
1484
1666
  darkSelector: t.darkSelector ?? ":root[data-theme=dark]"
1485
- }), vo = (t, e, r, o) => {
1486
- const { baseVars: l, darkVars: c, warnings: i, errors: u } = co(t), n = uo("vueforge-theme");
1487
- if (!n)
1667
+ }), $o = (t, e, r, o) => {
1668
+ const { baseVars: a, darkVars: c, warnings: i, errors: d } = Co(t), l = _o("vueforge-theme");
1669
+ if (!l)
1488
1670
  return;
1489
- if (u.length) {
1671
+ if (d.length) {
1490
1672
  if (o)
1491
- throw new Error(`[VueForge] ${u.join(" ")}`);
1492
- for (const a of u)
1493
- console.warn(`[VueForge] ${a}`);
1673
+ throw new Error(`[VueForge] ${d.join(" ")}`);
1674
+ for (const s of d)
1675
+ console.warn(`[VueForge] ${s}`);
1494
1676
  }
1495
1677
  if (i.length)
1496
- for (const a of i)
1497
- console.warn(`[VueForge] ${a}`);
1498
- const d = [];
1499
- l.length && d.push(`${e} { ${l.join(";")} }`), c.length && d.push(`${r} { ${c.join(";")} }`), n.textContent = d.join(`
1678
+ for (const s of i)
1679
+ console.warn(`[VueForge] ${s}`);
1680
+ const u = [];
1681
+ a.length && u.push(`${e} { ${a.join(";")} }`), c.length && u.push(`${r} { ${c.join(";")} }`), l.textContent = u.join(`
1500
1682
  `);
1501
1683
  };
1502
1684
  let J = null;
1503
- const je = (t) => {
1504
- const e = io(t);
1685
+ const Ue = (t) => {
1686
+ const e = ko(t);
1505
1687
  if (!e)
1506
1688
  return;
1507
- const r = Be(e.preset, e.overrides), { selector: o, darkSelector: l } = fo(e);
1508
- J = { ...e }, vo(r, o, l, e.strict);
1509
- }, Po = (t) => {
1689
+ const r = Se(e.preset, e.overrides), { selector: o, darkSelector: a } = wo(e);
1690
+ J = { ...e }, $o(r, o, a, e.strict);
1691
+ }, rr = (t) => {
1510
1692
  if (!J)
1511
1693
  return;
1512
- const e = t.overrides === void 0 ? J.overrides : Be(J.overrides ?? {}, t.overrides ?? {}), r = {
1694
+ const e = t.overrides === void 0 ? J.overrides : Se(J.overrides ?? {}, t.overrides ?? {}), r = {
1513
1695
  preset: t.preset ?? J.preset,
1514
1696
  overrides: e,
1515
1697
  selector: t.selector ?? J.selector,
1516
1698
  darkSelector: t.darkSelector ?? J.darkSelector
1517
1699
  };
1518
- je(r);
1519
- }, Ao = () => J ? { ...J } : null, Do = {
1700
+ Ue(r);
1701
+ }, ar = () => J ? { ...J } : null, lr = {
1520
1702
  install(t, e = {}) {
1521
- e.theme && je(e.theme);
1703
+ e.theme && Ue(e.theme);
1522
1704
  }
1523
- }, Re = {
1705
+ }, Le = {
1524
1706
  colors: {
1525
1707
  white: "#ffffff",
1526
1708
  green: "#0cbc87",
@@ -1583,7 +1765,7 @@ const je = (t) => {
1583
1765
  dividerColor: "#2e2e32"
1584
1766
  }
1585
1767
  }
1586
- }, po = {
1768
+ }, xo = {
1587
1769
  fontSize: "var(--vf-typography-font-size)",
1588
1770
  padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
1589
1771
  borderRadius: "var(--vf-radii-md)",
@@ -1725,11 +1907,11 @@ const je = (t) => {
1725
1907
  }
1726
1908
  }
1727
1909
  }
1728
- }, go = {
1910
+ }, Bo = {
1729
1911
  padding: "12px",
1730
1912
  borderColor: "var(--vf-border-color)",
1731
1913
  borderRadius: "var(--vf-radii-md)"
1732
- }, ho = {
1914
+ }, Fo = {
1733
1915
  gap: "0.5rem",
1734
1916
  fontSize: "var(--vf-typography-font-size)",
1735
1917
  padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
@@ -1750,7 +1932,7 @@ const je = (t) => {
1750
1932
  padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
1751
1933
  fontSize: "var(--vf-sizes-lg-font-size)"
1752
1934
  }
1753
- }, mo = {
1935
+ }, zo = {
1754
1936
  gap: "0.5rem",
1755
1937
  fontSize: "var(--vf-typography-font-size)",
1756
1938
  padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
@@ -1773,10 +1955,10 @@ const je = (t) => {
1773
1955
  padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
1774
1956
  fontSize: "var(--vf-sizes-lg-font-size)"
1775
1957
  }
1776
- }, bo = {
1958
+ }, So = {
1777
1959
  hoverColor: "var(--vf-blue)",
1778
1960
  activeColor: "var(--vf-blue)"
1779
- }, yo = {
1961
+ }, Vo = {
1780
1962
  iconGap: "6px",
1781
1963
  submenuOffset: "12px",
1782
1964
  separatorThickness: "1px",
@@ -1796,7 +1978,7 @@ const je = (t) => {
1796
1978
  marginBottom: "0.5rem",
1797
1979
  marginLeft: "0.5rem"
1798
1980
  }
1799
- }, ko = {
1981
+ }, To = {
1800
1982
  width: "90vw",
1801
1983
  maxWidth: "520px",
1802
1984
  maxHeight: "80vh",
@@ -1823,9 +2005,9 @@ const je = (t) => {
1823
2005
  closeColor: "var(--vf-text-color)",
1824
2006
  closeFontSize: "1.25rem",
1825
2007
  closeHoverBackgroundColor: "rgba(0, 0, 0, 0.06)"
1826
- }, Co = {
2008
+ }, Ro = {
1827
2009
  backgroundColor: "var(--vf-bg-color)"
1828
- }, wo = {
2010
+ }, Lo = {
1829
2011
  minWidth: "12rem",
1830
2012
  fontSize: "var(--vf-typography-font-size)",
1831
2013
  controlGap: "0.75rem",
@@ -1858,7 +2040,7 @@ const je = (t) => {
1858
2040
  padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
1859
2041
  fontSize: "var(--vf-sizes-lg-font-size)"
1860
2042
  }
1861
- }, _o = {
2043
+ }, Wo = {
1862
2044
  size: "1rem",
1863
2045
  gap: "0.5rem",
1864
2046
  borderRadius: "var(--vf-radii-sm)",
@@ -1870,7 +2052,21 @@ const je = (t) => {
1870
2052
  checkColor: "#ffffff",
1871
2053
  textColor: "var(--vf-text-color)",
1872
2054
  disabledOpacity: "var(--vf-states-disabled-opacity)"
1873
- }, $o = {
2055
+ }, Ho = {
2056
+ size: "1rem",
2057
+ dotSize: "0.45rem",
2058
+ gap: "0.5rem",
2059
+ groupGap: "0.5rem",
2060
+ borderRadius: "999px",
2061
+ dotBorderRadius: "999px",
2062
+ borderColor: "var(--vf-border-color)",
2063
+ backgroundColor: "var(--vf-controls-background-color)",
2064
+ checkedBackgroundColor: "var(--vf-blue)",
2065
+ checkedBorderColor: "var(--vf-blue)",
2066
+ dotColor: "#ffffff",
2067
+ textColor: "var(--vf-text-color)",
2068
+ disabledOpacity: "var(--vf-states-disabled-opacity)"
2069
+ }, Io = {
1874
2070
  width: "2.25rem",
1875
2071
  height: "1.25rem",
1876
2072
  thumbSize: "1rem",
@@ -1882,7 +2078,28 @@ const je = (t) => {
1882
2078
  thumbColor: "#ffffff",
1883
2079
  textColor: "var(--vf-text-color)",
1884
2080
  disabledOpacity: "var(--vf-states-disabled-opacity)"
1885
- }, xo = {
2081
+ }, Oo = {
2082
+ gap: "0.75rem",
2083
+ listGap: "0.5rem",
2084
+ listBorderWidth: "1px",
2085
+ listBorderColor: "var(--vf-border-color)",
2086
+ listVerticalPadding: "0.75rem",
2087
+ tabPadding: "0.45rem 0.75rem",
2088
+ tabFontSize: "var(--vf-typography-font-size)",
2089
+ tabBorderRadius: "0",
2090
+ tabTextColor: "var(--vf-secondary-text-color)",
2091
+ tabBackgroundColor: "transparent",
2092
+ tabHoverBackgroundColor: "transparent",
2093
+ tabActiveTextColor: "var(--vf-text-color)",
2094
+ tabActiveBackgroundColor: "transparent",
2095
+ tabActiveBorderColor: "var(--vf-blue)",
2096
+ tabActiveBorderWidth: "2px",
2097
+ panelPadding: "0",
2098
+ panelBorderRadius: "var(--vf-radii-md)",
2099
+ panelBackgroundColor: "transparent",
2100
+ panelTextColor: "var(--vf-text-color)",
2101
+ disabledOpacity: "var(--vf-states-disabled-opacity)"
2102
+ }, Eo = {
1886
2103
  padding: "0.35rem 0.6rem",
1887
2104
  borderRadius: "8px",
1888
2105
  backgroundColor: "rgba(0, 0, 0, 0.8)",
@@ -1893,40 +2110,47 @@ const je = (t) => {
1893
2110
  zIndex: "120",
1894
2111
  maxWidth: "240px",
1895
2112
  arrowSize: "8px"
1896
- }, Io = {
1897
- ...Re,
2113
+ }, nr = {
2114
+ ...Le,
1898
2115
  components: {
1899
- base: Re,
1900
- button: po,
1901
- card: go,
1902
- input: ho,
1903
- textarea: mo,
1904
- link: bo,
1905
- menu: yo,
1906
- modal: ko,
1907
- popover: Co,
1908
- select: wo,
1909
- checkbox: _o,
1910
- switch: $o,
1911
- tooltip: xo
2116
+ base: Le,
2117
+ button: xo,
2118
+ card: Bo,
2119
+ input: Fo,
2120
+ textarea: zo,
2121
+ link: So,
2122
+ menu: Vo,
2123
+ modal: To,
2124
+ popover: Ro,
2125
+ select: Lo,
2126
+ checkbox: Wo,
2127
+ radio: Ho,
2128
+ switch: Io,
2129
+ tabs: Oo,
2130
+ tooltip: Eo
1912
2131
  }
1913
2132
  };
1914
2133
  export {
1915
- To as Button,
1916
- st as Card,
1917
- Wo as Checkbox,
1918
- Io as DefaultTheme,
1919
- Ro as Input,
1920
- He as Link,
1921
- So as Menu,
1922
- Eo as Modal,
1923
- Ho as Popover,
1924
- Vo as Select,
1925
- Oo as Switch,
1926
- Lo as Textarea,
1927
- Mo as Tooltip,
1928
- Do as VueForge,
1929
- Ao as getTheme,
1930
- je as setTheme,
1931
- Po as updateTheme
2134
+ Ko as Button,
2135
+ ut as Card,
2136
+ jo as Checkbox,
2137
+ nr as DefaultTheme,
2138
+ No as Input,
2139
+ Pe as Link,
2140
+ Do as Menu,
2141
+ tr as Modal,
2142
+ er as Popover,
2143
+ Uo as RadioButton,
2144
+ Go as RadioGroup,
2145
+ Yo as Select,
2146
+ Qo as Switch,
2147
+ Zo as Tab,
2148
+ Jo as TabPanel,
2149
+ qo as Tabs,
2150
+ Xo as Textarea,
2151
+ or as Tooltip,
2152
+ lr as VueForge,
2153
+ ar as getTheme,
2154
+ Ue as setTheme,
2155
+ rr as updateTheme
1932
2156
  };