@codemonster-ru/vueforge 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/{LICENSE.md → LICENSE} +1 -1
  2. package/README.md +18 -4
  3. package/dist/index.css +1 -1
  4. package/dist/index.d.ts +0 -8
  5. package/dist/index.ts.mjs +646 -761
  6. package/dist/index.ts.umd.js +3 -3
  7. package/dist/package/components/button.vue.d.ts +2 -2
  8. package/dist/package/components/link.vue.d.ts +2 -2
  9. package/dist/package/themes/default/base.d.ts +1 -0
  10. package/dist/package/themes/default/components/button.d.ts +2 -0
  11. package/dist/package/themes/default/components/checkbox.d.ts +1 -0
  12. package/dist/package/themes/default/components/input.d.ts +2 -0
  13. package/dist/package/themes/default/components/menu.d.ts +4 -0
  14. package/dist/package/themes/default/components/select.d.ts +10 -0
  15. package/dist/package/themes/default/components/switch.d.ts +2 -0
  16. package/dist/package/themes/default/index.d.ts +23 -22
  17. package/package.json +13 -2
  18. package/dist/package/components/container.vue.d.ts +0 -17
  19. package/dist/package/components/content.vue.d.ts +0 -17
  20. package/dist/package/components/demo.vue.d.ts +0 -17
  21. package/dist/package/components/footer.vue.d.ts +0 -17
  22. package/dist/package/components/header.vue.d.ts +0 -17
  23. package/dist/package/components/logo.vue.d.ts +0 -24
  24. package/dist/package/layouts/defaultLayout.vue.d.ts +0 -19
  25. package/dist/package/layouts/leftSidebarLayout.vue.d.ts +0 -17
  26. package/dist/package/themes/default/components/container.d.ts +0 -4
  27. package/dist/package/themes/default/components/content.d.ts +0 -2
  28. package/dist/package/themes/default/components/demo.d.ts +0 -2
  29. package/dist/package/themes/default/components/footer.d.ts +0 -9
  30. package/dist/package/themes/default/components/header.d.ts +0 -9
  31. package/dist/package/themes/default/components/logo.d.ts +0 -2
