@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,20 +1,20 @@
1
- import { Fragment as pe, computed as i, createBlock as O, createCommentVNode as w, createElementBlock as D, createTextVNode as ee, defineComponent as M, getCurrentInstance as ge, inject as L, mergeDefaults as ye, mergeProps as _, openBlock as B, ref as G, renderSlot as I, resolveComponent as be, resolveDynamicComponent as me, toDisplayString as F, toRef as he, toRefs as te, unref as v, useAttrs as Se, useId as Be, useSlots as Ie, watch as Pe, withCtx as re } from "vue";
2
- import { Icon as ke, addIcon as we, iconLoaded as T } from "@iconify/vue";
1
+ import { Fragment as pe, computed as l, createBlock as w, createCommentVNode as k, createElementBlock as T, createTextVNode as ee, defineComponent as x, getCurrentInstance as ge, inject as L, mergeDefaults as ye, mergeProps as E, openBlock as B, ref as M, renderSlot as I, resolveComponent as be, resolveDynamicComponent as me, toDisplayString as F, toRef as he, toRefs as te, unref as v, useAttrs as Se, useId as Be, useSlots as Ie, watch as Pe, withCtx as re } from "vue";
2
+ import { Icon as Oe, addIcon as ke, iconLoaded as D } from "@iconify/vue";
3
3
  var W = /* @__PURE__ */ (function(e) {
4
4
  return e.local = "local", e.session = "session", e;
5
- })({}), Oe = /* @__PURE__ */ (function(e) {
5
+ })({}), we = /* @__PURE__ */ (function(e) {
6
6
  return e.absolute = "absolute", e.fixed = "fixed", e;
7
- })({}), m = /* @__PURE__ */ (function(e) {
7
+ })({}), b = /* @__PURE__ */ (function(e) {
8
8
  return e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e;
9
9
  })({}), Ae = /* @__PURE__ */ (function(e) {
10
10
  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;
11
- })({}), E = /* @__PURE__ */ (function(e) {
11
+ })({}), _ = /* @__PURE__ */ (function(e) {
12
12
  return e.before = "before", e.after = "after", e;
13
13
  })({}), H = /* @__PURE__ */ (function(e) {
14
14
  return e.button = "button", e.submit = "submit", e.reset = "reset", e;
15
15
  })({}), h = /* @__PURE__ */ (function(e) {
16
16
  return e.nuxtLink = "nuxt-link", e.routerLink = "router-link", e.a = "a", e.button = "button", e;
17
- })({}), Ce = /* @__PURE__ */ Symbol.for("volver"), Ne = /* @__PURE__ */ Symbol.for("buttonGroup"), _e = /* @__PURE__ */ Symbol.for("dropdownTrigger"), Ee = /* @__PURE__ */ Symbol.for("dropdownAction"), Le = {
17
+ })({}), Ce = /* @__PURE__ */ Symbol.for("volver"), Ne = /* @__PURE__ */ Symbol.for("buttonGroup"), Ee = /* @__PURE__ */ Symbol.for("dropdownTrigger"), _e = /* @__PURE__ */ Symbol.for("dropdownAction"), Le = {
18
18
  showPassword: "eye-on",
19
19
  hidePassword: "eye-off",
20
20
  showDatePicker: "calendar",
@@ -33,7 +33,7 @@ var W = /* @__PURE__ */ (function(e) {
33
33
  type: String,
34
34
  default: "noopener noreferrer"
35
35
  }
36
- }, q = {
36
+ }, G = {
37
37
  valid: {
38
38
  type: Boolean,
39
39
  default: !1
@@ -42,7 +42,7 @@ var W = /* @__PURE__ */ (function(e) {
42
42
  type: [String, Array],
43
43
  default: void 0
44
44
  }
45
- }, K = {
45
+ }, q = {
46
46
  invalid: {
47
47
  type: Boolean,
48
48
  default: !1
@@ -72,7 +72,7 @@ var W = /* @__PURE__ */ (function(e) {
72
72
  } }, Re = { current: {
73
73
  type: Boolean,
74
74
  default: !1
75
- } }, ct = {
75
+ } }, pt = {
76
76
  showClearAction: {
77
77
  type: Boolean,
78
78
  default: !1
@@ -85,22 +85,22 @@ var W = /* @__PURE__ */ (function(e) {
85
85
  type: String,
86
86
  default: "Clear"
87
87
  }
88
- }, De = { pressed: {
88
+ }, Te = { pressed: {
89
89
  type: Boolean,
90
90
  default: !1
91
91
  } }, j = { label: {
92
92
  type: [String, Number],
93
93
  default: void 0
94
- } }, z = { readonly: {
94
+ } }, K = { readonly: {
95
95
  type: Boolean,
96
96
  default: !1
97
97
  } }, R = { modifiers: {
98
98
  type: [String, Array],
99
99
  default: void 0
100
- } }, J = { hintLabel: {
100
+ } }, z = { hintLabel: {
101
101
  type: String,
102
102
  default: ""
103
- } }, Te = {
103
+ } }, De = {
104
104
  options: {
105
105
  type: Array,
106
106
  default: () => []
@@ -136,8 +136,8 @@ var W = /* @__PURE__ */ (function(e) {
136
136
  },
137
137
  iconPosition: {
138
138
  type: String,
139
- default: E.before,
140
- validation: (e) => Object.values(E).includes(e)
139
+ default: _.before,
140
+ validation: (e) => Object.values(_).includes(e)
141
141
  }
142
142
  }, ne = { tabindex: {
143
143
  type: [String, Number],
@@ -148,16 +148,16 @@ var W = /* @__PURE__ */ (function(e) {
148
148
  } }, Ge = { unselectable: {
149
149
  type: Boolean,
150
150
  default: !0
151
- } }, le = { id: [String, Number] }, pt = {
151
+ } }, le = { id: [String, Number] }, gt = {
152
152
  placement: {
153
153
  type: String,
154
- default: m.bottom,
155
- validator: (e) => Object.values(m).includes(e) || Object.values(Ae).includes(e)
154
+ default: b.bottom,
155
+ validator: (e) => Object.values(b).includes(e) || Object.values(Ae).includes(e)
156
156
  },
157
157
  strategy: {
158
158
  type: String,
159
159
  default: void 0,
160
- validator: (e) => Object.values(Oe).includes(e)
160
+ validator: (e) => Object.values(we).includes(e)
161
161
  },
162
162
  transitionName: {
163
163
  type: String,
@@ -215,16 +215,16 @@ var W = /* @__PURE__ */ (function(e) {
215
215
  } }, Ke = { autocomplete: {
216
216
  type: String,
217
217
  default: "off"
218
- } }, gt = {
218
+ } }, yt = {
219
219
  ...ue,
220
220
  ...qe,
221
221
  ...Ke,
222
222
  ...ne,
223
223
  ...$,
224
- ...z,
225
- ...q,
226
224
  ...K,
227
- ...J,
225
+ ...G,
226
+ ...q,
227
+ ...z,
228
228
  ...V,
229
229
  ...R,
230
230
  ...Fe,
@@ -245,14 +245,14 @@ var W = /* @__PURE__ */ (function(e) {
245
245
  default: void 0
246
246
  },
247
247
  ...oe
248
- }, yt = {
248
+ }, bt = {
249
249
  ...ue,
250
250
  ...ne,
251
+ ...G,
251
252
  ...q,
252
- ...K,
253
- ...J,
254
- ...$,
255
253
  ...z,
254
+ ...$,
255
+ ...K,
256
256
  ...R,
257
257
  ...j,
258
258
  ...V,
@@ -273,13 +273,13 @@ var W = /* @__PURE__ */ (function(e) {
273
273
  ],
274
274
  default: void 0
275
275
  }
276
- }, bt = {
276
+ }, mt = {
277
+ ...G,
277
278
  ...q,
278
- ...K,
279
- ...Te,
280
- ...J,
281
- ...$,
279
+ ...De,
282
280
  ...z,
281
+ ...$,
282
+ ...K,
283
283
  ...R,
284
284
  ...j,
285
285
  ...V,
@@ -305,7 +305,7 @@ var W = /* @__PURE__ */ (function(e) {
305
305
  }, ie = {
306
306
  ...$,
307
307
  ...j,
308
- ...De,
308
+ ...Te,
309
309
  ...je,
310
310
  ...Re,
311
311
  ...$e,
@@ -322,7 +322,7 @@ var W = /* @__PURE__ */ (function(e) {
322
322
  type: String,
323
323
  default: h.button
324
324
  }
325
- }, mt = {
325
+ }, ht = {
326
326
  storageType: {
327
327
  type: String,
328
328
  default: W.local,
@@ -331,10 +331,10 @@ var W = /* @__PURE__ */ (function(e) {
331
331
  storageKey: String
332
332
  };
333
333
  function ze(e) {
334
- const t = L(e, void 0), a = i(() => t !== void 0);
335
- function r(o, u, g) {
336
- const d = t?.[o];
337
- if (d) return i({
334
+ const t = L(e, void 0), o = l(() => t !== void 0);
335
+ function r(a, u, p) {
336
+ const d = t?.[a];
337
+ if (d) return l({
338
338
  get() {
339
339
  return d.value;
340
340
  },
@@ -342,19 +342,19 @@ function ze(e) {
342
342
  d.value = c;
343
343
  }
344
344
  });
345
- const y = he(u, o);
346
- return i({
345
+ const m = he(u, a);
346
+ return l({
347
347
  get() {
348
- return y.value;
348
+ return m.value;
349
349
  },
350
350
  set(c) {
351
- g && g(`update:${o}`, c);
351
+ p && p(`update:${a}`, c);
352
352
  }
353
353
  });
354
354
  }
355
355
  return {
356
356
  group: t,
357
- isInGroup: a,
357
+ isInGroup: o,
358
358
  getGroupOrLocalRef: r
359
359
  };
360
360
  }
@@ -367,8 +367,8 @@ var Je = ["update:modelValue"], Ue = {
367
367
  ...ae,
368
368
  iconPosition: {
369
369
  type: String,
370
- default: m.left,
371
- validator: (e) => Object.values(m).includes(e)
370
+ default: b.left,
371
+ validator: (e) => Object.values(b).includes(e)
372
372
  },
373
373
  loadingIcon: {
374
374
  type: String,
@@ -404,69 +404,69 @@ var Je = ["update:modelValue"], Ue = {
404
404
  }
405
405
  };
406
406
  function Ye(e, t) {
407
- const { group: a, isInGroup: r, getGroupOrLocalRef: o } = ze(Ne), { id: u, iconPosition: g, icon: d, label: y, pressed: c } = te(e);
407
+ const { group: o, isInGroup: r, getGroupOrLocalRef: a } = ze(Ne), { id: u, iconPosition: p, icon: d, label: m, pressed: c } = te(e);
408
408
  return {
409
- group: a,
409
+ group: o,
410
410
  isInGroup: r,
411
- modelValue: o("modelValue", e, t),
412
- toggle: o("toggle", e),
413
- unselectable: o("unselectable", e),
414
- multiple: i(() => a?.multiple.value ?? !1),
415
- modifiers: i(() => {
416
- let p = e.modifiers, n = a?.modifiers.value;
417
- const l = /* @__PURE__ */ new Set();
418
- return p && (Array.isArray(p) || (p = p.split(" ")), p.forEach((b) => l.add(b))), n && (Array.isArray(n) || (n = n.split(" ")), n.forEach((b) => l.add(b))), [...l];
411
+ modelValue: a("modelValue", e, t),
412
+ toggle: a("toggle", e),
413
+ unselectable: a("unselectable", e),
414
+ multiple: l(() => o?.multiple.value ?? !1),
415
+ modifiers: l(() => {
416
+ let g = e.modifiers, i = o?.modifiers.value;
417
+ const n = /* @__PURE__ */ new Set();
418
+ return g && (Array.isArray(g) || (g = g.split(" ")), g.forEach((y) => n.add(y))), i && (Array.isArray(i) || (i = i.split(" ")), i.forEach((y) => n.add(y))), [...n];
419
419
  }),
420
- disabled: i(() => !!(e.disabled || a?.disabled.value)),
420
+ disabled: l(() => !!(e.disabled || o?.disabled.value)),
421
421
  id: u,
422
422
  pressed: c,
423
- iconPosition: g,
423
+ iconPosition: p,
424
424
  icon: d,
425
- label: y
425
+ label: m
426
426
  };
427
427
  }
428
428
  var We = [
429
429
  "click",
430
430
  "mouseover",
431
431
  "mouseleave"
432
- ], He = ie;
432
+ ];
433
433
  function se() {
434
434
  return L(Ce, void 0);
435
435
  }
436
+ function He() {
437
+ return L(Ee, {});
438
+ }
436
439
  function Qe() {
437
440
  return L(_e, {});
438
441
  }
439
- function Xe() {
440
- return L(Ee, {});
441
- }
442
- var Ze = { name: "VvAction" }, et = /* @__PURE__ */ M({
443
- ...Ze,
444
- props: He,
442
+ var Xe = { name: "VvAction" }, Ze = /* @__PURE__ */ x({
443
+ ...Xe,
444
+ props: ie,
445
445
  emits: We,
446
- setup(e, { expose: t, emit: a }) {
447
- const r = e, o = a, u = ge(), g = se(), d = G(null);
446
+ setup(e, { expose: t, emit: o }) {
447
+ const r = e, a = o, u = ge(), p = se(), d = M(null);
448
448
  t({ $el: d });
449
- const { reference: y, bus: c, aria: p, expanded: n } = Qe();
449
+ const { reference: m, bus: c, aria: g, expanded: i } = He();
450
450
  Pe(() => d.value, (s) => {
451
- y && (y.value = s);
451
+ m && (m.value = s);
452
452
  });
453
- const l = i(() => r.pressed || n?.value), { role: b } = Xe(), S = i(() => {
453
+ const n = l(() => r.pressed || i?.value), { role: y } = Qe(), S = l(() => {
454
454
  switch (!0) {
455
455
  case r.disabled:
456
456
  return h.button;
457
457
  case r.to !== void 0:
458
- return g?.nuxt ? be(h.nuxtLink) : h.routerLink;
458
+ return p?.nuxt ? be(h.nuxtLink) : h.routerLink;
459
459
  case r.href !== void 0:
460
460
  return h.a;
461
461
  default:
462
462
  return r.defaultTag;
463
463
  }
464
- }), A = i(() => {
464
+ }), A = l(() => {
465
465
  const s = {
466
- ...p?.value,
467
- ariaPressed: l.value ? !0 : void 0,
466
+ ...g?.value,
467
+ ariaPressed: n.value ? !0 : void 0,
468
468
  ariaLabel: r.ariaLabel,
469
- role: b?.value
469
+ role: y?.value
470
470
  };
471
471
  switch (S.value) {
472
472
  case h.a:
@@ -499,31 +499,31 @@ var Ze = { name: "VvAction" }, et = /* @__PURE__ */ M({
499
499
  return;
500
500
  }
501
501
  if (u?.vnode.props?.onClick) {
502
- o("click", s);
502
+ a("click", s);
503
503
  return;
504
504
  }
505
505
  c?.emit("click", s);
506
506
  }
507
507
  function P(s) {
508
508
  if (u?.vnode.props?.onMouseover) {
509
- o("mouseover", s);
509
+ a("mouseover", s);
510
510
  return;
511
511
  }
512
512
  c?.emit("mouseover", s);
513
513
  }
514
514
  function N(s) {
515
515
  if (u?.vnode.props?.onMouseleave) {
516
- o("mouseleave", s);
516
+ a("mouseleave", s);
517
517
  return;
518
518
  }
519
519
  c?.emit("mouseleave", s);
520
520
  }
521
- return (s, U) => (B(), O(me(v(S)), _(v(A), {
521
+ return (s, U) => (B(), w(me(v(S)), E(v(A), {
522
522
  ref_key: "rootEl",
523
523
  ref: d,
524
524
  class: {
525
525
  active: s.active,
526
- pressed: v(l),
526
+ pressed: v(n),
527
527
  disabled: s.disabled,
528
528
  current: s.current
529
529
  },
@@ -535,19 +535,19 @@ var Ze = { name: "VvAction" }, et = /* @__PURE__ */ M({
535
535
  _: 3
536
536
  }, 16, ["class"]));
537
537
  }
538
- }), tt = et;
539
- function de(e, t, a) {
540
- return i(() => {
541
- const r = { [e]: !0 }, o = typeof t?.value == "string" ? t.value.split(" ") : t?.value;
542
- return o && Array.isArray(o) && o.forEach((u) => {
538
+ }), et = Ze;
539
+ function de(e, t, o) {
540
+ return l(() => {
541
+ const r = { [e]: !0 }, a = typeof t?.value == "string" ? t.value.split(" ") : t?.value;
542
+ return a && Array.isArray(a) && a.forEach((u) => {
543
543
  u && (r[`${e}--${u}`] = !0);
544
- }), a && Object.keys(a.value).forEach((u) => {
545
- r[`${e}--${u}`] = v(a.value[u]);
544
+ }), o && Object.keys(o.value).forEach((u) => {
545
+ r[`${e}--${u}`] = v(o.value[u]);
546
546
  }), r;
547
547
  });
548
548
  }
549
- var rt = { name: "VvIcon" }, ot = /* @__PURE__ */ M({
550
- ...rt,
549
+ var tt = { name: "VvIcon" }, rt = /* @__PURE__ */ x({
550
+ ...tt,
551
551
  props: /* @__PURE__ */ ye({
552
552
  name: {},
553
553
  color: {},
@@ -567,31 +567,30 @@ var rt = { name: "VvIcon" }, ot = /* @__PURE__ */ M({
567
567
  modifiers: {}
568
568
  }, Ve),
569
569
  setup(e) {
570
- const t = e, a = i(() => typeof t.rotate == "string" ? Number.parseFloat(t.rotate) : t.rotate), r = G(!0), o = se(), { modifiers: u } = te(t), g = de("vv-icon", u), d = i(() => t.provider || o?.iconsProvider), y = i(() => {
571
- const n = t.name ?? "", l = `@${d.value}:${t.prefix}:${n}`;
572
- if (T(l)) return l;
573
- const b = o?.iconsCollections.find((S) => T(`@${d.value}:${S.prefix}:${n}`));
574
- return b ? `@${d.value}:${b.prefix}:${n}` : n;
570
+ const t = e, o = l(() => typeof t.rotate == "string" ? Number.parseFloat(t.rotate) : t.rotate), r = M(!0), a = se(), { modifiers: u } = te(t), p = de("vv-icon", u), d = l(() => t.provider || a?.iconsProvider), m = l(() => {
571
+ const i = t.name ?? "", n = `@${d.value}:${t.prefix}:${i}`;
572
+ if (D(n)) return n;
573
+ const y = a?.iconsCollections.find((S) => D(`@${d.value}:${S.prefix}:${i}`));
574
+ return y ? `@${d.value}:${y.prefix}:${i}` : i;
575
575
  });
576
- function c(n) {
577
- const l = typeof window < "u" ? new window.DOMParser() : null;
578
- return l ? l.parseFromString(n, "text/html").querySelector("svg") : null;
576
+ function c(i) {
577
+ return globalThis.window === void 0 ? null : new globalThis.DOMParser().parseFromString(i, "text/html").querySelector("svg");
579
578
  }
580
- function p(n) {
581
- const l = c(n), b = l?.innerHTML.trim() || "";
582
- l && b && we(`@${d.value}:${t.prefix}:${t.name}`, {
583
- body: b,
584
- height: l.viewBox.baseVal.height,
585
- width: l.viewBox.baseVal.width
579
+ function g(i) {
580
+ const n = c(i), y = n?.innerHTML.trim() || "";
581
+ n && y && ke(`@${d.value}:${t.prefix}:${t.name}`, {
582
+ body: y,
583
+ height: n.viewBox.baseVal.height,
584
+ width: n.viewBox.baseVal.width
586
585
  });
587
586
  }
588
- return o && t.src && !T(`@${d.value}:${t.prefix}:${t.name}`) && (r.value = !1, o.fetchIcon(t.src).then((n) => {
589
- n && p(n), r.value = !0;
590
- }).catch((n) => {
591
- throw r.value = !0, new Error(`Error during fetch icon: ${n?.message}`);
592
- })), t.svg && p(t.svg), (n, l) => v(r) ? (B(), O(v(ke), _({
587
+ return a && t.src && !D(`@${d.value}:${t.prefix}:${t.name}`) && (r.value = !1, a.fetchIcon(t.src).then((i) => {
588
+ i && g(i), r.value = !0;
589
+ }).catch((i) => {
590
+ throw r.value = !0, new Error(`Error during fetch icon: ${i?.message}`);
591
+ })), t.svg && g(t.svg), (i, n) => v(r) ? (B(), w(v(Oe), E({
593
592
  key: 0,
594
- class: v(g)
593
+ class: v(p)
595
594
  }, {
596
595
  inline: e.inline,
597
596
  width: e.width,
@@ -599,120 +598,120 @@ var rt = { name: "VvIcon" }, ot = /* @__PURE__ */ M({
599
598
  horizontalFlip: e.horizontalFlip,
600
599
  verticalFlip: e.verticalFlip,
601
600
  flip: e.flip,
602
- rotate: v(a),
601
+ rotate: v(o),
603
602
  color: e.color,
604
- icon: v(y)
605
- }, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) : w("v-if", !0);
603
+ icon: v(m)
604
+ }, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) : k("v-if", !0);
606
605
  }
607
- }), Q = ot;
608
- function at(e) {
609
- return i(() => String(e?.value || Be()));
606
+ }), Q = rt;
607
+ function ot(e) {
608
+ return l(() => String(e?.value || Be()));
610
609
  }
611
- function fe(e, t, a) {
612
- return a ? X(e, a) === X(t, a) : x(e, t);
610
+ function fe(e, t, o) {
611
+ return o ? X(e, o) === X(t, o) : J(e, t);
613
612
  }
614
- function x(e, t) {
615
- if (e === t) return !0;
616
- if (e && t && typeof e == "object" && typeof t == "object") {
617
- const a = Array.isArray(e), r = Array.isArray(t);
618
- let o, u, g;
619
- if (a && r) {
620
- if (u = e.length, u !== t.length) return !1;
621
- for (o = u; o-- !== 0; ) if (!x(e[o], t[o])) return !1;
622
- return !0;
623
- }
624
- if (a !== r) return !1;
625
- const d = e instanceof Date, y = t instanceof Date;
626
- if (d !== y) return !1;
627
- if (d && y) return e.getTime() === t.getTime();
628
- const c = e instanceof RegExp, p = t instanceof RegExp;
629
- if (c !== p) return !1;
630
- if (c && p) return e.toString() === t.toString();
631
- const n = Object.keys(e);
632
- if (u = n.length, u !== Object.keys(t).length) return !1;
633
- for (o = u; o-- !== 0; ) if (!Object.hasOwn(t, n[o])) return !1;
634
- for (o = u; o-- !== 0; )
635
- if (g = n[o], !x(e[g], t[g])) return !1;
636
- return !0;
613
+ function at(e, t) {
614
+ if (e.length !== t.length) return !1;
615
+ for (let o = e.length; o-- !== 0; ) if (!J(e[o], t[o])) return !1;
616
+ return !0;
617
+ }
618
+ function nt(e, t) {
619
+ const o = Object.keys(e), { length: r } = o;
620
+ if (r !== Object.keys(t).length) return !1;
621
+ for (let a = r; a-- !== 0; ) if (!Object.hasOwn(t, o[a])) return !1;
622
+ for (let a = r; a-- !== 0; ) {
623
+ const u = o[a];
624
+ if (!J(e[u], t[u])) return !1;
637
625
  }
638
- return Number.isNaN(e) && Number.isNaN(t);
626
+ return !0;
627
+ }
628
+ function J(e, t) {
629
+ if (e === t) return !0;
630
+ if (!e || !t || typeof e != "object" || typeof t != "object") return Number.isNaN(e) && Number.isNaN(t);
631
+ const o = Array.isArray(e), r = Array.isArray(t);
632
+ if (o !== r) return !1;
633
+ if (o && r) return at(e, t);
634
+ const a = e instanceof Date, u = t instanceof Date;
635
+ if (a !== u) return !1;
636
+ if (a && u) return e.getTime() === t.getTime();
637
+ const p = e instanceof RegExp, d = t instanceof RegExp;
638
+ return p !== d ? !1 : p && d ? e.toString() === t.toString() : nt(e, t);
639
639
  }
640
640
  function X(e, t) {
641
- if (e && Object.keys(e).length && t) if (t.includes(".")) {
642
- const a = t.split(".");
641
+ if (e && Object.keys(e).length && t) {
642
+ if (!t.includes(".")) return e[t];
643
+ const o = t.split(".");
643
644
  let r = e;
644
- for (let o = 0, u = a.length; o < u; ++o) {
645
- if (e == null) return null;
646
- r = r[a[o]];
645
+ for (let a = 0, u = o.length; a < u; ++a) {
646
+ if (r == null) return null;
647
+ r = r[o[a]];
647
648
  }
648
649
  return r;
649
- } else
650
- return e[t];
651
- else return null;
650
+ } else return null;
652
651
  }
653
652
  function Z(e, t) {
654
- if (e != null && t && t.length) {
655
- for (const a of t) if (fe(e, a)) return !0;
653
+ if (e != null && t?.length) {
654
+ for (const o of t) if (fe(e, o)) return !0;
656
655
  }
657
656
  return !1;
658
657
  }
659
- function nt(e, t) {
660
- const a = i(() => typeof e?.value == "string" ? { name: e?.value } : e?.value), r = i(() => t?.value === E.before ? a.value : void 0), o = i(() => t?.value === E.after ? a.value : void 0);
658
+ function lt(e, t) {
659
+ const o = l(() => typeof e?.value == "string" ? { name: e?.value } : e?.value), r = l(() => t?.value === _.before ? o.value : void 0), a = l(() => t?.value === _.after ? o.value : void 0);
661
660
  return {
662
- hasIcon: a,
663
- hasIconLeft: i(() => t?.value === m.left ? a.value : void 0),
664
- hasIconRight: i(() => t?.value === m.right ? a.value : void 0),
665
- hasIconTop: i(() => t?.value === m.top ? a.value : void 0),
666
- hasIconBottom: i(() => t?.value === m.bottom ? a.value : void 0),
661
+ hasIcon: o,
662
+ hasIconLeft: l(() => t?.value === b.left ? o.value : void 0),
663
+ hasIconRight: l(() => t?.value === b.right ? o.value : void 0),
664
+ hasIconTop: l(() => t?.value === b.top ? o.value : void 0),
665
+ hasIconBottom: l(() => t?.value === b.bottom ? o.value : void 0),
667
666
  hasIconBefore: r,
668
- hasIconAfter: o
667
+ hasIconAfter: a
669
668
  };
670
669
  }
671
- var lt = {
670
+ var ut = {
672
671
  key: 1,
673
672
  class: "vv-button__label"
674
- }, ut = {
673
+ }, it = {
675
674
  key: 1,
676
675
  class: "vv-button__label"
677
- }, it = {
676
+ }, st = {
678
677
  name: "VvButton",
679
678
  inheritAttrs: !1
680
- }, st = /* @__PURE__ */ M({
681
- ...it,
679
+ }, dt = /* @__PURE__ */ x({
680
+ ...st,
682
681
  props: Ue,
683
682
  emits: Je,
684
- setup(e, { expose: t, emit: a }) {
685
- const r = e, o = a, u = Se(), g = Ie(), { id: d, modifiers: y, iconPosition: c, icon: p, label: n, modelValue: l, disabled: b, toggle: S, unselectable: A } = Ye(r, o), C = at(d), P = i(() => u?.name || C.value), N = G(null);
686
- t({ $el: i(() => N.value?.$el) });
687
- const s = i(() => S.value ? Array.isArray(l.value) ? Z(P.value, l.value) : fe(P.value, l.value) : r.pressed), U = de("vv-button", y, i(() => ({
688
- reverse: [m.right, m.bottom].includes(c.value),
689
- column: [m.top, m.bottom].includes(c.value),
690
- "icon-only": !!(p?.value && !n?.value && !g.default)
691
- }))), { hasIcon: Y } = nt(p), k = i(() => r.value !== void 0 ? r.value : P.value), ve = i(() => {
683
+ setup(e, { expose: t, emit: o }) {
684
+ const r = e, a = o, u = Se(), p = Ie(), { id: d, modifiers: m, iconPosition: c, icon: g, label: i, modelValue: n, disabled: y, toggle: S, unselectable: A } = Ye(r, a), C = ot(d), P = l(() => u?.name || C.value), N = M(null);
685
+ t({ $el: l(() => N.value?.$el) });
686
+ const s = l(() => S.value ? Array.isArray(n.value) ? Z(P.value, n.value) : fe(P.value, n.value) : r.pressed), U = de("vv-button", m, l(() => ({
687
+ reverse: [b.right, b.bottom].includes(c.value),
688
+ column: [b.top, b.bottom].includes(c.value),
689
+ "icon-only": !!(g?.value && !i?.value && !p.default)
690
+ }))), { hasIcon: Y } = lt(g), O = l(() => r.value === void 0 ? P.value : r.value), ve = l(() => {
692
691
  if (S.value)
693
692
  return { onClick: ce };
694
693
  });
695
694
  function ce() {
696
695
  if (S.value) {
697
- if (Array.isArray(l.value)) {
698
- if (Z(k.value, l.value)) {
699
- A.value && (l.value = l.value.filter((f) => f !== k.value));
696
+ if (Array.isArray(n.value)) {
697
+ if (Z(O.value, n.value)) {
698
+ A.value && (n.value = n.value.filter((f) => f !== O.value));
700
699
  return;
701
700
  }
702
- l.value.push(k.value);
701
+ n.value.push(O.value);
703
702
  return;
704
703
  }
705
- if (k.value === l.value && A.value) {
706
- l.value = r.uncheckedValue;
704
+ if (O.value === n.value && A.value) {
705
+ n.value = r.uncheckedValue;
707
706
  return;
708
707
  }
709
- l.value = k.value;
708
+ n.value = O.value;
710
709
  }
711
710
  }
712
- return (f, dt) => (B(), O(tt, _({
711
+ return (f, ft) => (B(), w(et, E({
713
712
  ...v(u),
714
713
  ...v(ve),
715
- disabled: v(b),
714
+ disabled: v(y),
716
715
  pressed: v(s),
717
716
  active: f.active,
718
717
  type: f.type,
@@ -727,20 +726,20 @@ var lt = {
727
726
  ref: N,
728
727
  class: v(U)
729
728
  }), {
730
- default: re(() => [I(f.$slots, "default", {}, () => [f.loading ? I(f.$slots, "loading", { key: 0 }, () => [f.loadingIcon ? (B(), O(Q, {
729
+ default: re(() => [I(f.$slots, "default", {}, () => [f.loading ? I(f.$slots, "loading", { key: 0 }, () => [f.loadingIcon ? (B(), w(Q, {
731
730
  key: 0,
732
731
  class: "vv-button__loading-icon",
733
732
  name: f.loadingIcon
734
- }, null, 8, ["name"])) : w("v-if", !0), f.loadingLabel ? (B(), D("span", lt, F(f.loadingLabel), 1)) : w("v-if", !0)]) : (B(), D(pe, { key: 1 }, [
733
+ }, null, 8, ["name"])) : k("v-if", !0), f.loadingLabel ? (B(), T("span", ut, F(f.loadingLabel), 1)) : k("v-if", !0)]) : (B(), T(pe, { key: 1 }, [
735
734
  I(f.$slots, "before"),
736
- v(Y) ? (B(), O(Q, _({ key: 0 }, v(Y), { class: "vv-button__icon" }), null, 16)) : w("v-if", !0),
737
- v(n) ? (B(), D("span", ut, [I(f.$slots, "label", {}, () => [ee(F(v(n)), 1)])])) : w("v-if", !0),
735
+ v(Y) ? (B(), w(Q, E({ key: 0 }, v(Y), { class: "vv-button__icon" }), null, 16)) : k("v-if", !0),
736
+ v(i) ? (B(), T("span", it, [I(f.$slots, "label", {}, () => [ee(F(v(i)), 1)])])) : k("v-if", !0),
738
737
  I(f.$slots, "after")
739
738
  ], 64))])]),
740
739
  _: 3
741
740
  }, 16, ["id", "class"]));
742
741
  }
743
- }), ht = st;
742
+ }), St = dt;
744
743
  export {
745
- ht as default
744
+ St as default
746
745
  };