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