@volverjs/ui-vue 0.0.14 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/dist/Volver.d.ts +5 -5
  2. package/dist/components/VvAction/VvAction.es.js +26 -26
  3. package/dist/components/VvAction/VvAction.umd.js +1 -1
  4. package/dist/components/VvAction/index.d.ts +1 -44
  5. package/dist/components/VvAlert/VvAlert.es.js +43 -44
  6. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  7. package/dist/components/VvAlert/VvAlert.vue.d.ts +1 -1
  8. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +54 -55
  9. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  10. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +34 -34
  11. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  12. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +1 -1
  13. package/dist/components/VvButton/VvButton.es.js +186 -187
  14. package/dist/components/VvButton/VvButton.umd.js +1 -1
  15. package/dist/components/VvCheckbox/VvCheckbox.es.js +215 -217
  16. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  17. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +235 -237
  18. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  19. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +2 -2
  20. package/dist/components/VvCheckboxGroup/index.d.ts +1 -78
  21. package/dist/components/VvCombobox/VvCombobox.es.js +810 -813
  22. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  23. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +1 -1
  24. package/dist/components/VvCombobox/index.d.ts +2 -2
  25. package/dist/components/VvDropdown/VvDropdown.es.js +4 -4
  26. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  27. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +50 -50
  28. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  29. package/dist/components/VvIcon/VvIcon.es.js +30 -31
  30. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  31. package/dist/components/VvInputFile/VvInputFile.es.js +415 -418
  32. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
  33. package/dist/components/VvInputText/VvInputText.es.js +595 -588
  34. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  35. package/dist/components/VvInputText/VvInputText.vue.d.ts +6 -6
  36. package/dist/components/VvInputText/index.d.ts +3 -3
  37. package/dist/components/VvNav/VvNav.es.js +63 -63
  38. package/dist/components/VvNav/VvNav.umd.js +1 -1
  39. package/dist/components/VvNavItem/VvNavItem.es.js +41 -41
  40. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
  41. package/dist/components/VvRadio/VvRadio.es.js +222 -224
  42. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  43. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +234 -236
  44. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  45. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +2 -2
  46. package/dist/components/VvRadioGroup/index.d.ts +1 -78
  47. package/dist/components/VvSelect/VvSelect.es.js +200 -203
  48. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  49. package/dist/components/VvSelect/VvSelect.vue.d.ts +1 -1
  50. package/dist/components/VvSelect/index.d.ts +2 -2
  51. package/dist/components/VvTab/VvTab.es.js +35 -35
  52. package/dist/components/VvTab/VvTab.umd.js +1 -1
  53. package/dist/components/VvTextarea/VvTextarea.es.js +341 -344
  54. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  55. package/dist/components/index.es.js +1965 -1958
  56. package/dist/components/index.umd.js +1 -1
  57. package/dist/composables/index.es.js +34 -34
  58. package/dist/composables/index.umd.js +2 -2
  59. package/dist/composables/useModifiers.d.ts +1 -1
  60. package/dist/constants.d.ts +2 -2
  61. package/dist/directives/index.es.js +22 -22
  62. package/dist/directives/index.umd.js +1 -1
  63. package/dist/directives/v-contextmenu.es.js +13 -13
  64. package/dist/directives/v-contextmenu.umd.js +1 -1
  65. package/dist/index.d.ts +2 -2
  66. package/dist/index.es.js +19 -19
  67. package/dist/index.umd.js +1 -1
  68. package/dist/json-render/index.es.js +1877 -1870
  69. package/dist/json-render/index.umd.js +1 -1
  70. package/dist/props/index.d.ts +1 -1
  71. package/dist/resolvers/unplugin.es.js +28 -28
  72. package/dist/resolvers/unplugin.umd.js +1 -1
  73. package/dist/types/alert.d.ts +1 -1
  74. package/dist/types/nav.d.ts +1 -1
  75. package/dist/utils/ObjectUtilities.d.ts +0 -6
  76. package/package.json +1 -1
  77. package/src/Volver.ts +8 -6
  78. package/src/components/VvAction/index.ts +1 -3
  79. package/src/components/VvButton/VvButton.vue +1 -1
  80. package/src/components/VvCheckboxGroup/index.ts +1 -3
  81. package/src/components/VvCombobox/VvCombobox.vue +3 -3
  82. package/src/components/VvDropdown/VvDropdown.vue +8 -8
  83. package/src/components/VvIcon/VvIcon.vue +3 -6
  84. package/src/components/VvInputFile/VvInputFile.vue +6 -6
  85. package/src/components/VvInputText/VvInputText.vue +95 -78
  86. package/src/components/VvRadioGroup/index.ts +1 -3
  87. package/src/composables/useBlurhash.ts +1 -1
  88. package/src/composables/useDebouncedInput.ts +1 -1
  89. package/src/composables/useDefaults.ts +55 -44
  90. package/src/composables/useModifiers.ts +1 -1
  91. package/src/index.ts +2 -2
  92. package/src/resolvers/unplugin.ts +6 -6
  93. package/src/types/alert.ts +1 -1
  94. package/src/types/nav.ts +1 -1
  95. package/src/utils/DateUtilities.ts +3 -3
  96. package/src/utils/DomUtilities.ts +7 -1
  97. package/src/utils/ObjectUtilities.ts +60 -59
@@ -1,8 +1,8 @@
1
- import { Fragment as Ne, Transition as yt, computed as n, createBlock as K, createCommentVNode as C, createElementBlock as B, createElementVNode as z, createSlots as St, createTextVNode as Be, createVNode as ce, defineComponent as M, guardReactiveProps as $, h as Z, inject as ot, isRef as ke, mergeDefaults as wt, mergeProps as k, nextTick as ue, normalizeClass as Ae, normalizeProps as E, normalizeStyle as We, onMounted as rt, openBlock as w, provide as Fe, ref as _, renderList as _t, renderSlot as L, toDisplayString as fe, toHandlers as Lt, toRefs as ee, unref as l, useAttrs as xt, useId as $t, useSlots as Et, vModelText as Ot, vShow as Pt, watch as A, withCtx as N, withDirectives as lt, withModifiers as qe } from "vue";
2
- import { arrow as It, autoPlacement as Je, autoUpdate as Vt, flip as Ke, offset as Ue, shift as Ye, size as Ge, useFloating as Ct } from "@floating-ui/vue";
3
- import { onClickOutside as Bt, onKeyStroke as de, useElementHover as nt, useElementVisibility as Dt, useFocus as it, useFocusWithin as st, useMutationObserver as Nt, useStorage as Qe, useVModel as kt } from "@vueuse/core";
1
+ import { Fragment as De, Transition as yt, computed as i, createBlock as K, createCommentVNode as V, createElementBlock as k, createElementVNode as z, createSlots as St, createTextVNode as ke, createVNode as ce, defineComponent as M, guardReactiveProps as $, h as Z, inject as ot, isRef as Ne, mergeDefaults as wt, mergeProps as N, nextTick as ue, normalizeClass as Ae, normalizeProps as E, normalizeStyle as We, onMounted as lt, openBlock as S, provide as Fe, ref as w, renderList as _t, renderSlot as _, toDisplayString as fe, toHandlers as Lt, toRefs as ee, unref as n, useAttrs as xt, useId as $t, useSlots as Et, vModelText as Ot, vShow as Pt, watch as A, withCtx as D, withDirectives as rt, withModifiers as qe } from "vue";
2
+ import { arrow as It, autoPlacement as Je, autoUpdate as Ct, flip as Ke, offset as Ue, shift as Ye, size as Ge, useFloating as Vt } from "@floating-ui/vue";
3
+ import { onClickOutside as kt, onKeyStroke as de, useElementHover as nt, useElementVisibility as Bt, useFocus as it, useFocusWithin as st, useMutationObserver as Dt, useStorage as Qe, useVModel as Nt } from "@vueuse/core";
4
4
  import At from "mitt";
