@codemonster-ru/vueforge 0.10.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 U, ref as P, computed as T, watch as ne, resolveComponent as Le, openBlock as m, createElementBlock as k, normalizeClass as V, 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 we, 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__ */ U({
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__ */ U({
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(), d = Ze(), i = P(null), c = T(() => o.href ?? o.url), n = T(() => o.as ? o.as === "router-link" && !o.to ? "a" : o.as : o.type === "router-link" || o.type === "a" ? o.type === "router-link" && !o.to ? "a" : o.type : o.to ? "router-link" : "a"), u = T(() => o.to), a = T(() => o.to ? d.resolve(o.to) : null), s = T(() => {
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;
21
+ const p = n.value;
22
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
- }), v = T(() => o.active === void 0 ? s.value : o.active), f = (p) => {
24
- if (!o.disabled) {
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
  }
@@ -30,81 +30,81 @@ const Je = ["href", "aria-disabled", "tabindex"], He = /* @__PURE__ */ U({
30
30
  return ne(s, (p) => {
31
31
  p && (r("active"), r("onActive")), r("update:active", p);
32
32
  }), (p, w) => {
33
- const b = Le("router-link");
34
- return n.value === "a" ? (m(), k("a", {
33
+ const h = Te("router-link");
34
+ return a.value === "a" ? (b(), k("a", {
35
35
  key: 0,
36
- href: c.value,
37
- class: V(["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: u.value,
50
- class: V(["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"], zo = /* @__PURE__ */ U({
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([]), d = (a, s) => `${a.label ?? a.to ?? a.href ?? a.url ?? "item"}_${s.toString()}`, i = (a) => a.to ? "router-link" : "a", c = (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 ? c(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
- }, u = (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 = c(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: V(["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: d(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[d(f, p)] ? _(a.$slots, d(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: V(["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: (w) => n(f),
156
+ "aria-expanded": v.subMenuVisible ? "true" : "false",
157
+ onClick: (w) => a(v),
158
158
  onKeydown: [
159
- re(le((w) => n(f), ["prevent"]), ["enter"]),
160
- re(le((w) => 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: V(["vf-menu__submenu", { "vf-menu__submenu_visible": f.subMenuVisible }]),
175
- onOnActive: u
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: (w) => n(f),
188
- onActive: (w) => u(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"], So = /* @__PURE__ */ U({
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 = T(() => e.as ? e.as === "button" : !(e.to || e.href || e.url || e.type && !o(e.type))), d = T(() => o(e.type) ? e.type : "button"), i = T(() => e.as === "link" ? e.to ? "router-link" : "a" : e.type && !o(e.type) ? e.type === "router-link" && e.to ? "router-link" : "a" : e.to ? "router-link" : "a"), c = T(() => {
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 = T(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]), u = T(() => ["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: d.value,
231
- class: V(c.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: V(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: V(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: V(u.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: V(u.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: V(c.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: V(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: V(u.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: V(u.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
- }, To = /* @__PURE__ */ U({
287
+ }, Mt = /* @__PURE__ */ D({
288
288
  __name: "input",
289
289
  props: {
290
290
  modelValue: { default: "" },
@@ -296,35 +296,72 @@ 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 = T(() => {
301
- const u = ["vf-input", `vf-input_${o.variant}`];
302
- return o.size !== "normal" && u.push(`vf-input_${o.size}`), o.disabled && u.push("vf-input_disabled"), u;
303
- }), d = (u) => {
304
- const a = u.target;
305
- r("update:modelValue", a.value), r("input", u);
306
- }, i = (u) => r("change", u), c = (u) => r("focus", u), n = (u) => r("blur", u);
307
- return (u, a) => (m(), k("div", {
308
- class: V(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
- u.$slots.prefix ? (m(), k("span", ft, [
311
- _(u.$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: u.type,
316
- value: u.modelValue,
317
- placeholder: u.placeholder,
318
- disabled: u.disabled,
319
- readonly: u.readonly,
320
- onInput: d,
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: c,
323
- onBlur: n
324
- }, null, 40, vt),
325
- u.$slots.suffix ? (m(), k("span", pt, [
326
- _(u.$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
+ ], 2));
329
+ }
330
+ }), yo = ["value", "placeholder", "disabled", "readonly", "rows"], Pt = /* @__PURE__ */ D({
331
+ __name: "textarea",
332
+ props: {
333
+ modelValue: { default: "" },
334
+ placeholder: { default: "" },
335
+ disabled: { type: Boolean, default: !1 },
336
+ readonly: { type: Boolean, default: !1 },
337
+ size: { default: "normal" },
338
+ variant: { default: "filled" },
339
+ rows: { default: 3 }
340
+ },
341
+ emits: ["update:modelValue", "input", "change", "focus", "blur"],
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
+ }, [
353
+ z("textarea", {
354
+ class: "vf-textarea__control",
355
+ value: c.modelValue,
356
+ placeholder: c.placeholder,
357
+ disabled: c.disabled,
358
+ readonly: c.readonly,
359
+ rows: c.rows,
360
+ onInput: u,
361
+ onChange: i,
362
+ onFocus: d,
363
+ onBlur: a
364
+ }, null, 40, yo)
328
365
  ], 2));
329
366
  }
330
367
  }), ze = [
@@ -340,406 +377,406 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
340
377
  "left",
341
378
  "left-start",
342
379
  "left-end"
343
- ], q = (t) => {
344
- if (t == null || !(t instanceof HTMLElement))
380
+ ], q = (o) => {
381
+ if (o == null || !(o instanceof HTMLElement))
345
382
  return null;
346
383
  if (typeof window < "u") {
347
- const e = window.getComputedStyle(t), r = `${e.overflowX}${e.overflowY}`;
384
+ const e = window.getComputedStyle(o), r = `${e.overflowX}${e.overflowY}`;
348
385
  if (/(auto|scroll|overlay)/.test(r))
349
- return t;
386
+ return o;
350
387
  }
351
- 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);
352
389
  };
353
- function gt(t) {
354
- 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";
355
392
  }
356
- const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q = (t, e) => ht(t, e) === "fixed", A = (t, e, r = {}) => {
357
- const o = t.getBoundingClientRect(), l = e ? e.offsetParent : null, d = e ? Q(r, e) : !1;
358
- if (l && !d) {
359
- const i = l.getBoundingClientRect(), c = 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;
360
397
  return {
361
- left: o.left - i.left + c,
362
- top: o.top - i.top + n,
363
- width: o.width,
364
- 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
365
402
  };
366
403
  }
367
404
  return {
368
- left: o.left,
369
- top: o.top,
370
- width: o.width,
371
- height: o.height
405
+ left: t.left,
406
+ top: t.top,
407
+ width: t.width,
408
+ height: t.height
372
409
  };
373
- }, oe = (t, e) => {
410
+ }, re = (o, e) => {
374
411
  var r;
375
- return (r = t.middleware) == null ? void 0 : r.find((o) => o.name === e);
376
- }, Ee = (t, e) => !!oe(t, e), mt = (t) => {
377
- 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);
378
415
  let r = "";
379
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;
380
- }, he = (t) => t.scrollLeft + t.clientWidth, me = (t) => t.scrollTop + t.clientHeight, N = (t, e, r = null, o = {}, l) => {
381
- if (r === null && typeof window < "u" && Q(o, e))
382
- return t;
383
- let d = 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;
384
421
  if (r === null) {
385
422
  const i = q(e);
386
- d = i ? i.scrollTop : 0;
423
+ u = i ? i.scrollTop : 0;
387
424
  }
388
- return t - d;
389
- }, K = (t, e, r = null, o = {}, l) => {
390
- let d;
391
- if (r === null && typeof window < "u" && Q(o, e))
392
- d = 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;
393
430
  else if (r === null) {
394
431
  const i = q(e);
395
- d = i ? he(i) : 0;
432
+ u = i ? be(i) : 0;
396
433
  } else
397
- d = r.getBoundingClientRect().width;
398
- return -(t + e.clientWidth - d);
399
- }, Z = (t, e, r = null, o = {}, l) => {
400
- let d;
401
- if (r === null && typeof window < "u" && Q(o, e))
402
- d = 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;
403
440
  else if (r === null) {
404
441
  const i = q(e);
405
- d = i ? me(i) : 0;
442
+ u = i ? me(i) : 0;
406
443
  } else
407
- d = r.getBoundingClientRect().height;
408
- return -(t + e.clientHeight - d);
409
- }, G = (t, e, r = null, o = {}, l) => {
410
- if (r === null && typeof window < "u" && Q(o, e))
411
- return t;
412
- let d = 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;
413
450
  if (r === null) {
414
451
  const i = q(e);
415
- d = i ? i.scrollLeft : 0;
452
+ u = i ? i.scrollLeft : 0;
416
453
  }
417
- return t - d;
454
+ return o - u;
418
455
  }, Se = ({
419
- options: t,
456
+ options: o,
420
457
  primaryX: e,
421
458
  primaryY: r,
422
- floating: o,
459
+ floating: t,
423
460
  placement: l,
424
- reference: d,
461
+ reference: u,
425
462
  scrollDirection: i
426
463
  }) => {
427
- const c = be(d, o, l, t), n = oe(t, "offset");
428
- if (n) {
429
- const u = n.fn({
430
- x: c.x,
431
- y: c.y,
432
- 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,
433
470
  primaryX: e,
434
471
  primaryY: r,
435
- floating: o,
472
+ floating: t,
436
473
  placement: l,
437
- reference: d,
474
+ reference: u,
438
475
  scrollDirection: i
439
476
  });
440
- c.x = u.x, c.y = u.y;
477
+ d.x = c.x, d.y = c.y;
441
478
  }
442
- return Vt(c, o, d, t) ? {
443
- x: c.x,
444
- y: c.y,
479
+ return Mo(d, t, u, o) ? {
480
+ x: d.x,
481
+ y: d.y,
445
482
  placement: l
446
483
  } : !1;
447
- }, Me = (t) => ({
484
+ }, Me = (o) => ({
448
485
  name: "flip",
449
- params: t,
486
+ params: o,
450
487
  fn: ({
451
488
  x: e,
452
489
  y: r,
453
- options: o,
490
+ options: t,
454
491
  primaryX: l,
455
- primaryY: d,
492
+ primaryY: u,
456
493
  floating: i,
457
- placement: c,
458
- reference: n,
459
- scrollDirection: u
494
+ placement: d,
495
+ reference: a,
496
+ scrollDirection: c
460
497
  }) => {
461
- var a;
498
+ var n;
462
499
  const s = {
463
500
  x: e,
464
501
  y: r,
465
- placement: c
466
- }, v = {
467
- ...o,
468
- middleware: (a = o.middleware) == null ? void 0 : a.filter((B) => B.name !== "shift")
469
- }, f = (t == null ? void 0 : t.placements) ?? ze, p = !(t != null && t.placements), w = p ? ze : f;
470
- let b = !1;
471
- const x = (B) => {
472
- 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)
473
510
  return;
474
- const z = Se({
475
- options: v,
511
+ const R = Se({
512
+ options: f,
476
513
  primaryX: l,
477
- primaryY: d,
514
+ primaryY: u,
478
515
  floating: i,
479
- placement: B,
480
- reference: n,
481
- scrollDirection: u
516
+ placement: V,
517
+ reference: a,
518
+ scrollDirection: c
482
519
  });
483
- z && (s.x = z.x, s.y = z.y, s.placement = z.placement, b = !0);
484
- }, L = Ot(n, i, v);
485
- if (!p && f.includes(c) && x(c), b || w.forEach(x), !b) {
486
- const B = f.reduce(
487
- (z, C) => {
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, $) => {
488
525
  const F = Se({
489
- options: v,
526
+ options: f,
490
527
  primaryX: l,
491
- primaryY: d,
528
+ primaryY: u,
492
529
  floating: i,
493
- placement: C,
494
- reference: n,
495
- scrollDirection: u
530
+ placement: $,
531
+ reference: a,
532
+ scrollDirection: c
496
533
  });
497
534
  if (!F)
498
- return z;
499
- const O = fe(C), W = L[O];
500
- return !z || W > z.space ? { result: F, space: W } : z;
535
+ return R;
536
+ const O = fe($), W = L[O];
537
+ return !R || W > R.space ? { result: F, space: W } : R;
501
538
  },
502
539
  null
503
540
  );
504
- B && (s.x = B.result.x, s.y = B.result.y, s.placement = B.result.placement, b = !0);
541
+ V && (s.x = V.result.x, s.y = V.result.y, s.placement = V.result.placement, h = !0);
505
542
  }
506
- if (!b && f.length > 0) {
507
- const B = fe(c);
508
- let z = B, C = L[B];
509
- f.forEach((h) => {
510
- const g = fe(h), y = L[g];
511
- y > C && (C = y, z = 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);
512
549
  });
513
- const F = Wt(z, c, 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");
514
551
  if (W) {
515
- const h = W.fn({
552
+ const m = W.fn({
516
553
  x: O.x,
517
554
  y: O.y,
518
- options: v,
555
+ options: f,
519
556
  primaryX: l,
520
- primaryY: d,
557
+ primaryY: u,
521
558
  floating: i,
522
559
  placement: F,
523
- reference: n,
524
- scrollDirection: u
560
+ reference: a,
561
+ scrollDirection: c
525
562
  });
526
- O.x = h.x, O.y = h.y;
563
+ O.x = m.x, O.y = m.y;
527
564
  }
528
565
  s.x = O.x, s.y = O.y, s.placement = O.placement;
529
566
  }
530
567
  return s;
531
568
  }
532
- }), Pe = (t, e, r, o, l) => {
533
- var d, i, c;
534
- let n = 0;
535
- o.startsWith("right") ? n = -t : o.startsWith("left") && (n = t);
536
- const u = oe(e, "arrow"), a = oe(e, "shift");
537
- if (u) {
538
- const s = ((d = u.params) == null ? void 0 : d.arrow).getBoundingClientRect();
539
- 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);
540
577
  }
541
- if (Ee(e, "shift") && u) {
542
- let s = null, v = 0;
543
- a && (s = (i = a.params) == null ? void 0 : i.parent);
544
- const f = (c = u.params) == null ? void 0 : c.arrow;
545
- v = f.getBoundingClientRect().width / 2, v += yt(f), v -= t, o.startsWith("right") ? K(r - n, l, s, e) <= t ? K(r, l, s, e) > 0 ? n = t - K(r, l, s, e) : n = t : G(r - n - v, l, s, e) <= t && (G(r - n - v, l, s, e) >= 0 ? (n = -t - (G(r - n - v, l, s, e) + t), s && (n = -t)) : n = -t) : o.startsWith("left") ? K(r - n + v, l, s, e) <= t ? (n = t + K(r - v, l, s, e), n <= t && (n = t)) : G(r - n, l, s, e) <= t && (n = -t + G(r, l, s, e), n <= -t && (n = -t)) : K(r - n, l, s, e) <= t ? K(r - n, l, s, e) <= t && K(r, l, s, e) > 0 ? n = t - K(r, l, s, e) : 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);
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);
546
583
  }
547
- return n;
548
- }, Ae = (t, e, r, o, l) => {
549
- var d, i, c;
550
- let n = 0;
551
- o.startsWith("top") ? n = t : o.startsWith("bottom") && (n = -t);
552
- const u = oe(e, "arrow"), a = oe(e, "shift");
553
- if (u) {
554
- const s = ((d = u.params) == null ? void 0 : d.arrow).getBoundingClientRect();
555
- 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);
556
593
  }
557
- if (Ee(e, "shift") && u) {
558
- let s = null, v = 0;
559
- a && (s = (i = a.params) == null ? void 0 : i.parent);
560
- const f = (c = u.params) == null ? void 0 : c.arrow;
561
- v = f.getBoundingClientRect().height / 2, v += kt(f), v -= t, o.startsWith("top") ? N(r - n, l, s, e) <= t ? N(r, l, s, e) >= 0 ? n = -(t - N(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") ? N(r - n - v, l, s, e) <= t ? N(r - n - v, l, s, e) >= 0 ? (n = -t - (N(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) : N(r - n, l, s, e) <= t ? N(r - n, l, s, e) >= 0 ? n = -(t - N(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);
562
599
  }
563
- return n;
564
- }, De = (t) => ({
600
+ return a;
601
+ }, De = (o) => ({
565
602
  name: "offset",
566
- params: { value: t },
603
+ params: { value: o },
567
604
  fn: ({
568
605
  x: e,
569
606
  y: r,
570
- options: o,
607
+ options: t,
571
608
  primaryX: l,
572
- primaryY: d,
609
+ primaryY: u,
573
610
  floating: i,
574
- placement: c
611
+ placement: d
575
612
  }) => ({
576
- x: e - Pe(t, o, l, c, i),
577
- y: r - Ae(t, o, d, c, i),
578
- placement: c
613
+ x: e - Pe(o, t, l, d, i),
614
+ y: r - Ae(o, t, u, d, i),
615
+ placement: d
579
616
  })
580
- }), bt = (t) => ({
617
+ }), _o = (o) => ({
581
618
  name: "shift",
582
- params: t,
619
+ params: o,
583
620
  fn: ({
584
621
  x: e,
585
622
  y: r,
586
- options: o,
623
+ options: t,
587
624
  primaryX: l,
588
- primaryY: d,
625
+ primaryY: u,
589
626
  floating: i,
590
- placement: c,
591
- reference: n
627
+ placement: d,
628
+ reference: a
592
629
  }) => {
593
- var u;
594
- const a = {
630
+ var c;
631
+ const n = {
595
632
  x: e,
596
633
  y: r,
597
- placement: c
598
- }, s = o.middleware || [], v = s.findIndex((y) => y.name === "shift"), f = s.findIndex((y) => y.name === "offset"), p = f !== -1 && (v === -1 || f > v), w = s.find((y) => y.name === "offset"), b = w ? (u = w.params) == null ? void 0 : u.value : 0, x = p ? Pe(b, o, l, c, i) : 0, L = p ? Ae(b, o, d, c, i) : 0, B = e - x, z = r - L;
599
- let C = B, F = z;
600
- const O = w ? Math.abs(b) : 0, W = O, h = O;
601
- if (Q(o, i) && typeof window < "u") {
602
- const y = W, S = window.innerWidth - i.clientWidth - W, H = S < y ? y : S, E = h, D = window.innerHeight - i.clientHeight - h, M = D < E ? E : D;
603
- C < y ? C = y : C > H && (C = H), F < E ? F = E : F > M && (F = M), p ? (a.x = e + (C - B), a.y = r + (F - z)) : (a.x = C, a.y = F);
604
- const j = W, Y = window.innerWidth - i.clientWidth - W, ee = h, ue = window.innerHeight - i.clientHeight - h, se = p ? j + x : j, ve = p ? Y + x : Y, pe = p ? ee + L : ee, ge = p ? ue + L : ue;
605
- 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;
606
643
  }
607
644
  const g = q(i);
608
645
  if (g !== null) {
609
- const y = A(n, i, o), S = y.left, H = y.left + y.width, E = y.top, D = y.top + y.height, M = g.scrollLeft + W, j = he(g) - i.clientWidth - W, Y = j < M ? M : j, 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);
610
- H <= ve ? C = M : S >= pe && (C = Y), D <= ge ? F = ee : E >= Ne && (F = se), F < ee ? F = ee : F > se && (F = se), C < M ? C = M : C > Y && (C = 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);
611
648
  }
612
- if (p ? (a.x = e + (C - B), a.y = r + (F - z)) : (a.x = C, a.y = F), g !== null) {
613
- const y = g.scrollLeft + W, S = he(g) - i.clientWidth - W, H = g.scrollTop + h, E = me(g) - i.clientHeight - h, D = p ? y + x : y, M = p ? S + x : S, j = p ? H + L : H, Y = p ? E + L : E;
614
- a.x < D ? a.x = D : a.x > M && (a.x = M), a.y < j ? a.y = j : 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);
615
652
  }
616
- return a;
653
+ return n;
617
654
  }
618
- }), yt = (t) => t.getBoundingClientRect().width !== t.clientWidth ? (t.getBoundingClientRect().width - t.clientWidth) / 2 : 0, kt = (t) => t.getBoundingClientRect().height !== t.clientHeight ? (t.getBoundingClientRect().height - t.clientHeight) / 2 : 0, Ie = (t, e) => {
619
- 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 = [];
620
657
  if (r !== null) {
621
658
  const l = () => e();
622
- 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));
623
660
  }
624
661
  if (typeof window < "u") {
625
- const l = () => e(), d = () => e();
626
- window.addEventListener("scroll", l, !1), window.addEventListener("resize", d, !1), o.push(() => window.removeEventListener("scroll", l, !1)), o.push(() => window.removeEventListener("resize", d, !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));
627
664
  }
628
- if (typeof ResizeObserver < "u" && t instanceof HTMLElement) {
665
+ if (typeof ResizeObserver < "u" && o instanceof HTMLElement) {
629
666
  const l = new ResizeObserver(() => e());
630
- l.observe(t), o.push(() => l.disconnect());
667
+ l.observe(o), t.push(() => l.disconnect());
631
668
  }
632
- return () => o.forEach((l) => l());
633
- }, wt = (t, e, r = {}) => {
634
- const o = A(t, e, r);
669
+ return () => t.forEach((l) => l());
670
+ }, Bo = (o, e, r = {}) => {
671
+ const t = I(o, e, r);
635
672
  return {
636
- x: o.left - e.getBoundingClientRect().width / 2 + o.width / 2,
637
- y: o.top - e.getBoundingClientRect().height,
673
+ x: t.left - e.getBoundingClientRect().width / 2 + t.width / 2,
674
+ y: t.top - e.getBoundingClientRect().height,
638
675
  placement: "top"
639
676
  };
640
- }, Ct = (t, e, r = {}) => {
641
- const o = A(t, e, r);
677
+ }, Fo = (o, e, r = {}) => {
678
+ const t = I(o, e, r);
642
679
  return {
643
- x: o.left,
644
- y: o.top - e.getBoundingClientRect().height,
680
+ x: t.left,
681
+ y: t.top - e.getBoundingClientRect().height,
645
682
  placement: "top-start"
646
683
  };
647
- }, _t = (t, e, r = {}) => {
648
- const o = A(t, e, r);
684
+ }, zo = (o, e, r = {}) => {
685
+ const t = I(o, e, r);
649
686
  return {
650
- x: o.left - e.getBoundingClientRect().width + o.width,
651
- y: o.top - e.getBoundingClientRect().height,
687
+ x: t.left - e.getBoundingClientRect().width + t.width,
688
+ y: t.top - e.getBoundingClientRect().height,
652
689
  placement: "top-end"
653
690
  };
654
- }, $t = (t, e, r = {}) => {
655
- const o = A(t, e, r);
691
+ }, So = (o, e, r = {}) => {
692
+ const t = I(o, e, r);
656
693
  return {
657
- x: o.left + o.width,
658
- 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,
659
696
  placement: "right"
660
697
  };
661
- }, xt = (t, e, r = {}) => {
662
- const o = A(t, e, r);
698
+ }, Vo = (o, e, r = {}) => {
699
+ const t = I(o, e, r);
663
700
  return {
664
- x: o.left + o.width,
665
- y: o.top,
701
+ x: t.left + t.width,
702
+ y: t.top,
666
703
  placement: "right-start"
667
704
  };
668
- }, Ft = (t, e, r = {}) => {
669
- const o = A(t, e, r);
705
+ }, Ro = (o, e, r = {}) => {
706
+ const t = I(o, e, r);
670
707
  return {
671
- x: o.left + o.width,
672
- y: o.top + o.height - e.getBoundingClientRect().height,
708
+ x: t.left + t.width,
709
+ y: t.top + t.height - e.getBoundingClientRect().height,
673
710
  placement: "right-end"
674
711
  };
675
- }, Bt = (t, e, r = {}) => {
676
- const o = A(t, e, r);
712
+ }, To = (o, e, r = {}) => {
713
+ const t = I(o, e, r);
677
714
  return {
678
- x: o.left + o.width / 2 - e.getBoundingClientRect().width / 2,
679
- y: o.top + o.height,
715
+ x: t.left + t.width / 2 - e.getBoundingClientRect().width / 2,
716
+ y: t.top + t.height,
680
717
  placement: "bottom"
681
718
  };
682
- }, zt = (t, e, r = {}) => {
683
- const o = A(t, e, r);
719
+ }, Lo = (o, e, r = {}) => {
720
+ const t = I(o, e, r);
684
721
  return {
685
- x: o.left,
686
- y: o.top + o.height,
722
+ x: t.left,
723
+ y: t.top + t.height,
687
724
  placement: "bottom-start"
688
725
  };
689
- }, St = (t, e, r = {}) => {
690
- const o = A(t, e, r);
726
+ }, Wo = (o, e, r = {}) => {
727
+ const t = I(o, e, r);
691
728
  return {
692
- x: o.left - e.getBoundingClientRect().width + o.width,
693
- y: o.top + o.height,
729
+ x: t.left - e.getBoundingClientRect().width + t.width,
730
+ y: t.top + t.height,
694
731
  placement: "bottom-end"
695
732
  };
696
- }, Tt = (t, e, r = {}) => {
697
- const o = A(t, e, r);
733
+ }, Oo = (o, e, r = {}) => {
734
+ const t = I(o, e, r);
698
735
  return {
699
- x: o.left - e.getBoundingClientRect().width,
700
- 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,
701
738
  placement: "left"
702
739
  };
703
- }, Rt = (t, e, r = {}) => {
704
- const o = A(t, e, r);
740
+ }, Ho = (o, e, r = {}) => {
741
+ const t = I(o, e, r);
705
742
  return {
706
- x: o.left - e.getBoundingClientRect().width,
707
- y: o.top,
743
+ x: t.left - e.getBoundingClientRect().width,
744
+ y: t.top,
708
745
  placement: "left-start"
709
746
  };
710
- }, Lt = (t, e, r = {}) => {
711
- const o = A(t, e, r);
747
+ }, Eo = (o, e, r = {}) => {
748
+ const t = I(o, e, r);
712
749
  return {
713
- x: o.left - e.getBoundingClientRect().width,
714
- y: o.top + o.height - e.getBoundingClientRect().height,
750
+ x: t.left - e.getBoundingClientRect().width,
751
+ y: t.top + t.height - e.getBoundingClientRect().height,
715
752
  placement: "left-end"
716
753
  };
717
- }, be = (t, e, r, o = {}) => {
754
+ }, he = (o, e, r, t = {}) => {
718
755
  switch (r) {
719
756
  case "top":
720
- return wt(t, e, o);
757
+ return Bo(o, e, t);
721
758
  case "top-start":
722
- return Ct(t, e, o);
759
+ return Fo(o, e, t);
723
760
  case "top-end":
724
- return _t(t, e, o);
761
+ return zo(o, e, t);
725
762
  case "right":
726
- return $t(t, e, o);
763
+ return So(o, e, t);
727
764
  case "right-start":
728
- return xt(t, e, o);
765
+ return Vo(o, e, t);
729
766
  case "right-end":
730
- return Ft(t, e, o);
767
+ return Ro(o, e, t);
731
768
  case "bottom":
732
- return Bt(t, e, o);
769
+ return To(o, e, t);
733
770
  case "bottom-start":
734
- return zt(t, e, o);
771
+ return Lo(o, e, t);
735
772
  case "bottom-end":
736
- return St(t, e, o);
773
+ return Wo(o, e, t);
737
774
  case "left":
738
- return Tt(t, e, o);
775
+ return Oo(o, e, t);
739
776
  case "left-start":
740
- return Rt(t, e, o);
777
+ return Ho(o, e, t);
741
778
  case "left-end":
742
- return Lt(t, e, o);
779
+ return Eo(o, e, t);
743
780
  default:
744
781
  return {
745
782
  x: 0,
@@ -747,25 +784,25 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
747
784
  placement: ""
748
785
  };
749
786
  }
750
- }, Vt = (t, e, r, o = {}) => {
751
- if (Q(o, e)) {
787
+ }, Mo = (o, e, r, t = {}) => {
788
+ if (Q(t, e)) {
752
789
  if (typeof window > "u")
753
790
  return !0;
754
- const s = t.x, v = t.y, f = s + e.clientWidth, p = v + e.clientHeight;
755
- 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;
756
793
  }
757
794
  if (q(r) !== null)
758
- return N(t.y, e, null, o) > 0 && K(t.x, e, null, o) > 0 && Z(t.y, e, null, o) > 0 && G(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;
759
796
  if (typeof window > "u")
760
797
  return !0;
761
- const l = window.innerWidth, d = 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;
762
799
  if (i) {
763
- const s = i.getBoundingClientRect(), v = s.left + t.x, f = s.top + t.y, p = v + e.clientWidth, w = f + e.clientHeight;
764
- return v >= 0 && f >= 0 && p <= l && w <= d;
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;
765
802
  }
766
- const c = t.x, n = t.y, u = c + e.clientWidth, a = n + e.clientHeight;
767
- return c >= 0 && n >= 0 && u <= l && a <= d;
768
- }, fe = (t) => t.startsWith("right") ? "right" : t.startsWith("left") ? "left" : t.startsWith("top") ? "top" : "bottom", Wt = (t, e, r) => fe(e) === t && r.includes(e) ? e : r.find((o) => fe(o) === t) ?? r[0], Ot = (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 = {}) => {
769
806
  if (typeof window > "u")
770
807
  return {
771
808
  top: 0,
@@ -773,51 +810,51 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
773
810
  bottom: 0,
774
811
  left: 0
775
812
  };
776
- const o = Q(r, e) ? null : q(t), l = t.getBoundingClientRect(), d = o ? o.getBoundingClientRect() : {
813
+ const t = Q(r, e) ? null : q(o), l = o.getBoundingClientRect(), u = t ? t.getBoundingClientRect() : {
777
814
  top: 0,
778
815
  left: 0,
779
816
  right: window.innerWidth,
780
817
  bottom: window.innerHeight
781
818
  };
782
819
  return {
783
- top: l.top - d.top,
784
- right: d.right - l.right,
785
- bottom: d.bottom - l.bottom,
786
- left: l.left - d.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
787
824
  };
788
- }, Xe = (t, e, r = {}) => new Promise((o) => {
789
- var l, d;
790
- const i = r.placement ? r.placement : "bottom", c = {
825
+ }, Ne = (o, e, r = {}) => new Promise((t) => {
826
+ var l, u;
827
+ const i = r.placement ? r.placement : "bottom", d = {
791
828
  x: 0,
792
829
  y: 0,
793
830
  placement: i,
794
831
  middlewareData: {}
795
- }, n = be(t, e, i, r);
796
- c.x = n.x, c.y = n.y, c.placement = n.placement;
797
- const u = c.x, a = c.y, s = mt(t);
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);
798
835
  (l = r.middleware) == null || l.forEach((w) => {
799
- const b = w.fn({
800
- x: c.x,
801
- y: c.y,
836
+ const h = w.fn({
837
+ x: d.x,
838
+ y: d.y,
802
839
  options: r,
803
- primaryX: u,
804
- primaryY: a,
840
+ primaryX: c,
841
+ primaryY: n,
805
842
  floating: e,
806
- placement: c.placement,
807
- reference: t,
843
+ placement: d.placement,
844
+ reference: o,
808
845
  scrollDirection: s
809
846
  });
810
- c.x = b.x, c.y = b.y, c.placement = b.placement, w.name === "arrow" && (b.baseX = b.x, b.baseY = b.y, b.x = b.arrowX ?? b.x, b.y = b.arrowY ?? b.y), c.middlewareData[w.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;
811
848
  });
812
- const v = be(t, e, c.placement, r), f = oe(r, "offset"), p = f ? (d = f.params) == null ? void 0 : d.value : 0;
813
- if (Number.isFinite(c.x) || (c.x = v.x), !Number.isFinite(c.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))
814
851
  if (Q(r, e)) {
815
- const w = t.getBoundingClientRect(), b = e.getBoundingClientRect().height;
816
- c.placement.startsWith("top") ? c.y = w.top - b - p : c.placement.startsWith("bottom") ? c.y = w.bottom + p : c.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;
817
854
  } else
818
- c.y = v.y;
819
- o(c);
820
- }), Ht = ["disabled", "aria-expanded", "onKeydown"], Et = ["data-placement"], Mt = ["disabled", "aria-selected", "onClick"], Ro = /* @__PURE__ */ U({
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({
821
858
  __name: "select",
822
859
  props: {
823
860
  modelValue: { default: void 0 },
@@ -826,178 +863,256 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
826
863
  optionValue: { default: "value" },
827
864
  placeholder: { default: "" },
828
865
  disabled: { type: Boolean, default: !1 },
866
+ variant: { default: "filled" },
829
867
  size: { default: "normal" }
830
868
  },
831
869
  emits: ["update:modelValue", "change", "focus", "blur"],
832
- setup(t, { emit: e }) {
870
+ setup(o, { emit: e }) {
833
871
  let r = 0;
834
- const o = e, l = t, d = P(null), i = P(null), c = P(null), n = P(!1), u = P("bottom"), a = P("bottom"), s = `vf-select-panel-${++r}`;
835
- let v = null;
836
- const f = T(() => 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) => ({
837
875
  label: g[l.optionLabel],
838
876
  value: g[l.optionValue],
839
877
  disabled: g.disabled
840
- }))), p = T(() => f.value.find((g) => g.value === l.modelValue)), w = T(() => {
878
+ }))), p = C(() => v.value.find((g) => g.value === l.modelValue)), w = C(() => {
841
879
  var g;
842
880
  return ((g = p.value) == null ? void 0 : g.label) ?? "";
843
- }), b = T(() => {
844
- const g = ["vf-select", n.value ? "vf-select_open" : ""];
881
+ }), h = C(() => {
882
+ const g = ["vf-select", `vf-select_${l.variant}`, a.value ? "vf-select_open" : ""];
845
883
  return l.size !== "normal" && g.push(`vf-select_${l.size}`), l.disabled && g.push("vf-select_disabled"), g.filter(Boolean);
846
- }), x = (g) => g.value === l.modelValue, L = (g) => {
847
- g.disabled || (o("update:modelValue", g.value), o("change", g.value), C());
848
- }, B = (g) => o("focus", g), z = (g) => o("blur", g), C = () => {
849
- n.value = !1, u.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";
850
888
  }, F = () => {
851
- l.disabled || (n.value = !n.value, n.value && (u.value = "bottom", a.value = "bottom"));
889
+ l.disabled || (a.value = !a.value, a.value && (c.value = "bottom", n.value = "bottom"));
852
890
  }, O = async () => {
853
891
  var g, y;
854
- n.value || (n.value = !0, await _e()), (y = (g = c.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();
855
893
  }, W = (g) => {
856
- var S;
857
- if (!n.value || !d.value)
894
+ var T;
895
+ if (!a.value || !u.value)
858
896
  return;
859
897
  const y = g.target;
860
- d.value.contains(y) || (S = c.value) != null && S.contains(y) || C();
861
- }, h = () => {
862
- if (!i.value || !c.value)
898
+ u.value.contains(y) || (T = d.value) != null && T.contains(y) || $();
899
+ }, m = () => {
900
+ if (!i.value || !d.value)
863
901
  return;
864
- const g = i.value, y = c.value, S = async () => {
902
+ const g = i.value, y = d.value, T = async () => {
865
903
  const {
866
904
  x: M,
867
905
  y: j,
868
906
  placement: Y
869
- } = await Xe(g, y, {
870
- placement: u.value,
907
+ } = await Ne(g, y, {
908
+ placement: c.value,
871
909
  strategy: "fixed",
872
910
  middleware: [De(2), Me({ placements: ["bottom", "top"] })]
873
911
  });
874
- a.value = Y ?? u.value, y.style.minWidth = `${g.getBoundingClientRect().width}px`, y.style.left = `${M}px`, y.style.top = `${j}px`;
912
+ n.value = Y ?? c.value, y.style.minWidth = `${g.getBoundingClientRect().width}px`, y.style.left = `${M}px`, y.style.top = `${j}px`;
875
913
  }, H = async () => {
876
- await S();
914
+ await T();
877
915
  }, E = Ie(g, () => {
878
916
  H();
879
- }), D = () => {
917
+ }), N = () => {
880
918
  H();
881
919
  };
882
- document.addEventListener("scroll", D, !0), window.addEventListener("resize", D, !1), v = {
920
+ document.addEventListener("scroll", N, !0), window.addEventListener("resize", N, !1), f = {
883
921
  update: H,
884
922
  destroy: () => {
885
- E(), document.removeEventListener("scroll", D, !0), window.removeEventListener("resize", D, !1);
923
+ E(), document.removeEventListener("scroll", N, !0), window.removeEventListener("resize", N, !1);
886
924
  }
887
- }, v.update();
925
+ }, f.update();
888
926
  };
889
- return ne(n, async (g) => {
927
+ return ne(a, async (g) => {
890
928
  if (!g) {
891
- v && (v.destroy(), v = null);
929
+ f && (f.destroy(), f = null);
892
930
  return;
893
931
  }
894
- await _e(), v || h(), v == null || v.update();
932
+ await _e(), f || m(), f == null || f.update();
895
933
  }), ne(
896
934
  () => l.options,
897
935
  () => {
898
- v == null || v.update();
936
+ f == null || f.update();
899
937
  },
900
938
  { deep: !0 }
901
939
  ), Oe(() => {
902
940
  document.addEventListener("click", W);
903
941
  }), $e(() => {
904
- document.removeEventListener("click", W), v == null || v.destroy(), v = null;
905
- }), (g, y) => (m(), k("div", {
942
+ document.removeEventListener("click", W), f == null || f.destroy(), f = null;
943
+ }), (g, y) => (b(), k("div", {
906
944
  ref_key: "root",
907
- ref: d,
908
- class: V(b.value)
945
+ ref: u,
946
+ class: S(h.value)
909
947
  }, [
910
- R("button", {
948
+ z("button", {
911
949
  ref_key: "trigger",
912
950
  ref: i,
913
951
  class: "vf-select__control",
914
952
  type: "button",
915
953
  disabled: g.disabled,
916
- "aria-expanded": n.value,
954
+ "aria-expanded": a.value,
917
955
  "aria-controls": s,
918
956
  "aria-haspopup": "listbox",
919
957
  onClick: F,
920
958
  onKeydown: [
921
- re(le(O, ["prevent"]), ["down"]),
922
- re(le(F, ["prevent"]), ["enter"]),
923
- re(le(C, ["prevent"]), ["esc"])
959
+ le(ae(O, ["prevent"]), ["down"]),
960
+ le(ae(F, ["prevent"]), ["enter"]),
961
+ le(ae($, ["prevent"]), ["esc"])
924
962
  ],
925
- onFocus: B,
926
- onBlur: z
963
+ onFocus: V,
964
+ onBlur: R
927
965
  }, [
928
- R("span", {
929
- class: V(["vf-select__label", { "vf-select__label_placeholder": !w.value }])
930
- }, X(w.value || g.placeholder), 3),
931
- 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", {
932
970
  class: "vf-select__chevron",
933
971
  "aria-hidden": "true"
934
972
  }, "▾", -1))
935
- ], 40, Ht),
936
- (m(), I(xe, { to: "body" }, [
937
- ke(R("div", {
973
+ ], 40, Do),
974
+ (b(), X(xe, { to: "body" }, [
975
+ ke(z("div", {
938
976
  id: s,
939
977
  ref_key: "panel",
940
- ref: c,
978
+ ref: d,
941
979
  class: "vf-select__panel",
942
980
  role: "listbox",
943
- "data-placement": a.value
981
+ "data-placement": n.value
944
982
  }, [
945
- (m(!0), k(ce, null, Ve(f.value, (S) => (m(), k("button", {
946
- key: S.value,
947
- class: V(["vf-select__option", { "is-active": x(S), "is-disabled": S.disabled }]),
983
+ (b(!0), k(ce, null, Le(v.value, (T) => (b(), k("button", {
984
+ key: T.value,
985
+ class: S(["vf-select__option", { "is-active": B(T), "is-disabled": T.disabled }]),
948
986
  type: "button",
949
987
  role: "option",
950
- disabled: S.disabled,
951
- "aria-selected": x(S),
952
- onClick: (H) => L(S)
953
- }, X(S.label), 11, Mt))), 128))
954
- ], 8, Et), [
955
- [we, n.value]
988
+ disabled: T.disabled,
989
+ "aria-selected": B(T),
990
+ onClick: (H) => L(T)
991
+ }, A(T.label), 11, No))), 128))
992
+ ], 8, Io), [
993
+ [Ce, a.value]
956
994
  ])
957
995
  ]))
958
996
  ], 2));
959
997
  }
960
- }), Pt = ["checked", "disabled"], At = {
998
+ }), Xo = ["checked", "disabled"], Yo = {
961
999
  key: 0,
962
1000
  class: "vf-checkbox__label"
963
- }, Lo = /* @__PURE__ */ U({
1001
+ }, Dt = /* @__PURE__ */ D({
964
1002
  __name: "checkbox",
965
1003
  props: {
966
1004
  modelValue: { type: Boolean, default: !1 },
967
1005
  label: { default: "" },
968
- disabled: { type: Boolean, default: !1 }
1006
+ disabled: { type: Boolean, default: !1 },
1007
+ variant: { default: "filled" }
969
1008
  },
970
1009
  emits: ["update:modelValue", "change"],
971
- setup(t, { emit: e }) {
972
- const r = e, o = t, l = T(() => {
973
- const i = ["vf-checkbox"];
974
- return o.disabled && i.push("vf-checkbox_disabled"), i;
975
- }), d = (i) => {
976
- const c = i.target;
977
- r("update:modelValue", c.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);
978
1017
  };
979
- return (i, c) => (m(), k("label", {
980
- class: V(l.value)
1018
+ return (i, d) => (b(), k("label", {
1019
+ class: S(l.value)
981
1020
  }, [
982
- R("input", {
1021
+ z("input", {
983
1022
  class: "vf-checkbox__control",
984
1023
  type: "checkbox",
985
1024
  checked: i.modelValue,
986
1025
  disabled: i.disabled,
987
- onChange: d
988
- }, null, 40, Pt),
989
- c[0] || (c[0] = R("span", { class: "vf-checkbox__box" }, null, -1)),
990
- i.label || i.$slots.default ? (m(), k("span", At, [
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, [
991
1030
  _(i.$slots, "default", {}, () => [
992
- ae(X(i.label), 1)
1031
+ te(A(i.label), 1)
1032
+ ])
1033
+ ])) : x("", !0)
1034
+ ], 2));
1035
+ }
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)
993
1108
  ])
994
- ])) : $("", !0)
1109
+ ])) : x("", !0)
995
1110
  ], 2));
996
1111
  }
997
- }), Dt = ["checked", "disabled"], It = {
1112
+ }), Uo = ["checked", "disabled"], qo = {
998
1113
  key: 0,
999
1114
  class: "vf-switch__label"
1000
- }, Vo = /* @__PURE__ */ U({
1115
+ }, Xt = /* @__PURE__ */ D({
1001
1116
  __name: "switch",
1002
1117
  props: {
1003
1118
  modelValue: { type: Boolean, default: !1 },
@@ -1005,114 +1120,114 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
1005
1120
  disabled: { type: Boolean, default: !1 }
1006
1121
  },
1007
1122
  emits: ["update:modelValue", "change"],
1008
- setup(t, { emit: e }) {
1009
- const r = e, o = t, l = T(() => {
1123
+ setup(o, { emit: e }) {
1124
+ const r = e, t = o, l = C(() => {
1010
1125
  const i = ["vf-switch"];
1011
- return o.disabled && i.push("vf-switch_disabled"), i;
1012
- }), d = (i) => {
1013
- const c = i.target;
1014
- r("update:modelValue", c.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);
1015
1130
  };
1016
- return (i, c) => (m(), k("label", {
1017
- class: V(l.value)
1131
+ return (i, d) => (b(), k("label", {
1132
+ class: S(l.value)
1018
1133
  }, [
1019
- R("input", {
1134
+ z("input", {
1020
1135
  class: "vf-switch__control",
1021
1136
  type: "checkbox",
1022
1137
  checked: i.modelValue,
1023
1138
  disabled: i.disabled,
1024
- onChange: d
1025
- }, null, 40, Dt),
1026
- c[0] || (c[0] = R("span", { class: "vf-switch__track" }, [
1027
- 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" })
1028
1143
  ], -1)),
1029
- i.label || i.$slots.default ? (m(), k("span", It, [
1144
+ i.label || i.$slots.default ? (b(), k("span", qo, [
1030
1145
  _(i.$slots, "default", {}, () => [
1031
- ae(X(i.label), 1)
1146
+ te(A(i.label), 1)
1032
1147
  ])
1033
- ])) : $("", !0)
1148
+ ])) : x("", !0)
1034
1149
  ], 2));
1035
1150
  }
1036
- }), Xt = { class: "vf-popover" }, Yt = ["aria-expanded", "onKeydown"], Wo = /* @__PURE__ */ U({
1151
+ }), Zo = { class: "vf-popover" }, Jo = ["aria-expanded", "onKeydown"], Yt = /* @__PURE__ */ D({
1037
1152
  __name: "popover",
1038
1153
  emits: ["click", "onClick"],
1039
- setup(t, { expose: e, emit: r }) {
1040
- const o = r, l = Ke({ visible: !1 });
1041
- let d = 0;
1042
- const i = `vf-popover-panel-${++d}`, c = () => l.visible = !0, n = () => l.visible = !1, u = () => l.visible = !l.visible, a = () => {
1043
- u(), 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");
1044
1159
  };
1045
- return e({ show: c, hide: n, toggle: u }), (s, v) => (m(), k("div", Xt, [
1046
- R("div", {
1160
+ return e({ show: d, hide: a, toggle: c }), (s, f) => (b(), k("div", Zo, [
1161
+ z("div", {
1047
1162
  class: "vf-popover__button",
1048
1163
  role: "button",
1049
1164
  tabindex: "0",
1050
1165
  "aria-haspopup": "dialog",
1051
1166
  "aria-expanded": l.visible,
1052
1167
  "aria-controls": i,
1053
- onClick: a,
1168
+ onClick: n,
1054
1169
  onKeydown: [
1055
- re(le(a, ["prevent"]), ["enter"]),
1056
- re(le(a, ["prevent"]), ["space"])
1170
+ le(ae(n, ["prevent"]), ["enter"]),
1171
+ le(ae(n, ["prevent"]), ["space"])
1057
1172
  ]
1058
1173
  }, [
1059
1174
  _(s.$slots, "button")
1060
- ], 40, Yt),
1061
- ke(We(st, {
1175
+ ], 40, Jo),
1176
+ ke(We(uo, {
1062
1177
  id: i,
1063
1178
  class: "vf-popover__wrapper"
1064
- }, Ge({
1065
- default: te(() => [
1066
- 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))
1067
1182
  ]),
1068
1183
  _: 2
1069
1184
  }, [
1070
1185
  s.$slots.default ? {
1071
1186
  name: "default",
1072
- fn: te(() => [
1187
+ fn: oe(() => [
1073
1188
  _(s.$slots, "default")
1074
1189
  ]),
1075
1190
  key: "0"
1076
1191
  } : void 0,
1077
1192
  s.$slots.header || s.$slots.popoverHeader ? {
1078
1193
  name: "header",
1079
- fn: te(() => [
1194
+ fn: oe(() => [
1080
1195
  _(s.$slots, "header"),
1081
- s.$slots.header ? $("", !0) : _(s.$slots, "popoverHeader", { key: 0 })
1196
+ s.$slots.header ? x("", !0) : _(s.$slots, "popoverHeader", { key: 0 })
1082
1197
  ]),
1083
1198
  key: "1"
1084
1199
  } : void 0,
1085
1200
  s.$slots.body || s.$slots.popoverBody ? {
1086
1201
  name: "body",
1087
- fn: te(() => [
1202
+ fn: oe(() => [
1088
1203
  _(s.$slots, "body"),
1089
- s.$slots.body ? $("", !0) : _(s.$slots, "popoverBody", { key: 0 })
1204
+ s.$slots.body ? x("", !0) : _(s.$slots, "popoverBody", { key: 0 })
1090
1205
  ]),
1091
1206
  key: "2"
1092
1207
  } : void 0,
1093
1208
  s.$slots.footer || s.$slots.popoverFooter ? {
1094
1209
  name: "footer",
1095
- fn: te(() => [
1210
+ fn: oe(() => [
1096
1211
  _(s.$slots, "footer"),
1097
- s.$slots.footer ? $("", !0) : _(s.$slots, "popoverFooter", { key: 0 })
1212
+ s.$slots.footer ? x("", !0) : _(s.$slots, "popoverFooter", { key: 0 })
1098
1213
  ]),
1099
1214
  key: "3"
1100
1215
  } : void 0
1101
1216
  ]), 1536), [
1102
- [we, l.visible]
1217
+ [Ce, l.visible]
1103
1218
  ])
1104
1219
  ]));
1105
1220
  }
1106
- }), jt = ["aria-labelledby", "aria-describedby"], Nt = {
1221
+ }), Qo = ["aria-labelledby", "aria-describedby"], et = {
1107
1222
  key: 0,
1108
1223
  class: "vf-modal__header"
1109
- }, Kt = {
1224
+ }, ot = {
1110
1225
  key: 0,
1111
1226
  class: "vf-modal__title"
1112
- }, Gt = {
1227
+ }, tt = {
1113
1228
  key: 3,
1114
1229
  class: "vf-modal__footer"
1115
- }, Oo = /* @__PURE__ */ U({
1230
+ }, jt = /* @__PURE__ */ D({
1116
1231
  __name: "modal",
1117
1232
  props: {
1118
1233
  modelValue: { type: Boolean, default: !1 },
@@ -1124,113 +1239,113 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
1124
1239
  size: { default: "md" }
1125
1240
  },
1126
1241
  emits: ["update:modelValue", "open", "close"],
1127
- setup(t, { expose: e, emit: r }) {
1128
- const o = r, l = t;
1129
- let d = 0, i = 0, c = "", n = null;
1130
- const u = P(null), a = Ue(), s = `vf-modal-title-${++d}`, v = `vf-modal-body-${d}`, f = T(() => !!l.title || !!a.header), p = T(() => !!a.body || !!a.default), w = T(() => {
1131
- const h = ["vf-modal"];
1132
- return l.size !== "md" && h.push(`vf-modal_${l.size}`), h;
1133
- }), b = () => o("update:modelValue", !0), x = () => {
1134
- o("update:modelValue", !1), o("close");
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");
1135
1250
  }, L = () => {
1136
- l.closeOnOverlay && x();
1137
- }, B = (h) => {
1138
- !l.modelValue || !l.closeOnEsc || h.key === "Escape" && (h.preventDefault(), x());
1139
- }, z = () => u.value ? Array.from(u.value.querySelectorAll('a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter((g) => !g.hasAttribute("disabled") && !g.getAttribute("aria-hidden")) : [], C = () => {
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")) : [], $ = () => {
1140
1255
  var g;
1141
- const h = z();
1142
- h.length ? h[0].focus() : (g = u.value) == null || g.focus();
1143
- }, F = (h) => {
1256
+ const m = R();
1257
+ m.length ? m[0].focus() : (g = c.value) == null || g.focus();
1258
+ }, F = (m) => {
1144
1259
  var E;
1145
- if (h.key !== "Tab")
1260
+ if (m.key !== "Tab")
1146
1261
  return;
1147
- const g = z();
1262
+ const g = R();
1148
1263
  if (!g.length) {
1149
- h.preventDefault(), (E = u.value) == null || E.focus();
1264
+ m.preventDefault(), (E = c.value) == null || E.focus();
1150
1265
  return;
1151
1266
  }
1152
- const y = g[0], S = g[g.length - 1], H = document.activeElement;
1153
- if (h.shiftKey && H === y) {
1154
- h.preventDefault(), S.focus();
1267
+ const y = g[0], T = g[g.length - 1], H = document.activeElement;
1268
+ if (m.shiftKey && H === y) {
1269
+ m.preventDefault(), T.focus();
1155
1270
  return;
1156
1271
  }
1157
- !h.shiftKey && H === S && (h.preventDefault(), y.focus());
1272
+ !m.shiftKey && H === T && (m.preventDefault(), y.focus());
1158
1273
  }, O = () => {
1159
- !l.lockScroll || typeof document > "u" || (i === 0 && (c = 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);
1160
1275
  }, W = () => {
1161
- !l.lockScroll || typeof document > "u" || (i = Math.max(0, i - 1), i === 0 && (document.body.style.overflow = c));
1276
+ !l.lockScroll || typeof document > "u" || (i = Math.max(0, i - 1), i === 0 && (document.body.style.overflow = d));
1162
1277
  };
1163
1278
  return ne(
1164
1279
  () => l.modelValue,
1165
- async (h) => {
1166
- h ? (typeof document < "u" && (n = document.activeElement), O(), o("open"), await _e(), C(), typeof document < "u" && document.addEventListener("keydown", B)) : (W(), typeof document < "u" && (document.removeEventListener("keydown", B), 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()));
1167
1282
  },
1168
1283
  { immediate: !0 }
1169
1284
  ), $e(() => {
1170
- W(), typeof document < "u" && document.removeEventListener("keydown", B);
1171
- }), e({ open: b, close: x }), (h, g) => (m(), I(xe, { to: "body" }, [
1172
- ke(R("div", {
1173
- class: V(w.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),
1174
1289
  role: "presentation"
1175
1290
  }, [
1176
- R("div", {
1291
+ z("div", {
1177
1292
  class: "vf-modal__overlay",
1178
1293
  onClick: L
1179
1294
  }),
1180
- R("div", {
1295
+ z("div", {
1181
1296
  ref_key: "panel",
1182
- ref: u,
1297
+ ref: c,
1183
1298
  class: "vf-modal__panel",
1184
1299
  role: "dialog",
1185
1300
  "aria-modal": "true",
1186
- "aria-labelledby": f.value ? s : void 0,
1187
- "aria-describedby": p.value ? v : void 0,
1301
+ "aria-labelledby": v.value ? s : void 0,
1302
+ "aria-describedby": p.value ? f : void 0,
1188
1303
  tabindex: "-1",
1189
1304
  onKeydown: F
1190
1305
  }, [
1191
- f.value ? (m(), k("div", Nt, [
1192
- R("div", {
1306
+ v.value ? (b(), k("div", et, [
1307
+ z("div", {
1193
1308
  id: s,
1194
1309
  class: "vf-modal__header-content"
1195
1310
  }, [
1196
- _(h.$slots, "header", {}, () => [
1197
- h.title ? (m(), k("h3", Kt, X(h.title), 1)) : $("", !0)
1311
+ _(m.$slots, "header", {}, () => [
1312
+ m.title ? (b(), k("h3", ot, A(m.title), 1)) : x("", !0)
1198
1313
  ])
1199
1314
  ])
1200
- ])) : $("", !0),
1201
- h.showClose ? _(h.$slots, "close", {
1315
+ ])) : x("", !0),
1316
+ m.showClose ? _(m.$slots, "close", {
1202
1317
  key: 1,
1203
- close: x
1318
+ close: B
1204
1319
  }, () => [
1205
- R("button", {
1320
+ z("button", {
1206
1321
  type: "button",
1207
1322
  class: "vf-modal__close",
1208
1323
  "aria-label": "Close",
1209
- onClick: x
1324
+ onClick: B
1210
1325
  }, "×")
1211
- ]) : $("", !0),
1212
- h.$slots.body || h.$slots.default ? (m(), k("div", {
1326
+ ]) : x("", !0),
1327
+ m.$slots.body || m.$slots.default ? (b(), k("div", {
1213
1328
  key: 2,
1214
- id: v,
1329
+ id: f,
1215
1330
  class: "vf-modal__body"
1216
1331
  }, [
1217
- _(h.$slots, "body"),
1218
- h.$slots.body ? $("", !0) : _(h.$slots, "default", { key: 0 })
1219
- ])) : $("", !0),
1220
- h.$slots.footer ? (m(), k("div", Gt, [
1221
- _(h.$slots, "footer")
1222
- ])) : $("", !0)
1223
- ], 40, jt)
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)
1224
1339
  ], 2), [
1225
- [we, h.modelValue]
1340
+ [Ce, m.modelValue]
1226
1341
  ])
1227
1342
  ]));
1228
1343
  }
1229
- }), Ut = ["data-placement"], qt = { class: "vf-tooltip__content" }, Zt = {
1344
+ }), rt = ["data-placement"], lt = { class: "vf-tooltip__content" }, at = {
1230
1345
  key: 0,
1231
1346
  class: "vf-tooltip__arrow",
1232
1347
  "aria-hidden": "true"
1233
- }, Ho = /* @__PURE__ */ U({
1348
+ }, Kt = /* @__PURE__ */ D({
1234
1349
  __name: "tooltip",
1235
1350
  props: {
1236
1351
  text: { default: "" },
@@ -1238,156 +1353,156 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
1238
1353
  disabled: { type: Boolean, default: !1 },
1239
1354
  arrow: { type: Boolean, default: !1 }
1240
1355
  },
1241
- setup(t) {
1242
- const e = t;
1356
+ setup(o) {
1357
+ const e = o;
1243
1358
  let r = 0;
1244
- const o = P(null), l = P(null), d = P(!1), i = P("top"), c = `vf-tooltip-${++r}`;
1245
- let n = null;
1246
- const u = () => {
1247
- e.disabled || (d.value = !0);
1248
- }, a = () => {
1249
- d.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;
1250
1365
  }, s = () => {
1251
- if (!o.value || !l.value)
1366
+ if (!t.value || !l.value)
1252
1367
  return;
1253
- const f = o.value, p = l.value, w = async () => {
1368
+ const v = t.value, p = l.value, w = async () => {
1254
1369
  const {
1255
- x: B,
1256
- y: z,
1257
- placement: C
1258
- } = await Xe(f, p, {
1370
+ x: V,
1371
+ y: R,
1372
+ placement: $
1373
+ } = await Ne(v, p, {
1259
1374
  placement: e.placement,
1260
1375
  strategy: "fixed",
1261
- middleware: [De(8), Me(), bt()]
1376
+ middleware: [De(8), Me(), _o()]
1262
1377
  });
1263
- i.value = C ?? e.placement, p.style.left = `${B}px`, p.style.top = `${z}px`;
1264
- }, b = async () => {
1378
+ i.value = $ ?? e.placement, p.style.left = `${V}px`, p.style.top = `${R}px`;
1379
+ }, h = async () => {
1265
1380
  await w();
1266
- }, x = Ie(f, () => {
1267
- b();
1381
+ }, B = Ie(v, () => {
1382
+ h();
1268
1383
  }), L = () => {
1269
- b();
1384
+ h();
1270
1385
  };
1271
- document.addEventListener("scroll", L, !0), window.addEventListener("resize", L, !1), n = {
1272
- update: b,
1386
+ document.addEventListener("scroll", L, !0), window.addEventListener("resize", L, !1), a = {
1387
+ update: h,
1273
1388
  destroy: () => {
1274
- x(), document.removeEventListener("scroll", L, !0), window.removeEventListener("resize", L, !1);
1389
+ B(), document.removeEventListener("scroll", L, !0), window.removeEventListener("resize", L, !1);
1275
1390
  }
1276
- }, n.update();
1391
+ }, a.update();
1277
1392
  };
1278
- ne(d, async (f) => {
1279
- if (!f) {
1280
- n && (n.destroy(), n = null);
1393
+ ne(u, async (v) => {
1394
+ if (!v) {
1395
+ a && (a.destroy(), a = null);
1281
1396
  return;
1282
1397
  }
1283
- n || s(), n == null || n.update();
1398
+ a || s(), a == null || a.update();
1284
1399
  }), Oe(() => {
1285
- d.value && s();
1400
+ u.value && s();
1286
1401
  }), $e(() => {
1287
- n == null || n.destroy(), n = null;
1402
+ a == null || a.destroy(), a = null;
1288
1403
  });
1289
- const v = T(() => !!e.text || !!(l.value && l.value.textContent));
1290
- return ne(v, (f) => {
1291
- f || (d.value = !1);
1292
- }), (f, p) => (m(), k(ce, null, [
1293
- 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", {
1294
1409
  ref_key: "trigger",
1295
- ref: o,
1410
+ ref: t,
1296
1411
  class: "vf-tooltip__trigger",
1297
- "aria-describedby": c,
1298
- onMouseenter: u,
1299
- onMouseleave: a,
1300
- onFocus: u,
1301
- onBlur: a
1412
+ "aria-describedby": d,
1413
+ onMouseenter: c,
1414
+ onMouseleave: n,
1415
+ onFocus: c,
1416
+ onBlur: n
1302
1417
  }, [
1303
- _(f.$slots, "default")
1418
+ _(v.$slots, "default")
1304
1419
  ], 544),
1305
- (m(), I(xe, { to: "body" }, [
1306
- ke(R("div", {
1307
- id: c,
1420
+ (b(), X(xe, { to: "body" }, [
1421
+ ke(z("div", {
1422
+ id: d,
1308
1423
  ref_key: "panel",
1309
1424
  ref: l,
1310
1425
  class: "vf-tooltip",
1311
1426
  role: "tooltip",
1312
1427
  "data-placement": i.value
1313
1428
  }, [
1314
- R("span", qt, [
1315
- _(f.$slots, "content", {}, () => [
1316
- ae(X(f.text), 1)
1429
+ z("span", lt, [
1430
+ _(v.$slots, "content", {}, () => [
1431
+ te(A(v.text), 1)
1317
1432
  ])
1318
1433
  ]),
1319
- f.arrow ? (m(), k("span", Zt)) : $("", !0)
1320
- ], 8, Ut), [
1321
- [we, d.value]
1434
+ v.arrow ? (b(), k("span", at)) : x("", !0)
1435
+ ], 8, rt), [
1436
+ [Ce, u.value]
1322
1437
  ])
1323
1438
  ]))
1324
1439
  ], 64));
1325
1440
  }
1326
- }), Jt = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], Qt = (t) => {
1327
- 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");
1328
1443
  return e.charAt(0).toUpperCase() + e.slice(1);
1329
- }, eo = (t) => t.filter((e) => !Jt.includes(e)).map((e) => Qt(e)).join("-").toLowerCase(), Ce = (t) => t.join("."), to = (t) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t), Fe = (t) => {
1330
- if (!to(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))
1331
1446
  return null;
1332
- if (t.length === 4) {
1333
- const e = t[1], r = t[2], o = t[3];
1334
- 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}`;
1335
1450
  }
1336
- return t.toLowerCase();
1337
- }, Ye = (t) => {
1338
- const e = Fe(t);
1451
+ return o.toLowerCase();
1452
+ }, Ye = (o) => {
1453
+ const e = Be(o);
1339
1454
  if (!e)
1340
1455
  return [0, 0, 0];
1341
- const r = parseInt(e.slice(1), 16), o = r >> 16 & 255, l = r >> 8 & 255, d = r & 255;
1342
- return [o, l, d];
1343
- }, Te = (t) => {
1344
- const [e, r, o] = Ye(t);
1345
- return `${e}, ${r}, ${o}`;
1346
- }, oo = (t, e, r) => {
1347
- const o = t / 255, l = e / 255, d = r / 255, i = Math.max(o, l, d), c = Math.min(o, l, d), n = i - c;
1348
- let u = 0, a = 0;
1349
- const s = (i + c) / 2;
1350
- if (n !== 0) {
1351
- switch (a = n / (1 - Math.abs(2 * s - 1)), i) {
1352
- case o:
1353
- u = (l - d) / 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;
1354
1469
  break;
1355
1470
  case l:
1356
- u = (d - o) / n + 2;
1471
+ c = (u - t) / a + 2;
1357
1472
  break;
1358
- case d:
1359
- u = (o - l) / n + 4;
1473
+ case u:
1474
+ c = (t - l) / a + 4;
1360
1475
  break;
1361
1476
  }
1362
- u *= 60, u < 0 && (u += 360);
1477
+ c *= 60, c < 0 && (c += 360);
1363
1478
  }
1364
- return [u, a * 100, s * 100];
1365
- }, ro = (t, e, r) => {
1366
- const o = e / 100, l = r / 100, d = (1 - Math.abs(2 * l - 1)) * o, i = d * (1 - Math.abs(t / 60 % 2 - 1)), c = l - d / 2;
1367
- let n = 0, u = 0, a = 0;
1368
- t >= 0 && t < 60 ? (n = d, u = i, a = 0) : t >= 60 && t < 120 ? (n = i, u = d, a = 0) : t >= 120 && t < 180 ? (n = 0, u = d, a = i) : t >= 180 && t < 240 ? (n = 0, u = i, a = d) : t >= 240 && t < 300 ? (n = i, u = 0, a = d) : (n = d, u = 0, a = i);
1369
- const s = Math.round((n + c) * 255), v = Math.round((u + c) * 255), f = Math.round((a + c) * 255);
1370
- return [s, v, f];
1371
- }, lo = (t, e, r) => `#${[t, e, r].map((o) => o.toString(16).padStart(2, "0")).join("")}`, no = (t, e, r) => Math.min(r, Math.max(e, t)), ao = (t, e) => {
1372
- 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);
1373
1488
  if (!r)
1374
- return t;
1375
- const [o, l, d] = Ye(r), [i, c, n] = oo(o, l, d), a = (e - 5) * 7, s = no(n + a, 0, 100), [v, f, p] = ro(i, c, s);
1376
- return lo(v, f, p);
1377
- }, 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) => {
1378
1493
  if (!e)
1379
- return { ...t };
1380
- const r = { ...t };
1381
- for (const o in e) {
1382
- const l = e[o], d = t[o];
1383
- ye(d) && ye(l) ? r[o] = Be(d, 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;
1384
1499
  }
1385
1500
  return r;
1386
- }, so = (t) => {
1387
- if (!t)
1501
+ }, gt = (o) => {
1502
+ if (!o)
1388
1503
  return null;
1389
- if (ye(t) && "preset" in t) {
1390
- const e = t;
1504
+ if (ye(o) && "preset" in o) {
1505
+ const e = o;
1391
1506
  return {
1392
1507
  preset: e.preset ?? {},
1393
1508
  overrides: e.overrides,
@@ -1396,89 +1511,89 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
1396
1511
  strict: e.strict
1397
1512
  };
1398
1513
  }
1399
- return { preset: t };
1400
- }, io = (t) => {
1401
- const e = [], r = [], o = [], l = [], d = (n) => o.push(n), i = (n) => l.push(n), c = (n, u) => {
1402
- if (!(!n || typeof n != "object"))
1403
- for (const a in n) {
1404
- const s = n[a], v = u.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]);
1405
1520
  if (ye(s)) {
1406
- c(s, v);
1521
+ d(s, f);
1407
1522
  continue;
1408
1523
  }
1409
1524
  if (s && typeof s == "object") {
1410
- i(`Theme value "${Ce(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.`);
1411
1526
  continue;
1412
1527
  }
1413
1528
  if (typeof s != "string") {
1414
- i(`Theme value "${Ce(v)}" is not a string and will be ignored.`);
1529
+ i(`Theme value "${we(f)}" is not a string and will be ignored.`);
1415
1530
  continue;
1416
1531
  }
1417
- const p = v.includes("colorScheme") && v.includes("dark") ? r : e, w = eo(v);
1418
- if (p.push(`--vf-${w}: ${s}`), v.includes("colors")) {
1419
- const b = Fe(s);
1420
- if (!b) {
1421
- d(
1422
- `Theme color "${Ce(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.`
1423
1538
  );
1424
1539
  continue;
1425
1540
  }
1426
- if (p.push(`--vf-${w}-rgb: ${Te(b)}`), a !== "white")
1427
- for (let x = 1; x < 10; ++x) {
1428
- const L = ao(b, x);
1429
- p.push(`--vf-${w}-${x}00: ${L}`), p.push(`--vf-${w}-${x}00-rgb: ${Te(L)}`);
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)}`);
1430
1545
  }
1431
1546
  }
1432
1547
  }
1433
1548
  };
1434
- return c(t, []), { baseVars: e, darkVars: r, warnings: o, errors: l };
1435
- }, co = (t) => {
1549
+ return d(o, []), { baseVars: e, darkVars: r, warnings: t, errors: l };
1550
+ }, mt = (o) => {
1436
1551
  if (typeof document > "u")
1437
1552
  return null;
1438
- const e = document.getElementById(t);
1553
+ const e = document.getElementById(o);
1439
1554
  if (e && e.tagName.toLowerCase() === "style")
1440
1555
  return e;
1441
1556
  const r = document.createElement("style");
1442
- return r.id = t, document.head.appendChild(r), r;
1443
- }, uo = (t) => ({
1444
- selector: t.selector ?? ":root",
1445
- darkSelector: t.darkSelector ?? ":root[data-theme=dark]"
1446
- }), fo = (t, e, r, o) => {
1447
- const { baseVars: l, darkVars: d, warnings: i, errors: c } = io(t), n = co("vueforge-theme");
1448
- 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)
1449
1564
  return;
1450
- if (c.length) {
1451
- if (o)
1452
- throw new Error(`[VueForge] ${c.join(" ")}`);
1453
- for (const a of c)
1454
- 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}`);
1455
1570
  }
1456
1571
  if (i.length)
1457
- for (const a of i)
1458
- console.warn(`[VueForge] ${a}`);
1459
- const u = [];
1460
- l.length && u.push(`${e} { ${l.join(";")} }`), d.length && u.push(`${r} { ${d.join(";")} }`), n.textContent = u.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(`
1461
1576
  `);
1462
1577
  };
1463
1578
  let J = null;
1464
- const je = (t) => {
1465
- const e = so(t);
1579
+ const je = (o) => {
1580
+ const e = gt(o);
1466
1581
  if (!e)
1467
1582
  return;
1468
- const r = Be(e.preset, e.overrides), { selector: o, darkSelector: l } = uo(e);
1469
- J = { ...e }, fo(r, o, l, e.strict);
1470
- }, Eo = (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) => {
1471
1586
  if (!J)
1472
1587
  return;
1473
- const e = t.overrides === void 0 ? J.overrides : Be(J.overrides ?? {}, t.overrides ?? {}), r = {
1474
- 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,
1475
1590
  overrides: e,
1476
- selector: t.selector ?? J.selector,
1477
- darkSelector: t.darkSelector ?? J.darkSelector
1591
+ selector: o.selector ?? J.selector,
1592
+ darkSelector: o.darkSelector ?? J.darkSelector
1478
1593
  };
1479
1594
  je(r);
1480
- }, Mo = () => J ? { ...J } : null, Po = {
1481
- install(t, e = {}) {
1595
+ }, Ut = () => J ? { ...J } : null, qt = {
1596
+ install(o, e = {}) {
1482
1597
  e.theme && je(e.theme);
1483
1598
  }
1484
1599
  }, Re = {
@@ -1496,7 +1611,8 @@ const je = (t) => {
1496
1611
  controls: {
1497
1612
  height: "2rem",
1498
1613
  paddingY: "0.25rem",
1499
- paddingX: "0.6rem"
1614
+ paddingX: "0.6rem",
1615
+ backgroundColor: "var(--vf-bg-soft-color)"
1500
1616
  },
1501
1617
  radii: {
1502
1618
  sm: "4px",
@@ -1543,7 +1659,7 @@ const je = (t) => {
1543
1659
  dividerColor: "#2e2e32"
1544
1660
  }
1545
1661
  }
1546
- }, vo = {
1662
+ }, kt = {
1547
1663
  fontSize: "var(--vf-typography-font-size)",
1548
1664
  padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
1549
1665
  borderRadius: "var(--vf-radii-md)",
@@ -1685,17 +1801,17 @@ const je = (t) => {
1685
1801
  }
1686
1802
  }
1687
1803
  }
1688
- }, po = {
1804
+ }, Ct = {
1689
1805
  padding: "12px",
1690
1806
  borderColor: "var(--vf-border-color)",
1691
1807
  borderRadius: "var(--vf-radii-md)"
1692
- }, go = {}, ho = {
1808
+ }, wt = {
1693
1809
  gap: "0.5rem",
1694
1810
  fontSize: "var(--vf-typography-font-size)",
1695
1811
  padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
1696
1812
  borderRadius: "var(--vf-radii-md)",
1697
1813
  borderColor: "var(--vf-border-color)",
1698
- backgroundColor: "var(--vf-bg-color)",
1814
+ backgroundColor: "var(--vf-controls-background-color)",
1699
1815
  textColor: "var(--vf-text-color)",
1700
1816
  placeholderColor: "var(--vf-secondary-text-color)",
1701
1817
  focusBorderColor: "var(--vf-blue-600)",
@@ -1710,10 +1826,33 @@ const je = (t) => {
1710
1826
  padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
1711
1827
  fontSize: "var(--vf-sizes-lg-font-size)"
1712
1828
  }
1713
- }, mo = {
1829
+ }, _t = {
1830
+ gap: "0.5rem",
1831
+ fontSize: "var(--vf-typography-font-size)",
1832
+ padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
1833
+ borderRadius: "var(--vf-radii-md)",
1834
+ borderColor: "var(--vf-border-color)",
1835
+ backgroundColor: "var(--vf-controls-background-color)",
1836
+ textColor: "var(--vf-text-color)",
1837
+ placeholderColor: "var(--vf-secondary-text-color)",
1838
+ focusBorderColor: "var(--vf-blue-600)",
1839
+ focusRingShadow: "var(--vf-states-focus-ring-shadow)",
1840
+ hoverBorderColor: "var(--vf-blue-500)",
1841
+ disabledOpacity: "var(--vf-states-disabled-opacity)",
1842
+ minHeight: "calc(var(--vf-controls-height) * 2)",
1843
+ resize: "vertical",
1844
+ small: {
1845
+ padding: "var(--vf-sizes-sm-padding-y) var(--vf-sizes-sm-padding-x)",
1846
+ fontSize: "var(--vf-sizes-sm-font-size)"
1847
+ },
1848
+ large: {
1849
+ padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
1850
+ fontSize: "var(--vf-sizes-lg-font-size)"
1851
+ }
1852
+ }, $t = {
1714
1853
  hoverColor: "var(--vf-blue)",
1715
1854
  activeColor: "var(--vf-blue)"
1716
- }, bo = {
1855
+ }, xt = {
1717
1856
  iconGap: "6px",
1718
1857
  submenuOffset: "12px",
1719
1858
  separatorThickness: "1px",
@@ -1733,7 +1872,7 @@ const je = (t) => {
1733
1872
  marginBottom: "0.5rem",
1734
1873
  marginLeft: "0.5rem"
1735
1874
  }
1736
- }, yo = {
1875
+ }, Bt = {
1737
1876
  width: "90vw",
1738
1877
  maxWidth: "520px",
1739
1878
  maxHeight: "80vh",
@@ -1760,9 +1899,9 @@ const je = (t) => {
1760
1899
  closeColor: "var(--vf-text-color)",
1761
1900
  closeFontSize: "1.25rem",
1762
1901
  closeHoverBackgroundColor: "rgba(0, 0, 0, 0.06)"
1763
- }, ko = {
1902
+ }, Ft = {
1764
1903
  backgroundColor: "var(--vf-bg-color)"
1765
- }, wo = {
1904
+ }, zt = {
1766
1905
  minWidth: "12rem",
1767
1906
  fontSize: "var(--vf-typography-font-size)",
1768
1907
  controlGap: "0.75rem",
@@ -1770,7 +1909,7 @@ const je = (t) => {
1770
1909
  padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
1771
1910
  borderRadius: "var(--vf-radii-md)",
1772
1911
  borderColor: "var(--vf-border-color)",
1773
- backgroundColor: "var(--vf-bg-color)",
1912
+ backgroundColor: "var(--vf-controls-background-color)",
1774
1913
  textColor: "var(--vf-text-color)",
1775
1914
  focusBorderColor: "var(--vf-blue-600)",
1776
1915
  hoverBorderColor: "var(--vf-blue-500)",
@@ -1795,19 +1934,33 @@ const je = (t) => {
1795
1934
  padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
1796
1935
  fontSize: "var(--vf-sizes-lg-font-size)"
1797
1936
  }
1798
- }, Co = {
1937
+ }, St = {
1799
1938
  size: "1rem",
1800
1939
  gap: "0.5rem",
1801
1940
  borderRadius: "var(--vf-radii-sm)",
1802
1941
  checkBorderRadius: "2px",
1803
1942
  borderColor: "var(--vf-border-color)",
1804
- backgroundColor: "var(--vf-bg-color)",
1943
+ backgroundColor: "var(--vf-controls-background-color)",
1805
1944
  checkedBackgroundColor: "var(--vf-blue)",
1806
1945
  checkedBorderColor: "var(--vf-blue)",
1807
1946
  checkColor: "#ffffff",
1808
1947
  textColor: "var(--vf-text-color)",
1809
1948
  disabledOpacity: "var(--vf-states-disabled-opacity)"
1810
- }, _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 = {
1811
1964
  width: "2.25rem",
1812
1965
  height: "1.25rem",
1813
1966
  thumbSize: "1rem",
@@ -1819,7 +1972,7 @@ const je = (t) => {
1819
1972
  thumbColor: "#ffffff",
1820
1973
  textColor: "var(--vf-text-color)",
1821
1974
  disabledOpacity: "var(--vf-states-disabled-opacity)"
1822
- }, $o = {
1975
+ }, Tt = {
1823
1976
  padding: "0.35rem 0.6rem",
1824
1977
  borderRadius: "8px",
1825
1978
  backgroundColor: "rgba(0, 0, 0, 0.8)",
@@ -1830,39 +1983,43 @@ const je = (t) => {
1830
1983
  zIndex: "120",
1831
1984
  maxWidth: "240px",
1832
1985
  arrowSize: "8px"
1833
- }, Ao = {
1986
+ }, Zt = {
1834
1987
  ...Re,
1835
1988
  components: {
1836
1989
  base: Re,
1837
- button: vo,
1838
- card: po,
1839
- codeBlock: go,
1840
- input: ho,
1841
- link: mo,
1842
- menu: bo,
1843
- modal: yo,
1844
- popover: ko,
1845
- select: wo,
1846
- checkbox: Co,
1847
- switch: _o,
1848
- tooltip: $o
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
1849
2003
  }
1850
2004
  };
1851
2005
  export {
1852
- So as Button,
1853
- st as Card,
1854
- Lo as Checkbox,
1855
- Ao as DefaultTheme,
1856
- To as Input,
2006
+ Et as Button,
2007
+ uo as Card,
2008
+ Dt as Checkbox,
2009
+ Zt as DefaultTheme,
2010
+ Mt as Input,
1857
2011
  He as Link,
1858
- zo as Menu,
1859
- Oo as Modal,
1860
- Wo as Popover,
1861
- Ro as Select,
1862
- Vo as Switch,
1863
- Ho as Tooltip,
1864
- Po as VueForge,
1865
- Mo 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,
1866
2023
  je as setTheme,
1867
- Eo as updateTheme
2024
+ Gt as updateTheme
1868
2025
  };