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