5
- import { Icon as Ft, addIcon as jt, iconLoaded as Ve } from "@iconify/vue";
5
+ import { Icon as Ft, addIcon as jt, iconLoaded as Ce } from "@iconify/vue";
6
6
  var ut = {
7
7
  showPassword: "eye-on",
8
8
  hidePassword: "eye-off",
@@ -14,13 +14,13 @@ var ut = {
14
14
  remove: "trash",
15
15
  edit: "edit",
16
16
  download: "download"
17
- }, Ht = { prefix: "normal" }, U = /* @__PURE__ */ (function(e) {
17
+ }, Tt = { prefix: "normal" }, U = /* @__PURE__ */ (function(e) {
18
18
  return e.local = "local", e.session = "session", e;
19
19
  })({}), dt = /* @__PURE__ */ (function(e) {
20
20
  return e.absolute = "absolute", e.fixed = "fixed", e;
21
21
  })({}), x = /* @__PURE__ */ (function(e) {
22
22
  return e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e;
23
- })({}), Tt = /* @__PURE__ */ (function(e) {
23
+ })({}), Ht = /* @__PURE__ */ (function(e) {
24
24
  return e.topStart = "top-start", e.topEnd = "top-end", e.bottomStart = "bottom-start", e.bottomEnd = "bottom-end", e.leftStart = "left-start", e.leftEnd = "left-end", e.rightStart = "right-start", e.rightEnd = "right-end", e;
25
25
  })({}), pe = /* @__PURE__ */ (function(e) {
26
26
  return e.before = "before", e.after = "after", e;
@@ -30,7 +30,7 @@ var ut = {
30
30
  return e.nuxtLink = "nuxt-link", e.routerLink = "router-link", e.a = "a", e.button = "button", e;
31
31
  })({}), zt = /* @__PURE__ */ (function(e) {
32
32
  return e.button = "button", e.link = "link", e.menuitem = "menuitem", e;
33
- })({}), De = /* @__PURE__ */ (function(e) {
33
+ })({}), Be = /* @__PURE__ */ (function(e) {
34
34
  return e.listbox = "listbox", e.menu = "menu", e;
35
35
  })({}), Ze = /* @__PURE__ */ (function(e) {
36
36
  return e.option = "option", e.presentation = "presentation", e;
@@ -51,7 +51,7 @@ var ut = {
51
51
  type: [String, Array],
52
52
  default: void 0
53
53
  }
54
- }, He = {
54
+ }, Te = {
55
55
  invalid: {
56
56
  type: Boolean,
57
57
  default: !1
@@ -60,7 +60,7 @@ var ut = {
60
60
  type: [String, Array],
61
61
  default: void 0
62
62
  }
63
- }, Te = {
63
+ }, He = {
64
64
  loading: {
65
65
  type: Boolean,
66
66
  default: !1
@@ -84,7 +84,7 @@ var ut = {
84
84
  } }, Yt = { current: {
85
85
  type: Boolean,
86
86
  default: !1
87
- } }, Za = {
87
+ } }, eo = {
88
88
  showClearAction: {
89
89
  type: Boolean,
90
90
  default: !1
@@ -164,7 +164,7 @@ var ut = {
164
164
  placement: {
165
165
  type: String,
166
166
  default: x.bottom,
167
- validator: (e) => Object.values(x).includes(e) || Object.values(Tt).includes(e)
167
+ validator: (e) => Object.values(x).includes(e) || Object.values(Ht).includes(e)
168
168
  },
169
169
  strategy: {
170
170
  type: String,
@@ -221,23 +221,23 @@ var ut = {
221
221
  type: String,
222
222
  required: !0
223
223
  }
224
- }, ra = { autofocus: {
224
+ }, la = { autofocus: {
225
225
  type: Boolean,
226
226
  default: !1
227
- } }, la = { autocomplete: {
227
+ } }, ra = { autocomplete: {
228
228
  type: String,
229
229
  default: "off"
230
230
  } }, na = {
231
231
  ...mt,
232
- ...ra,
233
232
  ...la,
233
+ ...ra,
234
234
  ...ct,
235
235
  ...te,
236
236
  ...Re,
237
237
  ...je,
238
- ...He,
239
- ...ze,
240
238
  ...Te,
239
+ ...ze,
240
+ ...He,
241
241
  ...ae,
242
242
  ...Xt,
243
243
  ...Zt,
@@ -257,17 +257,17 @@ var ut = {
257
257
  default: void 0
258
258
  },
259
259
  ...ft
260
- }, eo = {
260
+ }, to = {
261
261
  ...mt,
262
262
  ...ct,
263
263
  ...je,
264
- ...He,
264
+ ...Te,
265
265
  ...ze,
266
266
  ...te,
267
267
  ...Re,
268
268
  ...ae,
269
269
  ...me,
270
- ...Te,
270
+ ...He,
271
271
  value: {
272
272
  type: [
273
273
  String,
@@ -285,16 +285,16 @@ var ut = {
285
285
  ],
286
286
  default: void 0
287
287
  }
288
- }, to = {
288
+ }, ao = {
289
289
  ...je,
290
- ...He,
290
+ ...Te,
291
291
  ...Qt,
292
292
  ...ze,
293
293
  ...te,
294
294
  ...Re,
295
295
  ...ae,
296
296
  ...me,
297
- ...Te,
297
+ ...He,
298
298
  ...ft,
299
299
  modelValue: {
300
300
  type: [
@@ -314,7 +314,7 @@ var ut = {
314
314
  type: Boolean,
315
315
  default: !1
316
316
  }
317
- }, ao = {
317
+ }, oo = {
318
318
  ...te,
319
319
  ...me,
320
320
  ...Gt,
@@ -394,7 +394,7 @@ var ut = {
394
394
  resizable: Boolean
395
395
  };
396
396
  function ve(e) {
397
- return ((a) => a == null || a === "" || Array.isArray(a) && a.length === 0 || !(a instanceof Date) && typeof a == "object" && Object.keys(a).length === 0)(l(e));
397
+ return ((a) => a == null || a === "" || Array.isArray(a) && a.length === 0 || !(a instanceof Date) && typeof a == "object" && Object.keys(a).length === 0)(n(e));
398
398
  }
399
399
  function va(e) {
400
400
  return typeof e == "string";
@@ -403,13 +403,13 @@ function tt(e) {
403
403
  return Array.isArray(e) ? e.filter((a) => va(a)).join(" ") : e;
404
404
  }
405
405
  function fa(e, a) {
406
- const t = n(() => ke(e) ? e.value : e), o = n(() => tt(t.value.invalidLabel)), i = n(() => tt(t.value.validLabel)), s = n(() => t.value.loadingLabel), d = n(() => t.value.hintLabel), f = n(() => !!(t.value.loading && (a.loading || s.value))), m = n(() => !f.value && !!(t.value.invalid && (a.invalid || o.value))), v = n(() => !f.value && !m.value && !!(t.value.valid && (a.valid || i.value))), y = n(() => !f.value && !m.value && !v.value && !!(a.hint || d.value)), u = n(() => m.value || v.value || f.value || y.value);
406
+ const t = i(() => Ne(e) ? e.value : e), o = i(() => tt(t.value.invalidLabel)), r = i(() => tt(t.value.validLabel)), s = i(() => t.value.loadingLabel), v = i(() => t.value.hintLabel), u = i(() => !!(t.value.loading && (a.loading || s.value))), b = i(() => !u.value && !!(t.value.invalid && (a.invalid || o.value))), h = i(() => !u.value && !b.value && !!(t.value.valid && (a.valid || r.value))), L = i(() => !u.value && !b.value && !h.value && !!(a.hint || v.value)), d = i(() => b.value || h.value || u.value || L.value);
407
407
  return {
408
- hasInvalidLabelOrSlot: m,
409
- hasHintLabelOrSlot: y,
410
- hasValidLabelOrSlot: v,
411
- hasLoadingLabelOrSlot: f,
412
- hintSlotScope: n(() => ({
408
+ hasInvalidLabelOrSlot: b,
409
+ hasHintLabelOrSlot: L,
410
+ hasValidLabelOrSlot: h,
411
+ hasLoadingLabelOrSlot: u,
412
+ hintSlotScope: i(() => ({
413
413
  modelValue: t.value.modelValue,
414
414
  valid: t.value.valid,
415
415
  invalid: t.value.invalid,
@@ -423,21 +423,21 @@ function fa(e, a) {
423
423
  } },
424
424
  setup() {
425
425
  return {
426
- isVisible: u,
426
+ isVisible: d,
427
427
  invalidLabel: o,
428
- validLabel: i,
428
+ validLabel: r,
429
429
  loadingLabel: s,
430
- hintLabel: d,
431
- hasInvalidLabelOrSlot: m,
432
- hasValidLabelOrSlot: v,
433
- hasLoadingLabelOrSlot: f,
434
- hasHintLabelOrSlot: y
430
+ hintLabel: v,
431
+ hasInvalidLabelOrSlot: b,
432
+ hasValidLabelOrSlot: h,
433
+ hasLoadingLabelOrSlot: u,
434
+ hasHintLabelOrSlot: L
435
435
  };
436
436
  },
437
437
  render() {
438
438
  if (this.isVisible) {
439
- let g;
440
- return this.hasInvalidLabelOrSlot && (g = "alert"), this.hasValidLabelOrSlot && (g = "status"), this.hasLoadingLabelOrSlot ? Z(this.tag, { role: g }, this.$slots.loading?.() ?? this.loadingLabel) : this.hasInvalidLabelOrSlot ? Z(this.tag, { role: g }, this.$slots.invalid?.() ?? this.$slots.invalid ?? this.invalidLabel) : this.hasValidLabelOrSlot ? Z(this.tag, { role: g }, this.$slots.valid?.() ?? this.validLabel) : Z(this.tag, { role: g }, this.$slots.hint?.() ?? this.$slots.hint ?? this.hintLabel);
439
+ let m;
440
+ return this.hasInvalidLabelOrSlot && (m = "alert"), this.hasValidLabelOrSlot && (m = "status"), this.hasLoadingLabelOrSlot ? Z(this.tag, { role: m }, this.$slots.loading?.() ?? this.loadingLabel) : this.hasInvalidLabelOrSlot ? Z(this.tag, { role: m }, this.$slots.invalid?.() ?? this.$slots.invalid ?? this.invalidLabel) : this.hasValidLabelOrSlot ? Z(this.tag, { role: m }, this.$slots.valid?.() ?? this.validLabel) : Z(this.tag, { role: m }, this.$slots.hint?.() ?? this.$slots.hint ?? this.hintLabel);
441
441
  }
442
442
  return null;
443
443
  }
@@ -458,8 +458,8 @@ var ca = {
458
458
  },
459
459
  role: {
460
460
  type: String,
461
- default: De.menu,
462
- validator: (e) => Object.values(De).includes(e)
461
+ default: Be.menu,
462
+ validator: (e) => Object.values(Be).includes(e)
463
463
  }
464
464
  }, pa = { focusOnHover: {
465
465
  type: Boolean,
@@ -478,12 +478,12 @@ var ca = {
478
478
  }
479
479
  };
480
480
  function gt(e) {
481
- return n(() => String(e?.value || $t()));
481
+ return i(() => String(e?.value || $t()));
482
482
  }
483
483
  function ga({ reference: e, id: a, expanded: t, aria: o }) {
484
- const i = At();
484
+ const r = At();
485
485
  return {
486
- bus: i,
486
+ bus: r,
487
487
  component: M({
488
488
  name: "VvDropdownTriggerProvider",
489
489
  setup() {
@@ -492,17 +492,17 @@ function ga({ reference: e, id: a, expanded: t, aria: o }) {
492
492
  id: a,
493
493
  expanded: t,
494
494
  aria: o,
495
- bus: i
495
+ bus: r
496
496
  });
497
497
  },
498
498
  render() {
499
- return Z(Ne, {}, this.$slots.default?.());
499
+ return Z(De, {}, this.$slots.default?.());
500
500
  }
501
501
  })
502
502
  };
503
503
  }
504
504
  function ba({ role: e, ...a }) {
505
- const t = n(() => e.value === De.listbox ? Ze.option : Ze.presentation);
505
+ const t = i(() => e.value === Be.listbox ? Ze.option : Ze.presentation);
506
506
  return Fe(vt, {
507
507
  role: t,
508
508
  ...a
@@ -510,17 +510,17 @@ function ba({ role: e, ...a }) {
510
510
  }
511
511
  function ha({ expanded: e }) {
512
512
  Fe(qt, {
513
- role: _(zt.menuitem),
513
+ role: w(zt.menuitem),
514
514
  expanded: e
515
515
  });
516
516
  }
517
517
  function ge(e, a, t) {
518
- return n(() => {
519
- const o = { [e]: !0 }, i = typeof a?.value == "string" ? a.value.split(" ") : a?.value;
520
- return i && Array.isArray(i) && i.forEach((s) => {
518
+ return i(() => {
519
+ const o = { [e]: !0 }, r = typeof a?.value == "string" ? a.value.split(" ") : a?.value;
520
+ return r && Array.isArray(r) && r.forEach((s) => {
521
521
  s && (o[`${e}--${s}`] = !0);
522
522
  }), t && Object.keys(t.value).forEach((s) => {
523
- o[`${e}--${s}`] = l(t.value[s]);
523
+ o[`${e}--${s}`] = n(t.value[s]);
524
524
  }), o;
525
525
  });
526
526
  }
@@ -553,145 +553,145 @@ var ya = [
553
553
  "leaveCancelled"
554
554
  ],
555
555
  setup(e, { expose: a, emit: t }) {
556
- const o = e, i = t, { id: s } = ee(o), d = gt(s), f = xt(), m = _("auto"), v = _("auto"), y = _(), u = _(), g = _(), P = _(), O = n({
557
- get: () => o.reference ?? y.value,
558
- set: (r) => {
559
- y.value = r;
556
+ const o = e, r = t, { id: s } = ee(o), v = gt(s), u = xt(), b = w("auto"), h = w("auto"), L = w(), d = w(), m = w(), P = w(), O = i({
557
+ get: () => o.reference ?? L.value,
558
+ set: (l) => {
559
+ L.value = l;
560
560
  }
561
- }), F = _(!1);
562
- rt(() => {
563
- Nt(u.value, () => {
564
- F.value = window.getComputedStyle(u.value).getPropertyValue("--dropdown-custom-position")?.trim() === "true";
561
+ }), F = w(!1);
562
+ lt(() => {
563
+ Dt(d.value, () => {
564
+ F.value = globalThis.getComputedStyle(d.value).getPropertyValue("--dropdown-custom-position")?.trim() === "true";
565
565
  }, {
566
566
  attributeFilter: ["style"],
567
- window
567
+ window: globalThis.window
568
568
  });
569
569
  });
570
- function j(r, p, T) {
571
- return typeof r == "boolean" ? p() : T(r);
570
+ function j(l, c, H) {
571
+ return typeof l == "boolean" ? c() : H(l);
572
572
  }
573
- const oe = n(() => {
574
- const r = [];
575
- if (o.autoPlacement ? r.push(j(o.autoPlacement, () => Je(), (p) => Je(p))) : o.flip && r.push(j(o.flip, () => Ke({ fallbackStrategy: "initialPlacement" }), (p) => Ke(p))), o.shift && r.push(j(o.shift, () => Ye(), (p) => Ye(p))), o.size) {
576
- const p = ({ availableWidth: T, availableHeight: X }) => {
577
- m.value = `${T}px`, v.value = `${X}px`;
573
+ const oe = i(() => {
574
+ const l = [];
575
+ if (o.autoPlacement ? l.push(j(o.autoPlacement, () => Je(), (c) => Je(c))) : o.flip && l.push(j(o.flip, () => Ke({ fallbackStrategy: "initialPlacement" }), (c) => Ke(c))), o.shift && l.push(j(o.shift, () => Ye(), (c) => Ye(c))), o.size) {
576
+ const c = ({ availableWidth: H, availableHeight: X }) => {
577
+ b.value = `${H}px`, h.value = `${X}px`;
578
578
  };
579
- r.push(j(o.size, () => Ge({ apply: p }), (T) => Ge({
580
- ...T,
581
- apply: p
579
+ l.push(j(o.size, () => Ge({ apply: c }), (H) => Ge({
580
+ ...H,
581
+ apply: c
582
582
  })));
583
583
  }
584
- return o.offset && r.push(["string", "number"].includes(typeof o.offset) ? Ue(Number(o.offset)) : Ue(o.offset)), o.arrow && r.push(It({ element: g })), r;
585
- }), { x: be, y: he, middlewareData: W, placement: ye, strategy: Se } = Ct(O, u, {
586
- whileElementsMounted: (...r) => Vt(...r, { animationFrame: o.strategy === dt.fixed }),
587
- placement: n(() => o.placement),
588
- strategy: n(() => o.strategy),
584
+ return o.offset && l.push(["string", "number"].includes(typeof o.offset) ? Ue(Number(o.offset)) : Ue(o.offset)), o.arrow && l.push(It({ element: m })), l;
585
+ }), { x: be, y: he, middlewareData: W, placement: ye, strategy: Se } = Vt(O, d, {
586
+ whileElementsMounted: (...l) => Ct(...l, { animationFrame: o.strategy === dt.fixed }),
587
+ placement: i(() => o.placement),
588
+ strategy: i(() => o.strategy),
589
589
  middleware: oe
590
- }), we = n(() => {
590
+ }), we = i(() => {
591
591
  if (F.value) return;
592
- const r = o.triggerWidth && O.value ? `${O.value?.offsetWidth}px` : void 0;
592
+ const l = o.triggerWidth && O.value ? `${O.value?.offsetWidth}px` : void 0;
593
593
  return {
594
594
  position: Se.value,
595
595
  top: `${he.value ?? 0}px`,
596
596
  left: `${be.value ?? 0}px`,
597
- maxWidth: r ? void 0 : m.value,
598
- maxHeight: v.value,
599
- width: r
597
+ maxWidth: l ? void 0 : b.value,
598
+ maxHeight: h.value,
599
+ width: l
600
600
  };
601
- }), _e = n(() => ye.value.split("-")[0]), Le = n(() => {
601
+ }), _e = i(() => ye.value.split("-")[0]), Le = i(() => {
602
602
  if (F.value) return;
603
- const r = {
603
+ const l = {
604
604
  [x.top]: x.bottom,
605
605
  [x.right]: x.left,
606
606
  [x.bottom]: x.top,
607
607
  [x.left]: x.right
608
608
  }[_e.value];
609
609
  return {
610
- left: W.value.arrow?.x !== void 0 ? `${W.value.arrow?.x}px` : void 0,
611
- top: W.value.arrow?.y !== void 0 ? `${W.value.arrow?.y}px` : void 0,
612
- [r]: `${-(g.value?.offsetWidth ?? 0) / 2}px`
610
+ left: W.value.arrow?.x === void 0 ? void 0 : `${W.value.arrow?.x}px`,
611
+ top: W.value.arrow?.y === void 0 ? void 0 : `${W.value.arrow?.y}px`,
612
+ [l]: `${-(m.value?.offsetWidth ?? 0) / 2}px`
613
613
  };
614
- }), H = kt(o, "modelValue", i), q = _(!1), b = n({
615
- get: () => H.value ?? q.value,
616
- set: (r) => {
617
- if (H.value === void 0) {
618
- q.value = r;
614
+ }), T = Nt(o, "modelValue", r), q = w(!1), p = i({
615
+ get: () => T.value ?? q.value,
616
+ set: (l) => {
617
+ if (T.value === void 0) {
618
+ q.value = l;
619
619
  return;
620
620
  }
621
- H.value = r;
621
+ T.value = l;
622
622
  }
623
623
  });
624
- function S() {
625
- b.value = !0;
624
+ function y() {
625
+ p.value = !0;
626
626
  }
627
627
  function I() {
628
- b.value = !1;
628
+ p.value = !1;
629
629
  }
630
- function V() {
631
- b.value = !b.value;
630
+ function C() {
631
+ p.value = !p.value;
632
632
  }
633
- function Y(r) {
634
- O.value = r;
633
+ function Y(l) {
634
+ O.value = l;
635
635
  }
636
- Bt(u, () => {
637
- !o.keepOpen && b.value && (b.value = !1);
636
+ kt(d, () => {
637
+ !o.keepOpen && p.value && (p.value = !1);
638
638
  }, { ignore: [O] });
639
- const G = n(() => O.value?.getAttribute?.("id") ?? void 0), re = n(() => ({
640
- "aria-controls": d.value,
639
+ const G = i(() => O.value?.getAttribute?.("id") ?? void 0), le = i(() => ({
640
+ "aria-controls": v.value,
641
641
  "aria-haspopup": !0,
642
- "aria-expanded": b.value
642
+ "aria-expanded": p.value
643
643
  })), { component: xe, bus: $e } = ga({
644
644
  reference: O,
645
- id: d,
646
- expanded: b,
647
- aria: re
645
+ id: v,
646
+ expanded: p,
647
+ aria: le
648
648
  });
649
- $e.on("click", V);
650
- const { role: Q, modifiers: Ee } = ee(o), le = ge("vv-dropdown", Ee, n(() => ({ arrow: o.arrow }))), { focused: h } = st(u);
651
- function J(r) {
652
- return r ? [...r.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter((p) => !p.hasAttribute("disabled") && !p.getAttribute("aria-hidden")) : [];
649
+ $e.on("click", C);
650
+ const { role: Q, modifiers: Ee } = ee(o), re = ge("vv-dropdown", Ee, i(() => ({ arrow: o.arrow }))), { focused: g } = st(d);
651
+ function J(l) {
652
+ return l ? [...l.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter((c) => !c.hasAttribute("disabled") && !c.getAttribute("aria-hidden")) : [];
653
653
  }
654
654
  function ne() {
655
655
  ue(() => {
656
- const r = J(u.value);
657
- r.length > 0 && r[0].focus({ preventScroll: !0 });
656
+ const l = J(d.value);
657
+ l.length > 0 && l[0].focus({ preventScroll: !0 });
658
658
  });
659
659
  }
660
660
  function Oe() {
661
661
  ue(() => {
662
- const r = J(P.value);
663
- r.length > 0 && r[0].focus({ preventScroll: !0 });
662
+ const l = J(P.value);
663
+ l.length > 0 && l[0].focus({ preventScroll: !0 });
664
664
  });
665
665
  }
666
666
  function ie() {
667
667
  ue(() => {
668
- if (h.value) {
669
- const r = J(u.value);
670
- if (r.length === 0 || !document.activeElement) return;
671
- const p = r.indexOf(document.activeElement);
672
- p < r.length - 1 ? r[p + 1].focus({ preventScroll: !0 }) : r[0].focus({ preventScroll: !0 });
668
+ if (g.value) {
669
+ const l = J(d.value);
670
+ if (l.length === 0 || !document.activeElement) return;
671
+ const c = l.indexOf(document.activeElement);
672
+ c < l.length - 1 ? l[c + 1].focus({ preventScroll: !0 }) : l[0].focus({ preventScroll: !0 });
673
673
  }
674
674
  });
675
675
  }
676
676
  function se() {
677
677
  ue(() => {
678
- if (h.value) {
679
- const r = J(u.value);
680
- if (r.length === 0 || !document.activeElement) return;
681
- const p = r.indexOf(document.activeElement);
682
- if (p > 0) {
683
- r[p - 1].focus({ preventScroll: !0 });
678
+ if (g.value) {
679
+ const l = J(d.value);
680
+ if (l.length === 0 || !document.activeElement) return;
681
+ const c = l.indexOf(document.activeElement);
682
+ if (c > 0) {
683
+ l[c - 1].focus({ preventScroll: !0 });
684
684
  return;
685
685
  }
686
- r.at(-1)?.focus({ preventScroll: !0 });
686
+ l.at(-1)?.focus({ preventScroll: !0 });
687
687
  }
688
688
  });
689
689
  }
690
- A(b, (r) => {
691
- r && o.autofocusFirst && ne();
690
+ A(p, (l) => {
691
+ l && o.autofocusFirst && ne();
692
692
  }), a({
693
- toggle: V,
694
- show: S,
693
+ toggle: C,
694
+ show: y,
695
695
  hide: I,
696
696
  init: Y,
697
697
  focusFirst: ne,
@@ -702,98 +702,98 @@ var ya = [
702
702
  });
703
703
  const { itemRole: Pe } = ba({
704
704
  role: Q,
705
- expanded: b,
706
- focused: h,
707
- hovered: nt(u)
705
+ expanded: p,
706
+ focused: g,
707
+ hovered: nt(d)
708
708
  });
709
- de("Escape", (r) => {
710
- b.value && (r.preventDefault(), I());
711
- }), de("ArrowDown", (r) => {
712
- b.value && h.value && (r.preventDefault(), ie());
713
- }), de("ArrowUp", (r) => {
714
- b.value && h.value && (r.preventDefault(), se());
715
- }), de([" ", "Enter"], (r) => {
716
- const p = r.target;
717
- b.value && h.value && p && p?.click();
709
+ de("Escape", (l) => {
710
+ p.value && (l.preventDefault(), I());
711
+ }), de("ArrowDown", (l) => {
712
+ p.value && g.value && (l.preventDefault(), ie());
713
+ }), de("ArrowUp", (l) => {
714
+ p.value && g.value && (l.preventDefault(), se());
715
+ }), de([" ", "Enter"], (l) => {
716
+ const c = l.target;
717
+ p.value && g.value && c && c?.click();
718
718
  });
719
719
  const Ie = {
720
720
  "before-enter": () => {
721
- i(b.value ? "beforeExpand" : "beforeCollapse"), i("beforeEnter");
721
+ r(p.value ? "beforeExpand" : "beforeCollapse"), r("beforeEnter");
722
722
  },
723
723
  "after-leave": () => {
724
- i(b.value ? "afterExpand" : "afterCollapse"), i("afterLeave");
724
+ r(p.value ? "afterExpand" : "afterCollapse"), r("afterLeave");
725
725
  },
726
726
  enter: () => {
727
- i("enter");
727
+ r("enter");
728
728
  },
729
729
  "after-enter": () => {
730
- i("afterEnter");
730
+ r("afterEnter");
731
731
  },
732
732
  "enter-cancelled": () => {
733
- i("enterCancelled");
733
+ r("enterCancelled");
734
734
  },
735
735
  "before-leave": () => {
736
- i("beforeLeave");
736
+ r("beforeLeave");
737
737
  },
738
738
  leave: () => {
739
- i("leave");
739
+ r("leave");
740
740
  },
741
741
  "leave-cancelled": () => {
742
- i("leaveCancelled");
742
+ r("leaveCancelled");
743
743
  }
744
744
  };
745
- return (r, p) => (w(), B(Ne, null, [ce(l(xe), null, {
746
- default: N(() => [L(r.$slots, "default", E($({
745
+ return (l, c) => (S(), k(De, null, [ce(n(xe), null, {
746
+ default: D(() => [_(l.$slots, "default", E($({
747
747
  init: Y,
748
- show: S,
748
+ show: y,
749
749
  hide: I,
750
- toggle: V,
751
- expanded: l(b),
752
- aria: l(re)
750
+ toggle: C,
751
+ expanded: n(p),
752
+ aria: n(le)
753
753
  })))]),
754
754
  _: 3
755
- }), ce(yt, k({ name: r.transitionName }, Lt(Ie), { persisted: "" }), {
756
- default: N(() => [lt(z("div", {
755
+ }), ce(yt, N({ name: l.transitionName }, Lt(Ie), { persisted: "" }), {
756
+ default: D(() => [rt(z("div", {
757
757
  ref_key: "floatingEl",
758
- ref: u,
759
- style: We(l(we)),
760
- class: Ae(l(le))
758
+ ref: d,
759
+ style: We(n(we)),
760
+ class: Ae(n(re))
761
761
  }, [
762
- o.arrow ? (w(), B("div", {
762
+ o.arrow ? (S(), k("div", {
763
763
  key: 0,
764
764
  ref_key: "arrowEl",
765
- ref: g,
766
- style: We(l(Le)),
765
+ ref: m,
766
+ style: We(n(Le)),
767
767
  class: "vv-dropdown__arrow"
768
- }, null, 4)) : C("v-if", !0),
769
- L(r.$slots, "before", E($({
770
- show: S,
768
+ }, null, 4)) : V("v-if", !0),
769
+ _(l.$slots, "before", E($({
770
+ show: y,
771
771
  hide: I,
772
- toggle: V,
773
- expanded: l(b)
772
+ toggle: C,
773
+ expanded: n(p)
774
774
  }))),
775
- z("div", k(l(f), {
776
- id: l(d),
775
+ z("div", N(n(u), {
776
+ id: n(v),
777
777
  ref_key: "listEl",
778
778
  ref: P,
779
- tabindex: l(b) ? void 0 : -1,
780
- role: l(Q),
781
- "aria-labelledby": l(G),
779
+ tabindex: n(p) ? void 0 : -1,
780
+ role: n(Q),
781
+ "aria-labelledby": n(G),
782
782
  class: "vv-dropdown__list"
783
- }), [L(r.$slots, "items", E($({
784
- show: S,
783
+ }), [_(l.$slots, "items", E($({
784
+ show: y,
785
785
  hide: I,
786
- toggle: V,
787
- expanded: l(b),
788
- role: l(Pe)
786
+ toggle: C,
787
+ expanded: n(p),
788
+ role: n(Pe)
789
789
  })))], 16, ya),
790
- L(r.$slots, "after", E($({
791
- show: S,
790
+ _(l.$slots, "after", E($({
791
+ show: y,
792
792
  hide: I,
793
- toggle: V,
794
- expanded: l(b)
793
+ toggle: C,
794
+ expanded: n(p)
795
795
  })))
796
- ], 6), [[Pt, l(b)]])]),
796
+ ], 6), [[Pt, n(p)]])]),
797
797
  _: 3
798
798
  }, 16, ["name"])], 64));
799
799
  }
@@ -805,41 +805,41 @@ var xa = { name: "VvDropdownItem" }, $a = /* @__PURE__ */ M({
805
805
  ...xa,
806
806
  props: pa,
807
807
  setup(e) {
808
- const a = e, { role: t, expanded: o } = La(), i = _(null);
808
+ const a = e, { role: t, expanded: o } = La(), r = w(null);
809
809
  ha({ expanded: o });
810
- const s = nt(i), { focused: d } = it(i), { focused: f } = st(i);
811
- return A(s, (m) => {
812
- m && a.focusOnHover && (d.value = !0);
813
- }), (m, v) => (w(), B("div", k({ role: l(t) }, {
810
+ const s = nt(r), { focused: v } = it(r), { focused: u } = st(r);
811
+ return A(s, (b) => {
812
+ b && a.focusOnHover && (v.value = !0);
813
+ }), (b, h) => (S(), k("div", N({ role: n(t) }, {
814
814
  ref_key: "element",
815
- ref: i,
816
- class: ["vv-dropdown__item", { "focus-visible": l(d) || l(f) }]
817
- }), [L(m.$slots, "default")], 16));
815
+ ref: r,
816
+ class: ["vv-dropdown__item", { "focus-visible": n(v) || n(u) }]
817
+ }), [_(b.$slots, "default")], 16));
818
818
  }
819
819
  }), Ea = $a, Oa = ["title"], Pa = { name: "VvDropdownOption" }, Ia = /* @__PURE__ */ M({
820
820
  ...Pa,
821
821
  props: ma,
822
822
  setup(e) {
823
- const a = e, { modifiers: t } = ee(a), o = ge("vv-dropdown-option", t, n(() => ({
823
+ const a = e, { modifiers: t } = ee(a), o = ge("vv-dropdown-option", t, i(() => ({
824
824
  disabled: a.disabled,
825
825
  selected: a.selected,
826
826
  unselectable: a.unselectable && a.selected
827
- }))), i = n(() => a.selected ? a.unselectable ? a.deselectHintLabel : a.selectedHintLabel : a.disabled ? "" : a.selectHintLabel);
828
- return (s, d) => (w(), K(Ea, {
829
- class: Ae(l(o)),
827
+ }))), r = i(() => a.selected ? a.unselectable ? a.deselectHintLabel : a.selectedHintLabel : a.disabled ? "" : a.selectHintLabel);
828
+ return (s, v) => (S(), K(Ea, {
829
+ class: Ae(n(o)),
830
830
  tabindex: s.disabled ? -1 : 0,
831
831
  "aria-selected": s.selected,
832
832
  "aria-disabled": s.disabled,
833
833
  "focus-on-hover": s.focusOnHover
834
834
  }, {
835
- default: N(() => [L(s.$slots, "default"), z("span", {
835
+ default: D(() => [_(s.$slots, "default"), z("span", {
836
836
  class: "vv-dropdown-option__hint",
837
- title: l(i)
838
- }, [L(s.$slots, "hint", E($({
837
+ title: n(r)
838
+ }, [_(s.$slots, "hint", E($({
839
839
  disabled: s.disabled,
840
840
  selected: s.selected,
841
841
  unselectable: s.unselectable
842
- })), () => [Be(fe(l(i)), 1)])], 8, Oa)]),
842
+ })), () => [ke(fe(n(r)), 1)])], 8, Oa)]),
843
843
  _: 3
844
844
  }, 8, [
845
845
  "class",
@@ -849,12 +849,12 @@ var xa = { name: "VvDropdownItem" }, $a = /* @__PURE__ */ M({
849
849
  "focus-on-hover"
850
850
  ]));
851
851
  }
852
- }), Va = Ia;
852
+ }), Ca = Ia;
853
853
  function Me() {
854
854
  return ot(Mt, void 0);
855
855
  }
856
- var Ca = { name: "VvIcon" }, Ba = /* @__PURE__ */ M({
857
- ...Ca,
856
+ var Va = { name: "VvIcon" }, ka = /* @__PURE__ */ M({
857
+ ...Va,
858
858
  props: /* @__PURE__ */ wt({
859
859
  name: {},
860
860
  color: {},
@@ -872,33 +872,32 @@ var Ca = { name: "VvIcon" }, Ba = /* @__PURE__ */ M({
872
872
  onLoad: { type: Function },
873
873
  svg: {},
874
874
  modifiers: {}
875
- }, Ht),
875
+ }, Tt),
876
876
  setup(e) {
877
- const a = e, t = n(() => typeof a.rotate == "string" ? Number.parseFloat(a.rotate) : a.rotate), o = _(!0), i = Me(), { modifiers: s } = ee(a), d = ge("vv-icon", s), f = n(() => a.provider || i?.iconsProvider), m = n(() => {
878
- const u = a.name ?? "", g = `@${f.value}:${a.prefix}:${u}`;
879
- if (Ve(g)) return g;
880
- const P = i?.iconsCollections.find((O) => Ve(`@${f.value}:${O.prefix}:${u}`));
881
- return P ? `@${f.value}:${P.prefix}:${u}` : u;
877
+ const a = e, t = i(() => typeof a.rotate == "string" ? Number.parseFloat(a.rotate) : a.rotate), o = w(!0), r = Me(), { modifiers: s } = ee(a), v = ge("vv-icon", s), u = i(() => a.provider || r?.iconsProvider), b = i(() => {
878
+ const d = a.name ?? "", m = `@${u.value}:${a.prefix}:${d}`;
879
+ if (Ce(m)) return m;
880
+ const P = r?.iconsCollections.find((O) => Ce(`@${u.value}:${O.prefix}:${d}`));
881
+ return P ? `@${u.value}:${P.prefix}:${d}` : d;
882
882
  });
883
- function v(u) {
884
- const g = typeof window < "u" ? new window.DOMParser() : null;
885
- return g ? g.parseFromString(u, "text/html").querySelector("svg") : null;
883
+ function h(d) {
884
+ return globalThis.window === void 0 ? null : new globalThis.DOMParser().parseFromString(d, "text/html").querySelector("svg");
886
885
  }
887
- function y(u) {
888
- const g = v(u), P = g?.innerHTML.trim() || "";
889
- g && P && jt(`@${f.value}:${a.prefix}:${a.name}`, {
886
+ function L(d) {
887
+ const m = h(d), P = m?.innerHTML.trim() || "";
888
+ m && P && jt(`@${u.value}:${a.prefix}:${a.name}`, {
890
889
  body: P,
891
- height: g.viewBox.baseVal.height,
892
- width: g.viewBox.baseVal.width
890
+ height: m.viewBox.baseVal.height,
891
+ width: m.viewBox.baseVal.width
893
892
  });
894
893
  }
895
- return i && a.src && !Ve(`@${f.value}:${a.prefix}:${a.name}`) && (o.value = !1, i.fetchIcon(a.src).then((u) => {
896
- u && y(u), o.value = !0;
897
- }).catch((u) => {
898
- throw o.value = !0, new Error(`Error during fetch icon: ${u?.message}`);
899
- })), a.svg && y(a.svg), (u, g) => l(o) ? (w(), K(l(Ft), k({
894
+ return r && a.src && !Ce(`@${u.value}:${a.prefix}:${a.name}`) && (o.value = !1, r.fetchIcon(a.src).then((d) => {
895
+ d && L(d), o.value = !0;
896
+ }).catch((d) => {
897
+ throw o.value = !0, new Error(`Error during fetch icon: ${d?.message}`);
898
+ })), a.svg && L(a.svg), (d, m) => n(o) ? (S(), K(n(Ft), N({
900
899
  key: 0,
901
- class: l(d)
900
+ class: n(v)
902
901
  }, {
903
902
  inline: e.inline,
904
903
  width: e.width,
@@ -906,147 +905,145 @@ var Ca = { name: "VvIcon" }, Ba = /* @__PURE__ */ M({
906
905
  horizontalFlip: e.horizontalFlip,
907
906
  verticalFlip: e.verticalFlip,
908
907
  flip: e.flip,
909
- rotate: l(t),
908
+ rotate: n(t),
910
909
  color: e.color,
911
- icon: l(m)
912
- }, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) : C("v-if", !0);
910
+ icon: n(b)
911
+ }, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) : V("v-if", !0);
912
+ }
913
+ }), Ve = ka;
914
+ function Ba(e, a, t) {
915
+ let o = a;
916
+ if (Array.isArray(e) && e.length) {
917
+ const r = e[0];
918
+ r() === a && (o = t);
919
+ }
920
+ if (typeof e == "function" && e() === a && (o = t), typeof e == "object") {
921
+ let r = e.default;
922
+ typeof r == "function" && (r = r()), (typeof r == "object" ? JSON.stringify(r) === JSON.stringify(a) : r === a) && (o = t);
913
923
  }
914
- }), Ce = Ba;
924
+ return o;
925
+ }
915
926
  function Da(e, a, t) {
916
- const o = Me(), i = n(() => {
917
- if (!(!o || !o.defaults.value?.[e]))
927
+ const o = Me(), r = i(() => {
928
+ if (o?.defaults.value?.[e])
918
929
  return o.defaults.value[e];
919
930
  });
920
- return n(() => {
921
- if (i.value === void 0) return t;
922
- const s = i.value, d = a, f = t;
923
- return Object.keys(d).reduce((m, v) => {
924
- const y = f[v];
925
- if (m[v] = y, v in s) {
926
- if (Array.isArray(d[v])) {
927
- const u = d[v];
928
- u.length && u[0] === y && (m[v] = s[v]);
929
- }
930
- if (typeof d[v] == "function") {
931
- const u = d[v];
932
- u() === y && (m[v] = s[v]);
933
- }
934
- if (typeof d[v] == "object") {
935
- let u = d[v].default;
936
- typeof u == "function" && (u = u()), typeof u == "object" ? JSON.stringify(u) === JSON.stringify(y) && (m[v] = s[v]) : u === y && (m[v] = s[v]);
937
- }
938
- }
939
- return m;
931
+ return i(() => {
932
+ if (r.value === void 0) return t;
933
+ const s = r.value, v = a, u = t;
934
+ return Object.keys(v).reduce((b, h) => {
935
+ const L = u[h];
936
+ return b[h] = h in s ? Ba(v[h], L, s[h]) : L, b;
940
937
  }, {});
941
938
  });
942
939
  }
943
- function Na(e, a, t = 0, { getter: o = (s) => s, setter: i = (s) => s } = {}) {
940
+ function Na(e, a, t = 0, { getter: o = (s) => s, setter: r = (s) => s } = {}) {
944
941
  let s;
945
- return typeof t == "string" && (t = Number.parseInt(t)), n({
942
+ return typeof t == "string" && (t = Number.parseInt(t)), i({
946
943
  get: () => o(e?.value),
947
- set: (d) => {
944
+ set: (v) => {
948
945
  s && clearTimeout(s), s = setTimeout(() => {
949
- a("update:modelValue", i(d));
946
+ a("update:modelValue", r(v));
950
947
  }, t);
951
948
  }
952
949
  });
953
950
  }
954
951
  function at(e, a) {
955
- const t = n(() => typeof e?.value == "string" ? { name: e?.value } : e?.value), o = n(() => a?.value === pe.before ? t.value : void 0), i = n(() => a?.value === pe.after ? t.value : void 0);
952
+ const t = i(() => typeof e?.value == "string" ? { name: e?.value } : e?.value), o = i(() => a?.value === pe.before ? t.value : void 0), r = i(() => a?.value === pe.after ? t.value : void 0);
956
953
  return {
957
954
  hasIcon: t,
958
- hasIconLeft: n(() => a?.value === x.left ? t.value : void 0),
959
- hasIconRight: n(() => a?.value === x.right ? t.value : void 0),
960
- hasIconTop: n(() => a?.value === x.top ? t.value : void 0),
961
- hasIconBottom: n(() => a?.value === x.bottom ? t.value : void 0),
955
+ hasIconLeft: i(() => a?.value === x.left ? t.value : void 0),
956
+ hasIconRight: i(() => a?.value === x.right ? t.value : void 0),
957
+ hasIconTop: i(() => a?.value === x.top ? t.value : void 0),
958
+ hasIconBottom: i(() => a?.value === x.bottom ? t.value : void 0),
962
959
  hasIconBefore: o,
963
- hasIconAfter: i
960
+ hasIconAfter: r
964
961
  };
965
962
  }
966
- function ka(e, a) {
963
+ function Aa(e, a) {
967
964
  const { focused: t } = it(e);
968
965
  return A(t, (o) => {
969
- a(o ? "focus" : "blur", l(e));
966
+ a(o ? "focus" : "blur", n(e));
970
967
  }), { focused: t };
971
968
  }
972
- function Aa(e, a) {
973
- const t = n(() => (l(e) ?? "").length), o = n(() => a?.lowerLimit !== void 0 && t.value < a?.lowerLimit ? t.value - a.lowerLimit : a?.upperLimit !== void 0 ? a.upperLimit - t.value : 0);
969
+ function Fa(e, a) {
970
+ const t = i(() => (n(e) ?? "").length), o = i(() => a?.lowerLimit !== void 0 && t.value < a?.lowerLimit ? t.value - a.lowerLimit : a?.upperLimit !== void 0 ? a.upperLimit - t.value : 0);
974
971
  return {
975
972
  length: t,
976
973
  gap: o,
977
- formatted: n(() => a?.mode === !1 ? "" : a?.mode === "limit" && a?.upperLimit ? `${t.value} / ${a.lowerLimit ? `${a.lowerLimit}-` : ""}${a.upperLimit}` : a?.mode === "countdown" ? o.value === 0 ? void 0 : o.value : t.value)
974
+ formatted: i(() => a?.mode === !1 ? "" : a?.mode === "limit" && a?.upperLimit ? `${t.value} / ${a.lowerLimit ? `${a.lowerLimit}-` : ""}${a.upperLimit}` : a?.mode === "countdown" ? o.value === 0 ? void 0 : o.value : t.value)
978
975
  };
979
976
  }
980
- function Fa(e, a = U.local, t) {
981
- const o = _();
977
+ function ja(e, a = U.local, t) {
978
+ const o = w();
982
979
  t && (o.value = t);
983
- let i;
984
- return rt(() => {
985
- e && A(e, (s, d) => {
986
- const f = l(a) === U.session ? sessionStorage : localStorage;
987
- if (d && d !== s && f.removeItem(d), s) {
988
- i = Qe(s, i?.value ?? o.value, f), i.value && (o.value = i.value);
980
+ let r;
981
+ return lt(() => {
982
+ e && A(e, (s, v) => {
983
+ const u = n(a) === U.session ? sessionStorage : localStorage;
984
+ if (v && v !== s && u.removeItem(v), s) {
985
+ r = Qe(s, r?.value ?? o.value, u), r.value && (o.value = r.value);
989
986
  return;
990
987
  }
991
- i = void 0;
992
- }, { immediate: !0 }), ke(a) && A(a, (s, d) => {
988
+ r = void 0;
989
+ }, { immediate: !0 }), Ne(a) && A(a, (s, v) => {
993
990
  if (e?.value) {
994
991
  if (s) {
995
- const f = s === U.session ? sessionStorage : localStorage;
996
- i = Qe(e.value, i?.value ?? o.value, f);
992
+ const u = s === U.session ? sessionStorage : localStorage;
993
+ r = Qe(e.value, r?.value ?? o.value, u);
997
994
  }
998
- d && d !== s && (d === U.session ? sessionStorage : localStorage).removeItem(e.value);
995
+ v && v !== s && (v === U.session ? sessionStorage : localStorage).removeItem(e.value);
999
996
  }
1000
997
  });
1001
998
  }), A(o, (s) => {
1002
- i && (i.value = s);
999
+ r && (r.value = s);
1003
1000
  }, {
1004
1001
  deep: !0,
1005
1002
  immediate: !0
1006
1003
  }), o;
1007
1004
  }
1008
- var ja = ["for"], Ha = {
1005
+ var Ta = ["for"], Ha = {
1009
1006
  key: 0,
1010
1007
  class: "vv-textarea__input-before"
1011
- }, Ta = { class: "vv-textarea__inner" }, Ra = ["id"], za = {
1008
+ }, Ra = { class: "vv-textarea__inner" }, za = ["id"], Ma = {
1012
1009
  key: 1,
1013
1010
  class: "vv-textarea__input-after"
1014
- }, Ma = {
1011
+ }, Wa = {
1015
1012
  key: 2,
1016
1013
  class: "vv-textarea__limit"
1017
- }, Wa = { class: "flex-1" }, qa = ["title", "onClick"], Ja = { name: "VvTextarea" }, Ka = /* @__PURE__ */ M({
1018
- ...Ja,
1014
+ }, qa = { class: "flex-1" }, Ja = ["title", "onClick"], Ka = { name: "VvTextarea" }, Ua = /* @__PURE__ */ M({
1015
+ ...Ka,
1019
1016
  props: et,
1020
1017
  emits: da,
1021
1018
  setup(e, { emit: a }) {
1022
- const t = e, o = a, i = Et(), s = Me(), d = Da("VvTextarea", et, t), f = _(), m = _(), v = _(), { id: y, icon: u, iconPosition: g, iconRemoveSuggestion: P, labelRemoveSuggestion: O, label: F, modelValue: j, count: oe, valid: be, invalid: he, loading: W, modifiers: ye, debounce: Se, minlength: we, maxlength: _e, storageType: Le } = ee(t), H = gt(y), q = n(() => `${H.value}-hint`), b = n(() => t.floating && ve(t.placeholder) ? " " : t.placeholder), S = Na(j, o, Se?.value), { hasIconBefore: I, hasIconAfter: V } = at(u, g), { hasIcon: Y } = at(P), { focused: G } = ka(f, o);
1023
- A(n(() => G.value && !t.disabled && !t.readonly), (c) => {
1024
- if (c && d.value.selectOnFocus && f.value && f.value.select(), c && h.value?.size) {
1025
- v.value?.show();
1019
+ const t = e, o = a, r = Et(), s = Me(), v = Da("VvTextarea", et, t), u = w(), b = w(), h = w(), { id: L, icon: d, iconPosition: m, iconRemoveSuggestion: P, labelRemoveSuggestion: O, label: F, modelValue: j, count: oe, valid: be, invalid: he, loading: W, modifiers: ye, debounce: Se, minlength: we, maxlength: _e, storageType: Le } = ee(t), T = gt(L), q = i(() => `${T.value}-hint`), p = i(() => t.floating && ve(t.placeholder) ? " " : t.placeholder), y = Na(j, o, Se?.value), { hasIconBefore: I, hasIconAfter: C } = at(d, m), { hasIcon: Y } = at(P), { focused: G } = Aa(u, o);
1020
+ A(i(() => G.value && !t.disabled && !t.readonly), (f) => {
1021
+ if (f && v.value.selectOnFocus && u.value && u.value.select(), f && g.value?.size) {
1022
+ h.value?.show();
1026
1023
  return;
1027
1024
  }
1028
- if (Q.value && h.value) {
1025
+ if (Q.value && g.value) {
1029
1026
  const R = t.maxSuggestions;
1030
- h.value.size >= R && !h.value.has(S.value) && (h.value = new Set([...h.value].slice(h.value.size - R + 1))), h.value.add(S.value);
1027
+ g.value.size >= R && !g.value.has(y.value) && (g.value = new Set([...g.value].slice(g.value.size - R + 1))), g.value.add(y.value);
1031
1028
  }
1032
- }), A(Dt(f), (c) => {
1033
- c && t.autofocus && (G.value = !0);
1029
+ }), A(Bt(u), (f) => {
1030
+ f && t.autofocus && (G.value = !0);
1034
1031
  });
1035
- const { formatted: re } = Aa(S, {
1032
+ const { formatted: le } = Fa(y, {
1036
1033
  mode: oe?.value,
1037
1034
  upperLimit: Number(_e?.value),
1038
1035
  lowerLimit: Number(we?.value)
1039
- }), xe = n(() => !t.disabled && !t.readonly), $e = n(() => xe.value ? t.tabindex : -1), Q = n(() => !ve(j)), Ee = n(() => {
1036
+ }), xe = i(() => !t.disabled && !t.readonly), $e = i(() => xe.value ? t.tabindex : -1), Q = i(() => !ve(j)), Ee = i(() => {
1040
1037
  if (t.invalid === !0) return !0;
1041
1038
  if (t.valid === !0) return !1;
1042
- }), le = n(() => t.storageKey ?? (s?.experimentalFeatures.forceInputSuggestions ? t.name : void 0)), h = Fa(le, Le, /* @__PURE__ */ new Set()), J = n(() => h.value ? [...h.value].filter((c) => ve(S.value) || `${c}`.toLowerCase().includes(`${S.value}`.toLowerCase()) && c !== S.value).reverse() : []), ne = n(() => le?.value && h.value && h.value.size > 0);
1043
- function Oe(c) {
1044
- S.value = c, v.value?.hide(), o("suggestion:selected", c);
1039
+ }), re = i(() => t.storageKey ?? (s?.experimentalFeatures.forceInputSuggestions ? t.name : void 0)), g = ja(re, Le, /* @__PURE__ */ new Set()), J = i(() => g.value ? [...g.value].filter((f) => ve(y.value) || `${f}`.toLowerCase().includes(`${y.value}`.toLowerCase()) && f !== y.value).reverse() : []), ne = i(() => re?.value && g.value && g.value.size > 0);
1040
+ function Oe(f) {
1041
+ y.value = f, h.value?.hide(), o("suggestion:selected", f);
1045
1042
  }
1046
- function ie(c) {
1047
- h.value?.delete(c), o("suggestion:removed", c);
1043
+ function ie(f) {
1044
+ g.value?.delete(f), o("suggestion:removed", f);
1048
1045
  }
1049
- const { HintSlot: se, hasHintLabelOrSlot: Pe, hasInvalidLabelOrSlot: Ie, hintSlotScope: r } = fa(d, i), p = ge("vv-textarea", ye, n(() => ({
1046
+ const { HintSlot: se, hasHintLabelOrSlot: Pe, hasInvalidLabelOrSlot: Ie, hintSlotScope: l } = fa(v, r), c = ge("vv-textarea", ye, i(() => ({
1050
1047
  valid: be.value,
1051
1048
  invalid: he.value,
1052
1049
  loading: W.value,
@@ -1054,14 +1051,14 @@ var ja = ["for"], Ha = {
1054
1051
  readonly: t.readonly,
1055
1052
  required: t.required,
1056
1053
  "icon-before": I.value !== void 0,
1057
- "icon-after": V.value !== void 0,
1054
+ "icon-after": C.value !== void 0,
1058
1055
  floating: t.floating && !ve(t.label),
1059
1056
  dirty: Q.value,
1060
1057
  focus: G.value,
1061
1058
  resizable: t.resizable
1062
- }))), T = n(() => ({
1059
+ }))), H = i(() => ({
1063
1060
  name: t.name,
1064
- placeholder: b.value,
1061
+ placeholder: p.value,
1065
1062
  tabindex: $e.value,
1066
1063
  disabled: t.disabled,
1067
1064
  readonly: t.readonly,
@@ -1076,7 +1073,7 @@ var ja = ["for"], Ha = {
1076
1073
  "aria-invalid": Ee.value,
1077
1074
  "aria-describedby": Pe.value ? q.value : void 0,
1078
1075
  "aria-errormessage": Ie.value ? q.value : void 0
1079
- })), X = n(() => ({
1076
+ })), X = i(() => ({
1080
1077
  valid: t.valid,
1081
1078
  invalid: t.invalid,
1082
1079
  modelValue: t.modelValue,
@@ -1086,85 +1083,85 @@ var ja = ["for"], Ha = {
1086
1083
  clear: bt
1087
1084
  }));
1088
1085
  function bt() {
1089
- S.value = void 0;
1086
+ y.value = void 0;
1090
1087
  }
1091
- return (c, R) => (w(), B("div", { class: Ae(l(p)) }, [
1092
- l(F) ? (w(), B("label", {
1088
+ return (f, R) => (S(), k("div", { class: Ae(n(c)) }, [
1089
+ n(F) ? (S(), k("label", {
1093
1090
  key: 0,
1094
- for: l(H),
1091
+ for: n(T),
1095
1092
  class: "vv-textarea__label"
1096
- }, fe(l(F)), 9, ja)) : C("v-if", !0),
1093
+ }, fe(n(F)), 9, Ta)) : V("v-if", !0),
1097
1094
  z("div", {
1098
1095
  ref_key: "wrapperEl",
1099
- ref: m,
1096
+ ref: b,
1100
1097
  class: "vv-textarea__wrapper"
1101
1098
  }, [
1102
- c.$slots.before ? (w(), B("div", Ha, [L(c.$slots, "before", E($(l(X))))])) : C("v-if", !0),
1103
- z("div", Ta, [
1104
- l(I) ? (w(), K(Ce, k({ key: 0 }, l(I), { class: "vv-textarea__icon" }), null, 16)) : C("v-if", !0),
1105
- lt(z("textarea", k({
1106
- id: l(H),
1099
+ f.$slots.before ? (S(), k("div", Ha, [_(f.$slots, "before", E($(n(X))))])) : V("v-if", !0),
1100
+ z("div", Ra, [
1101
+ n(I) ? (S(), K(Ve, N({ key: 0 }, n(I), { class: "vv-textarea__icon" }), null, 16)) : V("v-if", !0),
1102
+ rt(z("textarea", N({
1103
+ id: n(T),
1107
1104
  ref_key: "textareaEl",
1108
- ref: f,
1109
- "onUpdate:modelValue": R[0] || (R[0] = (D) => ke(S) ? S.value = D : null)
1110
- }, l(T), { onKeyup: R[1] || (R[1] = (D) => o("keyup", D)) }), null, 16, Ra), [[Ot, l(S)]]),
1111
- l(V) ? (w(), K(Ce, k({ key: 1 }, l(V), { class: "vv-textarea__icon vv-textarea__icon-after" }), null, 16)) : C("v-if", !0)
1105
+ ref: u,
1106
+ "onUpdate:modelValue": R[0] || (R[0] = (B) => Ne(y) ? y.value = B : null)
1107
+ }, n(H), { onKeyup: R[1] || (R[1] = (B) => o("keyup", B)) }), null, 16, za), [[Ot, n(y)]]),
1108
+ n(C) ? (S(), K(Ve, N({ key: 1 }, n(C), { class: "vv-textarea__icon vv-textarea__icon-after" }), null, 16)) : V("v-if", !0)
1112
1109
  ]),
1113
- c.$slots.after ? (w(), B("div", za, [L(c.$slots, "after", E($(l(X))))])) : C("v-if", !0),
1114
- l(oe) ? (w(), B("span", Ma, [L(c.$slots, "count", E($(l(X))), () => [Be(fe(l(re)), 1)])])) : C("v-if", !0)
1110
+ f.$slots.after ? (S(), k("div", Ma, [_(f.$slots, "after", E($(n(X))))])) : V("v-if", !0),
1111
+ n(oe) ? (S(), k("span", Wa, [_(f.$slots, "count", E($(n(X))), () => [ke(fe(n(le)), 1)])])) : V("v-if", !0)
1115
1112
  ], 512),
1116
- ce(l(se), {
1117
- id: l(q),
1113
+ ce(n(se), {
1114
+ id: n(q),
1118
1115
  class: "vv-textarea__hint"
1119
1116
  }, St({ _: 2 }, [
1120
- c.$slots.hint ? {
1117
+ f.$slots.hint ? {
1121
1118
  name: "hint",
1122
- fn: N(() => [L(c.$slots, "hint", E($(l(r))))]),
1119
+ fn: D(() => [_(f.$slots, "hint", E($(n(l))))]),
1123
1120
  key: "0"
1124
1121
  } : void 0,
1125
- c.$slots.loading ? {
1122
+ f.$slots.loading ? {
1126
1123
  name: "loading",
1127
- fn: N(() => [L(c.$slots, "loading", E($(l(r))))]),
1124
+ fn: D(() => [_(f.$slots, "loading", E($(n(l))))]),
1128
1125
  key: "1"
1129
1126
  } : void 0,
1130
- c.$slots.valid ? {
1127
+ f.$slots.valid ? {
1131
1128
  name: "valid",
1132
- fn: N(() => [L(c.$slots, "valid", E($(l(r))))]),
1129
+ fn: D(() => [_(f.$slots, "valid", E($(n(l))))]),
1133
1130
  key: "2"
1134
1131
  } : void 0,
1135
- c.$slots.invalid ? {
1132
+ f.$slots.invalid ? {
1136
1133
  name: "invalid",
1137
- fn: N(() => [L(c.$slots, "invalid", E($(l(r))))]),
1134
+ fn: D(() => [_(f.$slots, "invalid", E($(n(l))))]),
1138
1135
  key: "3"
1139
1136
  } : void 0
1140
1137
  ]), 1032, ["id"]),
1141
- l(ne) ? (w(), K(_a, {
1138
+ n(ne) ? (S(), K(_a, {
1142
1139
  key: 1,
1143
1140
  ref_key: "suggestionsDropdownEl",
1144
- ref: v,
1145
- reference: l(m),
1141
+ ref: h,
1142
+ reference: n(b),
1146
1143
  "autofocus-first": !1,
1147
1144
  "trigger-width": !0
1148
1145
  }, {
1149
- items: N(() => [(w(!0), B(Ne, null, _t(l(J), (D) => (w(), K(Va, {
1150
- key: D,
1151
- onClick: qe((ht) => Oe(D), ["stop"])
1146
+ items: D(() => [(S(!0), k(De, null, _t(n(J), (B) => (S(), K(Ca, {
1147
+ key: B,
1148
+ onClick: qe((ht) => Oe(B), ["stop"])
1152
1149
  }, {
1153
- default: N(() => [z("div", Wa, [L(c.$slots, "suggestion", k({ ref_for: !0 }, { value: D }), () => [Be(fe(D), 1)])]), l(h) && l(Y) ? (w(), B("button", {
1150
+ default: D(() => [z("div", qa, [_(f.$slots, "suggestion", N({ ref_for: !0 }, { value: B }), () => [ke(fe(B), 1)])]), n(g) && n(Y) ? (S(), k("button", {
1154
1151
  key: 0,
1155
1152
  type: "button",
1156
1153
  tabindex: "-1",
1157
1154
  class: "cursor-pointer",
1158
- title: l(O),
1159
- onClick: qe((ht) => ie(D), ["stop"])
1160
- }, [ce(Ce, k({ ref_for: !0 }, l(Y)), null, 16)], 8, qa)) : C("v-if", !0)]),
1155
+ title: n(O),
1156
+ onClick: qe((ht) => ie(B), ["stop"])
1157
+ }, [ce(Ve, N({ ref_for: !0 }, n(Y)), null, 16)], 8, Ja)) : V("v-if", !0)]),
1161
1158
  _: 2
1162
1159
  }, 1032, ["onClick"]))), 128))]),
1163
1160
  _: 3
1164
- }, 8, ["reference"])) : C("v-if", !0)
1161
+ }, 8, ["reference"])) : V("v-if", !0)
1165
1162
  ], 2));
1166
1163
  }
1167
- }), oo = Ka;
1164
+ }), lo = Ua;
1168
1165
  export {
1169
- oo as default
1166
+ lo as default
1170
1167
  };