@codemonster-ru/vueforge 0.10.0 → 0.11.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";
1
+ import { defineComponent as j, ref as P, computed as B, watch as ne, resolveComponent as Le, openBlock as m, createElementBlock as k, normalizeClass as L, renderSlot as _, Fragment as ce, createTextVNode as ae, toDisplayString as X, createBlock as I, withCtx as te, createCommentVNode as $, createElementVNode as R, renderList as Ve, withKeys as re, withModifiers as le, unref as ie, createVNode as We, nextTick as _e, onMounted as Oe, onBeforeUnmount as $e, Teleport as xe, withDirectives as ke, vShow as Ce, reactive as Ke, createSlots as Ge, useSlots as Ue } from "vue";
2
2
  import { useRoute as qe, useRouter as Ze } 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 Je = ["href", "aria-disabled", "tabindex"], He = /* @__PURE__ */ j({
5
5
  __name: "link",
6
6
  props: {
7
7
  to: { default: void 0 },
@@ -15,12 +15,12 @@ const Je = ["href", "aria-disabled", "tabindex"], He = /* @__PURE__ */ U({
15
15
  },
16
16
  emits: ["click", "active", "update:active", "onActive"],
17
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(() => {
18
+ const r = e, o = t, l = qe(), c = Ze(), i = P(null), u = B(() => o.href ?? o.url), n = B(() => o.as ? o.as === "router-link" && !o.to ? "a" : o.as : o.type === "router-link" || o.type === "a" ? o.type === "router-link" && !o.to ? "a" : o.type : o.to ? "router-link" : "a"), d = B(() => o.to), a = B(() => o.to ? c.resolve(o.to) : null), s = B(() => {
19
19
  if (n.value !== "router-link")
20
20
  return !1;
21
21
  const p = a.value;
22
- return p ? p.name ? l.matched.some(({ name: w }) => w === p.name) : p.fullPath ? l.fullPath === p.fullPath : l.path === p.path : !1;
23
- }), v = T(() => o.active === void 0 ? s.value : o.active), f = (p) => {
22
+ return p ? p.name ? l.matched.some(({ name: C }) => C === p.name) : p.fullPath ? l.fullPath === p.fullPath : l.path === p.path : !1;
23
+ }), v = B(() => o.active === void 0 ? s.value : o.active), f = (p) => {
24
24
  if (!o.disabled) {
25
25
  r("click", p);
26
26
  return;
@@ -29,12 +29,12 @@ const Je = ["href", "aria-disabled", "tabindex"], He = /* @__PURE__ */ U({
29
29
  };
30
30
  return ne(s, (p) => {
31
31
  p && (r("active"), r("onActive")), r("update:active", p);
32
- }), (p, w) => {
32
+ }), (p, C) => {
33
33
  const b = Le("router-link");
34
34
  return n.value === "a" ? (m(), 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: u.value,
37
+ class: L(["vf-link", { "vf-link_active": v.value, "vf-link_disabled": p.disabled }]),
38
38
  "aria-disabled": p.disabled,
39
39
  tabindex: p.disabled ? -1 : void 0,
40
40
  onClick: f
@@ -46,8 +46,8 @@ const Je = ["href", "aria-disabled", "tabindex"], He = /* @__PURE__ */ U({
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: d.value,
50
+ class: L(["vf-link", { "vf-link_active": v.value }]),
51
51
  "aria-disabled": p.disabled,
52
52
  tabindex: p.disabled ? -1 : void 0,
53
53
  "active-class": "vf-link_partially-active",
@@ -104,7 +104,7 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
104
104
  key: 1,
105
105
  class: "vf-menu__separator",
106
106
  role: "separator"
107
- }, ct = ["aria-expanded", "onClick", "onKeydown"], zo = /* @__PURE__ */ U({
107
+ }, ct = ["aria-expanded", "onClick", "onKeydown"], So = /* @__PURE__ */ j({
108
108
  name: "VfMenu",
109
109
  __name: "menu",
110
110
  props: {
@@ -113,14 +113,14 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
113
113
  },
114
114
  emits: ["active", "onActive"],
115
115
  setup(t, { emit: e }) {
116
- const r = e, o = t, l = P([]), 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) => ({
116
+ const r = e, o = t, l = P([]), c = (a, s) => `${a.label ?? a.to ?? a.href ?? a.url ?? "item"}_${s.toString()}`, i = (a) => a.to ? "router-link" : "a", u = (a) => a.map((s) => ({
117
117
  ...s,
118
- items: s.items ? c(s.items) : void 0
118
+ items: s.items ? u(s.items) : void 0
119
119
  })), n = (a) => {
120
120
  a.items && a.items.length ? (l.value.map((s) => {
121
121
  s !== a && (s.subMenuVisible = !1);
122
122
  }), a.subMenuVisible = !a.subMenuVisible) : Object.prototype.hasOwnProperty.call(a, "command") && typeof a.command == "function" && a.command();
123
- }, u = (a) => {
123
+ }, d = (a) => {
124
124
  var s;
125
125
  for (const v in l.value) {
126
126
  const f = l.value[v];
@@ -131,33 +131,33 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
131
131
  return ne(
132
132
  () => o.items,
133
133
  (a) => {
134
- l.value = c(a);
134
+ l.value = u(a);
135
135
  },
136
136
  { deep: !0, immediate: !0 }
137
137
  ), (a, s) => {
138
138
  const v = Le("VfMenu");
139
139
  return m(), k("div", {
140
- class: V(["vf-menu", `vf-menu_${a.orientation}`])
140
+ class: L(["vf-menu", `vf-menu_${a.orientation}`])
141
141
  }, [
142
142
  R("ul", it, [
143
143
  (m(!0), k(ce, null, Ve(l.value, (f, p) => (m(), k("li", {
144
- key: d(f, p),
144
+ key: c(f, 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
+ a.$slots[c(f, p)] ? _(a.$slots, c(f, p), {
149
149
  key: 0,
150
150
  item: { ...f, class: "vf-menu__link" }
151
151
  }) : f.separator ? (m(), k("hr", dt)) : f.items && f.items.length ? (m(), k(ce, { key: 2 }, [
152
152
  R("div", {
153
- class: V(["vf-menu__parent", { "vf-menu__parent_active": f.active }]),
153
+ class: L(["vf-menu__parent", { "vf-menu__parent_active": f.active }]),
154
154
  role: "menuitem",
155
155
  tabindex: "0",
156
156
  "aria-expanded": f.subMenuVisible ? "true" : "false",
157
- onClick: (w) => n(f),
157
+ onClick: (C) => n(f),
158
158
  onKeydown: [
159
- re(le((w) => n(f), ["prevent"]), ["enter"]),
160
- re(le((w) => n(f), ["prevent"]), ["space"])
159
+ re(le((C) => n(f), ["prevent"]), ["enter"]),
160
+ re(le((C) => n(f), ["prevent"]), ["space"])
161
161
  ]
162
162
  }, [
163
163
  f.icon ? (m(), I(ie(de), {
@@ -171,8 +171,8 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
171
171
  f.items ? (m(), I(v, {
172
172
  key: 0,
173
173
  items: f.items,
174
- class: V(["vf-menu__submenu", { "vf-menu__submenu_visible": f.subMenuVisible }]),
175
- onOnActive: u
174
+ class: L(["vf-menu__submenu", { "vf-menu__submenu_visible": f.subMenuVisible }]),
175
+ onOnActive: d
176
176
  }, null, 8, ["items", "class"])) : $("", !0)
177
177
  ], 64)) : (m(), I(He, {
178
178
  key: 3,
@@ -184,8 +184,8 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
184
184
  disabled: f.disabled,
185
185
  role: "menuitem",
186
186
  "aria-disabled": f.disabled ? "true" : "false",
187
- onClick: (w) => n(f),
188
- onActive: (w) => u(f)
187
+ onClick: (C) => n(f),
188
+ onActive: (C) => d(f)
189
189
  }, {
190
190
  default: te(() => [
191
191
  f.icon ? (m(), I(ie(de), {
@@ -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
+ }), ut = ["type", "disabled"], To = /* @__PURE__ */ j({
206
206
  __name: "button",
207
207
  props: {
208
208
  to: { default: void 0 },
@@ -221,58 +221,58 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
221
221
  disabled: { type: Boolean, default: !1 }
222
222
  },
223
223
  setup(t) {
224
- const e = t, r = ["button", "submit", "reset"], o = (a) => !!a && r.includes(a), l = 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(() => {
224
+ const e = t, r = ["button", "submit", "reset"], o = (a) => !!a && r.includes(a), l = B(() => e.as ? e.as === "button" : !(e.to || e.href || e.url || e.type && !o(e.type))), c = B(() => o(e.type) ? e.type : "button"), i = B(() => e.as === "link" ? e.to ? "router-link" : "a" : e.type && !o(e.type) ? e.type === "router-link" && e.to ? "router-link" : "a" : e.to ? "router-link" : "a"), u = B(() => {
225
225
  let a = ["vf-button", `vf-button_${e.severity}`];
226
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"]);
227
+ }), n = B(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]), d = B(() => ["vf-button__label"]);
228
228
  return (a, s) => l.value ? (m(), k("button", {
229
229
  key: 0,
230
- type: d.value,
231
- class: V(c.value),
230
+ type: c.value,
231
+ class: L(u.value),
232
232
  disabled: e.loading || e.disabled
233
233
  }, [
234
234
  e.icon && !e.loading ? (m(), I(ie(de), {
235
235
  key: 0,
236
236
  icon: e.icon,
237
- class: V(n.value)
237
+ class: L(n.value)
238
238
  }, null, 8, ["icon", "class"])) : $("", !0),
239
239
  e.loading ? (m(), I(ie(de), {
240
240
  key: 1,
241
241
  icon: "circleNotch",
242
- class: V(n.value),
242
+ class: L(n.value),
243
243
  spin: ""
244
244
  }, null, 8, ["class"])) : $("", !0),
245
245
  a.$slots.default ? (m(), k("span", {
246
246
  key: 2,
247
- class: V(u.value)
247
+ class: L(d.value)
248
248
  }, [
249
249
  _(a.$slots, "default")
250
250
  ], 2)) : a.label ? (m(), k("span", {
251
251
  key: 3,
252
- class: V(u.value)
252
+ class: L(d.value)
253
253
  }, X(a.label), 3)) : $("", !0)
254
254
  ], 10, ut)) : (m(), I(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: L(u.value),
260
260
  disabled: e.loading || e.disabled
261
261
  }, {
262
262
  default: te(() => [
263
263
  e.icon ? (m(), I(ie(de), {
264
264
  key: 0,
265
265
  icon: e.icon,
266
- class: V(n.value)
266
+ class: L(n.value)
267
267
  }, null, 8, ["icon", "class"])) : $("", !0),
268
268
  a.$slots.default ? (m(), k("span", {
269
269
  key: 1,
270
- class: V(u.value)
270
+ class: L(d.value)
271
271
  }, [
272
272
  _(a.$slots, "default")
273
273
  ], 2)) : a.label ? (m(), k("span", {
274
274
  key: 2,
275
- class: V(u.value)
275
+ class: L(d.value)
276
276
  }, X(a.label), 3)) : $("", !0)
277
277
  ]),
278
278
  _: 3
@@ -284,7 +284,7 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
284
284
  }, vt = ["type", "value", "placeholder", "disabled", "readonly"], pt = {
285
285
  key: 1,
286
286
  class: "vf-input__suffix"
287
- }, To = /* @__PURE__ */ U({
287
+ }, Ro = /* @__PURE__ */ j({
288
288
  __name: "input",
289
289
  props: {
290
290
  modelValue: { default: "" },
@@ -297,36 +297,73 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
297
297
  },
298
298
  emits: ["update:modelValue", "input", "change", "focus", "blur"],
299
299
  setup(t, { emit: e }) {
300
- const r = e, o = t, l = 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)
300
+ const r = e, o = t, l = B(() => {
301
+ const d = ["vf-input", `vf-input_${o.variant}`];
302
+ return o.size !== "normal" && d.push(`vf-input_${o.size}`), o.disabled && d.push("vf-input_disabled"), d;
303
+ }), c = (d) => {
304
+ const a = d.target;
305
+ r("update:modelValue", a.value), r("input", d);
306
+ }, i = (d) => r("change", d), u = (d) => r("focus", d), n = (d) => r("blur", d);
307
+ return (d, a) => (m(), k("div", {
308
+ class: L(l.value)
309
309
  }, [
310
- u.$slots.prefix ? (m(), k("span", ft, [
311
- _(u.$slots, "prefix")
310
+ d.$slots.prefix ? (m(), k("span", ft, [
311
+ _(d.$slots, "prefix")
312
312
  ])) : $("", !0),
313
313
  R("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: d.type,
316
+ value: d.modelValue,
317
+ placeholder: d.placeholder,
318
+ disabled: d.disabled,
319
+ readonly: d.readonly,
320
+ onInput: c,
321
321
  onChange: i,
322
- onFocus: c,
322
+ onFocus: u,
323
323
  onBlur: n
324
324
  }, null, 40, vt),
325
- u.$slots.suffix ? (m(), k("span", pt, [
326
- _(u.$slots, "suffix")
325
+ d.$slots.suffix ? (m(), k("span", pt, [
326
+ _(d.$slots, "suffix")
327
327
  ])) : $("", !0)
328
328
  ], 2));
329
329
  }
330
+ }), gt = ["value", "placeholder", "disabled", "readonly", "rows"], Lo = /* @__PURE__ */ j({
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(t, { emit: e }) {
343
+ const r = e, o = t, l = B(() => {
344
+ const d = ["vf-textarea", `vf-textarea_${o.variant}`];
345
+ return o.size !== "normal" && d.push(`vf-textarea_${o.size}`), o.disabled && d.push("vf-textarea_disabled"), d;
346
+ }), c = (d) => {
347
+ const a = d.target;
348
+ r("update:modelValue", a.value), r("input", d);
349
+ }, i = (d) => r("change", d), u = (d) => r("focus", d), n = (d) => r("blur", d);
350
+ return (d, a) => (m(), k("div", {
351
+ class: L(l.value)
352
+ }, [
353
+ R("textarea", {
354
+ class: "vf-textarea__control",
355
+ value: d.modelValue,
356
+ placeholder: d.placeholder,
357
+ disabled: d.disabled,
358
+ readonly: d.readonly,
359
+ rows: d.rows,
360
+ onInput: c,
361
+ onChange: i,
362
+ onFocus: u,
363
+ onBlur: n
364
+ }, null, 40, gt)
365
+ ], 2));
366
+ }
330
367
  }), ze = [
331
368
  "top",
332
369
  "top-start",
@@ -350,15 +387,15 @@ const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
350
387
  }
351
388
  return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth ? t : q(t.parentNode);
352
389
  };
353
- function gt(t) {
390
+ function ht(t) {
354
391
  return typeof window > "u" ? !1 : window.getComputedStyle(t).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 mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q = (t, e) => mt(t, e) === "fixed", A = (t, e, r = {}) => {
394
+ const o = t.getBoundingClientRect(), l = e ? e.offsetParent : null, c = e ? Q(r, e) : !1;
395
+ if (l && !c) {
396
+ const i = l.getBoundingClientRect(), u = l.scrollLeft, n = l.scrollTop;
360
397
  return {
361
- left: o.left - i.left + c,
398
+ left: o.left - i.left + u,
362
399
  top: o.top - i.top + n,
363
400
  width: o.width,
364
401
  height: o.height
@@ -373,75 +410,75 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
373
410
  }, oe = (t, e) => {
374
411
  var r;
375
412
  return (r = t.middleware) == null ? void 0 : r.find((o) => o.name === e);
376
- }, Ee = (t, e) => !!oe(t, e), mt = (t) => {
413
+ }, Ee = (t, e) => !!oe(t, e), bt = (t) => {
377
414
  const e = q(t);
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) => {
417
+ }, he = (t) => t.scrollLeft + t.clientWidth, me = (t) => t.scrollTop + t.clientHeight, K = (t, e, r = null, o = {}, l) => {
381
418
  if (r === null && typeof window < "u" && Q(o, e))
382
419
  return t;
383
- let d = 0;
420
+ let c = 0;
384
421
  if (r === null) {
385
422
  const i = q(e);
386
- d = i ? i.scrollTop : 0;
423
+ c = i ? i.scrollTop : 0;
387
424
  }
388
- return t - d;
389
- }, K = (t, e, r = null, o = {}, l) => {
390
- let d;
425
+ return t - c;
426
+ }, G = (t, e, r = null, o = {}, l) => {
427
+ let c;
391
428
  if (r === null && typeof window < "u" && Q(o, e))
392
- d = window.innerWidth;
429
+ c = window.innerWidth;
393
430
  else if (r === null) {
394
431
  const i = q(e);
395
- d = i ? he(i) : 0;
432
+ c = i ? he(i) : 0;
396
433
  } else
397
- d = r.getBoundingClientRect().width;
398
- return -(t + e.clientWidth - d);
434
+ c = r.getBoundingClientRect().width;
435
+ return -(t + e.clientWidth - c);
399
436
  }, Z = (t, e, r = null, o = {}, l) => {
400
- let d;
437
+ let c;
401
438
  if (r === null && typeof window < "u" && Q(o, e))
402
- d = window.innerHeight;
439
+ c = window.innerHeight;
403
440
  else if (r === null) {
404
441
  const i = q(e);
405
- d = i ? me(i) : 0;
442
+ c = 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) => {
444
+ c = r.getBoundingClientRect().height;
445
+ return -(t + e.clientHeight - c);
446
+ }, U = (t, e, r = null, o = {}, l) => {
410
447
  if (r === null && typeof window < "u" && Q(o, e))
411
448
  return t;
412
- let d = 0;
449
+ let c = 0;
413
450
  if (r === null) {
414
451
  const i = q(e);
415
- d = i ? i.scrollLeft : 0;
452
+ c = i ? i.scrollLeft : 0;
416
453
  }
417
- return t - d;
454
+ return t - c;
418
455
  }, Se = ({
419
456
  options: t,
420
457
  primaryX: e,
421
458
  primaryY: r,
422
459
  floating: o,
423
460
  placement: l,
424
- reference: d,
461
+ reference: c,
425
462
  scrollDirection: i
426
463
  }) => {
427
- const c = be(d, o, l, t), n = oe(t, "offset");
464
+ const u = be(c, o, l, t), n = oe(t, "offset");
428
465
  if (n) {
429
- const u = n.fn({
430
- x: c.x,
431
- y: c.y,
466
+ const d = n.fn({
467
+ x: u.x,
468
+ y: u.y,
432
469
  options: t,
433
470
  primaryX: e,
434
471
  primaryY: r,
435
472
  floating: o,
436
473
  placement: l,
437
- reference: d,
474
+ reference: c,
438
475
  scrollDirection: i
439
476
  });
440
- c.x = u.x, c.y = u.y;
477
+ u.x = d.x, u.y = d.y;
441
478
  }
442
- return Vt(c, o, d, t) ? {
443
- x: c.x,
444
- y: c.y,
479
+ return Wt(u, o, c, t) ? {
480
+ x: u.x,
481
+ y: u.y,
445
482
  placement: l
446
483
  } : !1;
447
484
  }, Me = (t) => ({
@@ -452,76 +489,76 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
452
489
  y: r,
453
490
  options: o,
454
491
  primaryX: l,
455
- primaryY: d,
492
+ primaryY: c,
456
493
  floating: i,
457
- placement: c,
494
+ placement: u,
458
495
  reference: n,
459
- scrollDirection: u
496
+ scrollDirection: d
460
497
  }) => {
461
498
  var a;
462
499
  const s = {
463
500
  x: e,
464
501
  y: r,
465
- placement: c
502
+ placement: u
466
503
  }, v = {
467
504
  ...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;
505
+ middleware: (a = o.middleware) == null ? void 0 : a.filter((z) => z.name !== "shift")
506
+ }, f = (t == null ? void 0 : t.placements) ?? ze, p = !(t != null && t.placements), C = p ? ze : f;
470
507
  let b = !1;
471
- const x = (B) => {
508
+ const x = (z) => {
472
509
  if (b)
473
510
  return;
474
- const z = Se({
511
+ const S = Se({
475
512
  options: v,
476
513
  primaryX: l,
477
- primaryY: d,
514
+ primaryY: c,
478
515
  floating: i,
479
- placement: B,
516
+ placement: z,
480
517
  reference: n,
481
- scrollDirection: u
518
+ scrollDirection: d
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
+ S && (s.x = S.x, s.y = S.y, s.placement = S.placement, b = !0);
521
+ }, V = Ht(n, i, v);
522
+ if (!p && f.includes(u) && x(u), b || C.forEach(x), !b) {
523
+ const z = f.reduce(
524
+ (S, w) => {
488
525
  const F = Se({
489
526
  options: v,
490
527
  primaryX: l,
491
- primaryY: d,
528
+ primaryY: c,
492
529
  floating: i,
493
- placement: C,
530
+ placement: w,
494
531
  reference: n,
495
- scrollDirection: u
532
+ scrollDirection: d
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 S;
536
+ const O = fe(w), W = V[O];
537
+ return !S || W > S.space ? { result: F, space: W } : S;
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
+ z && (s.x = z.result.x, s.y = z.result.y, s.placement = z.result.placement, b = !0);
505
542
  }
506
543
  if (!b && f.length > 0) {
507
- const B = fe(c);
508
- let z = B, C = L[B];
544
+ const z = fe(u);
545
+ let S = z, w = V[z];
509
546
  f.forEach((h) => {
510
- const g = fe(h), y = L[g];
511
- y > C && (C = y, z = g);
547
+ const g = fe(h), y = V[g];
548
+ y > w && (w = y, S = g);
512
549
  });
513
- const F = Wt(z, c, f), O = be(n, i, F, v), W = oe(v, "offset");
550
+ const F = Ot(S, u, f), O = be(n, i, F, v), W = oe(v, "offset");
514
551
  if (W) {
515
552
  const h = W.fn({
516
553
  x: O.x,
517
554
  y: O.y,
518
555
  options: v,
519
556
  primaryX: l,
520
- primaryY: d,
557
+ primaryY: c,
521
558
  floating: i,
522
559
  placement: F,
523
560
  reference: n,
524
- scrollDirection: u
561
+ scrollDirection: d
525
562
  });
526
563
  O.x = h.x, O.y = h.y;
527
564
  }
@@ -530,35 +567,35 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
530
567
  return s;
531
568
  }
532
569
  }), Pe = (t, e, r, o, l) => {
533
- var d, i, c;
570
+ var c, i, u;
534
571
  let n = 0;
535
572
  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();
573
+ const d = oe(e, "arrow"), a = oe(e, "shift");
574
+ if (d) {
575
+ const s = ((c = d.params) == null ? void 0 : c.arrow).getBoundingClientRect();
539
576
  o.startsWith("right") ? n -= s.width / 2 : o.startsWith("left") && (n += s.width / 2);
540
577
  }
541
- if (Ee(e, "shift") && u) {
578
+ if (Ee(e, "shift") && d) {
542
579
  let s = null, v = 0;
543
580
  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);
581
+ const f = (u = d.params) == null ? void 0 : u.arrow;
582
+ v = f.getBoundingClientRect().width / 2, v += kt(f), v -= t, o.startsWith("right") ? G(r - n, l, s, e) <= t ? G(r, l, s, e) > 0 ? n = t - G(r, l, s, e) : n = t : U(r - n - v, l, s, e) <= t && (U(r - n - v, l, s, e) >= 0 ? (n = -t - (U(r - n - v, l, s, e) + t), s && (n = -t)) : n = -t) : o.startsWith("left") ? G(r - n + v, l, s, e) <= t ? (n = t + G(r - v, l, s, e), n <= t && (n = t)) : U(r - n, l, s, e) <= t && (n = -t + U(r, l, s, e), n <= -t && (n = -t)) : G(r - n, l, s, e) <= t ? G(r - n, l, s, e) <= t && G(r, l, s, e) > 0 ? n = t - G(r, l, s, e) : n = t : U(r - n, l, s, e) <= t && (U(r - n, l, s, e) <= t && U(r, l, s, e) > 0 ? n = -(t - U(r, l, s, e)) : n = -t);
546
583
  }
547
584
  return n;
548
585
  }, Ae = (t, e, r, o, l) => {
549
- var d, i, c;
586
+ var c, i, u;
550
587
  let n = 0;
551
588
  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();
589
+ const d = oe(e, "arrow"), a = oe(e, "shift");
590
+ if (d) {
591
+ const s = ((c = d.params) == null ? void 0 : c.arrow).getBoundingClientRect();
555
592
  o.startsWith("top") ? n += s.height / 2 : o.startsWith("bottom") && (n -= s.height / 2);
556
593
  }
557
- if (Ee(e, "shift") && u) {
594
+ if (Ee(e, "shift") && d) {
558
595
  let s = null, v = 0;
559
596
  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);
597
+ const f = (u = d.params) == null ? void 0 : u.arrow;
598
+ v = f.getBoundingClientRect().height / 2, v += Ct(f), v -= t, o.startsWith("top") ? K(r - n, l, s, e) <= t ? K(r, l, s, e) >= 0 ? n = -(t - K(r, l, s, e)) : n = -t : Z(r - n + v, l, s, e) <= t && (n = t + Z(r - v, l, s, e), n <= t && (n = t)) : o.startsWith("bottom") ? K(r - n - v, l, s, e) <= t ? K(r - n - v, l, s, e) >= 0 ? (n = -t - (K(r - n - v, l, s, e) + t), s && (n = -t)) : n = -t : Z(r - n, l, s, e) <= t && (Z(r, l, s, e) >= 0 ? n = t - Z(r, l, s, e) : n = t) : K(r - n, l, s, e) <= t ? K(r - n, l, s, e) >= 0 ? n = -(t - K(r - n, l, s, e)) : n = -t : Z(r - n, l, s, e) <= t && (Z(r - n, l, s, e) >= 0 ? n = t - Z(r - n, l, s, e) : n = t);
562
599
  }
563
600
  return n;
564
601
  }, De = (t) => ({
@@ -569,15 +606,15 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
569
606
  y: r,
570
607
  options: o,
571
608
  primaryX: l,
572
- primaryY: d,
609
+ primaryY: c,
573
610
  floating: i,
574
- placement: c
611
+ placement: u
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(t, o, l, u, i),
614
+ y: r - Ae(t, o, c, u, i),
615
+ placement: u
579
616
  })
580
- }), bt = (t) => ({
617
+ }), yt = (t) => ({
581
618
  name: "shift",
582
619
  params: t,
583
620
  fn: ({
@@ -585,45 +622,45 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
585
622
  y: r,
586
623
  options: o,
587
624
  primaryX: l,
588
- primaryY: d,
625
+ primaryY: c,
589
626
  floating: i,
590
- placement: c,
627
+ placement: u,
591
628
  reference: n
592
629
  }) => {
593
- var u;
630
+ var d;
594
631
  const a = {
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;
634
+ placement: u
635
+ }, s = o.middleware || [], v = s.findIndex((y) => y.name === "shift"), f = s.findIndex((y) => y.name === "offset"), p = f !== -1 && (v === -1 || f > v), C = s.find((y) => y.name === "offset"), b = C ? (d = C.params) == null ? void 0 : d.value : 0, x = p ? Pe(b, o, l, u, i) : 0, V = p ? Ae(b, o, c, u, i) : 0, z = e - x, S = r - V;
636
+ let w = z, F = S;
637
+ const O = C ? Math.abs(b) : 0, W = O, h = O;
601
638
  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;
639
+ const y = W, T = window.innerWidth - i.clientWidth - W, H = T < y ? y : T, E = h, D = window.innerHeight - i.clientHeight - h, M = D < E ? E : D;
640
+ w < y ? w = y : w > H && (w = H), F < E ? F = E : F > M && (F = M), p ? (a.x = e + (w - z), a.y = r + (F - S)) : (a.x = w, a.y = F);
641
+ const N = W, Y = window.innerWidth - i.clientWidth - W, ee = h, ue = window.innerHeight - i.clientHeight - h, se = p ? N + x : N, ve = p ? Y + x : Y, pe = p ? ee + V : ee, ge = p ? ue + V : ue;
605
642
  return a.x < se ? a.x = se : a.x > ve && (a.x = ve), a.y < pe ? a.y = pe : a.y > ge && (a.y = ge), a;
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 = A(n, i, o), T = y.left, H = y.left + y.width, E = y.top, D = y.top + y.height, M = g.scrollLeft + W, N = he(g) - i.clientWidth - W, Y = N < M ? M : N, ee = g.scrollTop + h, ue = me(g) - i.clientHeight - h, se = ue < ee ? ee : ue, ve = g.scrollLeft, pe = he(g), ge = g.scrollTop, Ne = me(g);
647
+ H <= ve ? w = M : T >= pe && (w = Y), D <= ge ? F = ee : E >= Ne && (F = se), F < ee ? F = ee : F > se && (F = se), w < M ? w = M : w > Y && (w = Y);
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 ? (a.x = e + (w - z), a.y = r + (F - S)) : (a.x = w, a.y = F), g !== null) {
650
+ const y = g.scrollLeft + W, T = he(g) - i.clientWidth - W, H = g.scrollTop + h, E = me(g) - i.clientHeight - h, D = p ? y + x : y, M = p ? T + x : T, N = p ? H + V : H, Y = p ? E + V : E;
651
+ a.x < D ? a.x = D : a.x > M && (a.x = M), a.y < N ? a.y = N : a.y > Y && (a.y = Y);
615
652
  }
616
653
  return a;
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) => {
655
+ }), kt = (t) => t.getBoundingClientRect().width !== t.clientWidth ? (t.getBoundingClientRect().width - t.clientWidth) / 2 : 0, Ct = (t) => t.getBoundingClientRect().height !== t.clientHeight ? (t.getBoundingClientRect().height - t.clientHeight) / 2 : 0, Ie = (t, e) => {
619
656
  const r = q(t), o = [];
620
657
  if (r !== null) {
621
658
  const l = () => e();
622
659
  r.addEventListener("scroll", l, !1), o.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(), c = () => e();
663
+ window.addEventListener("scroll", l, !1), window.addEventListener("resize", c, !1), o.push(() => window.removeEventListener("scroll", l, !1)), o.push(() => window.removeEventListener("resize", c, !1));
627
664
  }
628
665
  if (typeof ResizeObserver < "u" && t instanceof HTMLElement) {
629
666
  const l = new ResizeObserver(() => e());
@@ -637,77 +674,77 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
637
674
  y: o.top - e.getBoundingClientRect().height,
638
675
  placement: "top"
639
676
  };
640
- }, Ct = (t, e, r = {}) => {
677
+ }, _t = (t, e, r = {}) => {
641
678
  const o = A(t, e, r);
642
679
  return {
643
680
  x: o.left,
644
681
  y: o.top - e.getBoundingClientRect().height,
645
682
  placement: "top-start"
646
683
  };
647
- }, _t = (t, e, r = {}) => {
684
+ }, $t = (t, e, r = {}) => {
648
685
  const o = A(t, e, r);
649
686
  return {
650
687
  x: o.left - e.getBoundingClientRect().width + o.width,
651
688
  y: o.top - e.getBoundingClientRect().height,
652
689
  placement: "top-end"
653
690
  };
654
- }, $t = (t, e, r = {}) => {
691
+ }, xt = (t, e, r = {}) => {
655
692
  const o = A(t, e, r);
656
693
  return {
657
694
  x: o.left + o.width,
658
695
  y: o.top - e.getBoundingClientRect().height / 2 + o.height / 2,
659
696
  placement: "right"
660
697
  };
661
- }, xt = (t, e, r = {}) => {
698
+ }, Ft = (t, e, r = {}) => {
662
699
  const o = A(t, e, r);
663
700
  return {
664
701
  x: o.left + o.width,
665
702
  y: o.top,
666
703
  placement: "right-start"
667
704
  };
668
- }, Ft = (t, e, r = {}) => {
705
+ }, Bt = (t, e, r = {}) => {
669
706
  const o = A(t, e, r);
670
707
  return {
671
708
  x: o.left + o.width,
672
709
  y: o.top + o.height - e.getBoundingClientRect().height,
673
710
  placement: "right-end"
674
711
  };
675
- }, Bt = (t, e, r = {}) => {
712
+ }, zt = (t, e, r = {}) => {
676
713
  const o = A(t, e, r);
677
714
  return {
678
715
  x: o.left + o.width / 2 - e.getBoundingClientRect().width / 2,
679
716
  y: o.top + o.height,
680
717
  placement: "bottom"
681
718
  };
682
- }, zt = (t, e, r = {}) => {
719
+ }, St = (t, e, r = {}) => {
683
720
  const o = A(t, e, r);
684
721
  return {
685
722
  x: o.left,
686
723
  y: o.top + o.height,
687
724
  placement: "bottom-start"
688
725
  };
689
- }, St = (t, e, r = {}) => {
726
+ }, Tt = (t, e, r = {}) => {
690
727
  const o = A(t, e, r);
691
728
  return {
692
729
  x: o.left - e.getBoundingClientRect().width + o.width,
693
730
  y: o.top + o.height,
694
731
  placement: "bottom-end"
695
732
  };
696
- }, Tt = (t, e, r = {}) => {
733
+ }, Rt = (t, e, r = {}) => {
697
734
  const o = A(t, e, r);
698
735
  return {
699
736
  x: o.left - e.getBoundingClientRect().width,
700
737
  y: o.top + o.height / 2 - e.getBoundingClientRect().height / 2,
701
738
  placement: "left"
702
739
  };
703
- }, Rt = (t, e, r = {}) => {
740
+ }, Lt = (t, e, r = {}) => {
704
741
  const o = A(t, e, r);
705
742
  return {
706
743
  x: o.left - e.getBoundingClientRect().width,
707
744
  y: o.top,
708
745
  placement: "left-start"
709
746
  };
710
- }, Lt = (t, e, r = {}) => {
747
+ }, Vt = (t, e, r = {}) => {
711
748
  const o = A(t, e, r);
712
749
  return {
713
750
  x: o.left - e.getBoundingClientRect().width,
@@ -719,27 +756,27 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
719
756
  case "top":
720
757
  return wt(t, e, o);
721
758
  case "top-start":
722
- return Ct(t, e, o);
723
- case "top-end":
724
759
  return _t(t, e, o);
725
- case "right":
760
+ case "top-end":
726
761
  return $t(t, e, o);
727
- case "right-start":
762
+ case "right":
728
763
  return xt(t, e, o);
729
- case "right-end":
764
+ case "right-start":
730
765
  return Ft(t, e, o);
731
- case "bottom":
766
+ case "right-end":
732
767
  return Bt(t, e, o);
733
- case "bottom-start":
768
+ case "bottom":
734
769
  return zt(t, e, o);
735
- case "bottom-end":
770
+ case "bottom-start":
736
771
  return St(t, e, o);
737
- case "left":
772
+ case "bottom-end":
738
773
  return Tt(t, e, o);
739
- case "left-start":
774
+ case "left":
740
775
  return Rt(t, e, o);
741
- case "left-end":
776
+ case "left-start":
742
777
  return Lt(t, e, o);
778
+ case "left-end":
779
+ return Vt(t, e, o);
743
780
  default:
744
781
  return {
745
782
  x: 0,
@@ -747,7 +784,7 @@ 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 = {}) => {
787
+ }, Wt = (t, e, r, o = {}) => {
751
788
  if (Q(o, e)) {
752
789
  if (typeof window > "u")
753
790
  return !0;
@@ -755,17 +792,17 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
755
792
  return s >= 0 && v >= 0 && f <= 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(t.y, e, null, o) > 0 && G(t.x, e, null, o) > 0 && Z(t.y, e, null, o) > 0 && U(t.x, e, null, o) > 0;
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, c = 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(), v = s.left + t.x, f = s.top + t.y, p = v + e.clientWidth, C = f + e.clientHeight;
801
+ return v >= 0 && f >= 0 && p <= l && C <= c;
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 u = t.x, n = t.y, d = u + e.clientWidth, a = n + e.clientHeight;
804
+ return u >= 0 && n >= 0 && d <= l && a <= c;
805
+ }, fe = (t) => t.startsWith("right") ? "right" : t.startsWith("left") ? "left" : t.startsWith("top") ? "top" : "bottom", Ot = (t, e, r) => fe(e) === t && r.includes(e) ? e : r.find((o) => fe(o) === t) ?? r[0], Ht = (t, e, r = {}) => {
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 o = Q(r, e) ? null : q(t), l = t.getBoundingClientRect(), c = o ? o.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 - c.top,
821
+ right: c.right - l.right,
822
+ bottom: c.bottom - l.bottom,
823
+ left: l.left - c.left
787
824
  };
788
825
  }, Xe = (t, e, r = {}) => new Promise((o) => {
789
- var l, d;
790
- const i = r.placement ? r.placement : "bottom", c = {
826
+ var l, c;
827
+ const i = r.placement ? r.placement : "bottom", u = {
791
828
  x: 0,
792
829
  y: 0,
793
830
  placement: i,
794
831
  middlewareData: {}
795
832
  }, 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);
798
- (l = r.middleware) == null || l.forEach((w) => {
799
- const b = w.fn({
800
- x: c.x,
801
- y: c.y,
833
+ u.x = n.x, u.y = n.y, u.placement = n.placement;
834
+ const d = u.x, a = u.y, s = bt(t);
835
+ (l = r.middleware) == null || l.forEach((C) => {
836
+ const b = C.fn({
837
+ x: u.x,
838
+ y: u.y,
802
839
  options: r,
803
- primaryX: u,
840
+ primaryX: d,
804
841
  primaryY: a,
805
842
  floating: e,
806
- placement: c.placement,
843
+ placement: u.placement,
807
844
  reference: t,
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
+ u.x = b.x, u.y = b.y, u.placement = b.placement, C.name === "arrow" && (b.baseX = b.x, b.baseY = b.y, b.x = b.arrowX ?? b.x, b.y = b.arrowY ?? b.y), u.middlewareData[C.name] = b;
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 v = be(t, e, u.placement, r), f = oe(r, "offset"), p = f ? (c = f.params) == null ? void 0 : c.value : 0;
850
+ if (Number.isFinite(u.x) || (u.x = v.x), !Number.isFinite(u.y))
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 C = t.getBoundingClientRect(), b = e.getBoundingClientRect().height;
853
+ u.placement.startsWith("top") ? u.y = C.top - b - p : u.placement.startsWith("bottom") ? u.y = C.bottom + p : u.y = v.y;
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
+ u.y = v.y;
856
+ o(u);
857
+ }), Et = ["disabled", "aria-expanded", "onKeydown"], Mt = ["data-placement"], Pt = ["disabled", "aria-selected", "onClick"], Vo = /* @__PURE__ */ j({
821
858
  __name: "select",
822
859
  props: {
823
860
  modelValue: { default: void 0 },
@@ -826,54 +863,55 @@ 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
870
  setup(t, { 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}`;
872
+ const o = e, l = t, c = P(null), i = P(null), u = P(null), n = P(!1), d = P("bottom"), a = P("bottom"), s = `vf-select-panel-${++r}`;
835
873
  let v = null;
836
- const f = T(() => l.options.map((g) => ({
874
+ const f = B(() => 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 = B(() => f.value.find((g) => g.value === l.modelValue)), C = B(() => {
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
+ }), b = B(() => {
882
+ const g = ["vf-select", `vf-select_${l.variant}`, n.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
+ }), x = (g) => g.value === l.modelValue, V = (g) => {
885
+ g.disabled || (o("update:modelValue", g.value), o("change", g.value), w());
886
+ }, z = (g) => o("focus", g), S = (g) => o("blur", g), w = () => {
887
+ n.value = !1, d.value = "bottom", a.value = "bottom";
850
888
  }, F = () => {
851
- l.disabled || (n.value = !n.value, n.value && (u.value = "bottom", a.value = "bottom"));
889
+ l.disabled || (n.value = !n.value, n.value && (d.value = "bottom", a.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
+ n.value || (n.value = !0, await _e()), (y = (g = u.value) == null ? void 0 : g.querySelector(".vf-select__option:not(.is-disabled)")) == null || y.focus();
855
893
  }, W = (g) => {
856
- var S;
857
- if (!n.value || !d.value)
894
+ var T;
895
+ if (!n.value || !c.value)
858
896
  return;
859
897
  const y = g.target;
860
- d.value.contains(y) || (S = c.value) != null && S.contains(y) || C();
898
+ c.value.contains(y) || (T = u.value) != null && T.contains(y) || w();
861
899
  }, h = () => {
862
- if (!i.value || !c.value)
900
+ if (!i.value || !u.value)
863
901
  return;
864
- const g = i.value, y = c.value, S = async () => {
902
+ const g = i.value, y = u.value, T = async () => {
865
903
  const {
866
904
  x: M,
867
- y: j,
905
+ y: N,
868
906
  placement: Y
869
907
  } = await Xe(g, y, {
870
- placement: u.value,
908
+ placement: d.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
+ a.value = Y ?? d.value, y.style.minWidth = `${g.getBoundingClientRect().width}px`, y.style.left = `${M}px`, y.style.top = `${N}px`;
875
913
  }, H = async () => {
876
- await S();
914
+ await T();
877
915
  }, E = Ie(g, () => {
878
916
  H();
879
917
  }), D = () => {
@@ -904,8 +942,8 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
904
942
  document.removeEventListener("click", W), v == null || v.destroy(), v = null;
905
943
  }), (g, y) => (m(), k("div", {
906
944
  ref_key: "root",
907
- ref: d,
908
- class: V(b.value)
945
+ ref: c,
946
+ class: L(b.value)
909
947
  }, [
910
948
  R("button", {
911
949
  ref_key: "trigger",
@@ -920,84 +958,85 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
920
958
  onKeydown: [
921
959
  re(le(O, ["prevent"]), ["down"]),
922
960
  re(le(F, ["prevent"]), ["enter"]),
923
- re(le(C, ["prevent"]), ["esc"])
961
+ re(le(w, ["prevent"]), ["esc"])
924
962
  ],
925
- onFocus: B,
926
- onBlur: z
963
+ onFocus: z,
964
+ onBlur: S
927
965
  }, [
928
966
  R("span", {
929
- class: V(["vf-select__label", { "vf-select__label_placeholder": !w.value }])
930
- }, X(w.value || g.placeholder), 3),
967
+ class: L(["vf-select__label", { "vf-select__label_placeholder": !C.value }])
968
+ }, X(C.value || g.placeholder), 3),
931
969
  y[0] || (y[0] = R("span", {
932
970
  class: "vf-select__chevron",
933
971
  "aria-hidden": "true"
934
972
  }, "▾", -1))
935
- ], 40, Ht),
973
+ ], 40, Et),
936
974
  (m(), I(xe, { to: "body" }, [
937
975
  ke(R("div", {
938
976
  id: s,
939
977
  ref_key: "panel",
940
- ref: c,
978
+ ref: u,
941
979
  class: "vf-select__panel",
942
980
  role: "listbox",
943
981
  "data-placement": a.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
+ (m(!0), k(ce, null, Ve(f.value, (T) => (m(), k("button", {
984
+ key: T.value,
985
+ class: L(["vf-select__option", { "is-active": x(T), "is-disabled": T.disabled }]),
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": x(T),
990
+ onClick: (H) => V(T)
991
+ }, X(T.label), 11, Pt))), 128))
992
+ ], 8, Mt), [
993
+ [Ce, n.value]
956
994
  ])
957
995
  ]))
958
996
  ], 2));
959
997
  }
960
- }), Pt = ["checked", "disabled"], At = {
998
+ }), At = ["checked", "disabled"], Dt = {
961
999
  key: 0,
962
1000
  class: "vf-checkbox__label"
963
- }, Lo = /* @__PURE__ */ U({
1001
+ }, Wo = /* @__PURE__ */ j({
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
1010
  setup(t, { emit: e }) {
972
- const r = e, o = t, l = T(() => {
973
- const i = ["vf-checkbox"];
1011
+ const r = e, o = t, l = B(() => {
1012
+ const i = ["vf-checkbox", `vf-checkbox_${o.variant}`];
974
1013
  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);
1014
+ }), c = (i) => {
1015
+ const u = i.target;
1016
+ r("update:modelValue", u.checked), r("change", i);
978
1017
  };
979
- return (i, c) => (m(), k("label", {
980
- class: V(l.value)
1018
+ return (i, u) => (m(), k("label", {
1019
+ class: L(l.value)
981
1020
  }, [
982
1021
  R("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: c
1027
+ }, null, 40, At),
1028
+ u[0] || (u[0] = R("span", { class: "vf-checkbox__box" }, null, -1)),
1029
+ i.label || i.$slots.default ? (m(), k("span", Dt, [
991
1030
  _(i.$slots, "default", {}, () => [
992
1031
  ae(X(i.label), 1)
993
1032
  ])
994
1033
  ])) : $("", !0)
995
1034
  ], 2));
996
1035
  }
997
- }), Dt = ["checked", "disabled"], It = {
1036
+ }), It = ["checked", "disabled"], Xt = {
998
1037
  key: 0,
999
1038
  class: "vf-switch__label"
1000
- }, Vo = /* @__PURE__ */ U({
1039
+ }, Oo = /* @__PURE__ */ j({
1001
1040
  __name: "switch",
1002
1041
  props: {
1003
1042
  modelValue: { type: Boolean, default: !1 },
@@ -1006,43 +1045,43 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
1006
1045
  },
1007
1046
  emits: ["update:modelValue", "change"],
1008
1047
  setup(t, { emit: e }) {
1009
- const r = e, o = t, l = T(() => {
1048
+ const r = e, o = t, l = B(() => {
1010
1049
  const i = ["vf-switch"];
1011
1050
  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);
1051
+ }), c = (i) => {
1052
+ const u = i.target;
1053
+ r("update:modelValue", u.checked), r("change", i);
1015
1054
  };
1016
- return (i, c) => (m(), k("label", {
1017
- class: V(l.value)
1055
+ return (i, u) => (m(), k("label", {
1056
+ class: L(l.value)
1018
1057
  }, [
1019
1058
  R("input", {
1020
1059
  class: "vf-switch__control",
1021
1060
  type: "checkbox",
1022
1061
  checked: i.modelValue,
1023
1062
  disabled: i.disabled,
1024
- onChange: d
1025
- }, null, 40, Dt),
1026
- c[0] || (c[0] = R("span", { class: "vf-switch__track" }, [
1063
+ onChange: c
1064
+ }, null, 40, It),
1065
+ u[0] || (u[0] = R("span", { class: "vf-switch__track" }, [
1027
1066
  R("span", { class: "vf-switch__thumb" })
1028
1067
  ], -1)),
1029
- i.label || i.$slots.default ? (m(), k("span", It, [
1068
+ i.label || i.$slots.default ? (m(), k("span", Xt, [
1030
1069
  _(i.$slots, "default", {}, () => [
1031
1070
  ae(X(i.label), 1)
1032
1071
  ])
1033
1072
  ])) : $("", !0)
1034
1073
  ], 2));
1035
1074
  }
1036
- }), Xt = { class: "vf-popover" }, Yt = ["aria-expanded", "onKeydown"], Wo = /* @__PURE__ */ U({
1075
+ }), Yt = { class: "vf-popover" }, jt = ["aria-expanded", "onKeydown"], Ho = /* @__PURE__ */ j({
1037
1076
  __name: "popover",
1038
1077
  emits: ["click", "onClick"],
1039
1078
  setup(t, { expose: e, emit: r }) {
1040
1079
  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");
1080
+ let c = 0;
1081
+ const i = `vf-popover-panel-${++c}`, u = () => l.visible = !0, n = () => l.visible = !1, d = () => l.visible = !l.visible, a = () => {
1082
+ d(), o("click"), o("onClick");
1044
1083
  };
1045
- return e({ show: c, hide: n, toggle: u }), (s, v) => (m(), k("div", Xt, [
1084
+ return e({ show: u, hide: n, toggle: d }), (s, v) => (m(), k("div", Yt, [
1046
1085
  R("div", {
1047
1086
  class: "vf-popover__button",
1048
1087
  role: "button",
@@ -1057,7 +1096,7 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
1057
1096
  ]
1058
1097
  }, [
1059
1098
  _(s.$slots, "button")
1060
- ], 40, Yt),
1099
+ ], 40, jt),
1061
1100
  ke(We(st, {
1062
1101
  id: i,
1063
1102
  class: "vf-popover__wrapper"
@@ -1099,20 +1138,20 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
1099
1138
  key: "3"
1100
1139
  } : void 0
1101
1140
  ]), 1536), [
1102
- [we, l.visible]
1141
+ [Ce, l.visible]
1103
1142
  ])
1104
1143
  ]));
1105
1144
  }
1106
- }), jt = ["aria-labelledby", "aria-describedby"], Nt = {
1145
+ }), Nt = ["aria-labelledby", "aria-describedby"], Kt = {
1107
1146
  key: 0,
1108
1147
  class: "vf-modal__header"
1109
- }, Kt = {
1148
+ }, Gt = {
1110
1149
  key: 0,
1111
1150
  class: "vf-modal__title"
1112
- }, Gt = {
1151
+ }, Ut = {
1113
1152
  key: 3,
1114
1153
  class: "vf-modal__footer"
1115
- }, Oo = /* @__PURE__ */ U({
1154
+ }, Eo = /* @__PURE__ */ j({
1116
1155
  __name: "modal",
1117
1156
  props: {
1118
1157
  modelValue: { type: Boolean, default: !1 },
@@ -1126,60 +1165,60 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
1126
1165
  emits: ["update:modelValue", "open", "close"],
1127
1166
  setup(t, { expose: e, emit: r }) {
1128
1167
  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(() => {
1168
+ let c = 0, i = 0, u = "", n = null;
1169
+ const d = P(null), a = Ue(), s = `vf-modal-title-${++c}`, v = `vf-modal-body-${c}`, f = B(() => !!l.title || !!a.header), p = B(() => !!a.body || !!a.default), C = B(() => {
1131
1170
  const h = ["vf-modal"];
1132
1171
  return l.size !== "md" && h.push(`vf-modal_${l.size}`), h;
1133
1172
  }), b = () => o("update:modelValue", !0), x = () => {
1134
1173
  o("update:modelValue", !1), o("close");
1135
- }, L = () => {
1174
+ }, V = () => {
1136
1175
  l.closeOnOverlay && x();
1137
- }, B = (h) => {
1176
+ }, z = (h) => {
1138
1177
  !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 = () => {
1178
+ }, S = () => d.value ? Array.from(d.value.querySelectorAll('a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter((g) => !g.hasAttribute("disabled") && !g.getAttribute("aria-hidden")) : [], w = () => {
1140
1179
  var g;
1141
- const h = z();
1142
- h.length ? h[0].focus() : (g = u.value) == null || g.focus();
1180
+ const h = S();
1181
+ h.length ? h[0].focus() : (g = d.value) == null || g.focus();
1143
1182
  }, F = (h) => {
1144
1183
  var E;
1145
1184
  if (h.key !== "Tab")
1146
1185
  return;
1147
- const g = z();
1186
+ const g = S();
1148
1187
  if (!g.length) {
1149
- h.preventDefault(), (E = u.value) == null || E.focus();
1188
+ h.preventDefault(), (E = d.value) == null || E.focus();
1150
1189
  return;
1151
1190
  }
1152
- const y = g[0], S = g[g.length - 1], H = document.activeElement;
1191
+ const y = g[0], T = g[g.length - 1], H = document.activeElement;
1153
1192
  if (h.shiftKey && H === y) {
1154
- h.preventDefault(), S.focus();
1193
+ h.preventDefault(), T.focus();
1155
1194
  return;
1156
1195
  }
1157
- !h.shiftKey && H === S && (h.preventDefault(), y.focus());
1196
+ !h.shiftKey && H === T && (h.preventDefault(), y.focus());
1158
1197
  }, O = () => {
1159
- !l.lockScroll || typeof document > "u" || (i === 0 && (c = document.body.style.overflow, document.body.style.overflow = "hidden"), i += 1);
1198
+ !l.lockScroll || typeof document > "u" || (i === 0 && (u = document.body.style.overflow, document.body.style.overflow = "hidden"), i += 1);
1160
1199
  }, W = () => {
1161
- !l.lockScroll || typeof document > "u" || (i = Math.max(0, i - 1), i === 0 && (document.body.style.overflow = c));
1200
+ !l.lockScroll || typeof document > "u" || (i = Math.max(0, i - 1), i === 0 && (document.body.style.overflow = u));
1162
1201
  };
1163
1202
  return ne(
1164
1203
  () => l.modelValue,
1165
1204
  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()));
1205
+ h ? (typeof document < "u" && (n = document.activeElement), O(), o("open"), await _e(), w(), typeof document < "u" && document.addEventListener("keydown", z)) : (W(), typeof document < "u" && (document.removeEventListener("keydown", z), n == null || n.focus()));
1167
1206
  },
1168
1207
  { immediate: !0 }
1169
1208
  ), $e(() => {
1170
- W(), typeof document < "u" && document.removeEventListener("keydown", B);
1209
+ W(), typeof document < "u" && document.removeEventListener("keydown", z);
1171
1210
  }), e({ open: b, close: x }), (h, g) => (m(), I(xe, { to: "body" }, [
1172
1211
  ke(R("div", {
1173
- class: V(w.value),
1212
+ class: L(C.value),
1174
1213
  role: "presentation"
1175
1214
  }, [
1176
1215
  R("div", {
1177
1216
  class: "vf-modal__overlay",
1178
- onClick: L
1217
+ onClick: V
1179
1218
  }),
1180
1219
  R("div", {
1181
1220
  ref_key: "panel",
1182
- ref: u,
1221
+ ref: d,
1183
1222
  class: "vf-modal__panel",
1184
1223
  role: "dialog",
1185
1224
  "aria-modal": "true",
@@ -1188,13 +1227,13 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
1188
1227
  tabindex: "-1",
1189
1228
  onKeydown: F
1190
1229
  }, [
1191
- f.value ? (m(), k("div", Nt, [
1230
+ f.value ? (m(), k("div", Kt, [
1192
1231
  R("div", {
1193
1232
  id: s,
1194
1233
  class: "vf-modal__header-content"
1195
1234
  }, [
1196
1235
  _(h.$slots, "header", {}, () => [
1197
- h.title ? (m(), k("h3", Kt, X(h.title), 1)) : $("", !0)
1236
+ h.title ? (m(), k("h3", Gt, X(h.title), 1)) : $("", !0)
1198
1237
  ])
1199
1238
  ])
1200
1239
  ])) : $("", !0),
@@ -1217,20 +1256,20 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
1217
1256
  _(h.$slots, "body"),
1218
1257
  h.$slots.body ? $("", !0) : _(h.$slots, "default", { key: 0 })
1219
1258
  ])) : $("", !0),
1220
- h.$slots.footer ? (m(), k("div", Gt, [
1259
+ h.$slots.footer ? (m(), k("div", Ut, [
1221
1260
  _(h.$slots, "footer")
1222
1261
  ])) : $("", !0)
1223
- ], 40, jt)
1262
+ ], 40, Nt)
1224
1263
  ], 2), [
1225
- [we, h.modelValue]
1264
+ [Ce, h.modelValue]
1226
1265
  ])
1227
1266
  ]));
1228
1267
  }
1229
- }), Ut = ["data-placement"], qt = { class: "vf-tooltip__content" }, Zt = {
1268
+ }), qt = ["data-placement"], Zt = { class: "vf-tooltip__content" }, Jt = {
1230
1269
  key: 0,
1231
1270
  class: "vf-tooltip__arrow",
1232
1271
  "aria-hidden": "true"
1233
- }, Ho = /* @__PURE__ */ U({
1272
+ }, Mo = /* @__PURE__ */ j({
1234
1273
  __name: "tooltip",
1235
1274
  props: {
1236
1275
  text: { default: "" },
@@ -1241,93 +1280,93 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
1241
1280
  setup(t) {
1242
1281
  const e = t;
1243
1282
  let r = 0;
1244
- const o = P(null), l = P(null), d = P(!1), i = P("top"), c = `vf-tooltip-${++r}`;
1283
+ const o = P(null), l = P(null), c = P(!1), i = P("top"), u = `vf-tooltip-${++r}`;
1245
1284
  let n = null;
1246
- const u = () => {
1247
- e.disabled || (d.value = !0);
1285
+ const d = () => {
1286
+ e.disabled || (c.value = !0);
1248
1287
  }, a = () => {
1249
- d.value = !1;
1288
+ c.value = !1;
1250
1289
  }, s = () => {
1251
1290
  if (!o.value || !l.value)
1252
1291
  return;
1253
- const f = o.value, p = l.value, w = async () => {
1292
+ const f = o.value, p = l.value, C = async () => {
1254
1293
  const {
1255
- x: B,
1256
- y: z,
1257
- placement: C
1294
+ x: z,
1295
+ y: S,
1296
+ placement: w
1258
1297
  } = await Xe(f, p, {
1259
1298
  placement: e.placement,
1260
1299
  strategy: "fixed",
1261
- middleware: [De(8), Me(), bt()]
1300
+ middleware: [De(8), Me(), yt()]
1262
1301
  });
1263
- i.value = C ?? e.placement, p.style.left = `${B}px`, p.style.top = `${z}px`;
1302
+ i.value = w ?? e.placement, p.style.left = `${z}px`, p.style.top = `${S}px`;
1264
1303
  }, b = async () => {
1265
- await w();
1304
+ await C();
1266
1305
  }, x = Ie(f, () => {
1267
1306
  b();
1268
- }), L = () => {
1307
+ }), V = () => {
1269
1308
  b();
1270
1309
  };
1271
- document.addEventListener("scroll", L, !0), window.addEventListener("resize", L, !1), n = {
1310
+ document.addEventListener("scroll", V, !0), window.addEventListener("resize", V, !1), n = {
1272
1311
  update: b,
1273
1312
  destroy: () => {
1274
- x(), document.removeEventListener("scroll", L, !0), window.removeEventListener("resize", L, !1);
1313
+ x(), document.removeEventListener("scroll", V, !0), window.removeEventListener("resize", V, !1);
1275
1314
  }
1276
1315
  }, n.update();
1277
1316
  };
1278
- ne(d, async (f) => {
1317
+ ne(c, async (f) => {
1279
1318
  if (!f) {
1280
1319
  n && (n.destroy(), n = null);
1281
1320
  return;
1282
1321
  }
1283
1322
  n || s(), n == null || n.update();
1284
1323
  }), Oe(() => {
1285
- d.value && s();
1324
+ c.value && s();
1286
1325
  }), $e(() => {
1287
1326
  n == null || n.destroy(), n = null;
1288
1327
  });
1289
- const v = T(() => !!e.text || !!(l.value && l.value.textContent));
1328
+ const v = B(() => !!e.text || !!(l.value && l.value.textContent));
1290
1329
  return ne(v, (f) => {
1291
- f || (d.value = !1);
1330
+ f || (c.value = !1);
1292
1331
  }), (f, p) => (m(), k(ce, null, [
1293
1332
  R("span", {
1294
1333
  ref_key: "trigger",
1295
1334
  ref: o,
1296
1335
  class: "vf-tooltip__trigger",
1297
- "aria-describedby": c,
1298
- onMouseenter: u,
1336
+ "aria-describedby": u,
1337
+ onMouseenter: d,
1299
1338
  onMouseleave: a,
1300
- onFocus: u,
1339
+ onFocus: d,
1301
1340
  onBlur: a
1302
1341
  }, [
1303
1342
  _(f.$slots, "default")
1304
1343
  ], 544),
1305
1344
  (m(), I(xe, { to: "body" }, [
1306
1345
  ke(R("div", {
1307
- id: c,
1346
+ id: u,
1308
1347
  ref_key: "panel",
1309
1348
  ref: l,
1310
1349
  class: "vf-tooltip",
1311
1350
  role: "tooltip",
1312
1351
  "data-placement": i.value
1313
1352
  }, [
1314
- R("span", qt, [
1353
+ R("span", Zt, [
1315
1354
  _(f.$slots, "content", {}, () => [
1316
1355
  ae(X(f.text), 1)
1317
1356
  ])
1318
1357
  ]),
1319
- f.arrow ? (m(), k("span", Zt)) : $("", !0)
1320
- ], 8, Ut), [
1321
- [we, d.value]
1358
+ f.arrow ? (m(), k("span", Jt)) : $("", !0)
1359
+ ], 8, qt), [
1360
+ [Ce, c.value]
1322
1361
  ])
1323
1362
  ]))
1324
1363
  ], 64));
1325
1364
  }
1326
- }), Jt = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], Qt = (t) => {
1365
+ }), Qt = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], eo = (t) => {
1327
1366
  const e = t.replace(/([A-Z])/g, "-$1");
1328
1367
  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))
1368
+ }, to = (t) => t.filter((e) => !Qt.includes(e)).map((e) => eo(e)).join("-").toLowerCase(), we = (t) => t.join("."), oo = (t) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t), Fe = (t) => {
1369
+ if (!oo(t))
1331
1370
  return null;
1332
1371
  if (t.length === 4) {
1333
1372
  const e = t[1], r = t[2], o = t[3];
@@ -1338,52 +1377,52 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
1338
1377
  const e = Fe(t);
1339
1378
  if (!e)
1340
1379
  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];
1380
+ const r = parseInt(e.slice(1), 16), o = r >> 16 & 255, l = r >> 8 & 255, c = r & 255;
1381
+ return [o, l, c];
1343
1382
  }, Te = (t) => {
1344
1383
  const [e, r, o] = Ye(t);
1345
1384
  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;
1385
+ }, ro = (t, e, r) => {
1386
+ const o = t / 255, l = e / 255, c = r / 255, i = Math.max(o, l, c), u = Math.min(o, l, c), n = i - u;
1387
+ let d = 0, a = 0;
1388
+ const s = (i + u) / 2;
1350
1389
  if (n !== 0) {
1351
1390
  switch (a = n / (1 - Math.abs(2 * s - 1)), i) {
1352
1391
  case o:
1353
- u = (l - d) / n % 6;
1392
+ d = (l - c) / n % 6;
1354
1393
  break;
1355
1394
  case l:
1356
- u = (d - o) / n + 2;
1395
+ d = (c - o) / n + 2;
1357
1396
  break;
1358
- case d:
1359
- u = (o - l) / n + 4;
1397
+ case c:
1398
+ d = (o - l) / n + 4;
1360
1399
  break;
1361
1400
  }
1362
- u *= 60, u < 0 && (u += 360);
1401
+ d *= 60, d < 0 && (d += 360);
1363
1402
  }
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);
1403
+ return [d, a * 100, s * 100];
1404
+ }, lo = (t, e, r) => {
1405
+ const o = e / 100, l = r / 100, c = (1 - Math.abs(2 * l - 1)) * o, i = c * (1 - Math.abs(t / 60 % 2 - 1)), u = l - c / 2;
1406
+ let n = 0, d = 0, a = 0;
1407
+ t >= 0 && t < 60 ? (n = c, d = i, a = 0) : t >= 60 && t < 120 ? (n = i, d = c, a = 0) : t >= 120 && t < 180 ? (n = 0, d = c, a = i) : t >= 180 && t < 240 ? (n = 0, d = i, a = c) : t >= 240 && t < 300 ? (n = i, d = 0, a = c) : (n = c, d = 0, a = i);
1408
+ const s = Math.round((n + u) * 255), v = Math.round((d + u) * 255), f = Math.round((a + u) * 255);
1370
1409
  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) => {
1410
+ }, no = (t, e, r) => `#${[t, e, r].map((o) => o.toString(16).padStart(2, "0")).join("")}`, ao = (t, e, r) => Math.min(r, Math.max(e, t)), so = (t, e) => {
1372
1411
  const r = Fe(t);
1373
1412
  if (!r)
1374
1413
  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);
1414
+ const [o, l, c] = Ye(r), [i, u, n] = ro(o, l, c), a = (e - 5) * 7, s = ao(n + a, 0, 100), [v, f, p] = lo(i, u, s);
1415
+ return no(v, f, p);
1377
1416
  }, ye = (t) => !!t && typeof t == "object" && !Array.isArray(t), Be = (t, e) => {
1378
1417
  if (!e)
1379
1418
  return { ...t };
1380
1419
  const r = { ...t };
1381
1420
  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;
1421
+ const l = e[o], c = t[o];
1422
+ ye(c) && ye(l) ? r[o] = Be(c, l) : r[o] = l;
1384
1423
  }
1385
1424
  return r;
1386
- }, so = (t) => {
1425
+ }, io = (t) => {
1387
1426
  if (!t)
1388
1427
  return null;
1389
1428
  if (ye(t) && "preset" in t) {
@@ -1397,42 +1436,42 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
1397
1436
  };
1398
1437
  }
1399
1438
  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) => {
1439
+ }, co = (t) => {
1440
+ const e = [], r = [], o = [], l = [], c = (n) => o.push(n), i = (n) => l.push(n), u = (n, d) => {
1402
1441
  if (!(!n || typeof n != "object"))
1403
1442
  for (const a in n) {
1404
- const s = n[a], v = u.concat([a]);
1443
+ const s = n[a], v = d.concat([a]);
1405
1444
  if (ye(s)) {
1406
- c(s, v);
1445
+ u(s, v);
1407
1446
  continue;
1408
1447
  }
1409
1448
  if (s && typeof s == "object") {
1410
- i(`Theme value "${Ce(v)}" is not a plain object or string and will be ignored.`);
1449
+ i(`Theme value "${we(v)}" is not a plain object or string and will be ignored.`);
1411
1450
  continue;
1412
1451
  }
1413
1452
  if (typeof s != "string") {
1414
- i(`Theme value "${Ce(v)}" is not a string and will be ignored.`);
1453
+ i(`Theme value "${we(v)}" is not a string and will be ignored.`);
1415
1454
  continue;
1416
1455
  }
1417
- const p = v.includes("colorScheme") && v.includes("dark") ? r : e, w = eo(v);
1418
- if (p.push(`--vf-${w}: ${s}`), v.includes("colors")) {
1456
+ const p = v.includes("colorScheme") && v.includes("dark") ? r : e, C = to(v);
1457
+ if (p.push(`--vf-${C}: ${s}`), v.includes("colors")) {
1419
1458
  const b = Fe(s);
1420
1459
  if (!b) {
1421
- d(
1422
- `Theme color "${Ce(v)}" is not hex. Shade variables will not be generated for it.`
1460
+ c(
1461
+ `Theme color "${we(v)}" is not hex. Shade variables will not be generated for it.`
1423
1462
  );
1424
1463
  continue;
1425
1464
  }
1426
- if (p.push(`--vf-${w}-rgb: ${Te(b)}`), a !== "white")
1465
+ if (p.push(`--vf-${C}-rgb: ${Te(b)}`), a !== "white")
1427
1466
  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)}`);
1467
+ const V = so(b, x);
1468
+ p.push(`--vf-${C}-${x}00: ${V}`), p.push(`--vf-${C}-${x}00-rgb: ${Te(V)}`);
1430
1469
  }
1431
1470
  }
1432
1471
  }
1433
1472
  };
1434
- return c(t, []), { baseVars: e, darkVars: r, warnings: o, errors: l };
1435
- }, co = (t) => {
1473
+ return u(t, []), { baseVars: e, darkVars: r, warnings: o, errors: l };
1474
+ }, uo = (t) => {
1436
1475
  if (typeof document > "u")
1437
1476
  return null;
1438
1477
  const e = document.getElementById(t);
@@ -1440,34 +1479,34 @@ const ht = (t, e) => t.strategy ? t.strategy : gt(e) ? "fixed" : "absolute", Q =
1440
1479
  return e;
1441
1480
  const r = document.createElement("style");
1442
1481
  return r.id = t, document.head.appendChild(r), r;
1443
- }, uo = (t) => ({
1482
+ }, fo = (t) => ({
1444
1483
  selector: t.selector ?? ":root",
1445
1484
  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");
1485
+ }), vo = (t, e, r, o) => {
1486
+ const { baseVars: l, darkVars: c, warnings: i, errors: u } = co(t), n = uo("vueforge-theme");
1448
1487
  if (!n)
1449
1488
  return;
1450
- if (c.length) {
1489
+ if (u.length) {
1451
1490
  if (o)
1452
- throw new Error(`[VueForge] ${c.join(" ")}`);
1453
- for (const a of c)
1491
+ throw new Error(`[VueForge] ${u.join(" ")}`);
1492
+ for (const a of u)
1454
1493
  console.warn(`[VueForge] ${a}`);
1455
1494
  }
1456
1495
  if (i.length)
1457
1496
  for (const a of i)
1458
1497
  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(`
1498
+ const d = [];
1499
+ l.length && d.push(`${e} { ${l.join(";")} }`), c.length && d.push(`${r} { ${c.join(";")} }`), n.textContent = d.join(`
1461
1500
  `);
1462
1501
  };
1463
1502
  let J = null;
1464
1503
  const je = (t) => {
1465
- const e = so(t);
1504
+ const e = io(t);
1466
1505
  if (!e)
1467
1506
  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) => {
1507
+ const r = Be(e.preset, e.overrides), { selector: o, darkSelector: l } = fo(e);
1508
+ J = { ...e }, vo(r, o, l, e.strict);
1509
+ }, Po = (t) => {
1471
1510
  if (!J)
1472
1511
  return;
1473
1512
  const e = t.overrides === void 0 ? J.overrides : Be(J.overrides ?? {}, t.overrides ?? {}), r = {
@@ -1477,7 +1516,7 @@ const je = (t) => {
1477
1516
  darkSelector: t.darkSelector ?? J.darkSelector
1478
1517
  };
1479
1518
  je(r);
1480
- }, Mo = () => J ? { ...J } : null, Po = {
1519
+ }, Ao = () => J ? { ...J } : null, Do = {
1481
1520
  install(t, e = {}) {
1482
1521
  e.theme && je(e.theme);
1483
1522
  }
@@ -1496,7 +1535,8 @@ const je = (t) => {
1496
1535
  controls: {
1497
1536
  height: "2rem",
1498
1537
  paddingY: "0.25rem",
1499
- paddingX: "0.6rem"
1538
+ paddingX: "0.6rem",
1539
+ backgroundColor: "var(--vf-bg-soft-color)"
1500
1540
  },
1501
1541
  radii: {
1502
1542
  sm: "4px",
@@ -1543,7 +1583,7 @@ const je = (t) => {
1543
1583
  dividerColor: "#2e2e32"
1544
1584
  }
1545
1585
  }
1546
- }, vo = {
1586
+ }, po = {
1547
1587
  fontSize: "var(--vf-typography-font-size)",
1548
1588
  padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
1549
1589
  borderRadius: "var(--vf-radii-md)",
@@ -1685,17 +1725,17 @@ const je = (t) => {
1685
1725
  }
1686
1726
  }
1687
1727
  }
1688
- }, po = {
1728
+ }, go = {
1689
1729
  padding: "12px",
1690
1730
  borderColor: "var(--vf-border-color)",
1691
1731
  borderRadius: "var(--vf-radii-md)"
1692
- }, go = {}, ho = {
1732
+ }, ho = {
1693
1733
  gap: "0.5rem",
1694
1734
  fontSize: "var(--vf-typography-font-size)",
1695
1735
  padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
1696
1736
  borderRadius: "var(--vf-radii-md)",
1697
1737
  borderColor: "var(--vf-border-color)",
1698
- backgroundColor: "var(--vf-bg-color)",
1738
+ backgroundColor: "var(--vf-controls-background-color)",
1699
1739
  textColor: "var(--vf-text-color)",
1700
1740
  placeholderColor: "var(--vf-secondary-text-color)",
1701
1741
  focusBorderColor: "var(--vf-blue-600)",
@@ -1711,9 +1751,32 @@ const je = (t) => {
1711
1751
  fontSize: "var(--vf-sizes-lg-font-size)"
1712
1752
  }
1713
1753
  }, mo = {
1754
+ gap: "0.5rem",
1755
+ fontSize: "var(--vf-typography-font-size)",
1756
+ padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
1757
+ borderRadius: "var(--vf-radii-md)",
1758
+ borderColor: "var(--vf-border-color)",
1759
+ backgroundColor: "var(--vf-controls-background-color)",
1760
+ textColor: "var(--vf-text-color)",
1761
+ placeholderColor: "var(--vf-secondary-text-color)",
1762
+ focusBorderColor: "var(--vf-blue-600)",
1763
+ focusRingShadow: "var(--vf-states-focus-ring-shadow)",
1764
+ hoverBorderColor: "var(--vf-blue-500)",
1765
+ disabledOpacity: "var(--vf-states-disabled-opacity)",
1766
+ minHeight: "calc(var(--vf-controls-height) * 2)",
1767
+ resize: "vertical",
1768
+ small: {
1769
+ padding: "var(--vf-sizes-sm-padding-y) var(--vf-sizes-sm-padding-x)",
1770
+ fontSize: "var(--vf-sizes-sm-font-size)"
1771
+ },
1772
+ large: {
1773
+ padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
1774
+ fontSize: "var(--vf-sizes-lg-font-size)"
1775
+ }
1776
+ }, bo = {
1714
1777
  hoverColor: "var(--vf-blue)",
1715
1778
  activeColor: "var(--vf-blue)"
1716
- }, bo = {
1779
+ }, yo = {
1717
1780
  iconGap: "6px",
1718
1781
  submenuOffset: "12px",
1719
1782
  separatorThickness: "1px",
@@ -1733,7 +1796,7 @@ const je = (t) => {
1733
1796
  marginBottom: "0.5rem",
1734
1797
  marginLeft: "0.5rem"
1735
1798
  }
1736
- }, yo = {
1799
+ }, ko = {
1737
1800
  width: "90vw",
1738
1801
  maxWidth: "520px",
1739
1802
  maxHeight: "80vh",
@@ -1760,7 +1823,7 @@ const je = (t) => {
1760
1823
  closeColor: "var(--vf-text-color)",
1761
1824
  closeFontSize: "1.25rem",
1762
1825
  closeHoverBackgroundColor: "rgba(0, 0, 0, 0.06)"
1763
- }, ko = {
1826
+ }, Co = {
1764
1827
  backgroundColor: "var(--vf-bg-color)"
1765
1828
  }, wo = {
1766
1829
  minWidth: "12rem",
@@ -1770,7 +1833,7 @@ const je = (t) => {
1770
1833
  padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
1771
1834
  borderRadius: "var(--vf-radii-md)",
1772
1835
  borderColor: "var(--vf-border-color)",
1773
- backgroundColor: "var(--vf-bg-color)",
1836
+ backgroundColor: "var(--vf-controls-background-color)",
1774
1837
  textColor: "var(--vf-text-color)",
1775
1838
  focusBorderColor: "var(--vf-blue-600)",
1776
1839
  hoverBorderColor: "var(--vf-blue-500)",
@@ -1795,19 +1858,19 @@ const je = (t) => {
1795
1858
  padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
1796
1859
  fontSize: "var(--vf-sizes-lg-font-size)"
1797
1860
  }
1798
- }, Co = {
1861
+ }, _o = {
1799
1862
  size: "1rem",
1800
1863
  gap: "0.5rem",
1801
1864
  borderRadius: "var(--vf-radii-sm)",
1802
1865
  checkBorderRadius: "2px",
1803
1866
  borderColor: "var(--vf-border-color)",
1804
- backgroundColor: "var(--vf-bg-color)",
1867
+ backgroundColor: "var(--vf-controls-background-color)",
1805
1868
  checkedBackgroundColor: "var(--vf-blue)",
1806
1869
  checkedBorderColor: "var(--vf-blue)",
1807
1870
  checkColor: "#ffffff",
1808
1871
  textColor: "var(--vf-text-color)",
1809
1872
  disabledOpacity: "var(--vf-states-disabled-opacity)"
1810
- }, _o = {
1873
+ }, $o = {
1811
1874
  width: "2.25rem",
1812
1875
  height: "1.25rem",
1813
1876
  thumbSize: "1rem",
@@ -1819,7 +1882,7 @@ const je = (t) => {
1819
1882
  thumbColor: "#ffffff",
1820
1883
  textColor: "var(--vf-text-color)",
1821
1884
  disabledOpacity: "var(--vf-states-disabled-opacity)"
1822
- }, $o = {
1885
+ }, xo = {
1823
1886
  padding: "0.35rem 0.6rem",
1824
1887
  borderRadius: "8px",
1825
1888
  backgroundColor: "rgba(0, 0, 0, 0.8)",
@@ -1830,39 +1893,40 @@ const je = (t) => {
1830
1893
  zIndex: "120",
1831
1894
  maxWidth: "240px",
1832
1895
  arrowSize: "8px"
1833
- }, Ao = {
1896
+ }, Io = {
1834
1897
  ...Re,
1835
1898
  components: {
1836
1899
  base: Re,
1837
- button: vo,
1838
- card: po,
1839
- codeBlock: go,
1900
+ button: po,
1901
+ card: go,
1840
1902
  input: ho,
1841
- link: mo,
1842
- menu: bo,
1843
- modal: yo,
1844
- popover: ko,
1903
+ textarea: mo,
1904
+ link: bo,
1905
+ menu: yo,
1906
+ modal: ko,
1907
+ popover: Co,
1845
1908
  select: wo,
1846
- checkbox: Co,
1847
- switch: _o,
1848
- tooltip: $o
1909
+ checkbox: _o,
1910
+ switch: $o,
1911
+ tooltip: xo
1849
1912
  }
1850
1913
  };
1851
1914
  export {
1852
- So as Button,
1915
+ To as Button,
1853
1916
  st as Card,
1854
- Lo as Checkbox,
1855
- Ao as DefaultTheme,
1856
- To as Input,
1917
+ Wo as Checkbox,
1918
+ Io as DefaultTheme,
1919
+ Ro as Input,
1857
1920
  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,
1921
+ So as Menu,
1922
+ Eo as Modal,
1923
+ Ho as Popover,
1924
+ Vo as Select,
1925
+ Oo as Switch,
1926
+ Lo as Textarea,
1927
+ Mo as Tooltip,
1928
+ Do as VueForge,
1929
+ Ao as getTheme,
1866
1930
  je as setTheme,
1867
- Eo as updateTheme
1931
+ Po as updateTheme
1868
1932
  };