package/dist/index.ts.mjs CHANGED
@@ -1,72 +1,7 @@
1
- import { openBlock as p, createElementBlock as b, renderSlot as g, defineComponent as E, createVNode as Z, withCtx as L, resolveComponent as de, createElementVNode as $, ref as j, computed as C, watch as ae, normalizeClass as k, Fragment as ne, createTextVNode as ee, toDisplayString as H, createBlock as V, createCommentVNode as w, renderList as ye, withKeys as K, withModifiers as q, unref as J, nextTick as pe, onMounted as Re, onBeforeUnmount as Se, Teleport as Ve, withDirectives as _e, vShow as ke, reactive as ze, createSlots as We } from "vue";
2
- import { useRoute as Me, useRouter as He } from "vue-router";
3
- import { CmIcon as Q } from "@codemonster-ru/vueiconify";
4
- const U = (t, e) => {
5
- const r = t.__vccOpts || t;
6
- for (const [o, n] of e)
7
- r[o] = n;
8
- return r;
9
- }, Ee = {}, Ae = { class: "vf-header" };
10
- function Pe(t, e) {
11
- return p(), b("header", Ae, [
12
- g(t.$slots, "default")
13
- ]);
14
- }
15
- const De = /* @__PURE__ */ U(Ee, [["render", Pe]]), Oe = {}, Ne = { class: "vf-content" };
16
- function Ie(t, e) {
17
- return p(), b("div", Ne, [
18
- g(t.$slots, "default")
19
- ]);
20
- }
21
- const je = /* @__PURE__ */ U(Oe, [["render", Ie]]), Xe = {}, Ye = { class: "vf-footer" };
22
- function Ke(t, e) {
23
- return p(), b("footer", Ye, [
24
- g(t.$slots, "default")
25
- ]);
26
- }
27
- const qe = /* @__PURE__ */ U(Xe, [["render", Ke]]), Ue = { class: "vf-layout" }, No = /* @__PURE__ */ E({
28
- __name: "defaultLayout",
29
- setup(t) {
30
- return (e, r) => (p(), b("div", Ue, [
31
- Z(De, null, {
32
- default: L(() => [
33
- g(e.$slots, "header")
34
- ]),
35
- _: 3
36
- }),
37
- Z(je, null, {
38
- default: L(() => [
39
- g(e.$slots, "content")
40
- ]),
41
- _: 3
42
- }),
43
- Z(qe, null, {
44
- default: L(() => [
45
- g(e.$slots, "footer")
46
- ]),
47
- _: 3
48
- })
49
- ]));
50
- }
51
- }), Ge = {}, Ze = { class: "vf-left-sidebar-flexbox" }, Je = { class: "vf-left-sidebar" }, Qe = { class: "vf-main-content" };
52
- function et(t, e) {
53
- const r = de("router-view");
54
- return p(), b("div", Ze, [
55
- $("div", Je, [
56
- g(t.$slots, "leftSidebar")
57
- ]),
58
- $("div", Qe, [
59
- Z(r)
60
- ])
61
- ]);
62
- }
63
- const Io = /* @__PURE__ */ U(Ge, [["render", et]]), tt = {}, ot = { class: "vf-demo" };
64
- function rt(t, e) {
65
- return p(), b("div", ot, [
66
- g(t.$slots, "default")
67
- ]);
68
- }
69
- const jo = /* @__PURE__ */ U(tt, [["render", rt]]), nt = ["href", "aria-disabled", "tabindex"], ue = /* @__PURE__ */ E({
1
+ import { defineComponent as X, ref as N, computed as w, watch as le, resolveComponent as be, openBlock as g, createElementBlock as h, normalizeClass as C, renderSlot as k, Fragment as oe, createTextVNode as J, toDisplayString as M, createBlock as W, withCtx as I, createCommentVNode as _, createElementVNode as B, renderList as ge, withKeys as K, withModifiers as G, unref as U, createVNode as he, nextTick as de, onMounted as Re, onBeforeUnmount as Se, Teleport as Le, withDirectives as me, vShow as ye, reactive as Ve, createSlots as ze } from "vue";
2
+ import { useRoute as We, useRouter as Me } from "vue-router";
3
+ import { CmIcon as Z } from "@codemonster-ru/vueiconify";
4
+ const He = ["href", "aria-disabled", "tabindex"], ke = /* @__PURE__ */ X({
70
5
  __name: "link",
71
6
  props: {
72
7
  to: { default: void 0 },
@@ -80,132 +15,96 @@ const jo = /* @__PURE__ */ U(tt, [["render", rt]]), nt = ["href", "aria-disabled
80
15
  },
81
16
  emits: ["click", "active", "update:active", "onActive"],
82
17
  setup(t, { emit: e }) {
83
- const r = e, o = t, n = Me(), d = He(), a = j(null), c = C(() => o.href ?? o.url), l = C(() => o.as ? o.as : o.type === "router-link" || o.type === "a" ? o.type : o.to ? "router-link" : "a"), f = C(() => o.to ? d.resolve(o.to) : null), u = C(() => {
18
+ const r = e, o = t, n = We(), c = Me(), s = N(null), i = w(() => o.href ?? o.url), l = w(() => 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 = w(() => o.to), d = w(() => o.to ? c.resolve(o.to) : null), a = w(() => {
84
19
  if (l.value !== "router-link")
85
20
  return !1;
86
- const i = f.value;
87
- return i ? i.name ? n.matched.some(({ name: m }) => m === i.name) : i.fullPath ? n.fullPath === i.fullPath : n.path === i.path : !1;
88
- }), s = C(() => o.active === void 0 ? u.value : o.active), v = (i) => {
21
+ const p = d.value;
22
+ return p ? p.name ? n.matched.some(({ name: y }) => y === p.name) : p.fullPath ? n.fullPath === p.fullPath : n.path === p.path : !1;
23
+ }), v = w(() => o.active === void 0 ? a.value : o.active), f = (p) => {
89
24
  if (!o.disabled) {
90
- r("click", i);
25
+ r("click", p);
91
26
  return;
92
27
  }
93
- i.preventDefault(), i.stopPropagation();
28
+ p.preventDefault(), p.stopPropagation();
94
29
  };
95
- return ae(u, (i) => {
96
- i && (r("active"), r("onActive")), r("update:active", i);
97
- }), (i, m) => {
98
- const _ = de("router-link");
99
- return l.value === "a" ? (p(), b("a", {
30
+ return le(a, (p) => {
31
+ p && (r("active"), r("onActive")), r("update:active", p);
32
+ }), (p, y) => {
33
+ const m = be("router-link");
34
+ return l.value === "a" ? (g(), h("a", {
100
35
  key: 0,
101
- href: c.value,
102
- class: k(["vf-link", { "vf-link_active": s.value, "vf-link_disabled": i.disabled }]),
103
- "aria-disabled": i.disabled,
104
- tabindex: i.disabled ? -1 : void 0,
105
- onClick: v
36
+ href: i.value,
37
+ class: C(["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
106
41
  }, [
107
- i.$slots.default ? g(i.$slots, "default", { key: 0 }) : (p(), b(ne, { key: 1 }, [
108
- ee(H(i.label), 1)
42
+ p.$slots.default ? k(p.$slots, "default", { key: 0 }) : (g(), h(oe, { key: 1 }, [
43
+ J(M(p.label), 1)
109
44
  ], 64))
110
- ], 10, nt)) : (p(), V(_, {
45
+ ], 10, He)) : (g(), W(m, {
111
46
  key: 1,
112
47
  ref_key: "link",
113
- ref: a,
114
- to: i.to,
115
- class: k(["vf-link", { "vf-link_active": s.value }]),
116
- "aria-disabled": i.disabled,
117
- tabindex: i.disabled ? -1 : void 0,
48
+ ref: s,
49
+ to: u.value,
50
+ class: C(["vf-link", { "vf-link_active": v.value }]),
51
+ "aria-disabled": p.disabled,
52
+ tabindex: p.disabled ? -1 : void 0,
118
53
  "active-class": "vf-link_partially-active",
119
54
  "exact-active-class": "vf-link_active",
120
- onClick: v
55
+ onClick: f
121
56
  }, {
122
- default: L(() => [
123
- i.$slots.default ? g(i.$slots, "default", { key: 0 }) : (p(), b(ne, { key: 1 }, [
124
- ee(H(i.label), 1)
57
+ default: I(() => [
58
+ p.$slots.default ? k(p.$slots, "default", { key: 0 }) : (g(), h(oe, { key: 1 }, [
59
+ J(M(p.label), 1)
125
60
  ], 64))
126
61
  ]),
127
62
  _: 3
128
63
  }, 8, ["to", "class", "aria-disabled", "tabindex"]));
129
64
  };
130
65
  }
131
- }), lt = {}, st = { class: "vf-card" }, at = {
66
+ }), Oe = (t, e) => {
67
+ const r = t.__vccOpts || t;
68
+ for (const [o, n] of e)
69
+ r[o] = n;
70
+ return r;
71
+ }, Ee = {}, Pe = { class: "vf-card" }, Ae = {
132
72
  key: 0,
133
73
  class: "vf-card__default"
134
- }, it = {
74
+ }, De = {
135
75
  key: 1,
136
76
  class: "vf-card__header"
137
- }, ct = {
77
+ }, Ne = {
138
78
  key: 2,
139
79
  class: "vf-card__body"
140
- }, dt = {
80
+ }, Ie = {
141
81
  key: 3,
142
82
  class: "vf-card__footer"
143
83
  };
144
- function ut(t, e) {
145
- return p(), b("div", st, [
146
- t.$slots.default ? (p(), b("div", at, [
147
- g(t.$slots, "default")
148
- ])) : w("", !0),
149
- t.$slots.header ? (p(), b("div", it, [
150
- g(t.$slots, "header")
151
- ])) : w("", !0),
152
- t.$slots.body ? (p(), b("div", ct, [
153
- g(t.$slots, "body")
154
- ])) : w("", !0),
155
- t.$slots.footer ? (p(), b("div", dt, [
156
- g(t.$slots, "footer")
157
- ])) : w("", !0)
84
+ function je(t, e) {
85
+ return g(), h("div", Pe, [
86
+ t.$slots.default ? (g(), h("div", Ae, [
87
+ k(t.$slots, "default")
88
+ ])) : _("", !0),
89
+ t.$slots.header ? (g(), h("div", De, [
90
+ k(t.$slots, "header")
91
+ ])) : _("", !0),
92
+ t.$slots.body ? (g(), h("div", Ne, [
93
+ k(t.$slots, "body")
94
+ ])) : _("", !0),
95
+ t.$slots.footer ? (g(), h("div", Ie, [
96
+ k(t.$slots, "footer")
97
+ ])) : _("", !0)
158
98
  ]);
159
99
  }
160
- const ft = /* @__PURE__ */ U(lt, [["render", ut]]), vt = { class: "vf-logo" }, pt = ["src", "width", "height", "alt"], ht = ["src", "width", "height", "alt"], Xo = /* @__PURE__ */ E({
161
- __name: "logo",
162
- props: {
163
- to: { default: void 0 },
164
- href: { default: void 0 },
165
- url: { default: void 0 },
166
- src: {},
167
- alt: { default: void 0 },
168
- as: { default: void 0 },
169
- type: { default: void 0 },
170
- dark: { type: Boolean },
171
- width: { default: void 0 },
172
- height: { default: void 0 }
173
- },
174
- setup(t) {
175
- const e = t, r = C(() => e.as ? e.as : e.type === "router-link" || e.type === "a" ? e.type : e.to ? "router-link" : e.href || e.url ? "a" : ""), o = C(() => Array.isArray(e.src) ? e.dark ? e.src[1] : e.src[0] : e.src);
176
- return (n, d) => (p(), b("div", vt, [
177
- r.value ? (p(), V(ue, {
178
- key: 0,
179
- as: r.value,
180
- to: n.to,
181
- href: n.href ?? n.url
182
- }, {
183
- default: L(() => [
184
- $("img", {
185
- src: o.value,
186
- width: n.width,
187
- height: n.height,
188
- alt: n.alt
189
- }, null, 8, pt)
190
- ]),
191
- _: 1
192
- }, 8, ["as", "to", "href"])) : (p(), b("img", {
193
- key: 1,
194
- src: o.value,
195
- width: n.width,
196
- height: n.height,
197
- alt: n.alt
198
- }, null, 8, ht))
199
- ]));
200
- }
201
- }), bt = {
100
+ const Xe = /* @__PURE__ */ Oe(Ee, [["render", je]]), Ye = {
202
101
  class: "vf-menu__list",
203
102
  role: "menu"
204
- }, gt = {
103
+ }, Ke = {
205
104
  key: 1,
206
105
  class: "vf-menu__separator",
207
106
  role: "separator"
208
- }, mt = ["aria-expanded", "onClick", "onKeydown"], Yo = /* @__PURE__ */ E({
107
+ }, Ge = ["aria-expanded", "onClick", "onKeydown"], io = /* @__PURE__ */ X({
209
108
  name: "VfMenu",
210
109
  __name: "menu",
211
110
  props: {
@@ -214,87 +113,87 @@ const ft = /* @__PURE__ */ U(lt, [["render", ut]]), vt = { class: "vf-logo" }, p
214
113
  },
215
114
  emits: ["active", "onActive"],
216
115
  setup(t, { emit: e }) {
217
- const r = e, o = t, n = j([]), d = (u, s) => `${u.label ?? u.to ?? u.href ?? u.url ?? "item"}_${s.toString()}`, a = (u) => u.to ? "router-link" : "a", c = (u) => u.map((s) => ({
218
- ...s,
219
- items: s.items ? c(s.items) : void 0
220
- })), l = (u) => {
221
- u.items && u.items.length ? (n.value.map((s) => {
222
- s !== u && (s.subMenuVisible = !1);
223
- }), u.subMenuVisible = !u.subMenuVisible) : Object.prototype.hasOwnProperty.call(u, "command") && typeof u.command == "function" && u.command();
224
- }, f = (u) => {
225
- var s;
116
+ const r = e, o = t, n = N([]), c = (d, a) => `${d.label ?? d.to ?? d.href ?? d.url ?? "item"}_${a.toString()}`, s = (d) => d.to ? "router-link" : "a", i = (d) => d.map((a) => ({
117
+ ...a,
118
+ items: a.items ? i(a.items) : void 0
119
+ })), l = (d) => {
120
+ d.items && d.items.length ? (n.value.map((a) => {
121
+ a !== d && (a.subMenuVisible = !1);
122
+ }), d.subMenuVisible = !d.subMenuVisible) : Object.prototype.hasOwnProperty.call(d, "command") && typeof d.command == "function" && d.command();
123
+ }, u = (d) => {
124
+ var a;
226
125
  for (const v in n.value) {
227
- const i = n.value[v];
228
- Object.prototype.hasOwnProperty.call(i, "items") && ((s = i.items) != null && s.some((m) => m === u) ? (i.active = !0, i.subMenuVisible = !0) : (i.active = !1, i.subMenuVisible = !1));
126
+ const f = n.value[v];
127
+ Object.prototype.hasOwnProperty.call(f, "items") && ((a = f.items) != null && a.some((p) => p === d) ? (f.active = !0, f.subMenuVisible = !0) : (f.active = !1, f.subMenuVisible = !1));
229
128
  }
230
- r("active", u), r("onActive", u);
129
+ r("active", d), r("onActive", d);
231
130
  };
232
- return ae(
131
+ return le(
233
132
  () => o.items,
234
- (u) => {
235
- n.value = c(u);
133
+ (d) => {
134
+ n.value = i(d);
236
135
  },
237
136
  { deep: !0, immediate: !0 }
238
- ), (u, s) => {
239
- const v = de("VfMenu");
240
- return p(), b("div", {
241
- class: k(["vf-menu", `vf-menu_${u.orientation}`])
137
+ ), (d, a) => {
138
+ const v = be("VfMenu");
139
+ return g(), h("div", {
140
+ class: C(["vf-menu", `vf-menu_${d.orientation}`])
242
141
  }, [
243
- $("ul", bt, [
244
- (p(!0), b(ne, null, ye(n.value, (i, m) => (p(), b("li", {
245
- key: d(i, m),
142
+ B("ul", Ye, [
143
+ (g(!0), h(oe, null, ge(n.value, (f, p) => (g(), h("li", {
144
+ key: c(f, p),
246
145
  class: "vf-menu__item",
247
146
  role: "none"
248
147
  }, [
249
- u.$slots[d(i, m)] ? g(u.$slots, d(i, m), {
148
+ d.$slots[c(f, p)] ? k(d.$slots, c(f, p), {
250
149
  key: 0,
251
- item: { ...i, class: "vf-menu__link" }
252
- }) : i.separator ? (p(), b("hr", gt)) : i.items && i.items.length ? (p(), b(ne, { key: 2 }, [
253
- $("div", {
254
- class: k(["vf-menu__parent", { "vf-menu__parent_active": i.active }]),
150
+ item: { ...f, class: "vf-menu__link" }
151
+ }) : f.separator ? (g(), h("hr", Ke)) : f.items && f.items.length ? (g(), h(oe, { key: 2 }, [
152
+ B("div", {
153
+ class: C(["vf-menu__parent", { "vf-menu__parent_active": f.active }]),
255
154
  role: "menuitem",
256
155
  tabindex: "0",
257
- "aria-expanded": i.subMenuVisible ? "true" : "false",
258
- onClick: (_) => l(i),
156
+ "aria-expanded": f.subMenuVisible ? "true" : "false",
157
+ onClick: (y) => l(f),
259
158
  onKeydown: [
260
- K(q((_) => l(i), ["prevent"]), ["enter"]),
261
- K(q((_) => l(i), ["prevent"]), ["space"])
159
+ K(G((y) => l(f), ["prevent"]), ["enter"]),
160
+ K(G((y) => l(f), ["prevent"]), ["space"])
262
161
  ]
263
162
  }, [
264
- i.icon ? (p(), V(J(Q), {
163
+ f.icon ? (g(), W(U(Z), {
265
164
  key: 0,
266
- icon: i.icon,
165
+ icon: f.icon,
267
166
  class: "vf-menu__icon"
268
- }, null, 8, ["icon"])) : w("", !0),
269
- ee(" " + H(i.label) + " ", 1),
270
- Z(J(Q), { icon: "chevronDown" })
271
- ], 42, mt),
272
- i.items ? (p(), V(v, {
167
+ }, null, 8, ["icon"])) : _("", !0),
168
+ J(" " + M(f.label) + " ", 1),
169
+ he(U(Z), { icon: "chevronDown" })
170
+ ], 42, Ge),
171
+ f.items ? (g(), W(v, {
273
172
  key: 0,
274
- items: i.items,
275
- class: k(["vf-menu__submenu", { "vf-menu__submenu_visible": i.subMenuVisible }]),
276
- onOnActive: f
277
- }, null, 8, ["items", "class"])) : w("", !0)
278
- ], 64)) : (p(), V(ue, {
173
+ items: f.items,
174
+ class: C(["vf-menu__submenu", { "vf-menu__submenu_visible": f.subMenuVisible }]),
175
+ onOnActive: u
176
+ }, null, 8, ["items", "class"])) : _("", !0)
177
+ ], 64)) : (g(), W(ke, {
279
178
  key: 3,
280
- to: i.to,
281
- href: i.href ?? i.url,
282
- as: a(i),
179
+ to: f.to,
180
+ href: f.href ?? f.url,
181
+ as: s(f),
283
182
  class: "vf-menu__link",
284
- active: i.active,
285
- disabled: i.disabled,
183
+ active: f.active,
184
+ disabled: f.disabled,
286
185
  role: "menuitem",
287
- "aria-disabled": i.disabled ? "true" : "false",
288
- onClick: (_) => l(i),
289
- onActive: (_) => f(i)
186
+ "aria-disabled": f.disabled ? "true" : "false",
187
+ onClick: (y) => l(f),
188
+ onActive: (y) => u(f)
290
189
  }, {
291
- default: L(() => [
292
- i.icon ? (p(), V(J(Q), {
190
+ default: I(() => [
191
+ f.icon ? (g(), W(U(Z), {
293
192
  key: 0,
294
- icon: i.icon,
193
+ icon: f.icon,
295
194
  class: "vf-menu__icon"
296
- }, null, 8, ["icon"])) : w("", !0),
297
- ee(" " + H(i.label), 1)
195
+ }, null, 8, ["icon"])) : _("", !0),
196
+ J(" " + M(f.label), 1)
298
197
  ]),
299
198
  _: 2
300
199
  }, 1032, ["to", "href", "as", "active", "disabled", "aria-disabled", "onClick", "onActive"]))
@@ -303,7 +202,7 @@ const ft = /* @__PURE__ */ U(lt, [["render", ut]]), vt = { class: "vf-logo" }, p
303
202
  ], 2);
304
203
  };
305
204
  }
306
- }), yt = ["type", "disabled"], Ko = /* @__PURE__ */ E({
205
+ }), qe = ["type", "disabled"], co = /* @__PURE__ */ X({
307
206
  __name: "button",
308
207
  props: {
309
208
  to: { default: void 0 },
@@ -322,70 +221,70 @@ const ft = /* @__PURE__ */ U(lt, [["render", ut]]), vt = { class: "vf-logo" }, p
322
221
  disabled: { type: Boolean, default: !1 }
323
222
  },
324
223
  setup(t) {
325
- const e = t, r = ["button", "submit", "reset"], o = (u) => !!u && r.includes(u), n = C(() => e.as ? e.as === "button" : !(e.to || e.href || e.url || e.type && !o(e.type))), d = C(() => o(e.type) ? e.type : "button"), a = C(() => 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"), c = C(() => {
326
- let u = ["vf-button", `vf-button_${e.severity}`];
327
- return ["top", "bottom"].includes(e.iconPos) && u.push("vf-button_vertical"), e.variant === "text" && u.push("vf-button_text"), e.variant === "outlined" && u.push("vf-button_outlined"), ["small", "large"].indexOf(e.size) > -1 && u.push(`vf-button_${e.size}`), (e.loading || e.disabled) && u.push("vf-button_disabled"), e.rounded && u.push("vf-button_rounded"), u;
328
- }), l = C(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]), f = C(() => ["vf-button__label"]);
329
- return (u, s) => n.value ? (p(), b("button", {
224
+ const e = t, r = ["button", "submit", "reset"], o = (d) => !!d && r.includes(d), n = w(() => e.as ? e.as === "button" : !(e.to || e.href || e.url || e.type && !o(e.type))), c = w(() => o(e.type) ? e.type : "button"), s = w(() => 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"), i = w(() => {
225
+ let d = ["vf-button", `vf-button_${e.severity}`];
226
+ return ["top", "bottom"].includes(e.iconPos) && d.push("vf-button_vertical"), e.variant === "text" && d.push("vf-button_text"), e.variant === "outlined" && d.push("vf-button_outlined"), ["small", "large"].indexOf(e.size) > -1 && d.push(`vf-button_${e.size}`), (e.loading || e.disabled) && d.push("vf-button_disabled"), e.rounded && d.push("vf-button_rounded"), d;
227
+ }), l = w(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]), u = w(() => ["vf-button__label"]);
228
+ return (d, a) => n.value ? (g(), h("button", {
330
229
  key: 0,
331
- type: d.value,
332
- class: k(c.value),
230
+ type: c.value,
231
+ class: C(i.value),
333
232
  disabled: e.loading || e.disabled
334
233
  }, [
335
- e.icon && !e.loading ? (p(), V(J(Q), {
234
+ e.icon && !e.loading ? (g(), W(U(Z), {
336
235
  key: 0,
337
236
  icon: e.icon,
338
- class: k(l.value)
339
- }, null, 8, ["icon", "class"])) : w("", !0),
340
- e.loading ? (p(), V(J(Q), {
237
+ class: C(l.value)
238
+ }, null, 8, ["icon", "class"])) : _("", !0),
239
+ e.loading ? (g(), W(U(Z), {
341
240
  key: 1,
342
241
  icon: "circleNotch",
343
- class: k(l.value),
242
+ class: C(l.value),
344
243
  spin: ""
345
- }, null, 8, ["class"])) : w("", !0),
346
- u.$slots.default ? (p(), b("span", {
244
+ }, null, 8, ["class"])) : _("", !0),
245
+ d.$slots.default ? (g(), h("span", {
347
246
  key: 2,
348
- class: k(f.value)
247
+ class: C(u.value)
349
248
  }, [
350
- g(u.$slots, "default")
351
- ], 2)) : u.label ? (p(), b("span", {
249
+ k(d.$slots, "default")
250
+ ], 2)) : d.label ? (g(), h("span", {
352
251
  key: 3,
353
- class: k(f.value)
354
- }, H(u.label), 3)) : w("", !0)
355
- ], 10, yt)) : (p(), V(ue, {
252
+ class: C(u.value)
253
+ }, M(d.label), 3)) : _("", !0)
254
+ ], 10, qe)) : (g(), W(ke, {
356
255
  key: 1,
357
256
  to: e.to,
358
257
  href: e.href ?? e.url,
359
- as: a.value,
360
- class: k(c.value),
258
+ as: s.value,
259
+ class: C(i.value),
361
260
  disabled: e.loading || e.disabled
362
261
  }, {
363
- default: L(() => [
364
- e.icon ? (p(), V(J(Q), {
262
+ default: I(() => [
263
+ e.icon ? (g(), W(U(Z), {
365
264
  key: 0,
366
265
  icon: e.icon,
367
- class: k(l.value)
368
- }, null, 8, ["icon", "class"])) : w("", !0),
369
- u.$slots.default ? (p(), b("span", {
266
+ class: C(l.value)
267
+ }, null, 8, ["icon", "class"])) : _("", !0),
268
+ d.$slots.default ? (g(), h("span", {
370
269
  key: 1,
371
- class: k(f.value)
270
+ class: C(u.value)
372
271
  }, [
373
- g(u.$slots, "default")
374
- ], 2)) : u.label ? (p(), b("span", {
272
+ k(d.$slots, "default")
273
+ ], 2)) : d.label ? (g(), h("span", {
375
274
  key: 2,
376
- class: k(f.value)
377
- }, H(u.label), 3)) : w("", !0)
275
+ class: C(u.value)
276
+ }, M(d.label), 3)) : _("", !0)
378
277
  ]),
379
278
  _: 3
380
279
  }, 8, ["to", "href", "as", "class", "disabled"]));
381
280
  }
382
- }), _t = {
281
+ }), Ue = {
383
282
  key: 0,
384
283
  class: "vf-input__prefix"
385
- }, kt = ["type", "value", "placeholder", "disabled", "readonly"], Ct = {
284
+ }, Ze = ["type", "value", "placeholder", "disabled", "readonly"], Je = {
386
285
  key: 1,
387
286
  class: "vf-input__suffix"
388
- }, qo = /* @__PURE__ */ E({
287
+ }, uo = /* @__PURE__ */ X({
389
288
  __name: "input",
390
289
  props: {
391
290
  modelValue: { default: "" },
@@ -398,37 +297,37 @@ const ft = /* @__PURE__ */ U(lt, [["render", ut]]), vt = { class: "vf-logo" }, p
398
297
  },
399
298
  emits: ["update:modelValue", "input", "change", "focus", "blur"],
400
299
  setup(t, { emit: e }) {
401
- const r = e, o = t, n = C(() => {
402
- const f = ["vf-input", `vf-input_${o.variant}`];
403
- return o.size !== "normal" && f.push(`vf-input_${o.size}`), o.disabled && f.push("vf-input_disabled"), f;
404
- }), d = (f) => {
405
- const u = f.target;
406
- r("update:modelValue", u.value), r("input", f);
407
- }, a = (f) => r("change", f), c = (f) => r("focus", f), l = (f) => r("blur", f);
408
- return (f, u) => (p(), b("div", {
409
- class: k(n.value)
300
+ const r = e, o = t, n = w(() => {
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 d = u.target;
305
+ r("update:modelValue", d.value), r("input", u);
306
+ }, s = (u) => r("change", u), i = (u) => r("focus", u), l = (u) => r("blur", u);
307
+ return (u, d) => (g(), h("div", {
308
+ class: C(n.value)
410
309
  }, [
411
- f.$slots.prefix ? (p(), b("span", _t, [
412
- g(f.$slots, "prefix")
413
- ])) : w("", !0),
414
- $("input", {
310
+ u.$slots.prefix ? (g(), h("span", Ue, [
311
+ k(u.$slots, "prefix")
312
+ ])) : _("", !0),
313
+ B("input", {
415
314
  class: "vf-input__control",
416
- type: f.type,
417
- value: f.modelValue,
418
- placeholder: f.placeholder,
419
- disabled: f.disabled,
420
- readonly: f.readonly,
421
- onInput: d,
422
- onChange: a,
423
- onFocus: c,
315
+ type: u.type,
316
+ value: u.modelValue,
317
+ placeholder: u.placeholder,
318
+ disabled: u.disabled,
319
+ readonly: u.readonly,
320
+ onInput: c,
321
+ onChange: s,
322
+ onFocus: i,
424
323
  onBlur: l
425
- }, null, 40, kt),
426
- f.$slots.suffix ? (p(), b("span", Ct, [
427
- g(f.$slots, "suffix")
428
- ])) : w("", !0)
324
+ }, null, 40, Ze),
325
+ u.$slots.suffix ? (g(), h("span", Je, [
326
+ k(u.$slots, "suffix")
327
+ ])) : _("", !0)
429
328
  ], 2));
430
329
  }
431
- }), he = [
330
+ }), ue = [
432
331
  "top",
433
332
  "top-start",
434
333
  "top-end",
@@ -441,7 +340,7 @@ const ft = /* @__PURE__ */ U(lt, [["render", ut]]), vt = { class: "vf-logo" }, p
441
340
  "left",
442
341
  "left-start",
443
342
  "left-end"
444
- ], O = (t) => {
343
+ ], P = (t) => {
445
344
  if (t == null || !(t instanceof HTMLElement))
446
345
  return null;
447
346
  if (typeof window < "u") {
@@ -449,18 +348,18 @@ const ft = /* @__PURE__ */ U(lt, [["render", ut]]), vt = { class: "vf-logo" }, p
449
348
  if (/(auto|scroll|overlay)/.test(r))
450
349
  return t;
451
350
  }
452
- return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth ? t : O(t.parentNode);
351
+ return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth ? t : P(t.parentNode);
453
352
  };
454
- function wt(t) {
353
+ function Qe(t) {
455
354
  return typeof window > "u" ? !1 : window.getComputedStyle(t).position === "fixed";
456
355
  }
457
- const $t = (t, e) => t.strategy ? t.strategy : wt(e) ? "fixed" : "absolute", Y = (t, e) => $t(t, e) === "fixed", R = (t, e, r = {}) => {
458
- const o = t.getBoundingClientRect(), n = e ? e.offsetParent : null, d = e ? Y(r, e) : !1;
459
- if (n && !d) {
460
- const a = n.getBoundingClientRect(), c = n.scrollLeft, l = n.scrollTop;
356
+ const et = (t, e) => t.strategy ? t.strategy : Qe(e) ? "fixed" : "absolute", Y = (t, e) => et(t, e) === "fixed", R = (t, e, r = {}) => {
357
+ const o = t.getBoundingClientRect(), n = e ? e.offsetParent : null, c = e ? Y(r, e) : !1;
358
+ if (n && !c) {
359
+ const s = n.getBoundingClientRect(), i = n.scrollLeft, l = n.scrollTop;
461
360
  return {
462
- left: o.left - a.left + c,
463
- top: o.top - a.top + l,
361
+ left: o.left - s.left + i,
362
+ top: o.top - s.top + l,
464
363
  width: o.width,
465
364
  height: o.height
466
365
  };
@@ -471,81 +370,81 @@ const $t = (t, e) => t.strategy ? t.strategy : wt(e) ? "fixed" : "absolute", Y =
471
370
  width: o.width,
472
371
  height: o.height
473
372
  };
474
- }, X = (t, e) => {
373
+ }, j = (t, e) => {
475
374
  var r;
476
375
  return (r = t.middleware) == null ? void 0 : r.find((o) => o.name === e);
477
- }, Ce = (t, e) => !!X(t, e), Ft = (t) => {
478
- const e = O(t);
376
+ }, Ce = (t, e) => !!j(t, e), tt = (t) => {
377
+ const e = P(t);
479
378
  let r = "";
480
379
  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;
481
- }, Bt = (t) => t.scrollLeft + t.clientWidth, xt = (t) => t.scrollTop + t.clientHeight, z = (t, e, r = null, o = {}, n) => {
380
+ }, ot = (t) => t.scrollLeft + t.clientWidth, rt = (t) => t.scrollTop + t.clientHeight, L = (t, e, r = null, o = {}, n) => {
482
381
  if (r === null && typeof window < "u" && Y(o, e))
483
382
  return t;
484
- let d = 0;
383
+ let c = 0;
485
384
  if (r === null) {
486
- const a = O(e);
487
- d = a ? a.scrollTop : 0;
385
+ const s = P(e);
386
+ c = s ? s.scrollTop : 0;
488
387
  }
489
- return t - d;
490
- }, W = (t, e, r = null, o = {}, n) => {
491
- let d;
388
+ return t - c;
389
+ }, V = (t, e, r = null, o = {}, n) => {
390
+ let c;
492
391
  if (r === null && typeof window < "u" && Y(o, e))
493
- d = window.innerWidth;
392
+ c = window.innerWidth;
494
393
  else if (r === null) {
495
- const a = O(e);
496
- d = a ? Bt(a) : 0;
394
+ const s = P(e);
395
+ c = s ? ot(s) : 0;
497
396
  } else
498
- d = r.getBoundingClientRect().width;
499
- return -(t + e.clientWidth - d);
500
- }, P = (t, e, r = null, o = {}, n) => {
501
- let d;
397
+ c = r.getBoundingClientRect().width;
398
+ return -(t + e.clientWidth - c);
399
+ }, O = (t, e, r = null, o = {}, n) => {
400
+ let c;
502
401
  if (r === null && typeof window < "u" && Y(o, e))
503
- d = window.innerHeight;
402
+ c = window.innerHeight;
504
403
  else if (r === null) {
505
- const a = O(e);
506
- d = a ? xt(a) : 0;
404
+ const s = P(e);
405
+ c = s ? rt(s) : 0;
507
406
  } else
508
- d = r.getBoundingClientRect().height;
509
- return -(t + e.clientHeight - d);
510
- }, M = (t, e, r = null, o = {}, n) => {
407
+ c = r.getBoundingClientRect().height;
408
+ return -(t + e.clientHeight - c);
409
+ }, z = (t, e, r = null, o = {}, n) => {
511
410
  if (r === null && typeof window < "u" && Y(o, e))
512
411
  return t;
513
- let d = 0;
412
+ let c = 0;
514
413
  if (r === null) {
515
- const a = O(e);
516
- d = a ? a.scrollLeft : 0;
414
+ const s = P(e);
415
+ c = s ? s.scrollLeft : 0;
517
416
  }
518
- return t - d;
519
- }, be = ({
417
+ return t - c;
418
+ }, fe = ({
520
419
  options: t,
521
420
  primaryX: e,
522
421
  primaryY: r,
523
422
  floating: o,
524
423
  placement: n,
525
- reference: d,
526
- scrollDirection: a
424
+ reference: c,
425
+ scrollDirection: s
527
426
  }) => {
528
- const c = ie(d, o, n, t), l = X(t, "offset");
427
+ const i = ae(c, o, n, t), l = j(t, "offset");
529
428
  if (l) {
530
- const f = l.fn({
531
- x: c.x,
532
- y: c.y,
429
+ const u = l.fn({
430
+ x: i.x,
431
+ y: i.y,
533
432
  options: t,
534
433
  primaryX: e,
535
434
  primaryY: r,
536
435
  floating: o,
537
436
  placement: n,
538
- reference: d,
539
- scrollDirection: a
437
+ reference: c,
438
+ scrollDirection: s
540
439
  });
541
- c.x = f.x, c.y = f.y;
440
+ i.x = u.x, i.y = u.y;
542
441
  }
543
- return Kt(c, o, d, t) ? {
544
- x: c.x,
545
- y: c.y,
442
+ return _t(i, o, c, t) ? {
443
+ x: i.x,
444
+ y: i.y,
546
445
  placement: n
547
446
  } : !1;
548
- }, Tt = (t) => ({
447
+ }, nt = (t) => ({
549
448
  name: "flip",
550
449
  params: t,
551
450
  fn: ({
@@ -553,116 +452,116 @@ const $t = (t, e) => t.strategy ? t.strategy : wt(e) ? "fixed" : "absolute", Y =
553
452
  y: r,
554
453
  options: o,
555
454
  primaryX: n,
556
- primaryY: d,
557
- floating: a,
558
- placement: c,
455
+ primaryY: c,
456
+ floating: s,
457
+ placement: i,
559
458
  reference: l,
560
- scrollDirection: f
459
+ scrollDirection: u
561
460
  }) => {
562
- var u;
563
- const s = {
461
+ var d;
462
+ const a = {
564
463
  x: e,
565
464
  y: r,
566
- placement: c
465
+ placement: i
567
466
  }, v = {
568
467
  ...o,
569
- middleware: (u = o.middleware) == null ? void 0 : u.filter((x) => x.name !== "shift")
570
- }, i = (t == null ? void 0 : t.placements) ?? he, m = !(t != null && t.placements), _ = m ? he : i;
571
- let y = !1;
572
- const te = (x) => {
573
- if (y)
468
+ middleware: (d = o.middleware) == null ? void 0 : d.filter((x) => x.name !== "shift")
469
+ }, f = (t == null ? void 0 : t.placements) ?? ue, p = !(t != null && t.placements), y = p ? ue : f;
470
+ let m = !1;
471
+ const Q = (x) => {
472
+ if (m)
574
473
  return;
575
- const B = be({
474
+ const $ = fe({
576
475
  options: v,
577
476
  primaryX: n,
578
- primaryY: d,
579
- floating: a,
477
+ primaryY: c,
478
+ floating: s,
580
479
  placement: x,
581
480
  reference: l,
582
- scrollDirection: f
481
+ scrollDirection: u
583
482
  });
584
- B && (s.x = B.x, s.y = B.y, s.placement = B.placement, y = !0);
585
- }, oe = Ut(l, a, v);
586
- if (!m && i.includes(c) && te(c), y || _.forEach(te), !y) {
587
- const x = i.reduce(
588
- (B, A) => {
589
- const N = be({
483
+ $ && (a.x = $.x, a.y = $.y, a.placement = $.placement, m = !0);
484
+ }, ee = $t(l, s, v);
485
+ if (!p && f.includes(i) && Q(i), m || y.forEach(Q), !m) {
486
+ const x = f.reduce(
487
+ ($, H) => {
488
+ const A = fe({
590
489
  options: v,
591
490
  primaryX: n,
592
- primaryY: d,
593
- floating: a,
594
- placement: A,
491
+ primaryY: c,
492
+ floating: s,
493
+ placement: H,
595
494
  reference: l,
596
- scrollDirection: f
495
+ scrollDirection: u
597
496
  });
598
- if (!N)
599
- return B;
600
- const S = re(A), I = oe[S];
601
- return !B || I > B.space ? { result: N, space: I } : B;
497
+ if (!A)
498
+ return $;
499
+ const S = te(H), D = ee[S];
500
+ return !$ || D > $.space ? { result: A, space: D } : $;
602
501
  },
603
502
  null
604
503
  );
605
- x && (s.x = x.result.x, s.y = x.result.y, s.placement = x.result.placement, y = !0);
504
+ x && (a.x = x.result.x, a.y = x.result.y, a.placement = x.result.placement, m = !0);
606
505
  }
607
- if (!y && i.length > 0) {
608
- const x = re(c);
609
- let B = x, A = oe[x];
610
- i.forEach((G) => {
611
- const h = re(G), F = oe[h];
612
- F > A && (A = F, B = h);
506
+ if (!m && f.length > 0) {
507
+ const x = te(i);
508
+ let $ = x, H = ee[x];
509
+ f.forEach((q) => {
510
+ const b = te(q), F = ee[b];
511
+ F > H && (H = F, $ = b);
613
512
  });
614
- const N = qt(B, c, i), S = ie(l, a, N, v), I = X(v, "offset");
615
- if (I) {
616
- const G = I.fn({
513
+ const A = Ft($, i, f), S = ae(l, s, A, v), D = j(v, "offset");
514
+ if (D) {
515
+ const q = D.fn({
617
516
  x: S.x,
618
517
  y: S.y,
619
518
  options: v,
620
519
  primaryX: n,
621
- primaryY: d,
622
- floating: a,
623
- placement: N,
520
+ primaryY: c,
521
+ floating: s,
522
+ placement: A,
624
523
  reference: l,
625
- scrollDirection: f
524
+ scrollDirection: u
626
525
  });
627
- S.x = G.x, S.y = G.y;
526
+ S.x = q.x, S.y = q.y;
628
527
  }
629
- s.x = S.x, s.y = S.y, s.placement = S.placement;
528
+ a.x = S.x, a.y = S.y, a.placement = S.placement;
630
529
  }
631
- return s;
530
+ return a;
632
531
  }
633
- }), Lt = (t, e, r, o, n) => {
634
- var d, a, c;
532
+ }), lt = (t, e, r, o, n) => {
533
+ var c, s, i;
635
534
  let l = 0;
636
535
  o.startsWith("right") ? l = -2 : o.startsWith("left") && (l = t);
637
- const f = X(e, "arrow"), u = X(e, "shift");
638
- if (f) {
639
- const s = ((d = f.params) == null ? void 0 : d.arrow).getBoundingClientRect();
640
- o.startsWith("right") ? l -= s.width / 2 : o.startsWith("left") && (l += s.width / 2);
536
+ const u = j(e, "arrow"), d = j(e, "shift");
537
+ if (u) {
538
+ const a = ((c = u.params) == null ? void 0 : c.arrow).getBoundingClientRect();
539
+ o.startsWith("right") ? l -= a.width / 2 : o.startsWith("left") && (l += a.width / 2);
641
540
  }
642
- if (Ce(e, "shift") && f) {
643
- let s = null, v = 0;
644
- u && (s = (a = u.params) == null ? void 0 : a.parent);
645
- const i = (c = f.params) == null ? void 0 : c.arrow;
646
- v = i.getBoundingClientRect().width / 2, v += Vt(i), v -= t, o.startsWith("right") ? W(r - l, n, s, e) <= t ? W(r, n, s, e) > 0 ? l = t - W(r, n, s, e) : l = t : M(r - l - v, n, s, e) <= t && (M(r - l - v, n, s, e) >= 0 ? (l = -2 - (M(r - l - v, n, s, e) + t), s && (l = -2)) : l = -2) : o.startsWith("left") ? W(r - l + v, n, s, e) <= t ? (l = t + W(r - v, n, s, e), l <= t && (l = t)) : M(r - l, n, s, e) <= t && (l = -2 + M(r, n, s, e), l <= -2 && (l = -2)) : W(r - l, n, s, e) <= t ? W(r - l, n, s, e) <= t && W(r, n, s, e) > 0 ? l = t - W(r, n, s, e) : l = t : M(r - l, n, s, e) <= t && (M(r - l, n, s, e) <= t && M(r, n, s, e) > 0 ? l = -(t - M(r, n, s, e)) : l = -2);
541
+ if (Ce(e, "shift") && u) {
542
+ let a = null, v = 0;
543
+ d && (a = (s = d.params) == null ? void 0 : s.parent);
544
+ const f = (i = u.params) == null ? void 0 : i.arrow;
545
+ v = f.getBoundingClientRect().width / 2, v += it(f), v -= t, o.startsWith("right") ? V(r - l, n, a, e) <= t ? V(r, n, a, e) > 0 ? l = t - V(r, n, a, e) : l = t : z(r - l - v, n, a, e) <= t && (z(r - l - v, n, a, e) >= 0 ? (l = -2 - (z(r - l - v, n, a, e) + t), a && (l = -2)) : l = -2) : o.startsWith("left") ? V(r - l + v, n, a, e) <= t ? (l = t + V(r - v, n, a, e), l <= t && (l = t)) : z(r - l, n, a, e) <= t && (l = -2 + z(r, n, a, e), l <= -2 && (l = -2)) : V(r - l, n, a, e) <= t ? V(r - l, n, a, e) <= t && V(r, n, a, e) > 0 ? l = t - V(r, n, a, e) : l = t : z(r - l, n, a, e) <= t && (z(r - l, n, a, e) <= t && z(r, n, a, e) > 0 ? l = -(t - z(r, n, a, e)) : l = -2);
647
546
  }
648
547
  return l;
649
- }, Rt = (t, e, r, o, n) => {
650
- var d, a, c;
548
+ }, at = (t, e, r, o, n) => {
549
+ var c, s, i;
651
550
  let l = 0;
652
551
  o.startsWith("top") ? l = t : o.startsWith("bottom") && (l = -2);
653
- const f = X(e, "arrow"), u = X(e, "shift");
654
- if (f) {
655
- const s = ((d = f.params) == null ? void 0 : d.arrow).getBoundingClientRect();
656
- o.startsWith("top") ? l += s.height / 2 : o.startsWith("bottom") && (l -= s.height / 2);
552
+ const u = j(e, "arrow"), d = j(e, "shift");
553
+ if (u) {
554
+ const a = ((c = u.params) == null ? void 0 : c.arrow).getBoundingClientRect();
555
+ o.startsWith("top") ? l += a.height / 2 : o.startsWith("bottom") && (l -= a.height / 2);
657
556
  }
658
- if (Ce(e, "shift") && f) {
659
- let s = null, v = 0;
660
- u && (s = (a = u.params) == null ? void 0 : a.parent);
661
- const i = (c = f.params) == null ? void 0 : c.arrow;
662
- v = i.getBoundingClientRect().height / 2, v += zt(i), v -= t, o.startsWith("top") ? z(r - l, n, s, e) <= t ? z(r, n, s, e) >= 0 ? l = -(t - z(r, n, s, e)) : l = -2 : P(r - l + v, n, s, e) <= t && (l = t + P(r - v, n, s, e), l <= t && (l = t)) : o.startsWith("bottom") ? z(r - l - v, n, s, e) <= t ? z(r - l - v, n, s, e) >= 0 ? (l = -2 - (z(r - l - v, n, s, e) + t), s && (l = -2)) : l = -2 : P(r - l, n, s, e) <= t && (P(r, n, s, e) >= 0 ? l = t - P(r, n, s, e) : l = t) : z(r - l, n, s, e) <= t ? z(r - l, n, s, e) >= 0 ? l = -(t - z(r - l, n, s, e)) : l = -2 : P(r - l, n, s, e) <= t && (P(r - l, n, s, e) >= 0 ? l = t - P(r - l, n, s, e) : l = t);
557
+ if (Ce(e, "shift") && u) {
558
+ let a = null, v = 0;
559
+ d && (a = (s = d.params) == null ? void 0 : s.parent);
560
+ const f = (i = u.params) == null ? void 0 : i.arrow;
561
+ v = f.getBoundingClientRect().height / 2, v += ct(f), v -= t, o.startsWith("top") ? L(r - l, n, a, e) <= t ? L(r, n, a, e) >= 0 ? l = -(t - L(r, n, a, e)) : l = -2 : O(r - l + v, n, a, e) <= t && (l = t + O(r - v, n, a, e), l <= t && (l = t)) : o.startsWith("bottom") ? L(r - l - v, n, a, e) <= t ? L(r - l - v, n, a, e) >= 0 ? (l = -2 - (L(r - l - v, n, a, e) + t), a && (l = -2)) : l = -2 : O(r - l, n, a, e) <= t && (O(r, n, a, e) >= 0 ? l = t - O(r, n, a, e) : l = t) : L(r - l, n, a, e) <= t ? L(r - l, n, a, e) >= 0 ? l = -(t - L(r - l, n, a, e)) : l = -2 : O(r - l, n, a, e) <= t && (O(r - l, n, a, e) >= 0 ? l = t - O(r - l, n, a, e) : l = t);
663
562
  }
664
563
  return l;
665
- }, St = (t) => ({
564
+ }, st = (t) => ({
666
565
  name: "offset",
667
566
  params: { value: t },
668
567
  fn: ({
@@ -670,139 +569,139 @@ const $t = (t, e) => t.strategy ? t.strategy : wt(e) ? "fixed" : "absolute", Y =
670
569
  y: r,
671
570
  options: o,
672
571
  primaryX: n,
673
- primaryY: d,
674
- floating: a,
675
- placement: c
572
+ primaryY: c,
573
+ floating: s,
574
+ placement: i
676
575
  }) => ({
677
- x: e - Lt(t, o, n, c, a),
678
- y: r - Rt(t, o, d, c, a),
679
- placement: c
576
+ x: e - lt(t, o, n, i, s),
577
+ y: r - at(t, o, c, i, s),
578
+ placement: i
680
579
  })
681
- }), Vt = (t) => t.getBoundingClientRect().width !== t.clientWidth ? (t.getBoundingClientRect().width - t.clientWidth) / 2 : 0, zt = (t) => t.getBoundingClientRect().height !== t.clientHeight ? (t.getBoundingClientRect().height - t.clientHeight) / 2 : 0, Wt = (t, e) => {
682
- const r = O(t), o = [];
580
+ }), it = (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, dt = (t, e) => {
581
+ const r = P(t), o = [];
683
582
  if (r !== null) {
684
583
  const n = () => e();
685
584
  r.addEventListener("scroll", n, !1), o.push(() => r.removeEventListener("scroll", n, !1));
686
585
  }
687
586
  if (typeof window < "u") {
688
- const n = () => e(), d = () => e();
689
- window.addEventListener("scroll", n, !1), window.addEventListener("resize", d, !1), o.push(() => window.removeEventListener("scroll", n, !1)), o.push(() => window.removeEventListener("resize", d, !1));
587
+ const n = () => e(), c = () => e();
588
+ window.addEventListener("scroll", n, !1), window.addEventListener("resize", c, !1), o.push(() => window.removeEventListener("scroll", n, !1)), o.push(() => window.removeEventListener("resize", c, !1));
690
589
  }
691
590
  if (typeof ResizeObserver < "u" && t instanceof HTMLElement) {
692
591
  const n = new ResizeObserver(() => e());
693
592
  n.observe(t), o.push(() => n.disconnect());
694
593
  }
695
594
  return () => o.forEach((n) => n());
696
- }, Mt = (t, e, r = {}) => {
595
+ }, ut = (t, e, r = {}) => {
697
596
  const o = R(t, e, r);
698
597
  return {
699
598
  x: o.left - e.getBoundingClientRect().width / 2 + o.width / 2,
700
599
  y: o.top - e.getBoundingClientRect().height,
701
600
  placement: "top"
702
601
  };
703
- }, Ht = (t, e, r = {}) => {
602
+ }, ft = (t, e, r = {}) => {
704
603
  const o = R(t, e, r);
705
604
  return {
706
605
  x: o.left,
707
606
  y: o.top - e.getBoundingClientRect().height,
708
607
  placement: "top-start"
709
608
  };
710
- }, Et = (t, e, r = {}) => {
609
+ }, vt = (t, e, r = {}) => {
711
610
  const o = R(t, e, r);
712
611
  return {
713
612
  x: o.left - e.getBoundingClientRect().width + o.width,
714
613
  y: o.top - e.getBoundingClientRect().height,
715
614
  placement: "top-end"
716
615
  };
717
- }, At = (t, e, r = {}) => {
616
+ }, pt = (t, e, r = {}) => {
718
617
  const o = R(t, e, r);
719
618
  return {
720
619
  x: o.left + o.width,
721
620
  y: o.top - e.getBoundingClientRect().height / 2 + o.height / 2,
722
621
  placement: "right"
723
622
  };
724
- }, Pt = (t, e, r = {}) => {
623
+ }, bt = (t, e, r = {}) => {
725
624
  const o = R(t, e, r);
726
625
  return {
727
626
  x: o.left + o.width,
728
627
  y: o.top,
729
628
  placement: "right-start"
730
629
  };
731
- }, Dt = (t, e, r = {}) => {
630
+ }, gt = (t, e, r = {}) => {
732
631
  const o = R(t, e, r);
733
632
  return {
734
633
  x: o.left + o.width,
735
634
  y: o.top + o.height - e.getBoundingClientRect().height,
736
635
  placement: "right-end"
737
636
  };
738
- }, Ot = (t, e, r = {}) => {
637
+ }, ht = (t, e, r = {}) => {
739
638
  const o = R(t, e, r);
740
639
  return {
741
640
  x: o.left + o.width / 2 - e.getBoundingClientRect().width / 2,
742
641
  y: o.top + o.height,
743
642
  placement: "bottom"
744
643
  };
745
- }, Nt = (t, e, r = {}) => {
644
+ }, mt = (t, e, r = {}) => {
746
645
  const o = R(t, e, r);
747
646
  return {
748
647
  x: o.left,
749
648
  y: o.top + o.height,
750
649
  placement: "bottom-start"
751
650
  };
752
- }, It = (t, e, r = {}) => {
651
+ }, yt = (t, e, r = {}) => {
753
652
  const o = R(t, e, r);
754
653
  return {
755
654
  x: o.left - e.getBoundingClientRect().width + o.width,
756
655
  y: o.top + o.height,
757
656
  placement: "bottom-end"
758
657
  };
759
- }, jt = (t, e, r = {}) => {
658
+ }, kt = (t, e, r = {}) => {
760
659
  const o = R(t, e, r);
761
660
  return {
762
661
  x: o.left - e.getBoundingClientRect().width,
763
662
  y: o.top + o.height / 2 - e.getBoundingClientRect().height / 2,
764
663
  placement: "left"
765
664
  };
766
- }, Xt = (t, e, r = {}) => {
665
+ }, Ct = (t, e, r = {}) => {
767
666
  const o = R(t, e, r);
768
667
  return {
769
668
  x: o.left - e.getBoundingClientRect().width,
770
669
  y: o.top,
771
670
  placement: "left-start"
772
671
  };
773
- }, Yt = (t, e, r = {}) => {
672
+ }, wt = (t, e, r = {}) => {
774
673
  const o = R(t, e, r);
775
674
  return {
776
675
  x: o.left - e.getBoundingClientRect().width,
777
676
  y: o.top + o.height - e.getBoundingClientRect().height,
778
677
  placement: "left-end"
779
678
  };
780
- }, ie = (t, e, r, o = {}) => {
679
+ }, ae = (t, e, r, o = {}) => {
781
680
  switch (r) {
782
681
  case "top":
783
- return Mt(t, e, o);
682
+ return ut(t, e, o);
784
683
  case "top-start":
785
- return Ht(t, e, o);
684
+ return ft(t, e, o);
786
685
  case "top-end":
787
- return Et(t, e, o);
686
+ return vt(t, e, o);
788
687
  case "right":
789
- return At(t, e, o);
688
+ return pt(t, e, o);
790
689
  case "right-start":
791
- return Pt(t, e, o);
690
+ return bt(t, e, o);
792
691
  case "right-end":
793
- return Dt(t, e, o);
692
+ return gt(t, e, o);
794
693
  case "bottom":
795
- return Ot(t, e, o);
694
+ return ht(t, e, o);
796
695
  case "bottom-start":
797
- return Nt(t, e, o);
696
+ return mt(t, e, o);
798
697
  case "bottom-end":
799
- return It(t, e, o);
698
+ return yt(t, e, o);
800
699
  case "left":
801
- return jt(t, e, o);
700
+ return kt(t, e, o);
802
701
  case "left-start":
803
- return Xt(t, e, o);
702
+ return Ct(t, e, o);
804
703
  case "left-end":
805
- return Yt(t, e, o);
704
+ return wt(t, e, o);
806
705
  default:
807
706
  return {
808
707
  x: 0,
@@ -810,25 +709,25 @@ const $t = (t, e) => t.strategy ? t.strategy : wt(e) ? "fixed" : "absolute", Y =
810
709
  placement: ""
811
710
  };
812
711
  }
813
- }, Kt = (t, e, r, o = {}) => {
712
+ }, _t = (t, e, r, o = {}) => {
814
713
  if (Y(o, e)) {
815
714
  if (typeof window > "u")
816
715
  return !0;
817
- const s = t.x, v = t.y, i = s + e.clientWidth, m = v + e.clientHeight;
818
- return s >= 0 && v >= 0 && i <= window.innerWidth && m <= window.innerHeight;
716
+ const a = t.x, v = t.y, f = a + e.clientWidth, p = v + e.clientHeight;
717
+ return a >= 0 && v >= 0 && f <= window.innerWidth && p <= window.innerHeight;
819
718
  }
820
- if (O(r) !== null)
821
- return z(t.y, e, null, o) > 0 && W(t.x, e, null, o) > 0 && P(t.y, e, null, o) > 0 && M(t.x, e, null, o) > 0;
719
+ if (P(r) !== null)
720
+ return L(t.y, e, null, o) > 0 && V(t.x, e, null, o) > 0 && O(t.y, e, null, o) > 0 && z(t.x, e, null, o) > 0;
822
721
  if (typeof window > "u")
823
722
  return !0;
824
- const n = window.innerWidth, d = window.innerHeight, a = (r instanceof HTMLElement ? r.offsetParent : null) || e.offsetParent;
825
- if (a) {
826
- const s = a.getBoundingClientRect(), v = s.left + t.x, i = s.top + t.y, m = v + e.clientWidth, _ = i + e.clientHeight;
827
- return v >= 0 && i >= 0 && m <= n && _ <= d;
723
+ const n = window.innerWidth, c = window.innerHeight, s = (r instanceof HTMLElement ? r.offsetParent : null) || e.offsetParent;
724
+ if (s) {
725
+ const a = s.getBoundingClientRect(), v = a.left + t.x, f = a.top + t.y, p = v + e.clientWidth, y = f + e.clientHeight;
726
+ return v >= 0 && f >= 0 && p <= n && y <= c;
828
727
  }
829
- const c = t.x, l = t.y, f = c + e.clientWidth, u = l + e.clientHeight;
830
- return c >= 0 && l >= 0 && f <= n && u <= d;
831
- }, re = (t) => t.startsWith("right") ? "right" : t.startsWith("left") ? "left" : t.startsWith("top") ? "top" : "bottom", qt = (t, e, r) => re(e) === t && r.includes(e) ? e : r.find((o) => re(o) === t) ?? r[0], Ut = (t, e, r = {}) => {
728
+ const i = t.x, l = t.y, u = i + e.clientWidth, d = l + e.clientHeight;
729
+ return i >= 0 && l >= 0 && u <= n && d <= c;
730
+ }, te = (t) => t.startsWith("right") ? "right" : t.startsWith("left") ? "left" : t.startsWith("top") ? "top" : "bottom", Ft = (t, e, r) => te(e) === t && r.includes(e) ? e : r.find((o) => te(o) === t) ?? r[0], $t = (t, e, r = {}) => {
832
731
  if (typeof window > "u")
833
732
  return {
834
733
  top: 0,
@@ -836,51 +735,51 @@ const $t = (t, e) => t.strategy ? t.strategy : wt(e) ? "fixed" : "absolute", Y =
836
735
  bottom: 0,
837
736
  left: 0
838
737
  };
839
- const o = Y(r, e) ? null : O(t), n = t.getBoundingClientRect(), d = o ? o.getBoundingClientRect() : {
738
+ const o = Y(r, e) ? null : P(t), n = t.getBoundingClientRect(), c = o ? o.getBoundingClientRect() : {
840
739
  top: 0,
841
740
  left: 0,
842
741
  right: window.innerWidth,
843
742
  bottom: window.innerHeight
844
743
  };
845
744
  return {
846
- top: n.top - d.top,
847
- right: d.right - n.right,
848
- bottom: d.bottom - n.bottom,
849
- left: n.left - d.left
745
+ top: n.top - c.top,
746
+ right: c.right - n.right,
747
+ bottom: c.bottom - n.bottom,
748
+ left: n.left - c.left
850
749
  };
851
- }, Gt = (t, e, r = {}) => new Promise((o) => {
852
- var n, d;
853
- const a = r.placement ? r.placement : "bottom", c = {
750
+ }, Bt = (t, e, r = {}) => new Promise((o) => {
751
+ var n, c;
752
+ const s = r.placement ? r.placement : "bottom", i = {
854
753
  x: 0,
855
754
  y: 0,
856
- placement: a,
755
+ placement: s,
857
756
  middlewareData: {}
858
- }, l = ie(t, e, a, r);
859
- c.x = l.x, c.y = l.y, c.placement = l.placement;
860
- const f = c.x, u = c.y, s = Ft(t);
861
- (n = r.middleware) == null || n.forEach((_) => {
862
- const y = _.fn({
863
- x: c.x,
864
- y: c.y,
757
+ }, l = ae(t, e, s, r);
758
+ i.x = l.x, i.y = l.y, i.placement = l.placement;
759
+ const u = i.x, d = i.y, a = tt(t);
760
+ (n = r.middleware) == null || n.forEach((y) => {
761
+ const m = y.fn({
762
+ x: i.x,
763
+ y: i.y,
865
764
  options: r,
866
- primaryX: f,
867
- primaryY: u,
765
+ primaryX: u,
766
+ primaryY: d,
868
767
  floating: e,
869
- placement: c.placement,
768
+ placement: i.placement,
870
769
  reference: t,
871
- scrollDirection: s
770
+ scrollDirection: a
872
771
  });
873
- c.x = y.x, c.y = y.y, c.placement = y.placement, _.name === "arrow" && (y.baseX = y.x, y.baseY = y.y, y.x = y.arrowX ?? y.x, y.y = y.arrowY ?? y.y), c.middlewareData[_.name] = y;
772
+ i.x = m.x, i.y = m.y, i.placement = m.placement, y.name === "arrow" && (m.baseX = m.x, m.baseY = m.y, m.x = m.arrowX ?? m.x, m.y = m.arrowY ?? m.y), i.middlewareData[y.name] = m;
874
773
  });
875
- const v = ie(t, e, c.placement, r), i = X(r, "offset"), m = i ? (d = i.params) == null ? void 0 : d.value : 0;
876
- if (Number.isFinite(c.x) || (c.x = v.x), !Number.isFinite(c.y))
774
+ const v = ae(t, e, i.placement, r), f = j(r, "offset"), p = f ? (c = f.params) == null ? void 0 : c.value : 0;
775
+ if (Number.isFinite(i.x) || (i.x = v.x), !Number.isFinite(i.y))
877
776
  if (Y(r, e)) {
878
- const _ = t.getBoundingClientRect(), y = e.getBoundingClientRect().height;
879
- c.placement.startsWith("top") ? c.y = _.top - y - m : c.placement.startsWith("bottom") ? c.y = _.bottom + m : c.y = v.y;
777
+ const y = t.getBoundingClientRect(), m = e.getBoundingClientRect().height;
778
+ i.placement.startsWith("top") ? i.y = y.top - m - p : i.placement.startsWith("bottom") ? i.y = y.bottom + p : i.y = v.y;
880
779
  } else
881
- c.y = v.y;
882
- o(c);
883
- }), Zt = ["disabled", "aria-expanded", "onKeydown"], Jt = ["data-placement"], Qt = ["disabled", "aria-selected", "onClick"], Uo = /* @__PURE__ */ E({
780
+ i.y = v.y;
781
+ o(i);
782
+ }), xt = ["disabled", "aria-expanded", "onKeydown"], Tt = ["data-placement"], Rt = ["disabled", "aria-selected", "onClick"], fo = /* @__PURE__ */ X({
884
783
  __name: "select",
885
784
  props: {
886
785
  modelValue: { default: void 0 },
@@ -894,136 +793,136 @@ const $t = (t, e) => t.strategy ? t.strategy : wt(e) ? "fixed" : "absolute", Y =
894
793
  emits: ["update:modelValue", "change", "focus", "blur"],
895
794
  setup(t, { emit: e }) {
896
795
  let r = 0;
897
- const o = e, n = t, d = j(null), a = j(null), c = j(null), l = j(!1), f = j("bottom"), u = j("bottom"), s = `vf-select-panel-${++r}`;
796
+ const o = e, n = t, c = N(null), s = N(null), i = N(null), l = N(!1), u = N("bottom"), d = N("bottom"), a = `vf-select-panel-${++r}`;
898
797
  let v = null;
899
- const i = C(() => n.options.map((h) => ({
900
- label: h[n.optionLabel],
901
- value: h[n.optionValue],
902
- disabled: h.disabled
903
- }))), m = C(() => i.value.find((h) => h.value === n.modelValue)), _ = C(() => {
904
- var h;
905
- return ((h = m.value) == null ? void 0 : h.label) ?? "";
906
- }), y = C(() => {
907
- const h = ["vf-select", l.value ? "vf-select_open" : ""];
908
- return n.size !== "normal" && h.push(`vf-select_${n.size}`), n.disabled && h.push("vf-select_disabled"), h.filter(Boolean);
909
- }), te = (h) => h.value === n.modelValue, oe = (h) => {
910
- h.disabled || (o("update:modelValue", h.value), o("change", h.value), A());
911
- }, x = (h) => o("focus", h), B = (h) => o("blur", h), A = () => {
912
- l.value = !1, f.value = "bottom", u.value = "bottom";
913
- }, N = () => {
914
- n.disabled || (l.value = !l.value, l.value && (f.value = "bottom", u.value = "bottom"));
798
+ const f = w(() => n.options.map((b) => ({
799
+ label: b[n.optionLabel],
800
+ value: b[n.optionValue],
801
+ disabled: b.disabled
802
+ }))), p = w(() => f.value.find((b) => b.value === n.modelValue)), y = w(() => {
803
+ var b;
804
+ return ((b = p.value) == null ? void 0 : b.label) ?? "";
805
+ }), m = w(() => {
806
+ const b = ["vf-select", l.value ? "vf-select_open" : ""];
807
+ return n.size !== "normal" && b.push(`vf-select_${n.size}`), n.disabled && b.push("vf-select_disabled"), b.filter(Boolean);
808
+ }), Q = (b) => b.value === n.modelValue, ee = (b) => {
809
+ b.disabled || (o("update:modelValue", b.value), o("change", b.value), H());
810
+ }, x = (b) => o("focus", b), $ = (b) => o("blur", b), H = () => {
811
+ l.value = !1, u.value = "bottom", d.value = "bottom";
812
+ }, A = () => {
813
+ n.disabled || (l.value = !l.value, l.value && (u.value = "bottom", d.value = "bottom"));
915
814
  }, S = async () => {
916
- var h, F;
917
- l.value || (l.value = !0, await pe()), (F = (h = c.value) == null ? void 0 : h.querySelector(".vf-select__option:not(.is-disabled)")) == null || F.focus();
918
- }, I = (h) => {
815
+ var b, F;
816
+ l.value || (l.value = !0, await de()), (F = (b = i.value) == null ? void 0 : b.querySelector(".vf-select__option:not(.is-disabled)")) == null || F.focus();
817
+ }, D = (b) => {
919
818
  var T;
920
- if (!l.value || !d.value)
819
+ if (!l.value || !c.value)
921
820
  return;
922
- const F = h.target;
923
- d.value.contains(F) || (T = c.value) != null && T.contains(F) || A();
924
- }, G = () => {
925
- if (!a.value || !c.value)
821
+ const F = b.target;
822
+ c.value.contains(F) || (T = i.value) != null && T.contains(F) || H();
823
+ }, q = () => {
824
+ if (!s.value || !i.value)
926
825
  return;
927
- const h = a.value, F = c.value, T = async () => {
826
+ const b = s.value, F = i.value, T = async () => {
928
827
  const {
929
- x: xe,
930
- y: Te,
931
- placement: Le
932
- } = await Gt(h, F, {
933
- placement: f.value,
828
+ x: Be,
829
+ y: xe,
830
+ placement: Te
831
+ } = await Bt(b, F, {
832
+ placement: u.value,
934
833
  strategy: "fixed",
935
- middleware: [St(2), Tt({ placements: ["bottom", "top"] })]
834
+ middleware: [st(2), nt({ placements: ["bottom", "top"] })]
936
835
  });
937
- u.value = Le ?? f.value, F.style.minWidth = `${h.getBoundingClientRect().width}px`, F.style.left = `${xe}px`, F.style.top = `${Te}px`;
938
- }, le = async () => {
836
+ d.value = Te ?? u.value, F.style.minWidth = `${b.getBoundingClientRect().width}px`, F.style.left = `${Be}px`, F.style.top = `${xe}px`;
837
+ }, re = async () => {
939
838
  await T();
940
- }, Be = Wt(h, () => {
941
- le();
942
- }), se = () => {
943
- le();
839
+ }, $e = dt(b, () => {
840
+ re();
841
+ }), ne = () => {
842
+ re();
944
843
  };
945
- document.addEventListener("scroll", se, !0), window.addEventListener("resize", se, !1), v = {
946
- update: le,
844
+ document.addEventListener("scroll", ne, !0), window.addEventListener("resize", ne, !1), v = {
845
+ update: re,
947
846
  destroy: () => {
948
- Be(), document.removeEventListener("scroll", se, !0), window.removeEventListener("resize", se, !1);
847
+ $e(), document.removeEventListener("scroll", ne, !0), window.removeEventListener("resize", ne, !1);
949
848
  }
950
849
  }, v.update();
951
850
  };
952
- return ae(l, async (h) => {
953
- if (!h) {
851
+ return le(l, async (b) => {
852
+ if (!b) {
954
853
  v && (v.destroy(), v = null);
955
854
  return;
956
855
  }
957
- await pe(), v || G(), v == null || v.update();
958
- }), ae(
856
+ await de(), v || q(), v == null || v.update();
857
+ }), le(
959
858
  () => n.options,
960
859
  () => {
961
860
  v == null || v.update();
962
861
  },
963
862
  { deep: !0 }
964
863
  ), Re(() => {
965
- document.addEventListener("click", I);
864
+ document.addEventListener("click", D);
966
865
  }), Se(() => {
967
- document.removeEventListener("click", I), v == null || v.destroy(), v = null;
968
- }), (h, F) => (p(), b("div", {
866
+ document.removeEventListener("click", D), v == null || v.destroy(), v = null;
867
+ }), (b, F) => (g(), h("div", {
969
868
  ref_key: "root",
970
- ref: d,
971
- class: k(y.value)
869
+ ref: c,
870
+ class: C(m.value)
972
871
  }, [
973
- $("button", {
872
+ B("button", {
974
873
  ref_key: "trigger",
975
- ref: a,
874
+ ref: s,
976
875
  class: "vf-select__control",
977
876
  type: "button",
978
- disabled: h.disabled,
877
+ disabled: b.disabled,
979
878
  "aria-expanded": l.value,
980
- "aria-controls": s,
879
+ "aria-controls": a,
981
880
  "aria-haspopup": "listbox",
982
- onClick: N,
881
+ onClick: A,
983
882
  onKeydown: [
984
- K(q(S, ["prevent"]), ["down"]),
985
- K(q(N, ["prevent"]), ["enter"]),
986
- K(q(A, ["prevent"]), ["esc"])
883
+ K(G(S, ["prevent"]), ["down"]),
884
+ K(G(A, ["prevent"]), ["enter"]),
885
+ K(G(H, ["prevent"]), ["esc"])
987
886
  ],
988
887
  onFocus: x,
989
- onBlur: B
888
+ onBlur: $
990
889
  }, [
991
- $("span", {
992
- class: k(["vf-select__label", { "vf-select__label_placeholder": !_.value }])
993
- }, H(_.value || h.placeholder), 3),
994
- F[0] || (F[0] = $("span", {
890
+ B("span", {
891
+ class: C(["vf-select__label", { "vf-select__label_placeholder": !y.value }])
892
+ }, M(y.value || b.placeholder), 3),
893
+ F[0] || (F[0] = B("span", {
995
894
  class: "vf-select__chevron",
996
895
  "aria-hidden": "true"
997
896
  }, "▾", -1))
998
- ], 40, Zt),
999
- (p(), V(Ve, { to: "body" }, [
1000
- _e($("div", {
1001
- id: s,
897
+ ], 40, xt),
898
+ (g(), W(Le, { to: "body" }, [
899
+ me(B("div", {
900
+ id: a,
1002
901
  ref_key: "panel",
1003
- ref: c,
902
+ ref: i,
1004
903
  class: "vf-select__panel",
1005
904
  role: "listbox",
1006
- "data-placement": u.value
905
+ "data-placement": d.value
1007
906
  }, [
1008
- (p(!0), b(ne, null, ye(i.value, (T) => (p(), b("button", {
907
+ (g(!0), h(oe, null, ge(f.value, (T) => (g(), h("button", {
1009
908
  key: T.value,
1010
- class: k(["vf-select__option", { "is-active": te(T), "is-disabled": T.disabled }]),
909
+ class: C(["vf-select__option", { "is-active": Q(T), "is-disabled": T.disabled }]),
1011
910
  type: "button",
1012
911
  role: "option",
1013
912
  disabled: T.disabled,
1014
- "aria-selected": te(T),
1015
- onClick: (le) => oe(T)
1016
- }, H(T.label), 11, Qt))), 128))
1017
- ], 8, Jt), [
1018
- [ke, l.value]
913
+ "aria-selected": Q(T),
914
+ onClick: (re) => ee(T)
915
+ }, M(T.label), 11, Rt))), 128))
916
+ ], 8, Tt), [
917
+ [ye, l.value]
1019
918
  ])
1020
919
  ]))
1021
920
  ], 2));
1022
921
  }
1023
- }), eo = ["checked", "disabled"], to = {
922
+ }), St = ["checked", "disabled"], Lt = {
1024
923
  key: 0,
1025
924
  class: "vf-checkbox__label"
1026
- }, Go = /* @__PURE__ */ E({
925
+ }, vo = /* @__PURE__ */ X({
1027
926
  __name: "checkbox",
1028
927
  props: {
1029
928
  modelValue: { type: Boolean, default: !1 },
@@ -1032,35 +931,35 @@ const $t = (t, e) => t.strategy ? t.strategy : wt(e) ? "fixed" : "absolute", Y =
1032
931
  },
1033
932
  emits: ["update:modelValue", "change"],
1034
933
  setup(t, { emit: e }) {
1035
- const r = e, o = t, n = C(() => {
1036
- const a = ["vf-checkbox"];
1037
- return o.disabled && a.push("vf-checkbox_disabled"), a;
1038
- }), d = (a) => {
1039
- const c = a.target;
1040
- r("update:modelValue", c.checked), r("change", a);
934
+ const r = e, o = t, n = w(() => {
935
+ const s = ["vf-checkbox"];
936
+ return o.disabled && s.push("vf-checkbox_disabled"), s;
937
+ }), c = (s) => {
938
+ const i = s.target;
939
+ r("update:modelValue", i.checked), r("change", s);
1041
940
  };
1042
- return (a, c) => (p(), b("label", {
1043
- class: k(n.value)
941
+ return (s, i) => (g(), h("label", {
942
+ class: C(n.value)
1044
943
  }, [
1045
- $("input", {
944
+ B("input", {
1046
945
  class: "vf-checkbox__control",
1047
946
  type: "checkbox",
1048
- checked: a.modelValue,
1049
- disabled: a.disabled,
1050
- onChange: d
1051
- }, null, 40, eo),
1052
- c[0] || (c[0] = $("span", { class: "vf-checkbox__box" }, null, -1)),
1053
- a.label || a.$slots.default ? (p(), b("span", to, [
1054
- g(a.$slots, "default", {}, () => [
1055
- ee(H(a.label), 1)
947
+ checked: s.modelValue,
948
+ disabled: s.disabled,
949
+ onChange: c
950
+ }, null, 40, St),
951
+ i[0] || (i[0] = B("span", { class: "vf-checkbox__box" }, null, -1)),
952
+ s.label || s.$slots.default ? (g(), h("span", Lt, [
953
+ k(s.$slots, "default", {}, () => [
954
+ J(M(s.label), 1)
1056
955
  ])
1057
- ])) : w("", !0)
956
+ ])) : _("", !0)
1058
957
  ], 2));
1059
958
  }
1060
- }), oo = ["checked", "disabled"], ro = {
959
+ }), Vt = ["checked", "disabled"], zt = {
1061
960
  key: 0,
1062
961
  class: "vf-switch__label"
1063
- }, Zo = /* @__PURE__ */ E({
962
+ }, po = /* @__PURE__ */ X({
1064
963
  __name: "switch",
1065
964
  props: {
1066
965
  modelValue: { type: Boolean, default: !1 },
@@ -1069,114 +968,108 @@ const $t = (t, e) => t.strategy ? t.strategy : wt(e) ? "fixed" : "absolute", Y =
1069
968
  },
1070
969
  emits: ["update:modelValue", "change"],
1071
970
  setup(t, { emit: e }) {
1072
- const r = e, o = t, n = C(() => {
1073
- const a = ["vf-switch"];
1074
- return o.disabled && a.push("vf-switch_disabled"), a;
1075
- }), d = (a) => {
1076
- const c = a.target;
1077
- r("update:modelValue", c.checked), r("change", a);
971
+ const r = e, o = t, n = w(() => {
972
+ const s = ["vf-switch"];
973
+ return o.disabled && s.push("vf-switch_disabled"), s;
974
+ }), c = (s) => {
975
+ const i = s.target;
976
+ r("update:modelValue", i.checked), r("change", s);
1078
977
  };
1079
- return (a, c) => (p(), b("label", {
1080
- class: k(n.value)
978
+ return (s, i) => (g(), h("label", {
979
+ class: C(n.value)
1081
980
  }, [
1082
- $("input", {
981
+ B("input", {
1083
982
  class: "vf-switch__control",
1084
983
  type: "checkbox",
1085
- checked: a.modelValue,
1086
- disabled: a.disabled,
1087
- onChange: d
1088
- }, null, 40, oo),
1089
- c[0] || (c[0] = $("span", { class: "vf-switch__track" }, [
1090
- $("span", { class: "vf-switch__thumb" })
984
+ checked: s.modelValue,
985
+ disabled: s.disabled,
986
+ onChange: c
987
+ }, null, 40, Vt),
988
+ i[0] || (i[0] = B("span", { class: "vf-switch__track" }, [
989
+ B("span", { class: "vf-switch__thumb" })
1091
990
  ], -1)),
1092
- a.label || a.$slots.default ? (p(), b("span", ro, [
1093
- g(a.$slots, "default", {}, () => [
1094
- ee(H(a.label), 1)
991
+ s.label || s.$slots.default ? (g(), h("span", zt, [
992
+ k(s.$slots, "default", {}, () => [
993
+ J(M(s.label), 1)
1095
994
  ])
1096
- ])) : w("", !0)
995
+ ])) : _("", !0)
1097
996
  ], 2));
1098
997
  }
1099
- }), no = { class: "vf-popover" }, lo = ["aria-expanded", "onKeydown"], Jo = /* @__PURE__ */ E({
998
+ }), Wt = { class: "vf-popover" }, Mt = ["aria-expanded", "onKeydown"], bo = /* @__PURE__ */ X({
1100
999
  __name: "popover",
1101
1000
  emits: ["click", "onClick"],
1102
1001
  setup(t, { expose: e, emit: r }) {
1103
- const o = r, n = ze({ visible: !1 });
1104
- let d = 0;
1105
- const a = `vf-popover-panel-${++d}`, c = () => n.visible = !0, l = () => n.visible = !1, f = () => n.visible = !n.visible, u = () => {
1106
- f(), o("click"), o("onClick");
1002
+ const o = r, n = Ve({ visible: !1 });
1003
+ let c = 0;
1004
+ const s = `vf-popover-panel-${++c}`, i = () => n.visible = !0, l = () => n.visible = !1, u = () => n.visible = !n.visible, d = () => {
1005
+ u(), o("click"), o("onClick");
1107
1006
  };
1108
- return e({ show: c, hide: l, toggle: f }), (s, v) => (p(), b("div", no, [
1109
- $("div", {
1007
+ return e({ show: i, hide: l, toggle: u }), (a, v) => (g(), h("div", Wt, [
1008
+ B("div", {
1110
1009
  class: "vf-popover__button",
1111
1010
  role: "button",
1112
1011
  tabindex: "0",
1113
1012
  "aria-haspopup": "dialog",
1114
1013
  "aria-expanded": n.visible,
1115
- "aria-controls": a,
1116
- onClick: u,
1014
+ "aria-controls": s,
1015
+ onClick: d,
1117
1016
  onKeydown: [
1118
- K(q(u, ["prevent"]), ["enter"]),
1119
- K(q(u, ["prevent"]), ["space"])
1017
+ K(G(d, ["prevent"]), ["enter"]),
1018
+ K(G(d, ["prevent"]), ["space"])
1120
1019
  ]
1121
1020
  }, [
1122
- g(s.$slots, "button")
1123
- ], 40, lo),
1124
- _e(Z(ft, {
1125
- id: a,
1021
+ k(a.$slots, "button")
1022
+ ], 40, Mt),
1023
+ me(he(Xe, {
1024
+ id: s,
1126
1025
  class: "vf-popover__wrapper"
1127
- }, We({
1128
- default: L(() => [
1129
- v[0] || (v[0] = $("div", { class: "vf-popover__arrow" }, null, -1))
1026
+ }, ze({
1027
+ default: I(() => [
1028
+ v[0] || (v[0] = B("div", { class: "vf-popover__arrow" }, null, -1))
1130
1029
  ]),
1131
1030
  _: 2
1132
1031
  }, [
1133
- s.$slots.default ? {
1032
+ a.$slots.default ? {
1134
1033
  name: "default",
1135
- fn: L(() => [
1136
- g(s.$slots, "default")
1034
+ fn: I(() => [
1035
+ k(a.$slots, "default")
1137
1036
  ]),
1138
1037
  key: "0"
1139
1038
  } : void 0,
1140
- s.$slots.header || s.$slots.popoverHeader ? {
1039
+ a.$slots.header || a.$slots.popoverHeader ? {
1141
1040
  name: "header",
1142
- fn: L(() => [
1143
- g(s.$slots, "header"),
1144
- s.$slots.header ? w("", !0) : g(s.$slots, "popoverHeader", { key: 0 })
1041
+ fn: I(() => [
1042
+ k(a.$slots, "header"),
1043
+ a.$slots.header ? _("", !0) : k(a.$slots, "popoverHeader", { key: 0 })
1145
1044
  ]),
1146
1045
  key: "1"
1147
1046
  } : void 0,
1148
- s.$slots.body || s.$slots.popoverBody ? {
1047
+ a.$slots.body || a.$slots.popoverBody ? {
1149
1048
  name: "body",
1150
- fn: L(() => [
1151
- g(s.$slots, "body"),
1152
- s.$slots.body ? w("", !0) : g(s.$slots, "popoverBody", { key: 0 })
1049
+ fn: I(() => [
1050
+ k(a.$slots, "body"),
1051
+ a.$slots.body ? _("", !0) : k(a.$slots, "popoverBody", { key: 0 })
1153
1052
  ]),
1154
1053
  key: "2"
1155
1054
  } : void 0,
1156
- s.$slots.footer || s.$slots.popoverFooter ? {
1055
+ a.$slots.footer || a.$slots.popoverFooter ? {
1157
1056
  name: "footer",
1158
- fn: L(() => [
1159
- g(s.$slots, "footer"),
1160
- s.$slots.footer ? w("", !0) : g(s.$slots, "popoverFooter", { key: 0 })
1057
+ fn: I(() => [
1058
+ k(a.$slots, "footer"),
1059
+ a.$slots.footer ? _("", !0) : k(a.$slots, "popoverFooter", { key: 0 })
1161
1060
  ]),
1162
1061
  key: "3"
1163
1062
  } : void 0
1164
1063
  ]), 1536), [
1165
- [ke, n.visible]
1064
+ [ye, n.visible]
1166
1065
  ])
1167
1066
  ]));
1168
1067
  }
1169
- }), so = {}, ao = { class: "vf-container" };
1170
- function io(t, e) {
1171
- return p(), b("div", ao, [
1172
- g(t.$slots, "default")
1173
- ]);
1174
- }
1175
- const Qo = /* @__PURE__ */ U(so, [["render", io]]), co = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], uo = (t) => {
1068
+ }), Ht = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], Ot = (t) => {
1176
1069
  const e = t.replace(/([A-Z])/g, "-$1");
1177
1070
  return e.charAt(0).toUpperCase() + e.slice(1);
1178
- }, fo = (t) => t.filter((e) => !co.includes(e)).map((e) => uo(e)).join("-").toLowerCase(), vo = (t) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t), fe = (t) => {
1179
- if (!vo(t))
1071
+ }, Et = (t) => t.filter((e) => !Ht.includes(e)).map((e) => Ot(e)).join("-").toLowerCase(), Pt = (t) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t), ie = (t) => {
1072
+ if (!Pt(t))
1180
1073
  return null;
1181
1074
  if (t.length === 4) {
1182
1075
  const e = t[1], r = t[2], o = t[3];
@@ -1184,46 +1077,46 @@ const Qo = /* @__PURE__ */ U(so, [["render", io]]), co = ["dark", "light", "them
1184
1077
  }
1185
1078
  return t.toLowerCase();
1186
1079
  }, we = (t) => {
1187
- const e = fe(t);
1080
+ const e = ie(t);
1188
1081
  if (!e)
1189
1082
  return [0, 0, 0];
1190
- const r = parseInt(e.slice(1), 16), o = r >> 16 & 255, n = r >> 8 & 255, d = r & 255;
1191
- return [o, n, d];
1192
- }, ge = (t) => {
1083
+ const r = parseInt(e.slice(1), 16), o = r >> 16 & 255, n = r >> 8 & 255, c = r & 255;
1084
+ return [o, n, c];
1085
+ }, ve = (t) => {
1193
1086
  const [e, r, o] = we(t);
1194
1087
  return `${e}, ${r}, ${o}`;
1195
- }, po = (t, e, r) => {
1196
- const o = t / 255, n = e / 255, d = r / 255, a = Math.max(o, n, d), c = Math.min(o, n, d), l = a - c;
1197
- let f = 0, u = 0;
1198
- const s = (a + c) / 2;
1088
+ }, At = (t, e, r) => {
1089
+ const o = t / 255, n = e / 255, c = r / 255, s = Math.max(o, n, c), i = Math.min(o, n, c), l = s - i;
1090
+ let u = 0, d = 0;
1091
+ const a = (s + i) / 2;
1199
1092
  if (l !== 0) {
1200
- switch (u = l / (1 - Math.abs(2 * s - 1)), a) {
1093
+ switch (d = l / (1 - Math.abs(2 * a - 1)), s) {
1201
1094
  case o:
1202
- f = (n - d) / l % 6;
1095
+ u = (n - c) / l % 6;
1203
1096
  break;
1204
1097
  case n:
1205
- f = (d - o) / l + 2;
1098
+ u = (c - o) / l + 2;
1206
1099
  break;
1207
- case d:
1208
- f = (o - n) / l + 4;
1100
+ case c:
1101
+ u = (o - n) / l + 4;
1209
1102
  break;
1210
1103
  }
1211
- f *= 60, f < 0 && (f += 360);
1104
+ u *= 60, u < 0 && (u += 360);
1212
1105
  }
1213
- return [f, u * 100, s * 100];
1214
- }, ho = (t, e, r) => {
1215
- const o = e / 100, n = r / 100, d = (1 - Math.abs(2 * n - 1)) * o, a = d * (1 - Math.abs(t / 60 % 2 - 1)), c = n - d / 2;
1216
- let l = 0, f = 0, u = 0;
1217
- t >= 0 && t < 60 ? (l = d, f = a, u = 0) : t >= 60 && t < 120 ? (l = a, f = d, u = 0) : t >= 120 && t < 180 ? (l = 0, f = d, u = a) : t >= 180 && t < 240 ? (l = 0, f = a, u = d) : t >= 240 && t < 300 ? (l = a, f = 0, u = d) : (l = d, f = 0, u = a);
1218
- const s = Math.round((l + c) * 255), v = Math.round((f + c) * 255), i = Math.round((u + c) * 255);
1219
- return [s, v, i];
1220
- }, bo = (t, e, r) => `#${[t, e, r].map((o) => o.toString(16).padStart(2, "0")).join("")}`, go = (t, e, r) => Math.min(r, Math.max(e, t)), mo = (t, e) => {
1221
- const r = fe(t);
1106
+ return [u, d * 100, a * 100];
1107
+ }, Dt = (t, e, r) => {
1108
+ const o = e / 100, n = r / 100, c = (1 - Math.abs(2 * n - 1)) * o, s = c * (1 - Math.abs(t / 60 % 2 - 1)), i = n - c / 2;
1109
+ let l = 0, u = 0, d = 0;
1110
+ t >= 0 && t < 60 ? (l = c, u = s, d = 0) : t >= 60 && t < 120 ? (l = s, u = c, d = 0) : t >= 120 && t < 180 ? (l = 0, u = c, d = s) : t >= 180 && t < 240 ? (l = 0, u = s, d = c) : t >= 240 && t < 300 ? (l = s, u = 0, d = c) : (l = c, u = 0, d = s);
1111
+ const a = Math.round((l + i) * 255), v = Math.round((u + i) * 255), f = Math.round((d + i) * 255);
1112
+ return [a, v, f];
1113
+ }, Nt = (t, e, r) => `#${[t, e, r].map((o) => o.toString(16).padStart(2, "0")).join("")}`, It = (t, e, r) => Math.min(r, Math.max(e, t)), jt = (t, e) => {
1114
+ const r = ie(t);
1222
1115
  if (!r)
1223
1116
  return t;
1224
- const [o, n, d] = we(r), [a, c, l] = po(o, n, d), u = (e - 5) * 7, s = go(l + u, 0, 100), [v, i, m] = ho(a, c, s);
1225
- return bo(v, i, m);
1226
- }, yo = (t) => {
1117
+ const [o, n, c] = we(r), [s, i, l] = At(o, n, c), d = (e - 5) * 7, a = It(l + d, 0, 100), [v, f, p] = Dt(s, i, a);
1118
+ return Nt(v, f, p);
1119
+ }, Xt = (t) => {
1227
1120
  if (typeof document > "u")
1228
1121
  return null;
1229
1122
  const e = document.getElementById(t);
@@ -1231,19 +1124,19 @@ const Qo = /* @__PURE__ */ U(so, [["render", io]]), co = ["dark", "light", "them
1231
1124
  return e;
1232
1125
  const r = document.createElement("style");
1233
1126
  return r.id = t, document.head.appendChild(r), r;
1234
- }, ce = (t) => !!t && typeof t == "object" && !Array.isArray(t), ve = (t, e) => {
1127
+ }, se = (t) => !!t && typeof t == "object" && !Array.isArray(t), ce = (t, e) => {
1235
1128
  if (!e)
1236
1129
  return { ...t };
1237
1130
  const r = { ...t };
1238
1131
  for (const o in e) {
1239
- const n = e[o], d = t[o];
1240
- ce(d) && ce(n) ? r[o] = ve(d, n) : r[o] = n;
1132
+ const n = e[o], c = t[o];
1133
+ se(c) && se(n) ? r[o] = ce(c, n) : r[o] = n;
1241
1134
  }
1242
1135
  return r;
1243
- }, $e = (t) => {
1136
+ }, _e = (t) => {
1244
1137
  if (!t)
1245
1138
  return null;
1246
- if (ce(t) && "preset" in t) {
1139
+ if (se(t) && "preset" in t) {
1247
1140
  const e = t;
1248
1141
  return {
1249
1142
  preset: e.preset ?? {},
@@ -1253,65 +1146,65 @@ const Qo = /* @__PURE__ */ U(so, [["render", io]]), co = ["dark", "light", "them
1253
1146
  };
1254
1147
  }
1255
1148
  return { preset: t };
1256
- }, _o = (t) => {
1257
- const e = [], r = [], o = (n, d) => {
1149
+ }, Yt = (t) => {
1150
+ const e = [], r = [], o = (n, c) => {
1258
1151
  if (!(!n || typeof n != "object"))
1259
- for (const a in n) {
1260
- const c = n[a], l = d.concat([a]);
1261
- if (c && typeof c == "object") {
1262
- o(c, l);
1152
+ for (const s in n) {
1153
+ const i = n[s], l = c.concat([s]);
1154
+ if (i && typeof i == "object") {
1155
+ o(i, l);
1263
1156
  continue;
1264
1157
  }
1265
- if (typeof c != "string")
1158
+ if (typeof i != "string")
1266
1159
  continue;
1267
- const u = l.includes("colorScheme") && l.includes("dark") ? r : e, s = fo(l);
1268
- if (u.push(`--vf-${s}: ${c}`), l.includes("colors")) {
1269
- const v = fe(c);
1160
+ const d = l.includes("colorScheme") && l.includes("dark") ? r : e, a = Et(l);
1161
+ if (d.push(`--vf-${a}: ${i}`), l.includes("colors")) {
1162
+ const v = ie(i);
1270
1163
  if (!v)
1271
1164
  continue;
1272
- if (u.push(`--vf-${s}-rgb: ${ge(v)}`), a !== "white")
1273
- for (let i = 1; i < 10; ++i) {
1274
- const m = mo(v, i);
1275
- u.push(`--vf-${s}-${i}00: ${m}`), u.push(`--vf-${s}-${i}00-rgb: ${ge(m)}`);
1165
+ if (d.push(`--vf-${a}-rgb: ${ve(v)}`), s !== "white")
1166
+ for (let f = 1; f < 10; ++f) {
1167
+ const p = jt(v, f);
1168
+ d.push(`--vf-${a}-${f}00: ${p}`), d.push(`--vf-${a}-${f}00-rgb: ${ve(p)}`);
1276
1169
  }
1277
1170
  }
1278
1171
  }
1279
1172
  };
1280
1173
  return o(t, []), { baseVars: e, darkVars: r };
1281
- }, ko = (t, e, r) => {
1282
- const { baseVars: o, darkVars: n } = _o(t), d = yo("vueforge-theme");
1283
- if (!d)
1174
+ }, Kt = (t, e, r) => {
1175
+ const { baseVars: o, darkVars: n } = Yt(t), c = Xt("vueforge-theme");
1176
+ if (!c)
1284
1177
  return;
1285
- const a = [];
1286
- o.length && a.push(`${e} { ${o.join(";")} }`), n.length && a.push(`${r} { ${n.join(";")} }`), d.textContent = a.join(`
1178
+ const s = [];
1179
+ o.length && s.push(`${e} { ${o.join(";")} }`), n.length && s.push(`${r} { ${n.join(";")} }`), c.textContent = s.join(`
1287
1180
  `);
1288
1181
  };
1289
- let D = null;
1290
- const Co = (t) => ({
1182
+ let E = null;
1183
+ const Gt = (t) => ({
1291
1184
  selector: t.selector ?? ":root",
1292
1185
  darkSelector: t.darkSelector ?? ":root[data-theme=dark]"
1293
1186
  }), Fe = (t) => {
1294
- const e = $e(t);
1187
+ const e = _e(t);
1295
1188
  if (!e)
1296
1189
  return;
1297
- const r = ve(e.preset, e.overrides), { selector: o, darkSelector: n } = Co(e);
1298
- D = { ...e }, ko(r, o, n);
1299
- }, er = (t) => {
1300
- if (!D)
1190
+ const r = ce(e.preset, e.overrides), { selector: o, darkSelector: n } = Gt(e);
1191
+ E = { ...e }, Kt(r, o, n);
1192
+ }, go = (t) => {
1193
+ if (!E)
1301
1194
  return;
1302
- const e = t.overrides === void 0 ? D.overrides : ve(D.overrides ?? {}, t.overrides ?? {}), r = {
1303
- preset: t.preset ?? D.preset,
1195
+ const e = t.overrides === void 0 ? E.overrides : ce(E.overrides ?? {}, t.overrides ?? {}), r = {
1196
+ preset: t.preset ?? E.preset,
1304
1197
  overrides: e,
1305
- selector: t.selector ?? D.selector,
1306
- darkSelector: t.darkSelector ?? D.darkSelector
1198
+ selector: t.selector ?? E.selector,
1199
+ darkSelector: t.darkSelector ?? E.darkSelector
1307
1200
  };
1308
1201
  Fe(r);
1309
- }, tr = () => D ? { ...D } : null, or = {
1202
+ }, ho = () => E ? { ...E } : null, mo = {
1310
1203
  install(t, e = {}) {
1311
- const r = $e(e.theme);
1204
+ const r = _e(e.theme);
1312
1205
  r && Fe(r);
1313
1206
  }
1314
- }, me = {
1207
+ }, pe = {
1315
1208
  colors: {
1316
1209
  white: "#ffffff",
1317
1210
  green: "#0cbc87",
@@ -1322,6 +1215,7 @@ const Co = (t) => ({
1322
1215
  purple: "#6f42c1",
1323
1216
  gray: "#adb5bd"
1324
1217
  },
1218
+ borderWidth: "1px",
1325
1219
  colorScheme: {
1326
1220
  light: {
1327
1221
  bgColor: "#ffffff",
@@ -1342,10 +1236,12 @@ const Co = (t) => ({
1342
1236
  dividerColor: "#2e2e32"
1343
1237
  }
1344
1238
  }
1345
- }, wo = {
1239
+ }, qt = {
1240
+ fontSize: "1rem",
1346
1241
  padding: "6px 10px",
1347
1242
  borderRadius: "6px",
1348
1243
  roundedBorderRadius: "2rem",
1244
+ iconGap: "6px",
1349
1245
  small: {
1350
1246
  fontSize: "0.875rem",
1351
1247
  padding: "4px 8px"
@@ -1482,27 +1378,13 @@ const Co = (t) => ({
1482
1378
  }
1483
1379
  }
1484
1380
  }
1485
- }, $o = {
1381
+ }, Ut = {
1486
1382
  padding: "12px",
1487
1383
  borderColor: "var(--vf-border-color)",
1488
1384
  borderRadius: "6px"
1489
- }, Fo = {}, Bo = {
1490
- padding: "12px"
1491
- }, xo = {}, To = {}, Lo = {
1492
- color: "var(--vf-secondary-text-color)",
1493
- padding: "12px",
1494
- marginTop: "24px",
1495
- borderTop: "1px solid var(--vf-footer-border-color)",
1496
- borderColor: "var(--vf-border-color)",
1497
- backgroundColor: "var(--vf-bg-color)"
1498
- }, Ro = {
1499
- height: "55px",
1500
- padding: "0",
1501
- borderColor: "var(--vf-border-color)",
1502
- borderBottom: "1px solid var(--vf-header-border-color)",
1503
- marginBottom: "24px",
1504
- backgroundColor: "var(--vf-bg-color)"
1505
- }, So = {
1385
+ }, Zt = {}, Jt = {
1386
+ gap: "0.5rem",
1387
+ fontSize: "1rem",
1506
1388
  padding: "0.5rem 0.75rem",
1507
1389
  borderRadius: "6px",
1508
1390
  borderColor: "var(--vf-border-color)",
@@ -1520,10 +1402,14 @@ const Co = (t) => ({
1520
1402
  padding: "0.625rem 0.875rem",
1521
1403
  fontSize: "1.125rem"
1522
1404
  }
1523
- }, Vo = {
1405
+ }, Qt = {
1524
1406
  hoverColor: "var(--vf-blue)",
1525
1407
  activeColor: "var(--vf-blue)"
1526
- }, zo = {}, Wo = {
1408
+ }, eo = {
1409
+ iconGap: "6px",
1410
+ submenuOffset: "12px",
1411
+ separatorThickness: "1px",
1412
+ separatorHeight: "1rem",
1527
1413
  separatorColor: "var(--vf-border-color)",
1528
1414
  link: {
1529
1415
  hoverColor: "var(--vf-blue)",
@@ -1539,9 +1425,13 @@ const Co = (t) => ({
1539
1425
  marginBottom: "0.5rem",
1540
1426
  marginLeft: "0.5rem"
1541
1427
  }
1542
- }, Mo = {
1428
+ }, to = {
1543
1429
  backgroundColor: "var(--vf-bg-color)"
1544
- }, Ho = {
1430
+ }, oo = {
1431
+ minWidth: "12rem",
1432
+ fontSize: "1rem",
1433
+ controlGap: "0.75rem",
1434
+ chevronSize: "0.9em",
1545
1435
  padding: "0.5rem 0.75rem",
1546
1436
  borderRadius: "6px",
1547
1437
  borderColor: "var(--vf-border-color)",
@@ -1552,7 +1442,13 @@ const Co = (t) => ({
1552
1442
  disabledOpacity: "0.6",
1553
1443
  panelBackgroundColor: "var(--vf-bg-color)",
1554
1444
  panelBorderColor: "var(--vf-border-color)",
1445
+ panelPadding: "0.35rem",
1446
+ panelMaxHeight: "16rem",
1447
+ panelRadiusOffset: "2px",
1555
1448
  panelShadow: "0 10px 30px rgba(0, 0, 0, 0.12)",
1449
+ focusRingShadow: "0 0 0 3px rgba(var(--vf-blue-600-rgb), 0.12)",
1450
+ optionPadding: "0.5rem 0.6rem",
1451
+ optionBorderRadius: "6px",
1556
1452
  optionHoverBackgroundColor: "rgba(var(--vf-blue-600-rgb), 0.08)",
1557
1453
  optionActiveBackgroundColor: "rgba(var(--vf-blue-600-rgb), 0.14)",
1558
1454
  optionActiveTextColor: "var(--vf-text-color)",
@@ -1564,10 +1460,11 @@ const Co = (t) => ({
1564
1460
  padding: "0.625rem 0.875rem",
1565
1461
  fontSize: "1.125rem"
1566
1462
  }
1567
- }, Eo = {
1463
+ }, ro = {
1568
1464
  size: "1rem",
1569
1465
  gap: "0.5rem",
1570
1466
  borderRadius: "4px",
1467
+ checkBorderRadius: "2px",
1571
1468
  borderColor: "var(--vf-border-color)",
1572
1469
  backgroundColor: "var(--vf-bg-color)",
1573
1470
  checkedBackgroundColor: "var(--vf-blue)",
@@ -1575,59 +1472,47 @@ const Co = (t) => ({
1575
1472
  checkColor: "#ffffff",
1576
1473
  textColor: "var(--vf-text-color)",
1577
1474
  disabledOpacity: "0.6"
1578
- }, Ao = {
1475
+ }, no = {
1579
1476
  width: "2.25rem",
1580
1477
  height: "1.25rem",
1581
1478
  thumbSize: "1rem",
1582
1479
  gap: "0.5rem",
1480
+ thumbOffset: "2px",
1481
+ thumbTranslateOffset: "4px",
1583
1482
  backgroundColor: "var(--vf-border-color)",
1584
1483
  checkedBackgroundColor: "var(--vf-blue)",
1585
1484
  thumbColor: "#ffffff",
1586
1485
  textColor: "var(--vf-text-color)",
1587
1486
  disabledOpacity: "0.6"
1588
- }, rr = {
1589
- ...me,
1487
+ }, yo = {
1488
+ ...pe,
1590
1489
  components: {
1591
- base: me,
1592
- button: wo,
1593
- card: $o,
1594
- codeBlock: Fo,
1595
- container: Bo,
1596
- content: xo,
1597
- demo: To,
1598
- footer: Lo,
1599
- header: Ro,
1600
- input: So,
1601
- link: Vo,
1602
- logo: zo,
1603
- menu: Wo,
1604
- popover: Mo,
1605
- select: Ho,
1606
- checkbox: Eo,
1607
- switch: Ao
1490
+ base: pe,
1491
+ button: qt,
1492
+ card: Ut,
1493
+ codeBlock: Zt,
1494
+ input: Jt,
1495
+ link: Qt,
1496
+ menu: eo,
1497
+ popover: to,
1498
+ select: oo,
1499
+ checkbox: ro,
1500
+ switch: no
1608
1501
  }
1609
1502
  };
1610
1503
  export {
1611
- Ko as Button,
1612
- ft as Card,
1613
- Go as Checkbox,
1614
- Qo as Container,
1615
- je as Content,
1616
- No as DefaultLayout,
1617
- rr as DefaultTheme,
1618
- jo as Demo,
1619
- qe as Footer,
1620
- De as Header,
1621
- qo as Input,
1622
- Io as LeftSidebarLayout,
1623
- ue as Link,
1624
- Xo as Logo,
1625
- Yo as Menu,
1626
- Jo as Popover,
1627
- Uo as Select,
1628
- Zo as Switch,
1629
- or as VueForge,
1630
- tr as getTheme,
1504
+ co as Button,
1505
+ Xe as Card,
1506
+ vo as Checkbox,
1507
+ yo as DefaultTheme,
1508
+ uo as Input,
1509
+ ke as Link,
1510
+ io as Menu,
1511
+ bo as Popover,
1512
+ fo as Select,
1513
+ po as Switch,
1514
+ mo as VueForge,
1515
+ ho as getTheme,
1631
1516
  Fe as setTheme,
1632
- er as updateTheme
1517
+ go as updateTheme
1633
1518
  };