@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,7 +1,7 @@
1
- import { computed as o, createElementBlock as fe, createElementVNode as ce, createSlots as pe, createTextVNode as be, createVNode as ge, defineComponent as W, guardReactiveProps as L, h as B, inject as Q, isRef as X, normalizeClass as ye, normalizeProps as P, onMounted as he, openBlock as Se, ref as me, renderSlot as S, toDisplayString as Oe, toRef as Le, toRefs as Z, unref as v, useId as Be, useSlots as Pe, vModelCheckbox as Ve, watch as Ae, watchEffect as Ce, withCtx as V, withDirectives as je } from "vue";
1
+ import { computed as n, createElementBlock as fe, createElementVNode as ce, createSlots as pe, createTextVNode as be, createVNode as ye, defineComponent as W, guardReactiveProps as O, h as L, inject as Q, isRef as X, normalizeClass as ge, normalizeProps as k, onMounted as he, openBlock as Se, ref as me, renderSlot as h, toDisplayString as Oe, toRef as Le, toRefs as Z, unref as u, useId as ke, useSlots as Pe, vModelCheckbox as Be, watch as Ae, watchEffect as Ce, withCtx as P, withDirectives as Ve } from "vue";
2
2
  var K = /* @__PURE__ */ (function(e) {
3
3
  return e.local = "local", e.session = "session", e;
4
- })({}), ke = /* @__PURE__ */ (function(e) {
4
+ })({}), je = /* @__PURE__ */ (function(e) {
5
5
  return e.absolute = "absolute", e.fixed = "fixed", e;
6
6
  })({}), T = /* @__PURE__ */ (function(e) {
7
7
  return e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e;
@@ -13,7 +13,7 @@ var K = /* @__PURE__ */ (function(e) {
13
13
  return e.button = "button", e.submit = "submit", e.reset = "reset", e;
14
14
  })({}), Ie = /* @__PURE__ */ (function(e) {
15
15
  return e.nuxtLink = "nuxt-link", e.routerLink = "router-link", e.a = "a", e.button = "button", e;
16
- })({}), we = /* @__PURE__ */ Symbol.for("volver"), xe = /* @__PURE__ */ Symbol.for("checkGroup"), $e = {
16
+ })({}), we = /* @__PURE__ */ Symbol.for("volver"), xe = /* @__PURE__ */ Symbol.for("checkGroup"), Ee = {
17
17
  showPassword: "eye-on",
18
18
  hidePassword: "eye-off",
19
19
  showDatePicker: "calendar",
@@ -24,7 +24,7 @@ var K = /* @__PURE__ */ (function(e) {
24
24
  remove: "trash",
25
25
  edit: "edit",
26
26
  download: "download"
27
- }, Ee = {
27
+ }, $e = {
28
28
  to: { type: [String, Object] },
29
29
  href: String,
30
30
  target: String,
@@ -32,7 +32,7 @@ var K = /* @__PURE__ */ (function(e) {
32
32
  type: String,
33
33
  default: "noopener noreferrer"
34
34
  }
35
- }, x = {
35
+ }, w = {
36
36
  valid: {
37
37
  type: Boolean,
38
38
  default: !1
@@ -41,7 +41,7 @@ var K = /* @__PURE__ */ (function(e) {
41
41
  type: [String, Array],
42
42
  default: void 0
43
43
  }
44
- }, $ = {
44
+ }, x = {
45
45
  invalid: {
46
46
  type: Boolean,
47
47
  default: !1
@@ -59,7 +59,7 @@ var K = /* @__PURE__ */ (function(e) {
59
59
  type: String,
60
60
  default: "Loading..."
61
61
  }
62
- }, A = { disabled: {
62
+ }, B = { disabled: {
63
63
  type: Boolean,
64
64
  default: !1
65
65
  } }, ee = { required: {
@@ -68,35 +68,35 @@ var K = /* @__PURE__ */ (function(e) {
68
68
  } }, _e = { active: {
69
69
  type: Boolean,
70
70
  default: !1
71
- } }, De = { current: {
71
+ } }, Re = { current: {
72
72
  type: Boolean,
73
73
  default: !1
74
- } }, st = {
74
+ } }, ft = {
75
75
  showClearAction: {
76
76
  type: Boolean,
77
77
  default: !1
78
78
  },
79
79
  iconClear: {
80
80
  type: [String, Object],
81
- default: $e.clear
81
+ default: Ee.clear
82
82
  },
83
83
  labelClear: {
84
84
  type: String,
85
85
  default: "Clear"
86
86
  }
87
- }, Re = { pressed: {
87
+ }, De = { pressed: {
88
88
  type: Boolean,
89
89
  default: !1
90
- } }, C = { label: {
90
+ } }, A = { label: {
91
91
  type: [String, Number],
92
92
  default: void 0
93
- } }, _ = { readonly: {
93
+ } }, $ = { readonly: {
94
94
  type: Boolean,
95
95
  default: !1
96
- } }, j = { modifiers: {
96
+ } }, C = { modifiers: {
97
97
  type: [String, Array],
98
98
  default: void 0
99
- } }, D = { hintLabel: {
99
+ } }, _ = { hintLabel: {
100
100
  type: String,
101
101
  default: ""
102
102
  } }, Ge = {
@@ -116,7 +116,7 @@ var K = /* @__PURE__ */ (function(e) {
116
116
  type: [String, Function],
117
117
  default: "disabled"
118
118
  }
119
- }, He = { count: {
119
+ }, qe = { count: {
120
120
  type: [Boolean, String],
121
121
  default: !1,
122
122
  validator: (e) => [
@@ -125,10 +125,10 @@ var K = /* @__PURE__ */ (function(e) {
125
125
  "limit",
126
126
  "countdown"
127
127
  ].includes(e)
128
- } }, Fe = { debounce: {
128
+ } }, He = { debounce: {
129
129
  type: [Number, String],
130
130
  default: void 0
131
- } }, qe = {
131
+ } }, Fe = {
132
132
  icon: {
133
133
  type: [String, Object],
134
134
  default: void 0
@@ -144,7 +144,7 @@ var K = /* @__PURE__ */ (function(e) {
144
144
  } }, Ke = { floating: {
145
145
  type: Boolean,
146
146
  default: !1
147
- } }, Te = { id: [String, Number] }, dt = {
147
+ } }, Te = { id: [String, Number] }, ct = {
148
148
  placement: {
149
149
  type: String,
150
150
  default: T.bottom,
@@ -153,7 +153,7 @@ var K = /* @__PURE__ */ (function(e) {
153
153
  strategy: {
154
154
  type: String,
155
155
  default: void 0,
156
- validator: (e) => Object.values(ke).includes(e)
156
+ validator: (e) => Object.values(je).includes(e)
157
157
  },
158
158
  transitionName: {
159
159
  type: String,
@@ -211,23 +211,23 @@ var K = /* @__PURE__ */ (function(e) {
211
211
  } }, Je = { autocomplete: {
212
212
  type: String,
213
213
  default: "off"
214
- } }, vt = {
214
+ } }, pt = {
215
215
  ...ae,
216
216
  ...Me,
217
217
  ...Je,
218
218
  ...te,
219
- ...A,
220
- ..._,
221
- ...x,
219
+ ...B,
222
220
  ...$,
223
- ...D,
221
+ ...w,
222
+ ...x,
223
+ ..._,
224
224
  ...E,
225
- ...j,
225
+ ...C,
226
+ ...qe,
226
227
  ...He,
227
228
  ...Fe,
228
- ...qe,
229
229
  ...Ke,
230
- ...C,
230
+ ...A,
231
231
  minlength: {
232
232
  type: [String, Number],
233
233
  default: void 0
@@ -244,13 +244,13 @@ var K = /* @__PURE__ */ (function(e) {
244
244
  }, ze = {
245
245
  ...ae,
246
246
  ...te,
247
+ ...w,
247
248
  ...x,
248
- ...$,
249
- ...D,
250
- ...A,
251
249
  ..._,
252
- ...j,
250
+ ...B,
251
+ ...$,
253
252
  ...C,
253
+ ...A,
254
254
  ...E,
255
255
  value: {
256
256
  type: [
@@ -269,15 +269,15 @@ var K = /* @__PURE__ */ (function(e) {
269
269
  ],
270
270
  default: void 0
271
271
  }
272
- }, ft = {
272
+ }, bt = {
273
+ ...w,
273
274
  ...x,
274
- ...$,
275
275
  ...Ge,
276
- ...D,
277
- ...A,
278
276
  ..._,
279
- ...j,
277
+ ...B,
278
+ ...$,
280
279
  ...C,
280
+ ...A,
281
281
  ...E,
282
282
  ...ee,
283
283
  modelValue: {
@@ -298,13 +298,13 @@ var K = /* @__PURE__ */ (function(e) {
298
298
  type: Boolean,
299
299
  default: !1
300
300
  }
301
- }, ct = {
301
+ }, yt = {
302
+ ...B,
302
303
  ...A,
303
- ...C,
304
- ...Re,
305
- ..._e,
306
304
  ...De,
307
- ...Ee,
305
+ ..._e,
306
+ ...Re,
307
+ ...$e,
308
308
  type: {
309
309
  type: String,
310
310
  default: J.button,
@@ -318,7 +318,7 @@ var K = /* @__PURE__ */ (function(e) {
318
318
  type: String,
319
319
  default: Ie.button
320
320
  }
321
- }, pt = {
321
+ }, gt = {
322
322
  storageType: {
323
323
  type: String,
324
324
  default: K.local,
@@ -327,36 +327,36 @@ var K = /* @__PURE__ */ (function(e) {
327
327
  storageKey: String
328
328
  };
329
329
  function Ue(e) {
330
- const a = Q(e, void 0), t = o(() => a !== void 0);
331
- function i(l, n, u) {
332
- const s = a?.[l];
333
- if (s) return o({
330
+ const a = Q(e, void 0), t = n(() => a !== void 0);
331
+ function l(r, o, f) {
332
+ const i = a?.[r];
333
+ if (i) return n({
334
334
  get() {
335
- return s.value;
335
+ return i.value;
336
336
  },
337
- set(r) {
338
- s.value = r;
337
+ set(v) {
338
+ i.value = v;
339
339
  }
340
340
  });
341
- const d = Le(n, l);
342
- return o({
341
+ const c = Le(o, r);
342
+ return n({
343
343
  get() {
344
- return d.value;
344
+ return c.value;
345
345
  },
346
- set(r) {
347
- u && u(`update:${l}`, r);
346
+ set(v) {
347
+ f && f(`update:${r}`, v);
348
348
  }
349
349
  });
350
350
  }
351
351
  return {
352
352
  group: a,
353
353
  isInGroup: t,
354
- getGroupOrLocalRef: i
354
+ getGroupOrLocalRef: l
355
355
  };
356
356
  }
357
357
  var z = {
358
358
  ...ze,
359
- ...j,
359
+ ...C,
360
360
  indeterminate: Boolean,
361
361
  uncheckedValue: [
362
362
  String,
@@ -371,82 +371,82 @@ var z = {
371
371
  "blur"
372
372
  ];
373
373
  function We(e, a) {
374
- const { group: t, isInGroup: i, getGroupOrLocalRef: l } = Ue(xe), { id: n, switch: u, indeterminate: s } = Z(e);
374
+ const { group: t, isInGroup: l, getGroupOrLocalRef: r } = Ue(xe), { id: o, switch: f, indeterminate: i } = Z(e);
375
375
  return {
376
- id: n,
377
- propsSwitch: u,
378
- indeterminate: s,
376
+ id: o,
377
+ propsSwitch: f,
378
+ indeterminate: i,
379
379
  group: t,
380
- isInGroup: i,
381
- modelValue: l("modelValue", e, a),
382
- valid: l("valid", e),
383
- invalid: l("invalid", e),
384
- readonly: o(() => !!(e.readonly || t?.readonly.value)),
385
- disabled: o(() => !!(e.disabled || t?.disabled.value))
380
+ isInGroup: l,
381
+ modelValue: r("modelValue", e, a),
382
+ valid: r("valid", e),
383
+ invalid: r("invalid", e),
384
+ readonly: n(() => !!(e.readonly || t?.readonly.value)),
385
+ disabled: n(() => !!(e.disabled || t?.disabled.value))
386
386
  };
387
387
  }
388
- function le(e, a, t) {
389
- return t ? U(e, t) === U(a, t) : w(e, a);
388
+ function re(e, a, t) {
389
+ return t ? U(e, t) === U(a, t) : R(e, a);
390
390
  }
391
- function w(e, a) {
392
- if (e === a) return !0;
393
- if (e && a && typeof e == "object" && typeof a == "object") {
394
- const t = Array.isArray(e), i = Array.isArray(a);
395
- let l, n, u;
396
- if (t && i) {
397
- if (n = e.length, n !== a.length) return !1;
398
- for (l = n; l-- !== 0; ) if (!w(e[l], a[l])) return !1;
399
- return !0;
400
- }
401
- if (t !== i) return !1;
402
- const s = e instanceof Date, d = a instanceof Date;
403
- if (s !== d) return !1;
404
- if (s && d) return e.getTime() === a.getTime();
405
- const r = e instanceof RegExp, b = a instanceof RegExp;
406
- if (r !== b) return !1;
407
- if (r && b) return e.toString() === a.toString();
408
- const f = Object.keys(e);
409
- if (n = f.length, n !== Object.keys(a).length) return !1;
410
- for (l = n; l-- !== 0; ) if (!Object.hasOwn(a, f[l])) return !1;
411
- for (l = n; l-- !== 0; )
412
- if (u = f[l], !w(e[u], a[u])) return !1;
413
- return !0;
391
+ function Qe(e, a) {
392
+ if (e.length !== a.length) return !1;
393
+ for (let t = e.length; t-- !== 0; ) if (!R(e[t], a[t])) return !1;
394
+ return !0;
395
+ }
396
+ function Xe(e, a) {
397
+ const t = Object.keys(e), { length: l } = t;
398
+ if (l !== Object.keys(a).length) return !1;
399
+ for (let r = l; r-- !== 0; ) if (!Object.hasOwn(a, t[r])) return !1;
400
+ for (let r = l; r-- !== 0; ) {
401
+ const o = t[r];
402
+ if (!R(e[o], a[o])) return !1;
414
403
  }
415
- return Number.isNaN(e) && Number.isNaN(a);
404
+ return !0;
405
+ }
406
+ function R(e, a) {
407
+ if (e === a) return !0;
408
+ if (!e || !a || typeof e != "object" || typeof a != "object") return Number.isNaN(e) && Number.isNaN(a);
409
+ const t = Array.isArray(e), l = Array.isArray(a);
410
+ if (t !== l) return !1;
411
+ if (t && l) return Qe(e, a);
412
+ const r = e instanceof Date, o = a instanceof Date;
413
+ if (r !== o) return !1;
414
+ if (r && o) return e.getTime() === a.getTime();
415
+ const f = e instanceof RegExp, i = a instanceof RegExp;
416
+ return f !== i ? !1 : f && i ? e.toString() === a.toString() : Xe(e, a);
416
417
  }
417
418
  function U(e, a) {
418
- if (e && Object.keys(e).length && a) if (a.includes(".")) {
419
+ if (e && Object.keys(e).length && a) {
420
+ if (!a.includes(".")) return e[a];
419
421
  const t = a.split(".");
420
- let i = e;
421
- for (let l = 0, n = t.length; l < n; ++l) {
422
- if (e == null) return null;
423
- i = i[t[l]];
422
+ let l = e;
423
+ for (let r = 0, o = t.length; r < o; ++r) {
424
+ if (l == null) return null;
425
+ l = l[t[r]];
424
426
  }
425
- return i;
426
- } else
427
- return e[a];
428
- else return null;
427
+ return l;
428
+ } else return null;
429
429
  }
430
- function Qe(e, a) {
431
- if (e != null && a && a.length) {
432
- for (const t of a) if (le(e, t)) return !0;
430
+ function Ze(e, a) {
431
+ if (e != null && a?.length) {
432
+ for (const t of a) if (re(e, t)) return !0;
433
433
  }
434
434
  return !1;
435
435
  }
436
- function Xe(e) {
436
+ function et(e) {
437
437
  return typeof e == "string";
438
438
  }
439
439
  function Y(e) {
440
- return Array.isArray(e) ? e.filter((a) => Xe(a)).join(" ") : e;
440
+ return Array.isArray(e) ? e.filter((a) => et(a)).join(" ") : e;
441
441
  }
442
- function Ze(e, a) {
443
- const t = o(() => X(e) ? e.value : e), i = o(() => Y(t.value.invalidLabel)), l = o(() => Y(t.value.validLabel)), n = o(() => t.value.loadingLabel), u = o(() => t.value.hintLabel), s = o(() => !!(t.value.loading && (a.loading || n.value))), d = o(() => !s.value && !!(t.value.invalid && (a.invalid || i.value))), r = o(() => !s.value && !d.value && !!(t.value.valid && (a.valid || l.value))), b = o(() => !s.value && !d.value && !r.value && !!(a.hint || u.value)), f = o(() => d.value || r.value || s.value || b.value);
442
+ function tt(e, a) {
443
+ const t = n(() => X(e) ? e.value : e), l = n(() => Y(t.value.invalidLabel)), r = n(() => Y(t.value.validLabel)), o = n(() => t.value.loadingLabel), f = n(() => t.value.hintLabel), i = n(() => !!(t.value.loading && (a.loading || o.value))), c = n(() => !i.value && !!(t.value.invalid && (a.invalid || l.value))), v = n(() => !i.value && !c.value && !!(t.value.valid && (a.valid || r.value))), p = n(() => !i.value && !c.value && !v.value && !!(a.hint || f.value)), V = n(() => c.value || v.value || i.value || p.value);
444
444
  return {
445
- hasInvalidLabelOrSlot: d,
446
- hasHintLabelOrSlot: b,
447
- hasValidLabelOrSlot: r,
448
- hasLoadingLabelOrSlot: s,
449
- hintSlotScope: o(() => ({
445
+ hasInvalidLabelOrSlot: c,
446
+ hasHintLabelOrSlot: p,
447
+ hasValidLabelOrSlot: v,
448
+ hasLoadingLabelOrSlot: i,
449
+ hintSlotScope: n(() => ({
450
450
  modelValue: t.value.modelValue,
451
451
  valid: t.value.valid,
452
452
  invalid: t.value.invalid,
@@ -460,72 +460,70 @@ function Ze(e, a) {
460
460
  } },
461
461
  setup() {
462
462
  return {
463
- isVisible: f,
464
- invalidLabel: i,
465
- validLabel: l,
466
- loadingLabel: n,
467
- hintLabel: u,
468
- hasInvalidLabelOrSlot: d,
469
- hasValidLabelOrSlot: r,
470
- hasLoadingLabelOrSlot: s,
471
- hasHintLabelOrSlot: b
463
+ isVisible: V,
464
+ invalidLabel: l,
465
+ validLabel: r,
466
+ loadingLabel: o,
467
+ hintLabel: f,
468
+ hasInvalidLabelOrSlot: c,
469
+ hasValidLabelOrSlot: v,
470
+ hasLoadingLabelOrSlot: i,
471
+ hasHintLabelOrSlot: p
472
472
  };
473
473
  },
474
474
  render() {
475
475
  if (this.isVisible) {
476
- let c;
477
- return this.hasInvalidLabelOrSlot && (c = "alert"), this.hasValidLabelOrSlot && (c = "status"), this.hasLoadingLabelOrSlot ? B(this.tag, { role: c }, this.$slots.loading?.() ?? this.loadingLabel) : this.hasInvalidLabelOrSlot ? B(this.tag, { role: c }, this.$slots.invalid?.() ?? this.$slots.invalid ?? this.invalidLabel) : this.hasValidLabelOrSlot ? B(this.tag, { role: c }, this.$slots.valid?.() ?? this.validLabel) : B(this.tag, { role: c }, this.$slots.hint?.() ?? this.$slots.hint ?? this.hintLabel);
476
+ let s;
477
+ return this.hasInvalidLabelOrSlot && (s = "alert"), this.hasValidLabelOrSlot && (s = "status"), this.hasLoadingLabelOrSlot ? L(this.tag, { role: s }, this.$slots.loading?.() ?? this.loadingLabel) : this.hasInvalidLabelOrSlot ? L(this.tag, { role: s }, this.$slots.invalid?.() ?? this.$slots.invalid ?? this.invalidLabel) : this.hasValidLabelOrSlot ? L(this.tag, { role: s }, this.$slots.valid?.() ?? this.validLabel) : L(this.tag, { role: s }, this.$slots.hint?.() ?? this.$slots.hint ?? this.hintLabel);
478
478
  }
479
479
  return null;
480
480
  }
481
481
  })
482
482
  };
483
483
  }
484
- function et() {
484
+ function at() {
485
485
  return Q(we, void 0);
486
486
  }
487
- function tt(e, a, t) {
488
- const i = et(), l = o(() => {
489
- if (!(!i || !i.defaults.value?.[e]))
490
- return i.defaults.value[e];
487
+ function rt(e, a, t) {
488
+ let l = a;
489
+ if (Array.isArray(e) && e.length) {
490
+ const r = e[0];
491
+ r() === a && (l = t);
492
+ }
493
+ if (typeof e == "function" && e() === a && (l = t), typeof e == "object") {
494
+ let r = e.default;
495
+ typeof r == "function" && (r = r()), (typeof r == "object" ? JSON.stringify(r) === JSON.stringify(a) : r === a) && (l = t);
496
+ }
497
+ return l;
498
+ }
499
+ function lt(e, a, t) {
500
+ const l = at(), r = n(() => {
501
+ if (l?.defaults.value?.[e])
502
+ return l.defaults.value[e];
491
503
  });
492
- return o(() => {
493
- if (l.value === void 0) return t;
494
- const n = l.value, u = a, s = t;
495
- return Object.keys(u).reduce((d, r) => {
496
- const b = s[r];
497
- if (d[r] = b, r in n) {
498
- if (Array.isArray(u[r])) {
499
- const f = u[r];
500
- f.length && f[0] === b && (d[r] = n[r]);
501
- }
502
- if (typeof u[r] == "function") {
503
- const f = u[r];
504
- f() === b && (d[r] = n[r]);
505
- }
506
- if (typeof u[r] == "object") {
507
- let f = u[r].default;
508
- typeof f == "function" && (f = f()), typeof f == "object" ? JSON.stringify(f) === JSON.stringify(b) && (d[r] = n[r]) : f === b && (d[r] = n[r]);
509
- }
510
- }
511
- return d;
504
+ return n(() => {
505
+ if (r.value === void 0) return t;
506
+ const o = r.value, f = a, i = t;
507
+ return Object.keys(f).reduce((c, v) => {
508
+ const p = i[v];
509
+ return c[v] = v in o ? rt(f[v], p, o[v]) : p, c;
512
510
  }, {});
513
511
  });
514
512
  }
515
- function at(e) {
516
- return o(() => String(e?.value || Be()));
513
+ function nt(e) {
514
+ return n(() => String(e?.value || ke()));
517
515
  }
518
- function lt(e, a, t) {
519
- return o(() => {
520
- const i = { [e]: !0 }, l = typeof a?.value == "string" ? a.value.split(" ") : a?.value;
521
- return l && Array.isArray(l) && l.forEach((n) => {
522
- n && (i[`${e}--${n}`] = !0);
523
- }), t && Object.keys(t.value).forEach((n) => {
524
- i[`${e}--${n}`] = v(t.value[n]);
525
- }), i;
516
+ function ot(e, a, t) {
517
+ return n(() => {
518
+ const l = { [e]: !0 }, r = typeof a?.value == "string" ? a.value.split(" ") : a?.value;
519
+ return r && Array.isArray(r) && r.forEach((o) => {
520
+ o && (l[`${e}--${o}`] = !0);
521
+ }), t && Object.keys(t.value).forEach((o) => {
522
+ l[`${e}--${o}`] = u(t.value[o]);
523
+ }), l;
526
524
  });
527
525
  }
528
- var rt = ["for"], nt = [
526
+ var it = ["for"], ut = [
529
527
  "id",
530
528
  "name",
531
529
  "disabled",
@@ -534,97 +532,97 @@ var rt = ["for"], nt = [
534
532
  "aria-invalid",
535
533
  "aria-describedby",
536
534
  "aria-errormessage"
537
- ], ot = { name: "VvCheckbox" }, it = /* @__PURE__ */ W({
538
- ...ot,
535
+ ], st = { name: "VvCheckbox" }, dt = /* @__PURE__ */ W({
536
+ ...st,
539
537
  props: z,
540
538
  emits: Ye,
541
539
  setup(e, { emit: a }) {
542
- const t = e, i = a, l = Pe(), n = tt("VvCheckbox", z, t), { id: u, disabled: s, readonly: d, valid: r, invalid: b, propsSwitch: f, modelValue: c, indeterminate: R, isInGroup: G } = We(t, i), k = at(u), N = o(() => `${k.value}-hint`), re = o(() => H.value ? -1 : t.tabindex), m = me(), y = o(() => t.uncheckedValue !== void 0 && !G.value), H = o(() => s.value || d.value), ne = o(() => {
543
- if (b.value === !0) return !0;
544
- if (r.value === !0) return !1;
545
- }), F = o(() => y.value ? c.value === t.value : Array.isArray(c.value) ? Qe(t.value, c.value) : le(t.value, c.value)), q = o(() => !!(R.value || !F.value && y.value && t.uncheckedValue !== c.value)), oe = o(() => {
540
+ const t = e, l = a, r = Pe(), o = lt("VvCheckbox", z, t), { id: f, disabled: i, readonly: c, valid: v, invalid: p, propsSwitch: V, modelValue: s, indeterminate: D, isInGroup: G } = We(t, l), j = nt(f), N = n(() => `${j.value}-hint`), le = n(() => q.value ? -1 : t.tabindex), S = me(), y = n(() => t.uncheckedValue !== void 0 && !G.value), q = n(() => i.value || c.value), ne = n(() => {
541
+ if (p.value === !0) return !0;
542
+ if (v.value === !0) return !1;
543
+ }), H = n(() => y.value ? s.value === t.value : Array.isArray(s.value) ? Ze(t.value, s.value) : re(t.value, s.value)), F = n(() => !!(D.value || !H.value && y.value && t.uncheckedValue !== s.value)), oe = n(() => {
546
544
  if (!y.value)
547
545
  return [
548
546
  "string",
549
547
  "number",
550
548
  "boolean"
551
549
  ].includes(typeof t.value) ? t.value : !0;
552
- }), I = o({
550
+ }), I = n({
553
551
  get() {
554
- return F.value;
552
+ return H.value;
555
553
  },
556
- set(p) {
557
- if (y.value) c.value = p ? t.value : t.uncheckedValue;
558
- else if (Array.isArray(c.value) || G.value) {
559
- const g = c.value ?? [], h = new Set(Array.isArray(g) ? g : [g]);
560
- p ? h.add(t.value) : h.delete(t.value), c.value = [...h];
561
- } else c.value = p ? t.value : void 0;
562
- i("change", p);
554
+ set(d) {
555
+ if (y.value) s.value = d ? t.value : t.uncheckedValue;
556
+ else if (Array.isArray(s.value) || G.value) {
557
+ const b = s.value ?? [], g = new Set(Array.isArray(b) ? b : [b]);
558
+ d ? g.add(t.value) : g.delete(t.value), s.value = [...g];
559
+ } else s.value = d ? t.value : void 0;
560
+ l("change", d);
563
561
  }
564
- }), { modifiers: ie } = Z(t), ue = lt("vv-checkbox", ie, o(() => ({
565
- switch: f.value,
566
- valid: r.value,
567
- invalid: b.value,
568
- disabled: s.value,
569
- readonly: d.value,
570
- indeterminate: R.value
562
+ }), { modifiers: ie } = Z(t), ue = ot("vv-checkbox", ie, n(() => ({
563
+ switch: V.value,
564
+ valid: v.value,
565
+ invalid: p.value,
566
+ disabled: i.value,
567
+ readonly: c.value,
568
+ indeterminate: D.value
571
569
  })));
572
570
  Ce(() => {
573
- y.value && Array.isArray(c.value) && console.warn("[VvCheckbox] The model value is an array but the component is in binary mode.");
574
- }), Ae(() => q.value, (p) => {
575
- p ? m.value.indeterminate = !0 : m.value.indeterminate = !1;
571
+ y.value && Array.isArray(s.value) && console.warn("[VvCheckbox] The model value is an array but the component is in binary mode.");
572
+ }), Ae(() => F.value, (d) => {
573
+ d ? S.value.indeterminate = !0 : S.value.indeterminate = !1;
576
574
  }), he(() => {
577
- q.value && (m.value.indeterminate = !0);
575
+ F.value && (S.value.indeterminate = !0);
578
576
  });
579
- const { HintSlot: se, hasHintLabelOrSlot: de, hasInvalidLabelOrSlot: ve, hintSlotScope: O } = Ze(n, l);
580
- return (p, g) => (Se(), fe("label", {
581
- class: ye(v(ue)),
582
- for: v(k)
577
+ const { HintSlot: se, hasHintLabelOrSlot: de, hasInvalidLabelOrSlot: ve, hintSlotScope: m } = tt(o, r);
578
+ return (d, b) => (Se(), fe("label", {
579
+ class: ge(u(ue)),
580
+ for: u(j)
583
581
  }, [
584
- je(ce("input", {
585
- id: v(k),
582
+ Ve(ce("input", {
583
+ id: u(j),
586
584
  ref_key: "input",
587
- ref: m,
588
- "onUpdate:modelValue": g[0] || (g[0] = (h) => X(I) ? I.value = h : null),
585
+ ref: S,
586
+ "onUpdate:modelValue": b[0] || (b[0] = (g) => X(I) ? I.value = g : null),
589
587
  type: "checkbox",
590
588
  class: "vv-checkbox__input",
591
- name: p.name,
592
- disabled: v(H),
593
- value: v(oe),
594
- tabindex: v(re),
595
- "aria-invalid": v(ne),
596
- "aria-describedby": v(de) ? v(N) : void 0,
597
- "aria-errormessage": v(ve) ? v(N) : void 0
598
- }, null, 8, nt), [[Ve, v(I)]]),
599
- S(p.$slots, "default", { value: v(c) }, () => [be(Oe(p.label), 1)]),
600
- ge(v(se), {
601
- id: v(N),
589
+ name: d.name,
590
+ disabled: u(q),
591
+ value: u(oe),
592
+ tabindex: u(le),
593
+ "aria-invalid": u(ne),
594
+ "aria-describedby": u(de) ? u(N) : void 0,
595
+ "aria-errormessage": u(ve) ? u(N) : void 0
596
+ }, null, 8, ut), [[Be, u(I)]]),
597
+ h(d.$slots, "default", { value: u(s) }, () => [be(Oe(d.label), 1)]),
598
+ ye(u(se), {
599
+ id: u(N),
602
600
  class: "vv-checkbox__hint"
603
601
  }, pe({ _: 2 }, [
604
- p.$slots.hint ? {
602
+ d.$slots.hint ? {
605
603
  name: "hint",
606
- fn: V(() => [S(p.$slots, "hint", P(L(v(O))))]),
604
+ fn: P(() => [h(d.$slots, "hint", k(O(u(m))))]),
607
605
  key: "0"
608
606
  } : void 0,
609
- p.$slots.loading ? {
607
+ d.$slots.loading ? {
610
608
  name: "loading",
611
- fn: V(() => [S(p.$slots, "loading", P(L(v(O))))]),
609
+ fn: P(() => [h(d.$slots, "loading", k(O(u(m))))]),
612
610
  key: "1"
613
611
  } : void 0,
614
- p.$slots.valid ? {
612
+ d.$slots.valid ? {
615
613
  name: "valid",
616
- fn: V(() => [S(p.$slots, "valid", P(L(v(O))))]),
614
+ fn: P(() => [h(d.$slots, "valid", k(O(u(m))))]),
617
615
  key: "2"
618
616
  } : void 0,
619
- p.$slots.invalid ? {
617
+ d.$slots.invalid ? {
620
618
  name: "invalid",
621
- fn: V(() => [S(p.$slots, "invalid", P(L(v(O))))]),
619
+ fn: P(() => [h(d.$slots, "invalid", k(O(u(m))))]),
622
620
  key: "3"
623
621
  } : void 0
624
622
  ]), 1032, ["id"])
625
- ], 10, rt));
623
+ ], 10, it));
626
624
  }
627
- }), bt = it;
625
+ }), ht = dt;
628
626
  export {
629
- bt as default
627
+ ht as default
630
628
  };