@codemonster-ru/vueforge 0.11.0 → 0.12.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 D, ref as P, computed as C, watch as ne, resolveComponent as Te, openBlock as b, createElementBlock as k, normalizeClass as S, renderSlot as _, Fragment as ce, createTextVNode as te, toDisplayString as A, createBlock as X, withCtx as oe, createCommentVNode as x, createElementVNode as z, renderList as Le, withKeys as le, withModifiers as ae, unref as ie, createVNode as We, nextTick as _e, onMounted as Oe, onBeforeUnmount as $e, Teleport as xe, withDirectives as ke, vShow as Ce, provide as Ge, inject as Ue, reactive as qe, createSlots as Ze, useSlots as Je } from "vue";
2
+ import { useRoute as Qe, useRouter as eo } 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 oo = ["href", "aria-disabled", "tabindex"], He = /* @__PURE__ */ D({
5
5
  __name: "link",
6
6
  props: {
7
7
  to: { default: void 0 },
@@ -14,14 +14,14 @@ const Je = ["href", "aria-disabled", "tabindex"], He = /* @__PURE__ */ j({
14
14
  disabled: { type: Boolean }
15
15
  },
16
16
  emits: ["click", "active", "update:active", "onActive"],
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")
17
+ setup(o, { emit: e }) {
18
+ const r = e, t = o, l = Qe(), u = eo(), i = P(null), d = C(() => t.href ?? t.url), a = C(() => t.as ? t.as === "router-link" && !t.to ? "a" : t.as : t.type === "router-link" || t.type === "a" ? t.type === "router-link" && !t.to ? "a" : t.type : t.to ? "router-link" : "a"), c = C(() => t.to), n = C(() => t.to ? u.resolve(t.to) : null), s = C(() => {
19
+ if (a.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) => {
24
- if (!o.disabled) {
21
+ const p = n.value;
22
+ return p ? p.name ? l.matched.some(({ name: w }) => w === p.name) : p.fullPath ? l.fullPath === p.fullPath : l.path === p.path : !1;
23
+ }), f = C(() => t.active === void 0 ? s.value : t.active), v = (p) => {
24
+ if (!t.disabled) {
25
25
  r("click", p);
26
26
  return;
27
27
  }
@@ -29,82 +29,82 @@ const Je = ["href", "aria-disabled", "tabindex"], He = /* @__PURE__ */ j({
29
29
  };
30
30
  return ne(s, (p) => {
31
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", {
32
+ }), (p, w) => {
33
+ const h = Te("router-link");
34
+ return a.value === "a" ? (b(), 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 }]),
36
+ href: d.value,
37
+ class: S(["vf-link", { "vf-link_active": f.value, "vf-link_disabled": p.disabled }]),
38
38
  "aria-disabled": p.disabled,
39
39
  tabindex: p.disabled ? -1 : void 0,
40
- onClick: f
40
+ onClick: v
41
41
  }, [
42
- p.$slots.default ? _(p.$slots, "default", { key: 0 }) : (m(), k(ce, { key: 1 }, [
43
- ae(X(p.label), 1)
42
+ p.$slots.default ? _(p.$slots, "default", { key: 0 }) : (b(), k(ce, { key: 1 }, [
43
+ te(A(p.label), 1)
44
44
  ], 64))
45
- ], 10, Je)) : (m(), I(b, {
45
+ ], 10, oo)) : (b(), X(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 }]),
49
+ to: c.value,
50
+ class: S(["vf-link", { "vf-link_active": f.value }]),
51
51
  "aria-disabled": p.disabled,
52
52
  tabindex: p.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: v
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
+ p.$slots.default ? _(p.$slots, "default", { key: 0 }) : (b(), k(ce, { key: 1 }, [
59
+ te(A(p.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) => {
67
- const r = t.__vccOpts || t;
68
- for (const [o, l] of e)
69
- r[o] = l;
66
+ }), to = (o, e) => {
67
+ const r = o.__vccOpts || o;
68
+ for (const [t, l] of e)
69
+ r[t] = l;
70
70
  return r;
71
- }, et = {}, tt = { class: "vf-card" }, ot = {
71
+ }, ro = {}, lo = { class: "vf-card" }, ao = {
72
72
  key: 0,
73
73
  class: "vf-card__default"
74
- }, rt = {
74
+ }, no = {
75
75
  key: 1,
76
76
  class: "vf-card__header"
77
- }, lt = {
77
+ }, so = {
78
78
  key: 2,
79
79
  class: "vf-card__body"
80
- }, nt = {
80
+ }, io = {
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 co(o, e) {
85
+ return b(), k("div", lo, [
86
+ o.$slots.default ? (b(), k("div", ao, [
87
+ _(o.$slots, "default")
88
+ ])) : x("", !0),
89
+ o.$slots.header ? (b(), k("div", no, [
90
+ _(o.$slots, "header")
91
+ ])) : x("", !0),
92
+ o.$slots.body ? (b(), k("div", so, [
93
+ _(o.$slots, "body")
94
+ ])) : x("", !0),
95
+ o.$slots.footer ? (b(), k("div", io, [
96
+ _(o.$slots, "footer")
97
+ ])) : x("", !0)
98
98
  ]);
99
99
  }
100
- const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
100
+ const uo = /* @__PURE__ */ to(ro, [["render", co]]), fo = {
101
101
  class: "vf-menu__list",
102
102
  role: "menu"
103
- }, dt = {
103
+ }, vo = {
104
104
  key: 1,
105
105
  class: "vf-menu__separator",
106
106
  role: "separator"
107
- }, ct = ["aria-expanded", "onClick", "onKeydown"], So = /* @__PURE__ */ j({
107
+ }, po = ["aria-expanded", "onClick", "onKeydown"], Ht = /* @__PURE__ */ D({
108
108
  name: "VfMenu",
109
109
  __name: "menu",
110
110
  props: {
@@ -112,88 +112,88 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
112
112
  orientation: { default: "vertical" }
113
113
  },
114
114
  emits: ["active", "onActive"],
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) => ({
115
+ setup(o, { emit: e }) {
116
+ const r = e, t = o, l = P([]), u = (n, s) => `${n.label ?? n.to ?? n.href ?? n.url ?? "item"}_${s.toString()}`, i = (n) => n.to ? "router-link" : "a", d = (n) => n.map((s) => ({
117
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) => {
118
+ items: s.items ? d(s.items) : void 0
119
+ })), a = (n) => {
120
+ n.items && n.items.length ? (l.value.map((s) => {
121
+ s !== n && (s.subMenuVisible = !1);
122
+ }), n.subMenuVisible = !n.subMenuVisible) : Object.prototype.hasOwnProperty.call(n, "command") && typeof n.command == "function" && n.command();
123
+ }, c = (n) => {
124
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));
125
+ for (const f in l.value) {
126
+ const v = l.value[f];
127
+ Object.prototype.hasOwnProperty.call(v, "items") && ((s = v.items) != null && s.some((p) => p === n) ? (v.active = !0, v.subMenuVisible = !0) : (v.active = !1, v.subMenuVisible = !1));
128
128
  }
129
- r("active", a), r("onActive", a);
129
+ r("active", n), r("onActive", n);
130
130
  };
131
131
  return ne(
132
- () => o.items,
133
- (a) => {
134
- l.value = u(a);
132
+ () => t.items,
133
+ (n) => {
134
+ l.value = d(n);
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
+ ), (n, s) => {
138
+ const f = Te("VfMenu");
139
+ return b(), k("div", {
140
+ class: S(["vf-menu", `vf-menu_${n.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
+ z("ul", fo, [
143
+ (b(!0), k(ce, null, Le(l.value, (v, p) => (b(), k("li", {
144
+ key: u(v, p),
145
145
  class: "vf-menu__item",
146
146
  role: "none"
147
147
  }, [
148
- a.$slots[c(f, p)] ? _(a.$slots, c(f, p), {
148
+ n.$slots[u(v, p)] ? _(n.$slots, u(v, p), {
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: { ...v, class: "vf-menu__link" }
151
+ }) : v.separator ? (b(), k("hr", vo)) : v.items && v.items.length ? (b(), k(ce, { key: 2 }, [
152
+ z("div", {
153
+ class: S(["vf-menu__parent", { "vf-menu__parent_active": v.active }]),
154
154
  role: "menuitem",
155
155
  tabindex: "0",
156
- "aria-expanded": f.subMenuVisible ? "true" : "false",
157
- onClick: (C) => n(f),
156
+ "aria-expanded": v.subMenuVisible ? "true" : "false",
157
+ onClick: (w) => a(v),
158
158
  onKeydown: [
159
- re(le((C) => n(f), ["prevent"]), ["enter"]),
160
- re(le((C) => n(f), ["prevent"]), ["space"])
159
+ le(ae((w) => a(v), ["prevent"]), ["enter"]),
160
+ le(ae((w) => a(v), ["prevent"]), ["space"])
161
161
  ]
162
162
  }, [
163
- f.icon ? (m(), I(ie(de), {
163
+ v.icon ? (b(), X(ie(de), {
164
164
  key: 0,
165
- icon: f.icon,
165
+ icon: v.icon,
166
166
  class: "vf-menu__icon"
167
- }, null, 8, ["icon"])) : $("", !0),
168
- ae(" " + X(f.label) + " ", 1),
167
+ }, null, 8, ["icon"])) : x("", !0),
168
+ te(" " + A(v.label) + " ", 1),
169
169
  We(ie(de), { icon: "chevronDown" })
170
- ], 42, ct),
171
- f.items ? (m(), I(v, {
170
+ ], 42, po),
171
+ v.items ? (b(), X(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: v.items,
174
+ class: S(["vf-menu__submenu", { "vf-menu__submenu_visible": v.subMenuVisible }]),
175
+ onOnActive: c
176
+ }, null, 8, ["items", "class"])) : x("", !0)
177
+ ], 64)) : (b(), X(He, {
178
178
  key: 3,
179
- to: f.to,
180
- href: f.href ?? f.url,
181
- as: i(f),
179
+ to: v.to,
180
+ href: v.href ?? v.url,
181
+ as: i(v),
182
182
  class: "vf-menu__link",
183
- active: f.active,
184
- disabled: f.disabled,
183
+ active: v.active,
184
+ disabled: v.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": v.disabled ? "true" : "false",
187
+ onClick: (w) => a(v),
188
+ onActive: (w) => c(v)
189
189
  }, {
190
- default: te(() => [
191
- f.icon ? (m(), I(ie(de), {
190
+ default: oe(() => [
191
+ v.icon ? (b(), X(ie(de), {
192
192
  key: 0,
193
- icon: f.icon,
193
+ icon: v.icon,
194
194
  class: "vf-menu__icon"
195
- }, null, 8, ["icon"])) : $("", !0),
196
- ae(" " + X(f.label), 1)
195
+ }, null, 8, ["icon"])) : x("", !0),
196
+ te(" " + A(v.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
+ }), go = ["type", "disabled"], Et = /* @__PURE__ */ D({
206
206
  __name: "button",
207
207
  props: {
208
208
  to: { default: void 0 },
@@ -220,71 +220,71 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
220
220
  severity: { default: "primary" },
221
221
  disabled: { type: Boolean, default: !1 }
222
222
  },
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", {
223
+ setup(o) {
224
+ const e = o, r = ["button", "submit", "reset"], t = (n) => !!n && r.includes(n), l = C(() => e.as ? e.as === "button" : !(e.to || e.href || e.url || e.type && !t(e.type))), u = C(() => t(e.type) ? e.type : "button"), i = C(() => e.as === "link" ? e.to ? "router-link" : "a" : e.type && !t(e.type) ? e.type === "router-link" && e.to ? "router-link" : "a" : e.to ? "router-link" : "a"), d = C(() => {
225
+ let n = ["vf-button", `vf-button_${e.severity}`];
226
+ return ["top", "bottom"].includes(e.iconPos) && n.push("vf-button_vertical"), e.variant === "text" && n.push("vf-button_text"), e.variant === "outlined" && n.push("vf-button_outlined"), ["small", "large"].indexOf(e.size) > -1 && n.push(`vf-button_${e.size}`), (e.loading || e.disabled) && n.push("vf-button_disabled"), e.rounded && n.push("vf-button_rounded"), n;
227
+ }), a = C(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]), c = C(() => ["vf-button__label"]);
228
+ return (n, s) => l.value ? (b(), k("button", {
229
229
  key: 0,
230
- type: c.value,
231
- class: L(u.value),
230
+ type: u.value,
231
+ class: S(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 ? (b(), X(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: S(a.value)
238
+ }, null, 8, ["icon", "class"])) : x("", !0),
239
+ e.loading ? (b(), X(ie(de), {
240
240
  key: 1,
241
241
  icon: "circleNotch",
242
- class: L(n.value),
242
+ class: S(a.value),
243
243
  spin: ""
244
- }, null, 8, ["class"])) : $("", !0),
245
- a.$slots.default ? (m(), k("span", {
244
+ }, null, 8, ["class"])) : x("", !0),
245
+ n.$slots.default ? (b(), k("span", {
246
246
  key: 2,
247
- class: L(d.value)
247
+ class: S(c.value)
248
248
  }, [
249
- _(a.$slots, "default")
250
- ], 2)) : a.label ? (m(), k("span", {
249
+ _(n.$slots, "default")
250
+ ], 2)) : n.label ? (b(), 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: S(c.value)
253
+ }, A(n.label), 3)) : x("", !0)
254
+ ], 10, go)) : (b(), X(He, {
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: S(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 ? (b(), X(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: S(a.value)
267
+ }, null, 8, ["icon", "class"])) : x("", !0),
268
+ n.$slots.default ? (b(), k("span", {
269
269
  key: 1,
270
- class: L(d.value)
270
+ class: S(c.value)
271
271
  }, [
272
- _(a.$slots, "default")
273
- ], 2)) : a.label ? (m(), k("span", {
272
+ _(n.$slots, "default")
273
+ ], 2)) : n.label ? (b(), k("span", {
274
274
  key: 2,
275
- class: L(d.value)
276
- }, X(a.label), 3)) : $("", !0)
275
+ class: S(c.value)
276
+ }, A(n.label), 3)) : x("", !0)
277
277
  ]),
278
278
  _: 3
279
279
  }, 8, ["to", "href", "as", "class", "disabled"]));
280
280
  }
281
- }), ft = {
281
+ }), bo = {
282
282
  key: 0,
283
283
  class: "vf-input__prefix"
284
- }, vt = ["type", "value", "placeholder", "disabled", "readonly"], pt = {
284
+ }, mo = ["type", "value", "placeholder", "disabled", "readonly"], ho = {
285
285
  key: 1,
286
286
  class: "vf-input__suffix"
287
- }, Ro = /* @__PURE__ */ j({
287
+ }, Mt = /* @__PURE__ */ D({
288
288
  __name: "input",
289
289
  props: {
290
290
  modelValue: { default: "" },
@@ -296,38 +296,38 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
296
296
  variant: { default: "filled" }
297
297
  },
298
298
  emits: ["update:modelValue", "input", "change", "focus", "blur"],
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)
299
+ setup(o, { emit: e }) {
300
+ const r = e, t = o, l = C(() => {
301
+ const c = ["vf-input", `vf-input_${t.variant}`];
302
+ return t.size !== "normal" && c.push(`vf-input_${t.size}`), t.disabled && c.push("vf-input_disabled"), c;
303
+ }), u = (c) => {
304
+ const n = c.target;
305
+ r("update:modelValue", n.value), r("input", c);
306
+ }, i = (c) => r("change", c), d = (c) => r("focus", c), a = (c) => r("blur", c);
307
+ return (c, n) => (b(), k("div", {
308
+ class: S(l.value)
309
309
  }, [
310
- d.$slots.prefix ? (m(), k("span", ft, [
311
- _(d.$slots, "prefix")
312
- ])) : $("", !0),
313
- R("input", {
310
+ c.$slots.prefix ? (b(), k("span", bo, [
311
+ _(c.$slots, "prefix")
312
+ ])) : x("", !0),
313
+ z("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,
320
- onInput: c,
315
+ type: c.type,
316
+ value: c.modelValue,
317
+ placeholder: c.placeholder,
318
+ disabled: c.disabled,
319
+ readonly: c.readonly,
320
+ onInput: u,
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: a
324
+ }, null, 40, mo),
325
+ c.$slots.suffix ? (b(), k("span", ho, [
326
+ _(c.$slots, "suffix")
327
+ ])) : x("", !0)
328
328
  ], 2));
329
329
  }
330
- }), gt = ["value", "placeholder", "disabled", "readonly", "rows"], Lo = /* @__PURE__ */ j({
330
+ }), yo = ["value", "placeholder", "disabled", "readonly", "rows"], Pt = /* @__PURE__ */ D({
331
331
  __name: "textarea",
332
332
  props: {
333
333
  modelValue: { default: "" },
@@ -339,29 +339,29 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
339
339
  rows: { default: 3 }
340
340
  },
341
341
  emits: ["update:modelValue", "input", "change", "focus", "blur"],
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)
342
+ setup(o, { emit: e }) {
343
+ const r = e, t = o, l = C(() => {
344
+ const c = ["vf-textarea", `vf-textarea_${t.variant}`];
345
+ return t.size !== "normal" && c.push(`vf-textarea_${t.size}`), t.disabled && c.push("vf-textarea_disabled"), c;
346
+ }), u = (c) => {
347
+ const n = c.target;
348
+ r("update:modelValue", n.value), r("input", c);
349
+ }, i = (c) => r("change", c), d = (c) => r("focus", c), a = (c) => r("blur", c);
350
+ return (c, n) => (b(), k("div", {
351
+ class: S(l.value)
352
352
  }, [
353
- R("textarea", {
353
+ z("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,
360
- onInput: c,
355
+ value: c.modelValue,
356
+ placeholder: c.placeholder,
357
+ disabled: c.disabled,
358
+ readonly: c.readonly,
359
+ rows: c.rows,
360
+ onInput: u,
361
361
  onChange: i,
362
- onFocus: u,
363
- onBlur: n
364
- }, null, 40, gt)
362
+ onFocus: d,
363
+ onBlur: a
364
+ }, null, 40, yo)
365
365
  ], 2));
366
366
  }
367
367
  }), ze = [
@@ -377,406 +377,406 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
377
377
  "left",
378
378
  "left-start",
379
379
  "left-end"
380
- ], q = (t) => {
381
- if (t == null || !(t instanceof HTMLElement))
380
+ ], q = (o) => {
381
+ if (o == null || !(o instanceof HTMLElement))
382
382
  return null;
383
383
  if (typeof window < "u") {
384
- const e = window.getComputedStyle(t), r = `${e.overflowX}${e.overflowY}`;
384
+ const e = window.getComputedStyle(o), r = `${e.overflowX}${e.overflowY}`;
385
385
  if (/(auto|scroll|overlay)/.test(r))
386
- return t;
386
+ return o;
387
387
  }
388
- return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth ? t : q(t.parentNode);
388
+ return o.scrollHeight > o.clientHeight || o.scrollWidth > o.clientWidth ? o : q(o.parentNode);
389
389
  };
390
- function ht(t) {
391
- return typeof window > "u" ? !1 : window.getComputedStyle(t).position === "fixed";
390
+ function ko(o) {
391
+ return typeof window > "u" ? !1 : window.getComputedStyle(o).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 Co = (o, e) => o.strategy ? o.strategy : ko(e) ? "fixed" : "absolute", Q = (o, e) => Co(o, e) === "fixed", I = (o, e, r = {}) => {
394
+ const t = o.getBoundingClientRect(), l = e ? e.offsetParent : null, u = e ? Q(r, e) : !1;
395
+ if (l && !u) {
396
+ const i = l.getBoundingClientRect(), d = l.scrollLeft, a = l.scrollTop;
397
397
  return {
398
- left: o.left - i.left + u,
399
- top: o.top - i.top + n,
400
- width: o.width,
401
- height: o.height
398
+ left: t.left - i.left + d,
399
+ top: t.top - i.top + a,
400
+ width: t.width,
401
+ height: t.height
402
402
  };
403
403
  }
404
404
  return {
405
- left: o.left,
406
- top: o.top,
407
- width: o.width,
408
- height: o.height
405
+ left: t.left,
406
+ top: t.top,
407
+ width: t.width,
408
+ height: t.height
409
409
  };
410
- }, oe = (t, e) => {
410
+ }, re = (o, e) => {
411
411
  var r;
412
- return (r = t.middleware) == null ? void 0 : r.find((o) => o.name === e);
413
- }, Ee = (t, e) => !!oe(t, e), bt = (t) => {
414
- const e = q(t);
412
+ return (r = o.middleware) == null ? void 0 : r.find((t) => t.name === e);
413
+ }, Ee = (o, e) => !!re(o, e), wo = (o) => {
414
+ const e = q(o);
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))
419
- return t;
420
- let c = 0;
417
+ }, be = (o) => o.scrollLeft + o.clientWidth, me = (o) => o.scrollTop + o.clientHeight, K = (o, e, r = null, t = {}, l) => {
418
+ if (r === null && typeof window < "u" && Q(t, e))
419
+ return o;
420
+ let u = 0;
421
421
  if (r === null) {
422
422
  const i = q(e);
423
- c = i ? i.scrollTop : 0;
423
+ u = i ? i.scrollTop : 0;
424
424
  }
425
- return t - c;
426
- }, G = (t, e, r = null, o = {}, l) => {
427
- let c;
428
- if (r === null && typeof window < "u" && Q(o, e))
429
- c = window.innerWidth;
425
+ return o - u;
426
+ }, G = (o, e, r = null, t = {}, l) => {
427
+ let u;
428
+ if (r === null && typeof window < "u" && Q(t, e))
429
+ u = window.innerWidth;
430
430
  else if (r === null) {
431
431
  const i = q(e);
432
- c = i ? he(i) : 0;
432
+ u = i ? be(i) : 0;
433
433
  } else
434
- c = r.getBoundingClientRect().width;
435
- return -(t + e.clientWidth - c);
436
- }, Z = (t, e, r = null, o = {}, l) => {
437
- let c;
438
- if (r === null && typeof window < "u" && Q(o, e))
439
- c = window.innerHeight;
434
+ u = r.getBoundingClientRect().width;
435
+ return -(o + e.clientWidth - u);
436
+ }, Z = (o, e, r = null, t = {}, l) => {
437
+ let u;
438
+ if (r === null && typeof window < "u" && Q(t, e))
439
+ u = window.innerHeight;
440
440
  else if (r === null) {
441
441
  const i = q(e);
442
- c = i ? me(i) : 0;
442
+ u = i ? me(i) : 0;
443
443
  } else
444
- c = r.getBoundingClientRect().height;
445
- return -(t + e.clientHeight - c);
446
- }, U = (t, e, r = null, o = {}, l) => {
447
- if (r === null && typeof window < "u" && Q(o, e))
448
- return t;
449
- let c = 0;
444
+ u = r.getBoundingClientRect().height;
445
+ return -(o + e.clientHeight - u);
446
+ }, U = (o, e, r = null, t = {}, l) => {
447
+ if (r === null && typeof window < "u" && Q(t, e))
448
+ return o;
449
+ let u = 0;
450
450
  if (r === null) {
451
451
  const i = q(e);
452
- c = i ? i.scrollLeft : 0;
452
+ u = i ? i.scrollLeft : 0;
453
453
  }
454
- return t - c;
454
+ return o - u;
455
455
  }, Se = ({
456
- options: t,
456
+ options: o,
457
457
  primaryX: e,
458
458
  primaryY: r,
459
- floating: o,
459
+ floating: t,
460
460
  placement: l,
461
- reference: c,
461
+ reference: u,
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,
469
- options: t,
464
+ const d = he(u, t, l, o), a = re(o, "offset");
465
+ if (a) {
466
+ const c = a.fn({
467
+ x: d.x,
468
+ y: d.y,
469
+ options: o,
470
470
  primaryX: e,
471
471
  primaryY: r,
472
- floating: o,
472
+ floating: t,
473
473
  placement: l,
474
- reference: c,
474
+ reference: u,
475
475
  scrollDirection: i
476
476
  });
477
- u.x = d.x, u.y = d.y;
477
+ d.x = c.x, d.y = c.y;
478
478
  }
479
- return Wt(u, o, c, t) ? {
480
- x: u.x,
481
- y: u.y,
479
+ return Mo(d, t, u, o) ? {
480
+ x: d.x,
481
+ y: d.y,
482
482
  placement: l
483
483
  } : !1;
484
- }, Me = (t) => ({
484
+ }, Me = (o) => ({
485
485
  name: "flip",
486
- params: t,
486
+ params: o,
487
487
  fn: ({
488
488
  x: e,
489
489
  y: r,
490
- options: o,
490
+ options: t,
491
491
  primaryX: l,
492
- primaryY: c,
492
+ primaryY: u,
493
493
  floating: i,
494
- placement: u,
495
- reference: n,
496
- scrollDirection: d
494
+ placement: d,
495
+ reference: a,
496
+ scrollDirection: c
497
497
  }) => {
498
- var a;
498
+ var n;
499
499
  const s = {
500
500
  x: e,
501
501
  y: r,
502
- placement: u
503
- }, v = {
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)
502
+ placement: d
503
+ }, f = {
504
+ ...t,
505
+ middleware: (n = t.middleware) == null ? void 0 : n.filter((V) => V.name !== "shift")
506
+ }, v = (o == null ? void 0 : o.placements) ?? ze, p = !(o != null && o.placements), w = p ? ze : v;
507
+ let h = !1;
508
+ const B = (V) => {
509
+ if (h)
510
510
  return;
511
- const S = Se({
512
- options: v,
511
+ const R = Se({
512
+ options: f,
513
513
  primaryX: l,
514
- primaryY: c,
514
+ primaryY: u,
515
515
  floating: i,
516
- placement: z,
517
- reference: n,
518
- scrollDirection: d
516
+ placement: V,
517
+ reference: a,
518
+ scrollDirection: c
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) => {
520
+ R && (s.x = R.x, s.y = R.y, s.placement = R.placement, h = !0);
521
+ }, L = Ao(a, i, f);
522
+ if (!p && v.includes(d) && B(d), h || w.forEach(B), !h) {
523
+ const V = v.reduce(
524
+ (R, $) => {
525
525
  const F = Se({
526
- options: v,
526
+ options: f,
527
527
  primaryX: l,
528
- primaryY: c,
528
+ primaryY: u,
529
529
  floating: i,
530
- placement: w,
531
- reference: n,
532
- scrollDirection: d
530
+ placement: $,
531
+ reference: a,
532
+ scrollDirection: c
533
533
  });
534
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;
535
+ return R;
536
+ const O = fe($), W = L[O];
537
+ return !R || W > R.space ? { result: F, space: W } : R;
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
+ V && (s.x = V.result.x, s.y = V.result.y, s.placement = V.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 && v.length > 0) {
544
+ const V = fe(d);
545
+ let R = V, $ = L[V];
546
+ v.forEach((m) => {
547
+ const g = fe(m), y = L[g];
548
+ y > $ && ($ = y, R = g);
549
549
  });
550
- const F = Ot(S, u, f), O = be(n, i, F, v), W = oe(v, "offset");
550
+ const F = Po(R, d, v), O = he(a, i, F, f), W = re(f, "offset");
551
551
  if (W) {
552
- const h = W.fn({
552
+ const m = W.fn({
553
553
  x: O.x,
554
554
  y: O.y,
555
- options: v,
555
+ options: f,
556
556
  primaryX: l,
557
- primaryY: c,
557
+ primaryY: u,
558
558
  floating: i,
559
559
  placement: F,
560
- reference: n,
561
- scrollDirection: d
560
+ reference: a,
561
+ scrollDirection: c
562
562
  });
563
- O.x = h.x, O.y = h.y;
563
+ O.x = m.x, O.y = m.y;
564
564
  }
565
565
  s.x = O.x, s.y = O.y, s.placement = O.placement;
566
566
  }
567
567
  return s;
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
+ }), Pe = (o, e, r, t, l) => {
570
+ var u, i, d;
571
+ let a = 0;
572
+ t.startsWith("right") ? a = -o : t.startsWith("left") && (a = o);
573
+ const c = re(e, "arrow"), n = re(e, "shift");
574
+ if (c) {
575
+ const s = ((u = c.params) == null ? void 0 : u.arrow).getBoundingClientRect();
576
+ t.startsWith("right") ? a -= s.width / 2 : t.startsWith("left") && (a += s.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 (Ee(e, "shift") && c) {
579
+ let s = null, f = 0;
580
+ n && (s = (i = n.params) == null ? void 0 : i.parent);
581
+ const v = (d = c.params) == null ? void 0 : d.arrow;
582
+ f = v.getBoundingClientRect().width / 2, f += $o(v), f -= o, t.startsWith("right") ? G(r - a, l, s, e) <= o ? G(r, l, s, e) > 0 ? a = o - G(r, l, s, e) : a = o : U(r - a - f, l, s, e) <= o && (U(r - a - f, l, s, e) >= 0 ? (a = -o - (U(r - a - f, l, s, e) + o), s && (a = -o)) : a = -o) : t.startsWith("left") ? G(r - a + f, l, s, e) <= o ? (a = o + G(r - f, l, s, e), a <= o && (a = o)) : U(r - a, l, s, e) <= o && (a = -o + U(r, l, s, e), a <= -o && (a = -o)) : G(r - a, l, s, e) <= o ? G(r - a, l, s, e) <= o && G(r, l, s, e) > 0 ? a = o - G(r, l, s, e) : a = o : U(r - a, l, s, e) <= o && (U(r - a, l, s, e) <= o && U(r, l, s, e) > 0 ? a = -(o - U(r, l, s, e)) : a = -o);
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 a;
585
+ }, Ae = (o, e, r, t, l) => {
586
+ var u, i, d;
587
+ let a = 0;
588
+ t.startsWith("top") ? a = o : t.startsWith("bottom") && (a = -o);
589
+ const c = re(e, "arrow"), n = re(e, "shift");
590
+ if (c) {
591
+ const s = ((u = c.params) == null ? void 0 : u.arrow).getBoundingClientRect();
592
+ t.startsWith("top") ? a += s.height / 2 : t.startsWith("bottom") && (a -= s.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 (Ee(e, "shift") && c) {
595
+ let s = null, f = 0;
596
+ n && (s = (i = n.params) == null ? void 0 : i.parent);
597
+ const v = (d = c.params) == null ? void 0 : d.arrow;
598
+ f = v.getBoundingClientRect().height / 2, f += xo(v), f -= o, t.startsWith("top") ? K(r - a, l, s, e) <= o ? K(r, l, s, e) >= 0 ? a = -(o - K(r, l, s, e)) : a = -o : Z(r - a + f, l, s, e) <= o && (a = o + Z(r - f, l, s, e), a <= o && (a = o)) : t.startsWith("bottom") ? K(r - a - f, l, s, e) <= o ? K(r - a - f, l, s, e) >= 0 ? (a = -o - (K(r - a - f, l, s, e) + o), s && (a = -o)) : a = -o : Z(r - a, l, s, e) <= o && (Z(r, l, s, e) >= 0 ? a = o - Z(r, l, s, e) : a = o) : K(r - a, l, s, e) <= o ? K(r - a, l, s, e) >= 0 ? a = -(o - K(r - a, l, s, e)) : a = -o : Z(r - a, l, s, e) <= o && (Z(r - a, l, s, e) >= 0 ? a = o - Z(r - a, l, s, e) : a = o);
599
599
  }
600
- return n;
601
- }, De = (t) => ({
600
+ return a;
601
+ }, De = (o) => ({
602
602
  name: "offset",
603
- params: { value: t },
603
+ params: { value: o },
604
604
  fn: ({
605
605
  x: e,
606
606
  y: r,
607
- options: o,
607
+ options: t,
608
608
  primaryX: l,
609
- primaryY: c,
609
+ primaryY: u,
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 - Pe(o, t, l, d, i),
614
+ y: r - Ae(o, t, u, d, i),
615
+ placement: d
616
616
  })
617
- }), yt = (t) => ({
617
+ }), _o = (o) => ({
618
618
  name: "shift",
619
- params: t,
619
+ params: o,
620
620
  fn: ({
621
621
  x: e,
622
622
  y: r,
623
- options: o,
623
+ options: t,
624
624
  primaryX: l,
625
- primaryY: c,
625
+ primaryY: u,
626
626
  floating: i,
627
- placement: u,
628
- reference: n
627
+ placement: d,
628
+ reference: a
629
629
  }) => {
630
- var d;
631
- const a = {
630
+ var c;
631
+ const n = {
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
+ }, s = t.middleware || [], f = s.findIndex((y) => y.name === "shift"), v = s.findIndex((y) => y.name === "offset"), p = v !== -1 && (f === -1 || v > f), w = s.find((y) => y.name === "offset"), h = w ? (c = w.params) == null ? void 0 : c.value : 0, B = p ? Pe(h, t, l, d, i) : 0, L = p ? Ae(h, t, u, d, i) : 0, V = e - B, R = r - L;
636
+ let $ = V, F = R;
637
+ const O = w ? Math.abs(h) : 0, W = O, m = O;
638
+ if (Q(t, i) && typeof window < "u") {
639
+ const y = W, T = window.innerWidth - i.clientWidth - W, H = T < y ? y : T, E = m, N = window.innerHeight - i.clientHeight - m, M = N < E ? E : N;
640
+ $ < y ? $ = y : $ > H && ($ = H), F < E ? F = E : F > M && (F = M), p ? (n.x = e + ($ - V), n.y = r + (F - R)) : (n.x = $, n.y = F);
641
+ const j = W, Y = window.innerWidth - i.clientWidth - W, ee = m, ue = window.innerHeight - i.clientHeight - m, se = p ? j + B : j, ve = p ? Y + B : Y, pe = p ? ee + L : ee, ge = p ? ue + L : ue;
642
+ return n.x < se ? n.x = se : n.x > ve && (n.x = ve), n.y < pe ? n.y = pe : n.y > ge && (n.y = ge), n;
643
643
  }
644
644
  const g = q(i);
645
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);
646
+ const y = I(a, i, t), T = y.left, H = y.left + y.width, E = y.top, N = y.top + y.height, M = g.scrollLeft + W, j = be(g) - i.clientWidth - W, Y = j < M ? M : j, ee = g.scrollTop + m, ue = me(g) - i.clientHeight - m, se = ue < ee ? ee : ue, ve = g.scrollLeft, pe = be(g), ge = g.scrollTop, Ke = me(g);
647
+ H <= ve ? $ = M : T >= pe && ($ = Y), N <= ge ? F = ee : E >= Ke && (F = se), F < ee ? F = ee : F > se && (F = se), $ < M ? $ = M : $ > Y && ($ = Y);
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 (p ? (n.x = e + ($ - V), n.y = r + (F - R)) : (n.x = $, n.y = F), g !== null) {
650
+ const y = g.scrollLeft + W, T = be(g) - i.clientWidth - W, H = g.scrollTop + m, E = me(g) - i.clientHeight - m, N = p ? y + B : y, M = p ? T + B : T, j = p ? H + L : H, Y = p ? E + L : E;
651
+ n.x < N ? n.x = N : n.x > M && (n.x = M), n.y < j ? n.y = j : n.y > Y && (n.y = Y);
652
652
  }
653
- return a;
653
+ return n;
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) => {
656
- const r = q(t), o = [];
655
+ }), $o = (o) => o.getBoundingClientRect().width !== o.clientWidth ? (o.getBoundingClientRect().width - o.clientWidth) / 2 : 0, xo = (o) => o.getBoundingClientRect().height !== o.clientHeight ? (o.getBoundingClientRect().height - o.clientHeight) / 2 : 0, Ie = (o, e) => {
656
+ const r = q(o), t = [];
657
657
  if (r !== null) {
658
658
  const l = () => e();
659
- r.addEventListener("scroll", l, !1), o.push(() => r.removeEventListener("scroll", l, !1));
659
+ r.addEventListener("scroll", l, !1), t.push(() => r.removeEventListener("scroll", l, !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 l = () => e(), u = () => e();
663
+ window.addEventListener("scroll", l, !1), window.addEventListener("resize", u, !1), t.push(() => window.removeEventListener("scroll", l, !1)), t.push(() => window.removeEventListener("resize", u, !1));
664
664
  }
665
- if (typeof ResizeObserver < "u" && t instanceof HTMLElement) {
665
+ if (typeof ResizeObserver < "u" && o instanceof HTMLElement) {
666
666
  const l = new ResizeObserver(() => e());
667
- l.observe(t), o.push(() => l.disconnect());
667
+ l.observe(o), t.push(() => l.disconnect());
668
668
  }
669
- return () => o.forEach((l) => l());
670
- }, wt = (t, e, r = {}) => {
671
- const o = A(t, e, r);
669
+ return () => t.forEach((l) => l());
670
+ }, Bo = (o, e, r = {}) => {
671
+ const t = I(o, e, r);
672
672
  return {
673
- x: o.left - e.getBoundingClientRect().width / 2 + o.width / 2,
674
- y: o.top - e.getBoundingClientRect().height,
673
+ x: t.left - e.getBoundingClientRect().width / 2 + t.width / 2,
674
+ y: t.top - e.getBoundingClientRect().height,
675
675
  placement: "top"
676
676
  };
677
- }, _t = (t, e, r = {}) => {
678
- const o = A(t, e, r);
677
+ }, Fo = (o, e, r = {}) => {
678
+ const t = I(o, e, r);
679
679
  return {
680
- x: o.left,
681
- y: o.top - e.getBoundingClientRect().height,
680
+ x: t.left,
681
+ y: t.top - e.getBoundingClientRect().height,
682
682
  placement: "top-start"
683
683
  };
684
- }, $t = (t, e, r = {}) => {
685
- const o = A(t, e, r);
684
+ }, zo = (o, e, r = {}) => {
685
+ const t = I(o, e, r);
686
686
  return {
687
- x: o.left - e.getBoundingClientRect().width + o.width,
688
- y: o.top - e.getBoundingClientRect().height,
687
+ x: t.left - e.getBoundingClientRect().width + t.width,
688
+ y: t.top - e.getBoundingClientRect().height,
689
689
  placement: "top-end"
690
690
  };
691
- }, xt = (t, e, r = {}) => {
692
- const o = A(t, e, r);
691
+ }, So = (o, e, r = {}) => {
692
+ const t = I(o, e, r);
693
693
  return {
694
- x: o.left + o.width,
695
- y: o.top - e.getBoundingClientRect().height / 2 + o.height / 2,
694
+ x: t.left + t.width,
695
+ y: t.top - e.getBoundingClientRect().height / 2 + t.height / 2,
696
696
  placement: "right"
697
697
  };
698
- }, Ft = (t, e, r = {}) => {
699
- const o = A(t, e, r);
698
+ }, Vo = (o, e, r = {}) => {
699
+ const t = I(o, e, r);
700
700
  return {
701
- x: o.left + o.width,
702
- y: o.top,
701
+ x: t.left + t.width,
702
+ y: t.top,
703
703
  placement: "right-start"
704
704
  };
705
- }, Bt = (t, e, r = {}) => {
706
- const o = A(t, e, r);
705
+ }, Ro = (o, e, r = {}) => {
706
+ const t = I(o, e, r);
707
707
  return {
708
- x: o.left + o.width,
709
- y: o.top + o.height - e.getBoundingClientRect().height,
708
+ x: t.left + t.width,
709
+ y: t.top + t.height - e.getBoundingClientRect().height,
710
710
  placement: "right-end"
711
711
  };
712
- }, zt = (t, e, r = {}) => {
713
- const o = A(t, e, r);
712
+ }, To = (o, e, r = {}) => {
713
+ const t = I(o, e, r);
714
714
  return {
715
- x: o.left + o.width / 2 - e.getBoundingClientRect().width / 2,
716
- y: o.top + o.height,
715
+ x: t.left + t.width / 2 - e.getBoundingClientRect().width / 2,
716
+ y: t.top + t.height,
717
717
  placement: "bottom"
718
718
  };
719
- }, St = (t, e, r = {}) => {
720
- const o = A(t, e, r);
719
+ }, Lo = (o, e, r = {}) => {
720
+ const t = I(o, e, r);
721
721
  return {
722
- x: o.left,
723
- y: o.top + o.height,
722
+ x: t.left,
723
+ y: t.top + t.height,
724
724
  placement: "bottom-start"
725
725
  };
726
- }, Tt = (t, e, r = {}) => {
727
- const o = A(t, e, r);
726
+ }, Wo = (o, e, r = {}) => {
727
+ const t = I(o, e, r);
728
728
  return {
729
- x: o.left - e.getBoundingClientRect().width + o.width,
730
- y: o.top + o.height,
729
+ x: t.left - e.getBoundingClientRect().width + t.width,
730
+ y: t.top + t.height,
731
731
  placement: "bottom-end"
732
732
  };
733
- }, Rt = (t, e, r = {}) => {
734
- const o = A(t, e, r);
733
+ }, Oo = (o, e, r = {}) => {
734
+ const t = I(o, e, r);
735
735
  return {
736
- x: o.left - e.getBoundingClientRect().width,
737
- y: o.top + o.height / 2 - e.getBoundingClientRect().height / 2,
736
+ x: t.left - e.getBoundingClientRect().width,
737
+ y: t.top + t.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
+ }, Ho = (o, e, r = {}) => {
741
+ const t = I(o, e, r);
742
742
  return {
743
- x: o.left - e.getBoundingClientRect().width,
744
- y: o.top,
743
+ x: t.left - e.getBoundingClientRect().width,
744
+ y: t.top,
745
745
  placement: "left-start"
746
746
  };
747
- }, Vt = (t, e, r = {}) => {
748
- const o = A(t, e, r);
747
+ }, Eo = (o, e, r = {}) => {
748
+ const t = I(o, e, r);
749
749
  return {
750
- x: o.left - e.getBoundingClientRect().width,
751
- y: o.top + o.height - e.getBoundingClientRect().height,
750
+ x: t.left - e.getBoundingClientRect().width,
751
+ y: t.top + t.height - e.getBoundingClientRect().height,
752
752
  placement: "left-end"
753
753
  };
754
- }, be = (t, e, r, o = {}) => {
754
+ }, he = (o, e, r, t = {}) => {
755
755
  switch (r) {
756
756
  case "top":
757
- return wt(t, e, o);
757
+ return Bo(o, e, t);
758
758
  case "top-start":
759
- return _t(t, e, o);
759
+ return Fo(o, e, t);
760
760
  case "top-end":
761
- return $t(t, e, o);
761
+ return zo(o, e, t);
762
762
  case "right":
763
- return xt(t, e, o);
763
+ return So(o, e, t);
764
764
  case "right-start":
765
- return Ft(t, e, o);
765
+ return Vo(o, e, t);
766
766
  case "right-end":
767
- return Bt(t, e, o);
767
+ return Ro(o, e, t);
768
768
  case "bottom":
769
- return zt(t, e, o);
769
+ return To(o, e, t);
770
770
  case "bottom-start":
771
- return St(t, e, o);
771
+ return Lo(o, e, t);
772
772
  case "bottom-end":
773
- return Tt(t, e, o);
773
+ return Wo(o, e, t);
774
774
  case "left":
775
- return Rt(t, e, o);
775
+ return Oo(o, e, t);
776
776
  case "left-start":
777
- return Lt(t, e, o);
777
+ return Ho(o, e, t);
778
778
  case "left-end":
779
- return Vt(t, e, o);
779
+ return Eo(o, e, t);
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
+ }, Mo = (o, e, r, t = {}) => {
788
+ if (Q(t, 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 s = o.x, f = o.y, v = s + e.clientWidth, p = f + e.clientHeight;
792
+ return s >= 0 && f >= 0 && v <= window.innerWidth && p <= 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 K(o.y, e, null, t) > 0 && G(o.x, e, null, t) > 0 && Z(o.y, e, null, t) > 0 && U(o.x, e, null, t) > 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 l = window.innerWidth, u = 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 s = i.getBoundingClientRect(), f = s.left + o.x, v = s.top + o.y, p = f + e.clientWidth, w = v + e.clientHeight;
801
+ return f >= 0 && v >= 0 && p <= l && w <= u;
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 = o.x, a = o.y, c = d + e.clientWidth, n = a + e.clientHeight;
804
+ return d >= 0 && a >= 0 && c <= l && n <= u;
805
+ }, fe = (o) => o.startsWith("right") ? "right" : o.startsWith("left") ? "left" : o.startsWith("top") ? "top" : "bottom", Po = (o, e, r) => fe(e) === o && r.includes(e) ? e : r.find((t) => fe(t) === o) ?? r[0], Ao = (o, 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 t = Q(r, e) ? null : q(o), l = o.getBoundingClientRect(), u = t ? t.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: l.top - u.top,
821
+ right: u.right - l.right,
822
+ bottom: u.bottom - l.bottom,
823
+ left: l.left - u.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
+ }, Ne = (o, e, r = {}) => new Promise((t) => {
826
+ var l, u;
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
+ }, a = he(o, e, i, r);
833
+ d.x = a.x, d.y = a.y, d.placement = a.placement;
834
+ const c = d.x, n = d.y, s = wo(o);
835
+ (l = r.middleware) == null || l.forEach((w) => {
836
+ const h = w.fn({
837
+ x: d.x,
838
+ y: d.y,
839
839
  options: r,
840
- primaryX: d,
841
- primaryY: a,
840
+ primaryX: c,
841
+ primaryY: n,
842
842
  floating: e,
843
- placement: u.placement,
844
- reference: t,
843
+ placement: d.placement,
844
+ reference: o,
845
845
  scrollDirection: s
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, w.name === "arrow" && (h.baseX = h.x, h.baseY = h.y, h.x = h.arrowX ?? h.x, h.y = h.arrowY ?? h.y), d.middlewareData[w.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))
849
+ const f = he(o, e, d.placement, r), v = re(r, "offset"), p = v ? (u = v.params) == null ? void 0 : u.value : 0;
850
+ if (Number.isFinite(d.x) || (d.x = f.x), !Number.isFinite(d.y))
851
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;
852
+ const w = o.getBoundingClientRect(), h = e.getBoundingClientRect().height;
853
+ d.placement.startsWith("top") ? d.y = w.top - h - p : d.placement.startsWith("bottom") ? d.y = w.bottom + p : 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
+ t(d);
857
+ }), Do = ["disabled", "aria-expanded", "onKeydown"], Io = ["data-placement"], No = ["disabled", "aria-selected", "onClick"], At = /* @__PURE__ */ D({
858
858
  __name: "select",
859
859
  props: {
860
860
  modelValue: { default: void 0 },
@@ -867,138 +867,138 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
867
867
  size: { default: "normal" }
868
868
  },
869
869
  emits: ["update:modelValue", "change", "focus", "blur"],
870
- setup(t, { emit: e }) {
870
+ setup(o, { 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) => ({
872
+ const t = e, l = o, u = P(null), i = P(null), d = P(null), a = P(!1), c = P("bottom"), n = P("bottom"), s = `vf-select-panel-${++r}`;
873
+ let f = null;
874
+ const v = C(() => l.options.map((g) => ({
875
875
  label: g[l.optionLabel],
876
876
  value: g[l.optionValue],
877
877
  disabled: g.disabled
878
- }))), p = B(() => f.value.find((g) => g.value === l.modelValue)), C = B(() => {
878
+ }))), p = C(() => v.value.find((g) => g.value === l.modelValue)), w = C(() => {
879
879
  var g;
880
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" : ""];
881
+ }), h = C(() => {
882
+ const g = ["vf-select", `vf-select_${l.variant}`, a.value ? "vf-select_open" : ""];
883
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";
884
+ }), B = (g) => g.value === l.modelValue, L = (g) => {
885
+ g.disabled || (t("update:modelValue", g.value), t("change", g.value), $());
886
+ }, V = (g) => t("focus", g), R = (g) => t("blur", g), $ = () => {
887
+ a.value = !1, c.value = "bottom", n.value = "bottom";
888
888
  }, F = () => {
889
- l.disabled || (n.value = !n.value, n.value && (d.value = "bottom", a.value = "bottom"));
889
+ l.disabled || (a.value = !a.value, a.value && (c.value = "bottom", n.value = "bottom"));
890
890
  }, O = async () => {
891
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();
892
+ a.value || (a.value = !0, await _e()), (y = (g = d.value) == null ? void 0 : g.querySelector(".vf-select__option:not(.is-disabled)")) == null || y.focus();
893
893
  }, W = (g) => {
894
894
  var T;
895
- if (!n.value || !c.value)
895
+ if (!a.value || !u.value)
896
896
  return;
897
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)
898
+ u.value.contains(y) || (T = d.value) != null && T.contains(y) || $();
899
+ }, m = () => {
900
+ if (!i.value || !d.value)
901
901
  return;
902
- const g = i.value, y = u.value, T = async () => {
902
+ const g = i.value, y = d.value, T = async () => {
903
903
  const {
904
904
  x: M,
905
- y: N,
905
+ y: j,
906
906
  placement: Y
907
- } = await Xe(g, y, {
908
- placement: d.value,
907
+ } = await Ne(g, y, {
908
+ placement: c.value,
909
909
  strategy: "fixed",
910
910
  middleware: [De(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`;
912
+ n.value = Y ?? c.value, y.style.minWidth = `${g.getBoundingClientRect().width}px`, y.style.left = `${M}px`, y.style.top = `${j}px`;
913
913
  }, H = async () => {
914
914
  await T();
915
915
  }, E = Ie(g, () => {
916
916
  H();
917
- }), D = () => {
917
+ }), N = () => {
918
918
  H();
919
919
  };
920
- document.addEventListener("scroll", D, !0), window.addEventListener("resize", D, !1), v = {
920
+ document.addEventListener("scroll", N, !0), window.addEventListener("resize", N, !1), f = {
921
921
  update: H,
922
922
  destroy: () => {
923
- E(), document.removeEventListener("scroll", D, !0), window.removeEventListener("resize", D, !1);
923
+ E(), document.removeEventListener("scroll", N, !0), window.removeEventListener("resize", N, !1);
924
924
  }
925
- }, v.update();
925
+ }, f.update();
926
926
  };
927
- return ne(n, async (g) => {
927
+ return ne(a, async (g) => {
928
928
  if (!g) {
929
- v && (v.destroy(), v = null);
929
+ f && (f.destroy(), f = null);
930
930
  return;
931
931
  }
932
- await _e(), v || h(), v == null || v.update();
932
+ await _e(), f || m(), f == null || f.update();
933
933
  }), ne(
934
934
  () => l.options,
935
935
  () => {
936
- v == null || v.update();
936
+ f == null || f.update();
937
937
  },
938
938
  { deep: !0 }
939
939
  ), Oe(() => {
940
940
  document.addEventListener("click", W);
941
941
  }), $e(() => {
942
- document.removeEventListener("click", W), v == null || v.destroy(), v = null;
943
- }), (g, y) => (m(), k("div", {
942
+ document.removeEventListener("click", W), f == null || f.destroy(), f = null;
943
+ }), (g, y) => (b(), k("div", {
944
944
  ref_key: "root",
945
- ref: c,
946
- class: L(b.value)
945
+ ref: u,
946
+ class: S(h.value)
947
947
  }, [
948
- R("button", {
948
+ z("button", {
949
949
  ref_key: "trigger",
950
950
  ref: i,
951
951
  class: "vf-select__control",
952
952
  type: "button",
953
953
  disabled: g.disabled,
954
- "aria-expanded": n.value,
954
+ "aria-expanded": a.value,
955
955
  "aria-controls": s,
956
956
  "aria-haspopup": "listbox",
957
957
  onClick: F,
958
958
  onKeydown: [
959
- re(le(O, ["prevent"]), ["down"]),
960
- re(le(F, ["prevent"]), ["enter"]),
961
- re(le(w, ["prevent"]), ["esc"])
959
+ le(ae(O, ["prevent"]), ["down"]),
960
+ le(ae(F, ["prevent"]), ["enter"]),
961
+ le(ae($, ["prevent"]), ["esc"])
962
962
  ],
963
- onFocus: z,
964
- onBlur: S
963
+ onFocus: V,
964
+ onBlur: R
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
+ z("span", {
967
+ class: S(["vf-select__label", { "vf-select__label_placeholder": !w.value }])
968
+ }, A(w.value || g.placeholder), 3),
969
+ y[0] || (y[0] = z("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", {
973
+ ], 40, Do),
974
+ (b(), X(xe, { to: "body" }, [
975
+ ke(z("div", {
976
976
  id: s,
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": n.value
982
982
  }, [
983
- (m(!0), k(ce, null, Ve(f.value, (T) => (m(), k("button", {
983
+ (b(!0), k(ce, null, Le(v.value, (T) => (b(), k("button", {
984
984
  key: T.value,
985
- class: L(["vf-select__option", { "is-active": x(T), "is-disabled": T.disabled }]),
985
+ class: S(["vf-select__option", { "is-active": B(T), "is-disabled": T.disabled }]),
986
986
  type: "button",
987
987
  role: "option",
988
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]
989
+ "aria-selected": B(T),
990
+ onClick: (H) => L(T)
991
+ }, A(T.label), 11, No))), 128))
992
+ ], 8, Io), [
993
+ [Ce, a.value]
994
994
  ])
995
995
  ]))
996
996
  ], 2));
997
997
  }
998
- }), At = ["checked", "disabled"], Dt = {
998
+ }), Xo = ["checked", "disabled"], Yo = {
999
999
  key: 0,
1000
1000
  class: "vf-checkbox__label"
1001
- }, Wo = /* @__PURE__ */ j({
1001
+ }, Dt = /* @__PURE__ */ D({
1002
1002
  __name: "checkbox",
1003
1003
  props: {
1004
1004
  modelValue: { type: Boolean, default: !1 },
@@ -1007,36 +1007,112 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
1007
1007
  variant: { default: "filled" }
1008
1008
  },
1009
1009
  emits: ["update:modelValue", "change"],
1010
- setup(t, { emit: e }) {
1011
- const r = e, o = t, l = B(() => {
1012
- const i = ["vf-checkbox", `vf-checkbox_${o.variant}`];
1013
- return o.disabled && i.push("vf-checkbox_disabled"), i;
1014
- }), c = (i) => {
1015
- const u = i.target;
1016
- r("update:modelValue", u.checked), r("change", i);
1010
+ setup(o, { emit: e }) {
1011
+ const r = e, t = o, l = C(() => {
1012
+ const i = ["vf-checkbox", `vf-checkbox_${t.variant}`];
1013
+ return t.disabled && i.push("vf-checkbox_disabled"), i;
1014
+ }), u = (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) => (b(), k("label", {
1019
+ class: S(l.value)
1020
1020
  }, [
1021
- R("input", {
1021
+ z("input", {
1022
1022
  class: "vf-checkbox__control",
1023
1023
  type: "checkbox",
1024
1024
  checked: i.modelValue,
1025
1025
  disabled: i.disabled,
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, [
1026
+ onChange: u
1027
+ }, null, 40, Xo),
1028
+ d[0] || (d[0] = z("span", { class: "vf-checkbox__box" }, null, -1)),
1029
+ i.label || i.$slots.default ? (b(), k("span", Yo, [
1030
1030
  _(i.$slots, "default", {}, () => [
1031
- ae(X(i.label), 1)
1031
+ te(A(i.label), 1)
1032
1032
  ])
1033
- ])) : $("", !0)
1033
+ ])) : x("", !0)
1034
1034
  ], 2));
1035
1035
  }
1036
- }), It = ["checked", "disabled"], Xt = {
1036
+ }), Xe = Symbol("VueForgeRadioGroup"), jo = ["aria-disabled", "aria-label", "aria-labelledby"], It = /* @__PURE__ */ D({
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(o, { emit: e }) {
1049
+ const r = e, t = o, l = C(() => {
1050
+ const d = ["vf-radio-group"];
1051
+ return t.direction === "horizontal" && d.push("vf-radio-group_horizontal"), d;
1052
+ }), u = (d, a) => {
1053
+ r("update:modelValue", d), r("change", d, a);
1054
+ }, i = {
1055
+ name: C(() => t.name),
1056
+ modelValue: C(() => t.modelValue),
1057
+ disabled: C(() => t.disabled),
1058
+ variant: C(() => t.variant),
1059
+ onChange: u
1060
+ };
1061
+ return Ge(Xe, i), (d, a) => (b(), k("div", {
1062
+ class: S(l.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
+ _(d.$slots, "default")
1069
+ ], 10, jo));
1070
+ }
1071
+ }), Ko = ["name", "value", "checked", "disabled"], Go = {
1072
+ key: 0,
1073
+ class: "vf-radio__label"
1074
+ }, Nt = /* @__PURE__ */ D({
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(o, { emit: e }) {
1086
+ const r = e, t = o, l = Ue(Xe, null), u = C(() => l ? l.modelValue.value : t.modelValue), i = C(() => l ? l.name.value : t.name), d = C(() => l ? l.variant.value : t.variant), a = C(() => (l ? l.disabled.value : !1) || t.disabled), c = C(() => u.value === t.value), n = C(() => {
1087
+ const f = ["vf-radio", `vf-radio_${d.value}`];
1088
+ return a.value && f.push("vf-radio_disabled"), f;
1089
+ }), s = (f) => {
1090
+ a.value || (l ? l.onChange(t.value, f) : r("update:modelValue", t.value), r("change", t.value, f));
1091
+ };
1092
+ return (f, v) => (b(), k("label", {
1093
+ class: S(n.value)
1094
+ }, [
1095
+ z("input", {
1096
+ class: "vf-radio__control",
1097
+ type: "radio",
1098
+ name: i.value,
1099
+ value: f.value,
1100
+ checked: c.value,
1101
+ disabled: a.value,
1102
+ onChange: s
1103
+ }, null, 40, Ko),
1104
+ v[0] || (v[0] = z("span", { class: "vf-radio__circle" }, null, -1)),
1105
+ f.label || f.$slots.default ? (b(), k("span", Go, [
1106
+ _(f.$slots, "default", {}, () => [
1107
+ te(A(f.label), 1)
1108
+ ])
1109
+ ])) : x("", !0)
1110
+ ], 2));
1111
+ }
1112
+ }), Uo = ["checked", "disabled"], qo = {
1037
1113
  key: 0,
1038
1114
  class: "vf-switch__label"
1039
- }, Oo = /* @__PURE__ */ j({
1115
+ }, Xt = /* @__PURE__ */ D({
1040
1116
  __name: "switch",
1041
1117
  props: {
1042
1118
  modelValue: { type: Boolean, default: !1 },
@@ -1044,96 +1120,96 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
1044
1120
  disabled: { type: Boolean, default: !1 }
1045
1121
  },
1046
1122
  emits: ["update:modelValue", "change"],
1047
- setup(t, { emit: e }) {
1048
- const r = e, o = t, l = B(() => {
1123
+ setup(o, { emit: e }) {
1124
+ const r = e, t = o, l = C(() => {
1049
1125
  const i = ["vf-switch"];
1050
- return o.disabled && i.push("vf-switch_disabled"), i;
1051
- }), c = (i) => {
1052
- const u = i.target;
1053
- r("update:modelValue", u.checked), r("change", i);
1126
+ return t.disabled && i.push("vf-switch_disabled"), i;
1127
+ }), u = (i) => {
1128
+ const d = i.target;
1129
+ r("update:modelValue", d.checked), r("change", i);
1054
1130
  };
1055
- return (i, u) => (m(), k("label", {
1056
- class: L(l.value)
1131
+ return (i, d) => (b(), k("label", {
1132
+ class: S(l.value)
1057
1133
  }, [
1058
- R("input", {
1134
+ z("input", {
1059
1135
  class: "vf-switch__control",
1060
1136
  type: "checkbox",
1061
1137
  checked: i.modelValue,
1062
1138
  disabled: i.disabled,
1063
- onChange: c
1064
- }, null, 40, It),
1065
- u[0] || (u[0] = R("span", { class: "vf-switch__track" }, [
1066
- R("span", { class: "vf-switch__thumb" })
1139
+ onChange: u
1140
+ }, null, 40, Uo),
1141
+ d[0] || (d[0] = z("span", { class: "vf-switch__track" }, [
1142
+ z("span", { class: "vf-switch__thumb" })
1067
1143
  ], -1)),
1068
- i.label || i.$slots.default ? (m(), k("span", Xt, [
1144
+ i.label || i.$slots.default ? (b(), k("span", qo, [
1069
1145
  _(i.$slots, "default", {}, () => [
1070
- ae(X(i.label), 1)
1146
+ te(A(i.label), 1)
1071
1147
  ])
1072
- ])) : $("", !0)
1148
+ ])) : x("", !0)
1073
1149
  ], 2));
1074
1150
  }
1075
- }), Yt = { class: "vf-popover" }, jt = ["aria-expanded", "onKeydown"], Ho = /* @__PURE__ */ j({
1151
+ }), Zo = { class: "vf-popover" }, Jo = ["aria-expanded", "onKeydown"], Yt = /* @__PURE__ */ D({
1076
1152
  __name: "popover",
1077
1153
  emits: ["click", "onClick"],
1078
- setup(t, { expose: e, emit: r }) {
1079
- const o = r, l = Ke({ visible: !1 });
1080
- 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");
1154
+ setup(o, { expose: e, emit: r }) {
1155
+ const t = r, l = qe({ visible: !1 });
1156
+ let u = 0;
1157
+ const i = `vf-popover-panel-${++u}`, d = () => l.visible = !0, a = () => l.visible = !1, c = () => l.visible = !l.visible, n = () => {
1158
+ c(), t("click"), t("onClick");
1083
1159
  };
1084
- return e({ show: u, hide: n, toggle: d }), (s, v) => (m(), k("div", Yt, [
1085
- R("div", {
1160
+ return e({ show: d, hide: a, toggle: c }), (s, f) => (b(), k("div", Zo, [
1161
+ z("div", {
1086
1162
  class: "vf-popover__button",
1087
1163
  role: "button",
1088
1164
  tabindex: "0",
1089
1165
  "aria-haspopup": "dialog",
1090
1166
  "aria-expanded": l.visible,
1091
1167
  "aria-controls": i,
1092
- onClick: a,
1168
+ onClick: n,
1093
1169
  onKeydown: [
1094
- re(le(a, ["prevent"]), ["enter"]),
1095
- re(le(a, ["prevent"]), ["space"])
1170
+ le(ae(n, ["prevent"]), ["enter"]),
1171
+ le(ae(n, ["prevent"]), ["space"])
1096
1172
  ]
1097
1173
  }, [
1098
1174
  _(s.$slots, "button")
1099
- ], 40, jt),
1100
- ke(We(st, {
1175
+ ], 40, Jo),
1176
+ ke(We(uo, {
1101
1177
  id: i,
1102
1178
  class: "vf-popover__wrapper"
1103
- }, Ge({
1104
- default: te(() => [
1105
- v[0] || (v[0] = R("div", { class: "vf-popover__arrow" }, null, -1))
1179
+ }, Ze({
1180
+ default: oe(() => [
1181
+ f[0] || (f[0] = z("div", { class: "vf-popover__arrow" }, null, -1))
1106
1182
  ]),
1107
1183
  _: 2
1108
1184
  }, [
1109
1185
  s.$slots.default ? {
1110
1186
  name: "default",
1111
- fn: te(() => [
1187
+ fn: oe(() => [
1112
1188
  _(s.$slots, "default")
1113
1189
  ]),
1114
1190
  key: "0"
1115
1191
  } : void 0,
1116
1192
  s.$slots.header || s.$slots.popoverHeader ? {
1117
1193
  name: "header",
1118
- fn: te(() => [
1194
+ fn: oe(() => [
1119
1195
  _(s.$slots, "header"),
1120
- s.$slots.header ? $("", !0) : _(s.$slots, "popoverHeader", { key: 0 })
1196
+ s.$slots.header ? x("", !0) : _(s.$slots, "popoverHeader", { key: 0 })
1121
1197
  ]),
1122
1198
  key: "1"
1123
1199
  } : void 0,
1124
1200
  s.$slots.body || s.$slots.popoverBody ? {
1125
1201
  name: "body",
1126
- fn: te(() => [
1202
+ fn: oe(() => [
1127
1203
  _(s.$slots, "body"),
1128
- s.$slots.body ? $("", !0) : _(s.$slots, "popoverBody", { key: 0 })
1204
+ s.$slots.body ? x("", !0) : _(s.$slots, "popoverBody", { key: 0 })
1129
1205
  ]),
1130
1206
  key: "2"
1131
1207
  } : void 0,
1132
1208
  s.$slots.footer || s.$slots.popoverFooter ? {
1133
1209
  name: "footer",
1134
- fn: te(() => [
1210
+ fn: oe(() => [
1135
1211
  _(s.$slots, "footer"),
1136
- s.$slots.footer ? $("", !0) : _(s.$slots, "popoverFooter", { key: 0 })
1212
+ s.$slots.footer ? x("", !0) : _(s.$slots, "popoverFooter", { key: 0 })
1137
1213
  ]),
1138
1214
  key: "3"
1139
1215
  } : void 0
@@ -1142,16 +1218,16 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
1142
1218
  ])
1143
1219
  ]));
1144
1220
  }
1145
- }), Nt = ["aria-labelledby", "aria-describedby"], Kt = {
1221
+ }), Qo = ["aria-labelledby", "aria-describedby"], et = {
1146
1222
  key: 0,
1147
1223
  class: "vf-modal__header"
1148
- }, Gt = {
1224
+ }, ot = {
1149
1225
  key: 0,
1150
1226
  class: "vf-modal__title"
1151
- }, Ut = {
1227
+ }, tt = {
1152
1228
  key: 3,
1153
1229
  class: "vf-modal__footer"
1154
- }, Eo = /* @__PURE__ */ j({
1230
+ }, jt = /* @__PURE__ */ D({
1155
1231
  __name: "modal",
1156
1232
  props: {
1157
1233
  modelValue: { type: Boolean, default: !1 },
@@ -1163,113 +1239,113 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
1163
1239
  size: { default: "md" }
1164
1240
  },
1165
1241
  emits: ["update:modelValue", "open", "close"],
1166
- 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 = () => {
1173
- 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 = () => {
1242
+ setup(o, { expose: e, emit: r }) {
1243
+ const t = r, l = o;
1244
+ let u = 0, i = 0, d = "", a = null;
1245
+ const c = P(null), n = Je(), s = `vf-modal-title-${++u}`, f = `vf-modal-body-${u}`, v = C(() => !!l.title || !!n.header), p = C(() => !!n.body || !!n.default), w = C(() => {
1246
+ const m = ["vf-modal"];
1247
+ return l.size !== "md" && m.push(`vf-modal_${l.size}`), m;
1248
+ }), h = () => t("update:modelValue", !0), B = () => {
1249
+ t("update:modelValue", !1), t("close");
1250
+ }, L = () => {
1251
+ l.closeOnOverlay && B();
1252
+ }, V = (m) => {
1253
+ !l.modelValue || !l.closeOnEsc || m.key === "Escape" && (m.preventDefault(), B());
1254
+ }, R = () => c.value ? Array.from(c.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")) : [], $ = () => {
1179
1255
  var g;
1180
- const h = S();
1181
- h.length ? h[0].focus() : (g = d.value) == null || g.focus();
1182
- }, F = (h) => {
1256
+ const m = R();
1257
+ m.length ? m[0].focus() : (g = c.value) == null || g.focus();
1258
+ }, F = (m) => {
1183
1259
  var E;
1184
- if (h.key !== "Tab")
1260
+ if (m.key !== "Tab")
1185
1261
  return;
1186
- const g = S();
1262
+ const g = R();
1187
1263
  if (!g.length) {
1188
- h.preventDefault(), (E = d.value) == null || E.focus();
1264
+ m.preventDefault(), (E = c.value) == null || E.focus();
1189
1265
  return;
1190
1266
  }
1191
1267
  const y = g[0], T = g[g.length - 1], H = document.activeElement;
1192
- if (h.shiftKey && H === y) {
1193
- h.preventDefault(), T.focus();
1268
+ if (m.shiftKey && H === y) {
1269
+ m.preventDefault(), T.focus();
1194
1270
  return;
1195
1271
  }
1196
- !h.shiftKey && H === T && (h.preventDefault(), y.focus());
1272
+ !m.shiftKey && H === T && (m.preventDefault(), y.focus());
1197
1273
  }, O = () => {
1198
- !l.lockScroll || typeof document > "u" || (i === 0 && (u = document.body.style.overflow, document.body.style.overflow = "hidden"), i += 1);
1274
+ !l.lockScroll || typeof document > "u" || (i === 0 && (d = document.body.style.overflow, document.body.style.overflow = "hidden"), i += 1);
1199
1275
  }, W = () => {
1200
- !l.lockScroll || typeof document > "u" || (i = Math.max(0, i - 1), i === 0 && (document.body.style.overflow = u));
1276
+ !l.lockScroll || typeof document > "u" || (i = Math.max(0, i - 1), i === 0 && (document.body.style.overflow = d));
1201
1277
  };
1202
1278
  return ne(
1203
1279
  () => 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()));
1280
+ async (m) => {
1281
+ m ? (typeof document < "u" && (a = document.activeElement), O(), t("open"), await _e(), $(), typeof document < "u" && document.addEventListener("keydown", V)) : (W(), typeof document < "u" && (document.removeEventListener("keydown", V), a == null || a.focus()));
1206
1282
  },
1207
1283
  { immediate: !0 }
1208
1284
  ), $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),
1285
+ W(), typeof document < "u" && document.removeEventListener("keydown", V);
1286
+ }), e({ open: h, close: B }), (m, g) => (b(), X(xe, { to: "body" }, [
1287
+ ke(z("div", {
1288
+ class: S(w.value),
1213
1289
  role: "presentation"
1214
1290
  }, [
1215
- R("div", {
1291
+ z("div", {
1216
1292
  class: "vf-modal__overlay",
1217
- onClick: V
1293
+ onClick: L
1218
1294
  }),
1219
- R("div", {
1295
+ z("div", {
1220
1296
  ref_key: "panel",
1221
- ref: d,
1297
+ ref: c,
1222
1298
  class: "vf-modal__panel",
1223
1299
  role: "dialog",
1224
1300
  "aria-modal": "true",
1225
- "aria-labelledby": f.value ? s : void 0,
1226
- "aria-describedby": p.value ? v : void 0,
1301
+ "aria-labelledby": v.value ? s : void 0,
1302
+ "aria-describedby": p.value ? f : void 0,
1227
1303
  tabindex: "-1",
1228
1304
  onKeydown: F
1229
1305
  }, [
1230
- f.value ? (m(), k("div", Kt, [
1231
- R("div", {
1306
+ v.value ? (b(), k("div", et, [
1307
+ z("div", {
1232
1308
  id: s,
1233
1309
  class: "vf-modal__header-content"
1234
1310
  }, [
1235
- _(h.$slots, "header", {}, () => [
1236
- h.title ? (m(), k("h3", Gt, X(h.title), 1)) : $("", !0)
1311
+ _(m.$slots, "header", {}, () => [
1312
+ m.title ? (b(), k("h3", ot, A(m.title), 1)) : x("", !0)
1237
1313
  ])
1238
1314
  ])
1239
- ])) : $("", !0),
1240
- h.showClose ? _(h.$slots, "close", {
1315
+ ])) : x("", !0),
1316
+ m.showClose ? _(m.$slots, "close", {
1241
1317
  key: 1,
1242
- close: x
1318
+ close: B
1243
1319
  }, () => [
1244
- R("button", {
1320
+ z("button", {
1245
1321
  type: "button",
1246
1322
  class: "vf-modal__close",
1247
1323
  "aria-label": "Close",
1248
- onClick: x
1324
+ onClick: B
1249
1325
  }, "×")
1250
- ]) : $("", !0),
1251
- h.$slots.body || h.$slots.default ? (m(), k("div", {
1326
+ ]) : x("", !0),
1327
+ m.$slots.body || m.$slots.default ? (b(), k("div", {
1252
1328
  key: 2,
1253
- id: v,
1329
+ id: f,
1254
1330
  class: "vf-modal__body"
1255
1331
  }, [
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)
1332
+ _(m.$slots, "body"),
1333
+ m.$slots.body ? x("", !0) : _(m.$slots, "default", { key: 0 })
1334
+ ])) : x("", !0),
1335
+ m.$slots.footer ? (b(), k("div", tt, [
1336
+ _(m.$slots, "footer")
1337
+ ])) : x("", !0)
1338
+ ], 40, Qo)
1263
1339
  ], 2), [
1264
- [Ce, h.modelValue]
1340
+ [Ce, m.modelValue]
1265
1341
  ])
1266
1342
  ]));
1267
1343
  }
1268
- }), qt = ["data-placement"], Zt = { class: "vf-tooltip__content" }, Jt = {
1344
+ }), rt = ["data-placement"], lt = { class: "vf-tooltip__content" }, at = {
1269
1345
  key: 0,
1270
1346
  class: "vf-tooltip__arrow",
1271
1347
  "aria-hidden": "true"
1272
- }, Mo = /* @__PURE__ */ j({
1348
+ }, Kt = /* @__PURE__ */ D({
1273
1349
  __name: "tooltip",
1274
1350
  props: {
1275
1351
  text: { default: "" },
@@ -1277,156 +1353,156 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
1277
1353
  disabled: { type: Boolean, default: !1 },
1278
1354
  arrow: { type: Boolean, default: !1 }
1279
1355
  },
1280
- setup(t) {
1281
- const e = t;
1356
+ setup(o) {
1357
+ const e = o;
1282
1358
  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 = () => {
1286
- e.disabled || (c.value = !0);
1287
- }, a = () => {
1288
- c.value = !1;
1359
+ const t = P(null), l = P(null), u = P(!1), i = P("top"), d = `vf-tooltip-${++r}`;
1360
+ let a = null;
1361
+ const c = () => {
1362
+ e.disabled || (u.value = !0);
1363
+ }, n = () => {
1364
+ u.value = !1;
1289
1365
  }, s = () => {
1290
- if (!o.value || !l.value)
1366
+ if (!t.value || !l.value)
1291
1367
  return;
1292
- const f = o.value, p = l.value, C = async () => {
1368
+ const v = t.value, p = l.value, w = async () => {
1293
1369
  const {
1294
- x: z,
1295
- y: S,
1296
- placement: w
1297
- } = await Xe(f, p, {
1370
+ x: V,
1371
+ y: R,
1372
+ placement: $
1373
+ } = await Ne(v, p, {
1298
1374
  placement: e.placement,
1299
1375
  strategy: "fixed",
1300
- middleware: [De(8), Me(), yt()]
1376
+ middleware: [De(8), Me(), _o()]
1301
1377
  });
1302
- i.value = w ?? e.placement, p.style.left = `${z}px`, p.style.top = `${S}px`;
1303
- }, b = async () => {
1304
- await C();
1305
- }, x = Ie(f, () => {
1306
- b();
1307
- }), V = () => {
1308
- b();
1378
+ i.value = $ ?? e.placement, p.style.left = `${V}px`, p.style.top = `${R}px`;
1379
+ }, h = async () => {
1380
+ await w();
1381
+ }, B = Ie(v, () => {
1382
+ h();
1383
+ }), L = () => {
1384
+ h();
1309
1385
  };
1310
- document.addEventListener("scroll", V, !0), window.addEventListener("resize", V, !1), n = {
1311
- update: b,
1386
+ document.addEventListener("scroll", L, !0), window.addEventListener("resize", L, !1), a = {
1387
+ update: h,
1312
1388
  destroy: () => {
1313
- x(), document.removeEventListener("scroll", V, !0), window.removeEventListener("resize", V, !1);
1389
+ B(), document.removeEventListener("scroll", L, !0), window.removeEventListener("resize", L, !1);
1314
1390
  }
1315
- }, n.update();
1391
+ }, a.update();
1316
1392
  };
1317
- ne(c, async (f) => {
1318
- if (!f) {
1319
- n && (n.destroy(), n = null);
1393
+ ne(u, async (v) => {
1394
+ if (!v) {
1395
+ a && (a.destroy(), a = null);
1320
1396
  return;
1321
1397
  }
1322
- n || s(), n == null || n.update();
1398
+ a || s(), a == null || a.update();
1323
1399
  }), Oe(() => {
1324
- c.value && s();
1400
+ u.value && s();
1325
1401
  }), $e(() => {
1326
- n == null || n.destroy(), n = null;
1402
+ a == null || a.destroy(), a = null;
1327
1403
  });
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", {
1404
+ const f = C(() => !!e.text || !!(l.value && l.value.textContent));
1405
+ return ne(f, (v) => {
1406
+ v || (u.value = !1);
1407
+ }), (v, p) => (b(), k(ce, null, [
1408
+ z("span", {
1333
1409
  ref_key: "trigger",
1334
- ref: o,
1410
+ ref: t,
1335
1411
  class: "vf-tooltip__trigger",
1336
- "aria-describedby": u,
1337
- onMouseenter: d,
1338
- onMouseleave: a,
1339
- onFocus: d,
1340
- onBlur: a
1412
+ "aria-describedby": d,
1413
+ onMouseenter: c,
1414
+ onMouseleave: n,
1415
+ onFocus: c,
1416
+ onBlur: n
1341
1417
  }, [
1342
- _(f.$slots, "default")
1418
+ _(v.$slots, "default")
1343
1419
  ], 544),
1344
- (m(), I(xe, { to: "body" }, [
1345
- ke(R("div", {
1346
- id: u,
1420
+ (b(), X(xe, { to: "body" }, [
1421
+ ke(z("div", {
1422
+ id: d,
1347
1423
  ref_key: "panel",
1348
1424
  ref: l,
1349
1425
  class: "vf-tooltip",
1350
1426
  role: "tooltip",
1351
1427
  "data-placement": i.value
1352
1428
  }, [
1353
- R("span", Zt, [
1354
- _(f.$slots, "content", {}, () => [
1355
- ae(X(f.text), 1)
1429
+ z("span", lt, [
1430
+ _(v.$slots, "content", {}, () => [
1431
+ te(A(v.text), 1)
1356
1432
  ])
1357
1433
  ]),
1358
- f.arrow ? (m(), k("span", Jt)) : $("", !0)
1359
- ], 8, qt), [
1360
- [Ce, c.value]
1434
+ v.arrow ? (b(), k("span", at)) : x("", !0)
1435
+ ], 8, rt), [
1436
+ [Ce, u.value]
1361
1437
  ])
1362
1438
  ]))
1363
1439
  ], 64));
1364
1440
  }
1365
- }), Qt = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], eo = (t) => {
1366
- const e = t.replace(/([A-Z])/g, "-$1");
1441
+ }), nt = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], st = (o) => {
1442
+ const e = o.replace(/([A-Z])/g, "-$1");
1367
1443
  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))
1444
+ }, it = (o) => o.filter((e) => !nt.includes(e)).map((e) => st(e)).join("-").toLowerCase(), we = (o) => o.join("."), dt = (o) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(o), Be = (o) => {
1445
+ if (!dt(o))
1370
1446
  return null;
1371
- if (t.length === 4) {
1372
- const e = t[1], r = t[2], o = t[3];
1373
- return `#${e}${e}${r}${r}${o}${o}`;
1447
+ if (o.length === 4) {
1448
+ const e = o[1], r = o[2], t = o[3];
1449
+ return `#${e}${e}${r}${r}${t}${t}`;
1374
1450
  }
1375
- return t.toLowerCase();
1376
- }, Ye = (t) => {
1377
- const e = Fe(t);
1451
+ return o.toLowerCase();
1452
+ }, Ye = (o) => {
1453
+ const e = Be(o);
1378
1454
  if (!e)
1379
1455
  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);
1384
- 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) {
1391
- case o:
1392
- d = (l - c) / n % 6;
1456
+ const r = parseInt(e.slice(1), 16), t = r >> 16 & 255, l = r >> 8 & 255, u = r & 255;
1457
+ return [t, l, u];
1458
+ }, Ve = (o) => {
1459
+ const [e, r, t] = Ye(o);
1460
+ return `${e}, ${r}, ${t}`;
1461
+ }, ct = (o, e, r) => {
1462
+ const t = o / 255, l = e / 255, u = r / 255, i = Math.max(t, l, u), d = Math.min(t, l, u), a = i - d;
1463
+ let c = 0, n = 0;
1464
+ const s = (i + d) / 2;
1465
+ if (a !== 0) {
1466
+ switch (n = a / (1 - Math.abs(2 * s - 1)), i) {
1467
+ case t:
1468
+ c = (l - u) / a % 6;
1393
1469
  break;
1394
1470
  case l:
1395
- d = (c - o) / n + 2;
1471
+ c = (u - t) / a + 2;
1396
1472
  break;
1397
- case c:
1398
- d = (o - l) / n + 4;
1473
+ case u:
1474
+ c = (t - l) / a + 4;
1399
1475
  break;
1400
1476
  }
1401
- d *= 60, d < 0 && (d += 360);
1477
+ c *= 60, c < 0 && (c += 360);
1402
1478
  }
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);
1479
+ return [c, n * 100, s * 100];
1480
+ }, ut = (o, e, r) => {
1481
+ const t = e / 100, l = r / 100, u = (1 - Math.abs(2 * l - 1)) * t, i = u * (1 - Math.abs(o / 60 % 2 - 1)), d = l - u / 2;
1482
+ let a = 0, c = 0, n = 0;
1483
+ o >= 0 && o < 60 ? (a = u, c = i, n = 0) : o >= 60 && o < 120 ? (a = i, c = u, n = 0) : o >= 120 && o < 180 ? (a = 0, c = u, n = i) : o >= 180 && o < 240 ? (a = 0, c = i, n = u) : o >= 240 && o < 300 ? (a = i, c = 0, n = u) : (a = u, c = 0, n = i);
1484
+ const s = Math.round((a + d) * 255), f = Math.round((c + d) * 255), v = Math.round((n + d) * 255);
1485
+ return [s, f, v];
1486
+ }, ft = (o, e, r) => `#${[o, e, r].map((t) => t.toString(16).padStart(2, "0")).join("")}`, vt = (o, e, r) => Math.min(r, Math.max(e, o)), pt = (o, e) => {
1487
+ const r = Be(o);
1412
1488
  if (!r)
1413
- 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) => {
1489
+ return o;
1490
+ const [t, l, u] = Ye(r), [i, d, a] = ct(t, l, u), n = (e - 5) * 7, s = vt(a + n, 0, 100), [f, v, p] = ut(i, d, s);
1491
+ return ft(f, v, p);
1492
+ }, ye = (o) => !!o && typeof o == "object" && !Array.isArray(o), Fe = (o, e) => {
1417
1493
  if (!e)
1418
- return { ...t };
1419
- const r = { ...t };
1420
- 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;
1494
+ return { ...o };
1495
+ const r = { ...o };
1496
+ for (const t in e) {
1497
+ const l = e[t], u = o[t];
1498
+ ye(u) && ye(l) ? r[t] = Fe(u, l) : r[t] = l;
1423
1499
  }
1424
1500
  return r;
1425
- }, io = (t) => {
1426
- if (!t)
1501
+ }, gt = (o) => {
1502
+ if (!o)
1427
1503
  return null;
1428
- if (ye(t) && "preset" in t) {
1429
- const e = t;
1504
+ if (ye(o) && "preset" in o) {
1505
+ const e = o;
1430
1506
  return {
1431
1507
  preset: e.preset ?? {},
1432
1508
  overrides: e.overrides,
@@ -1435,89 +1511,89 @@ const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q =
1435
1511
  strict: e.strict
1436
1512
  };
1437
1513
  }
1438
- 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]);
1514
+ return { preset: o };
1515
+ }, bt = (o) => {
1516
+ const e = [], r = [], t = [], l = [], u = (a) => t.push(a), i = (a) => l.push(a), d = (a, c) => {
1517
+ if (!(!a || typeof a != "object"))
1518
+ for (const n in a) {
1519
+ const s = a[n], f = c.concat([n]);
1444
1520
  if (ye(s)) {
1445
- u(s, v);
1521
+ d(s, f);
1446
1522
  continue;
1447
1523
  }
1448
1524
  if (s && typeof s == "object") {
1449
- i(`Theme value "${we(v)}" is not a plain object or string and will be ignored.`);
1525
+ i(`Theme value "${we(f)}" is not a plain object or string and will be ignored.`);
1450
1526
  continue;
1451
1527
  }
1452
1528
  if (typeof s != "string") {
1453
- i(`Theme value "${we(v)}" is not a string and will be ignored.`);
1529
+ i(`Theme value "${we(f)}" is not a string and will be ignored.`);
1454
1530
  continue;
1455
1531
  }
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) {
1460
- c(
1461
- `Theme color "${we(v)}" is not hex. Shade variables will not be generated for it.`
1532
+ const p = f.includes("colorScheme") && f.includes("dark") ? r : e, w = it(f);
1533
+ if (p.push(`--vf-${w}: ${s}`), f.includes("colors")) {
1534
+ const h = Be(s);
1535
+ if (!h) {
1536
+ u(
1537
+ `Theme color "${we(f)}" is not hex. Shade variables will not be generated for it.`
1462
1538
  );
1463
1539
  continue;
1464
1540
  }
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)}`);
1541
+ if (p.push(`--vf-${w}-rgb: ${Ve(h)}`), n !== "white")
1542
+ for (let B = 1; B < 10; ++B) {
1543
+ const L = pt(h, B);
1544
+ p.push(`--vf-${w}-${B}00: ${L}`), p.push(`--vf-${w}-${B}00-rgb: ${Ve(L)}`);
1469
1545
  }
1470
1546
  }
1471
1547
  }
1472
1548
  };
1473
- return u(t, []), { baseVars: e, darkVars: r, warnings: o, errors: l };
1474
- }, uo = (t) => {
1549
+ return d(o, []), { baseVars: e, darkVars: r, warnings: t, errors: l };
1550
+ }, mt = (o) => {
1475
1551
  if (typeof document > "u")
1476
1552
  return null;
1477
- const e = document.getElementById(t);
1553
+ const e = document.getElementById(o);
1478
1554
  if (e && e.tagName.toLowerCase() === "style")
1479
1555
  return e;
1480
1556
  const r = document.createElement("style");
1481
- return r.id = t, document.head.appendChild(r), r;
1482
- }, fo = (t) => ({
1483
- selector: t.selector ?? ":root",
1484
- 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)
1557
+ return r.id = o, document.head.appendChild(r), r;
1558
+ }, ht = (o) => ({
1559
+ selector: o.selector ?? ":root",
1560
+ darkSelector: o.darkSelector ?? ":root[data-theme=dark]"
1561
+ }), yt = (o, e, r, t) => {
1562
+ const { baseVars: l, darkVars: u, warnings: i, errors: d } = bt(o), a = mt("vueforge-theme");
1563
+ if (!a)
1488
1564
  return;
1489
- if (u.length) {
1490
- if (o)
1491
- throw new Error(`[VueForge] ${u.join(" ")}`);
1492
- for (const a of u)
1493
- console.warn(`[VueForge] ${a}`);
1565
+ if (d.length) {
1566
+ if (t)
1567
+ throw new Error(`[VueForge] ${d.join(" ")}`);
1568
+ for (const n of d)
1569
+ console.warn(`[VueForge] ${n}`);
1494
1570
  }
1495
1571
  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(`
1572
+ for (const n of i)
1573
+ console.warn(`[VueForge] ${n}`);
1574
+ const c = [];
1575
+ l.length && c.push(`${e} { ${l.join(";")} }`), u.length && c.push(`${r} { ${u.join(";")} }`), a.textContent = c.join(`
1500
1576
  `);
1501
1577
  };
1502
1578
  let J = null;
1503
- const je = (t) => {
1504
- const e = io(t);
1579
+ const je = (o) => {
1580
+ const e = gt(o);
1505
1581
  if (!e)
1506
1582
  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) => {
1583
+ const r = Fe(e.preset, e.overrides), { selector: t, darkSelector: l } = ht(e);
1584
+ J = { ...e }, yt(r, t, l, e.strict);
1585
+ }, Gt = (o) => {
1510
1586
  if (!J)
1511
1587
  return;
1512
- const e = t.overrides === void 0 ? J.overrides : Be(J.overrides ?? {}, t.overrides ?? {}), r = {
1513
- preset: t.preset ?? J.preset,
1588
+ const e = o.overrides === void 0 ? J.overrides : Fe(J.overrides ?? {}, o.overrides ?? {}), r = {
1589
+ preset: o.preset ?? J.preset,
1514
1590
  overrides: e,
1515
- selector: t.selector ?? J.selector,
1516
- darkSelector: t.darkSelector ?? J.darkSelector
1591
+ selector: o.selector ?? J.selector,
1592
+ darkSelector: o.darkSelector ?? J.darkSelector
1517
1593
  };
1518
1594
  je(r);
1519
- }, Ao = () => J ? { ...J } : null, Do = {
1520
- install(t, e = {}) {
1595
+ }, Ut = () => J ? { ...J } : null, qt = {
1596
+ install(o, e = {}) {
1521
1597
  e.theme && je(e.theme);
1522
1598
  }
1523
1599
  }, Re = {
@@ -1583,7 +1659,7 @@ const je = (t) => {
1583
1659
  dividerColor: "#2e2e32"
1584
1660
  }
1585
1661
  }
1586
- }, po = {
1662
+ }, kt = {
1587
1663
  fontSize: "var(--vf-typography-font-size)",
1588
1664
  padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
1589
1665
  borderRadius: "var(--vf-radii-md)",
@@ -1725,11 +1801,11 @@ const je = (t) => {
1725
1801
  }
1726
1802
  }
1727
1803
  }
1728
- }, go = {
1804
+ }, Ct = {
1729
1805
  padding: "12px",
1730
1806
  borderColor: "var(--vf-border-color)",
1731
1807
  borderRadius: "var(--vf-radii-md)"
1732
- }, ho = {
1808
+ }, wt = {
1733
1809
  gap: "0.5rem",
1734
1810
  fontSize: "var(--vf-typography-font-size)",
1735
1811
  padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
@@ -1750,7 +1826,7 @@ const je = (t) => {
1750
1826
  padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
1751
1827
  fontSize: "var(--vf-sizes-lg-font-size)"
1752
1828
  }
1753
- }, mo = {
1829
+ }, _t = {
1754
1830
  gap: "0.5rem",
1755
1831
  fontSize: "var(--vf-typography-font-size)",
1756
1832
  padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
@@ -1773,10 +1849,10 @@ const je = (t) => {
1773
1849
  padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
1774
1850
  fontSize: "var(--vf-sizes-lg-font-size)"
1775
1851
  }
1776
- }, bo = {
1852
+ }, $t = {
1777
1853
  hoverColor: "var(--vf-blue)",
1778
1854
  activeColor: "var(--vf-blue)"
1779
- }, yo = {
1855
+ }, xt = {
1780
1856
  iconGap: "6px",
1781
1857
  submenuOffset: "12px",
1782
1858
  separatorThickness: "1px",
@@ -1796,7 +1872,7 @@ const je = (t) => {
1796
1872
  marginBottom: "0.5rem",
1797
1873
  marginLeft: "0.5rem"
1798
1874
  }
1799
- }, ko = {
1875
+ }, Bt = {
1800
1876
  width: "90vw",
1801
1877
  maxWidth: "520px",
1802
1878
  maxHeight: "80vh",
@@ -1823,9 +1899,9 @@ const je = (t) => {
1823
1899
  closeColor: "var(--vf-text-color)",
1824
1900
  closeFontSize: "1.25rem",
1825
1901
  closeHoverBackgroundColor: "rgba(0, 0, 0, 0.06)"
1826
- }, Co = {
1902
+ }, Ft = {
1827
1903
  backgroundColor: "var(--vf-bg-color)"
1828
- }, wo = {
1904
+ }, zt = {
1829
1905
  minWidth: "12rem",
1830
1906
  fontSize: "var(--vf-typography-font-size)",
1831
1907
  controlGap: "0.75rem",
@@ -1858,7 +1934,7 @@ const je = (t) => {
1858
1934
  padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
1859
1935
  fontSize: "var(--vf-sizes-lg-font-size)"
1860
1936
  }
1861
- }, _o = {
1937
+ }, St = {
1862
1938
  size: "1rem",
1863
1939
  gap: "0.5rem",
1864
1940
  borderRadius: "var(--vf-radii-sm)",
@@ -1870,7 +1946,21 @@ const je = (t) => {
1870
1946
  checkColor: "#ffffff",
1871
1947
  textColor: "var(--vf-text-color)",
1872
1948
  disabledOpacity: "var(--vf-states-disabled-opacity)"
1873
- }, $o = {
1949
+ }, Vt = {
1950
+ size: "1rem",
1951
+ dotSize: "0.45rem",
1952
+ gap: "0.5rem",
1953
+ groupGap: "0.5rem",
1954
+ borderRadius: "999px",
1955
+ dotBorderRadius: "999px",
1956
+ borderColor: "var(--vf-border-color)",
1957
+ backgroundColor: "var(--vf-controls-background-color)",
1958
+ checkedBackgroundColor: "var(--vf-blue)",
1959
+ checkedBorderColor: "var(--vf-blue)",
1960
+ dotColor: "#ffffff",
1961
+ textColor: "var(--vf-text-color)",
1962
+ disabledOpacity: "var(--vf-states-disabled-opacity)"
1963
+ }, Rt = {
1874
1964
  width: "2.25rem",
1875
1965
  height: "1.25rem",
1876
1966
  thumbSize: "1rem",
@@ -1882,7 +1972,7 @@ const je = (t) => {
1882
1972
  thumbColor: "#ffffff",
1883
1973
  textColor: "var(--vf-text-color)",
1884
1974
  disabledOpacity: "var(--vf-states-disabled-opacity)"
1885
- }, xo = {
1975
+ }, Tt = {
1886
1976
  padding: "0.35rem 0.6rem",
1887
1977
  borderRadius: "8px",
1888
1978
  backgroundColor: "rgba(0, 0, 0, 0.8)",
@@ -1893,40 +1983,43 @@ const je = (t) => {
1893
1983
  zIndex: "120",
1894
1984
  maxWidth: "240px",
1895
1985
  arrowSize: "8px"
1896
- }, Io = {
1986
+ }, Zt = {
1897
1987
  ...Re,
1898
1988
  components: {
1899
1989
  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
1990
+ button: kt,
1991
+ card: Ct,
1992
+ input: wt,
1993
+ textarea: _t,
1994
+ link: $t,
1995
+ menu: xt,
1996
+ modal: Bt,
1997
+ popover: Ft,
1998
+ select: zt,
1999
+ checkbox: St,
2000
+ radio: Vt,
2001
+ switch: Rt,
2002
+ tooltip: Tt
1912
2003
  }
1913
2004
  };
1914
2005
  export {
1915
- To as Button,
1916
- st as Card,
1917
- Wo as Checkbox,
1918
- Io as DefaultTheme,
1919
- Ro as Input,
2006
+ Et as Button,
2007
+ uo as Card,
2008
+ Dt as Checkbox,
2009
+ Zt as DefaultTheme,
2010
+ Mt as Input,
1920
2011
  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,
2012
+ Ht as Menu,
2013
+ jt as Modal,
2014
+ Yt as Popover,
2015
+ Nt as RadioButton,
2016
+ It as RadioGroup,
2017
+ At as Select,
2018
+ Xt as Switch,
2019
+ Pt as Textarea,
2020
+ Kt as Tooltip,
2021
+ qt as VueForge,
2022
+ Ut as getTheme,
1930
2023
  je as setTheme,
1931
- Po as updateTheme
2024
+ Gt as updateTheme
1932
2025
  };