@volverjs/ui-vue 0.0.1-beta.6 → 0.0.1-beta.8

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 (82) hide show
  1. package/README.md +61 -2
  2. package/dist/components/VvButton/vv-button.es.js +56 -58
  3. package/dist/components/VvButton/vv-button.umd.js +1 -1
  4. package/dist/components/VvCheckGroup/vv-check-group.es.js +221 -203
  5. package/dist/components/VvCheckGroup/vv-check-group.umd.js +2 -2
  6. package/dist/components/VvInputText/VvInputText.d.ts +14 -0
  7. package/dist/components/VvInputText/VvInputText.vue.d.ts +36 -1
  8. package/dist/components/VvInputText/VvInputTextActions.d.ts +3 -0
  9. package/dist/components/VvInputText/vv-input-text.es.js +509 -380
  10. package/dist/components/VvInputText/vv-input-text.umd.js +2 -2
  11. package/dist/components/VvNativeSelect/vv-native-select.es.js +180 -161
  12. package/dist/components/VvNativeSelect/vv-native-select.umd.js +2 -2
  13. package/dist/components/VvRadioGroup/vv-radio-group.es.js +211 -193
  14. package/dist/components/VvRadioGroup/vv-radio-group.umd.js +2 -2
  15. package/dist/components/VvSelect/vv-select.es.js +189 -171
  16. package/dist/components/VvSelect/vv-select.umd.js +2 -2
  17. package/dist/components/VvTextarea/VvTextarea.d.ts +43 -22
  18. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +140 -85
  19. package/dist/components/VvTextarea/vv-textarea.es.js +364 -288
  20. package/dist/components/VvTextarea/vv-textarea.umd.js +2 -2
  21. package/dist/composables/debouncedInput/useDebouncedInput.d.ts +2 -0
  22. package/dist/composables/icons/useComponentIcons.d.ts +6 -0
  23. package/dist/composables/textLimit/useTextLimit.d.ts +14 -0
  24. package/dist/composables/useModifiers.d.ts +3 -2
  25. package/dist/icons.es.js +3 -3
  26. package/dist/icons.umd.js +1 -1
  27. package/dist/props/index.d.ts +42 -0
  28. package/dist/stories/utils.d.ts +5 -0
  29. package/dist/ui-vue.es.js +417 -401
  30. package/dist/ui-vue.umd.js +2 -2
  31. package/package.json +3 -1
  32. package/src/assets/icons/detailed.json +1 -1
  33. package/src/assets/icons/normal.json +1 -1
  34. package/src/assets/icons/simple.json +1 -1
  35. package/src/components/VvButton/VvButton.vue +1 -2
  36. package/src/components/VvInputText/VvInputText.ts +19 -2
  37. package/src/components/VvInputText/VvInputText.vue +123 -149
  38. package/src/components/VvInputText/VvInputTextActions.ts +151 -0
  39. package/src/components/VvTextarea/VvTextarea.ts +25 -16
  40. package/src/components/VvTextarea/VvTextarea.vue +89 -93
  41. package/src/components/common/HintSlot.ts +31 -13
  42. package/src/composables/debouncedInput/useDebouncedInput.ts +19 -0
  43. package/src/composables/icons/useComponentIcons.ts +35 -0
  44. package/src/composables/textLimit/useTextLimit.ts +44 -0
  45. package/src/composables/useModifiers.ts +47 -1
  46. package/src/props/index.ts +39 -0
  47. package/src/stories/InputText/InputTextMaxLength.stories.mdx +21 -0
  48. package/src/stories/Textarea/Textarea.stories.mdx +33 -51
  49. package/src/stories/Textarea/TextareaAutoclear.stories.mdx +23 -0
  50. package/src/stories/Textarea/TextareaAutocomplete.stories.mdx +10 -2
  51. package/src/stories/Textarea/TextareaAutofocus.stories.mdx +5 -1
  52. package/src/stories/Textarea/TextareaDebounce.stories.mdx +23 -0
  53. package/src/stories/Textarea/TextareaDisabled.stories.mdx +5 -1
  54. package/src/stories/Textarea/TextareaError.stories.mdx +6 -3
  55. package/src/stories/Textarea/TextareaErrorLabel.stories.mdx +37 -0
  56. package/src/stories/Textarea/TextareaFloating.stories.mdx +7 -2
  57. package/src/stories/Textarea/TextareaHintLabel.stories.mdx +5 -1
  58. package/src/stories/Textarea/TextareaIcon.stories.mdx +5 -1
  59. package/src/stories/Textarea/TextareaIconPosition.stories.mdx +9 -1
  60. package/src/stories/Textarea/TextareaId.stories.mdx +19 -0
  61. package/src/stories/Textarea/TextareaLabel.stories.mdx +5 -1
  62. package/src/stories/Textarea/TextareaLimit.stories.mdx +50 -0
  63. package/src/stories/Textarea/TextareaLoading.stories.mdx +6 -3
  64. package/src/stories/Textarea/TextareaLoadingLabel.stories.mdx +23 -0
  65. package/src/stories/Textarea/TextareaMaxLength.stories.mdx +6 -2
  66. package/src/stories/Textarea/TextareaMinLength.stories.mdx +5 -1
  67. package/src/stories/Textarea/TextareaModifiers.stories.mdx +24 -0
  68. package/src/stories/Textarea/TextareaName.stories.mdx +23 -0
  69. package/src/stories/Textarea/TextareaPlaceholder.stories.mdx +5 -1
  70. package/src/stories/Textarea/TextareaReadonly.stories.mdx +5 -1
  71. package/src/stories/Textarea/TextareaRequired.stories.mdx +22 -0
  72. package/src/stories/Textarea/TextareaResizable.stories.mdx +22 -0
  73. package/src/stories/Textarea/TextareaRowsCols.stories.mdx +9 -1
  74. package/src/stories/Textarea/TextareaValid.stories.mdx +7 -4
  75. package/src/stories/Textarea/TextareaValidLabel.stories.mdx +35 -0
  76. package/src/stories/stories.scss +11 -0
  77. package/src/stories/utils.ts +12 -0
  78. package/src/stories/volver-ui-vue.stories.mdx +7 -1
  79. package/dist/components/VvInputText/useInputNumber.d.ts +0 -16
  80. package/dist/components/VvInputText/useInputPassword.d.ts +0 -16
  81. package/src/components/VvInputText/useInputNumber.ts +0 -40
  82. package/src/components/VvInputText/useInputPassword.ts +0 -38
@@ -1,22 +1,22 @@
1
- import { isRef as x, provide as z, computed as f, toRefs as E, unref as C, inject as Z, toRef as T, watch as U, defineComponent as I, useAttrs as M, ref as W, openBlock as b, createElementBlock as R, mergeProps as B, createElementVNode as F, renderSlot as P, createTextVNode as J, toDisplayString as D, h as K, useSlots as Q, normalizeClass as X, createCommentVNode as Y, Fragment as L, renderList as ee, createBlock as te, createVNode as ne } from "vue";
2
- import { useFocus as re, useVModel as se } from "@vueuse/core";
3
- const G = {
1
+ import { isRef as z, provide as Z, computed as f, toRefs as j, unref as O, inject as M, toRef as T, watch as U, defineComponent as F, useAttrs as W, ref as J, openBlock as V, createElementBlock as E, mergeProps as S, createElementVNode as P, renderSlot as D, createTextVNode as K, toDisplayString as G, h as Q, useSlots as X, normalizeClass as Y, createCommentVNode as L, Fragment as ee, renderList as te, createBlock as re, createVNode as ne } from "vue";
2
+ import { useFocus as se, toReactive as oe, useVModel as ue } from "@vueuse/core";
3
+ const $ = {
4
4
  valid: Boolean,
5
5
  validLabel: [String, Array]
6
- }, $ = {
6
+ }, q = {
7
7
  error: Boolean,
8
8
  errorLabel: [String, Array]
9
- }, oe = {
9
+ }, ae = {
10
10
  hintLabel: { type: String, default: "" }
11
- }, ue = {
11
+ }, le = {
12
12
  options: { type: Array, default: () => [] },
13
13
  optionLabel: { type: [String, Function], default: () => "label" },
14
14
  optionValue: { type: [String, Function], default: () => "value" }
15
- }, le = ["update:modelValue"], ae = {
16
- ...G,
15
+ }, ie = ["update:modelValue"], ce = {
17
16
  ...$,
18
- ...ue,
19
- ...oe,
17
+ ...q,
18
+ ...le,
19
+ ...ae,
20
20
  modelValue: null,
21
21
  label: { type: String, default: "" },
22
22
  name: { type: String, default: "", required: !0 },
@@ -24,62 +24,62 @@ const G = {
24
24
  readonly: { type: Boolean, default: !1 },
25
25
  vertical: { type: Boolean, default: !1 }
26
26
  };
27
- function ie(e) {
27
+ function fe(e) {
28
28
  if (Object.keys(e).some(
29
- (t) => t !== "key" && !x(e[t])
29
+ (t) => t !== "key" && !z(e[t])
30
30
  ))
31
31
  throw Error("One or more groupState props aren't ref.");
32
- console.log("PRovide - ", e), z(
32
+ console.log("PRovide - ", e), Z(
33
33
  e.key,
34
34
  f(() => e)
35
35
  );
36
36
  }
37
- function ce(e) {
38
- const { options: t, optionLabel: n, optionValue: s } = E(e);
37
+ function de(e) {
38
+ const { options: t, optionLabel: r, optionValue: s } = j(e);
39
39
  return {
40
40
  options: t,
41
- getOptionLabel: (o) => typeof o != "object" && o !== null ? o : typeof n.value == "function" ? n.value(o) : o[n.value],
41
+ getOptionLabel: (o) => typeof o != "object" && o !== null ? o : typeof r.value == "function" ? r.value(o) : o[r.value],
42
42
  getOptionValue: (o) => typeof o != "object" && o !== null ? o : typeof s.value == "function" ? s.value(o) : o[s.value]
43
43
  };
44
44
  }
45
- const g = {
46
- equals(e, t, n) {
47
- return n ? this.resolveFieldData(e, n) === this.resolveFieldData(t, n) : this.deepEquals(e, t);
45
+ const h = {
46
+ equals(e, t, r) {
47
+ return r ? this.resolveFieldData(e, r) === this.resolveFieldData(t, r) : this.deepEquals(e, t);
48
48
  },
49
49
  deepEquals(e, t) {
50
50
  if (e === t)
51
51
  return !0;
52
52
  if (e && t && typeof e == "object" && typeof t == "object") {
53
- const n = Array.isArray(e), s = Array.isArray(t);
54
- let r, l, o;
55
- if (n && s) {
56
- if (l = e.length, l != t.length)
53
+ const r = Array.isArray(e), s = Array.isArray(t);
54
+ let n, a, o;
55
+ if (r && s) {
56
+ if (a = e.length, a != t.length)
57
57
  return !1;
58
- for (r = l; r-- !== 0; )
59
- if (!this.deepEquals(e[r], t[r]))
58
+ for (n = a; n-- !== 0; )
59
+ if (!this.deepEquals(e[n], t[n]))
60
60
  return !1;
61
61
  return !0;
62
62
  }
63
- if (n != s)
63
+ if (r != s)
64
64
  return !1;
65
- const u = e instanceof Date, i = t instanceof Date;
66
- if (u != i)
65
+ const l = e instanceof Date, u = t instanceof Date;
66
+ if (l != u)
67
67
  return !1;
68
- if (u && i)
68
+ if (l && u)
69
69
  return e.getTime() == t.getTime();
70
- const c = e instanceof RegExp, p = t instanceof RegExp;
71
- if (c != p)
70
+ const p = e instanceof RegExp, y = t instanceof RegExp;
71
+ if (p != y)
72
72
  return !1;
73
- if (c && p)
73
+ if (p && y)
74
74
  return e.toString() == t.toString();
75
- const d = Object.keys(e);
76
- if (l = d.length, l !== Object.keys(t).length)
75
+ const c = Object.keys(e);
76
+ if (a = c.length, a !== Object.keys(t).length)
77
77
  return !1;
78
- for (r = l; r-- !== 0; )
79
- if (!Object.prototype.hasOwnProperty.call(t, d[r]))
78
+ for (n = a; n-- !== 0; )
79
+ if (!Object.prototype.hasOwnProperty.call(t, c[n]))
80
80
  return !1;
81
- for (r = l; r-- !== 0; )
82
- if (o = d[r], !this.deepEquals(e[o], t[o]))
81
+ for (n = a; n-- !== 0; )
82
+ if (o = c[n], !this.deepEquals(e[o], t[o]))
83
83
  return !1;
84
84
  return !0;
85
85
  }
@@ -90,12 +90,12 @@ const g = {
90
90
  if (t.indexOf(".") === -1)
91
91
  return e[t];
92
92
  {
93
- const n = t.split(".");
93
+ const r = t.split(".");
94
94
  let s = e;
95
- for (let r = 0, l = n.length; r < l; ++r) {
95
+ for (let n = 0, a = r.length; n < a; ++n) {
96
96
  if (e == null)
97
97
  return null;
98
- s = s[n[r]];
98
+ s = s[r[n]];
99
99
  }
100
100
  return s;
101
101
  }
@@ -106,20 +106,20 @@ const g = {
106
106
  return !!(e && e.constructor && e.call && e.apply);
107
107
  },
108
108
  findIndexInList(e, t) {
109
- let n = -1;
109
+ let r = -1;
110
110
  if (t) {
111
111
  for (let s = 0; s < t.length; s++)
112
112
  if (this.equals(t[s], e)) {
113
- n = s;
113
+ r = s;
114
114
  break;
115
115
  }
116
116
  }
117
- return n;
117
+ return r;
118
118
  },
119
119
  contains(e, t) {
120
120
  if (e != null && t && t.length) {
121
- for (const n of t)
122
- if (this.equals(e, n))
121
+ for (const r of t)
122
+ if (this.equals(e, r))
123
123
  return !0;
124
124
  }
125
125
  return !1;
@@ -132,52 +132,52 @@ const g = {
132
132
  },
133
133
  pickBy(e, t) {
134
134
  return Object.fromEntries(
135
- Object.entries(e).filter(([n]) => t(n))
135
+ Object.entries(e).filter(([r]) => t(r))
136
136
  );
137
137
  },
138
138
  removeFromList(e, t) {
139
- const n = this.findIndexInList(e, t);
140
- return n > -1 ? t.filter((s, r) => r !== n) : t;
139
+ const r = this.findIndexInList(e, t);
140
+ return r > -1 ? t.filter((s, n) => n !== r) : t;
141
141
  },
142
142
  isString(e) {
143
143
  return typeof e == "string" || e instanceof String;
144
144
  },
145
145
  propsToObject(e) {
146
- return Object.keys(e).reduce((t, n) => {
147
- var s, r, l, o, u;
148
- return this.isFunction(e[n]) ? t[n] = e[n]() : Array.isArray(e[n]) ? t[n] = e[n][0]() : (s = e[n]) != null && s.type && (Array.isArray(e[n].type) ? t[n] = ((r = e[n]) == null ? void 0 : r.default) || ((l = e[n]) == null ? void 0 : l.type[0]()) : t[n] = ((o = e[n]) == null ? void 0 : o.default) || ((u = e[n]) == null ? void 0 : u.type())), t;
146
+ return Object.keys(e).reduce((t, r) => {
147
+ var s, n, a, o, l;
148
+ return this.isFunction(e[r]) ? t[r] = e[r]() : Array.isArray(e[r]) ? t[r] = e[r][0]() : (s = e[r]) != null && s.type && (Array.isArray(e[r].type) ? t[r] = ((n = e[r]) == null ? void 0 : n.default) || ((a = e[r]) == null ? void 0 : a.type[0]()) : t[r] = ((o = e[r]) == null ? void 0 : o.default) || ((l = e[r]) == null ? void 0 : l.type())), t;
149
149
  }, {});
150
150
  },
151
- filterArray(e, t, n) {
152
- return e.filter((s) => t.some((r) => typeof r == "string" ? s[n] == r : this.equals(
153
- s[n],
154
- r[n]
151
+ filterArray(e, t, r) {
152
+ return e.filter((s) => t.some((n) => typeof n == "string" ? s[r] == n : this.equals(
153
+ s[r],
154
+ n[r]
155
155
  )));
156
156
  },
157
157
  kebabCase(e) {
158
- var t, n;
158
+ var t, r;
159
159
  if (e)
160
- return (n = (t = e.match(
160
+ return (r = (t = e.match(
161
161
  /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
162
- )) == null ? void 0 : t.join("-")) == null ? void 0 : n.toLowerCase();
162
+ )) == null ? void 0 : t.join("-")) == null ? void 0 : r.toLowerCase();
163
163
  }
164
164
  };
165
- function S(e, t) {
166
- const n = { [`${e}`]: !0 };
165
+ function I(e, t) {
166
+ const r = { [`${e}`]: !0 };
167
167
  return {
168
- bemCssClasses: f(() => Object.keys(t).reduce((r, l) => {
169
- const o = C(t[l]) || !1;
168
+ bemCssClasses: f(() => Object.keys(t).reduce((n, a) => {
169
+ const o = O(t[a]) || !1;
170
170
  if (!o)
171
- return r;
172
- if (l === "modifiers") {
173
- const u = Array.isArray(o) ? o : [o];
171
+ return n;
172
+ if (a === "modifiers") {
173
+ const l = Array.isArray(o) ? o : [o];
174
174
  return {
175
- ...r,
176
- ...u.reduce(
177
- (i, c) => ({
178
- ...i,
179
- [`${e}--${g.kebabCase(
180
- c
175
+ ...n,
176
+ ...l.reduce(
177
+ (u, p) => ({
178
+ ...u,
179
+ [`${e}--${h.kebabCase(
180
+ p
181
181
  )}`]: !0
182
182
  }),
183
183
  {}
@@ -185,236 +185,254 @@ function S(e, t) {
185
185
  };
186
186
  } else
187
187
  return {
188
- ...r,
189
- [`${e}--${g.kebabCase(l)}`]: o
188
+ ...n,
189
+ [`${e}--${h.kebabCase(a)}`]: o
190
190
  };
191
- }, n) || {})
191
+ }, r) || {})
192
192
  };
193
193
  }
194
- const q = Symbol("VV_RADIO_GROUP"), fe = {
195
- ...G,
194
+ const w = Symbol("VV_RADIO_GROUP"), pe = {
196
195
  ...$,
196
+ ...q,
197
197
  value: null,
198
198
  modelValue: { type: [Object, Number, Boolean, String] },
199
199
  label: { type: String, default: "" },
200
200
  disabled: Boolean,
201
201
  readonly: Boolean
202
- }, de = [
202
+ }, ye = [
203
203
  "click",
204
204
  "update:modelValue",
205
205
  "change",
206
206
  "focus",
207
207
  "blur"
208
208
  ];
209
- function pe(e) {
210
- const t = Z(e, void 0);
209
+ function ve(e) {
210
+ const t = M(e, void 0);
211
211
  console.log("Inject - ", t);
212
- const n = f(() => g.isNotEmpty(t));
213
- function s(r, l, o) {
212
+ const r = f(() => h.isNotEmpty(t));
213
+ function s(n, a, o) {
214
214
  if (t != null && t.value) {
215
- const u = C(t.value)[r];
215
+ const l = O(t.value)[n];
216
216
  return f({
217
217
  get() {
218
- return u == null ? void 0 : u.value;
218
+ return l == null ? void 0 : l.value;
219
219
  },
220
- set(i) {
221
- u.value = i;
220
+ set(u) {
221
+ l.value = u;
222
222
  }
223
223
  });
224
224
  } else {
225
- const u = T(l, r);
225
+ const l = T(a, n);
226
226
  return f({
227
227
  get() {
228
- return u.value;
228
+ return l.value;
229
229
  },
230
- set(i) {
231
- o && o(`update:${r}`, i);
230
+ set(u) {
231
+ o && o(`update:${n}`, u);
232
232
  }
233
233
  });
234
234
  }
235
235
  }
236
236
  return {
237
237
  group: t,
238
- isInGroup: n,
238
+ isInGroup: r,
239
239
  getGroupOrLocalRef: s
240
240
  };
241
241
  }
242
- function ye(e, t) {
243
- const { group: n, isInGroup: s, getGroupOrLocalRef: r } = pe(q), { valid: l, error: o } = E(e), u = r("modelValue", e, t), i = r("readonly", e), c = r("disabled", e);
242
+ function me(e, t) {
243
+ const { group: r, isInGroup: s, getGroupOrLocalRef: n } = ve(w), { valid: a, error: o } = j(e), l = n("modelValue", e, t), u = n("readonly", e), p = n("disabled", e);
244
244
  return {
245
- group: n,
245
+ group: r,
246
246
  isInGroup: s,
247
- valid: l,
247
+ valid: a,
248
248
  error: o,
249
- modelValue: u,
250
- readonly: i,
251
- disabled: c
249
+ modelValue: l,
250
+ readonly: u,
251
+ disabled: p
252
252
  };
253
253
  }
254
- function ve(e, t) {
255
- const { focused: n } = re(e);
256
- return U(n, (s) => {
254
+ function ge(e, t) {
255
+ const { focused: r } = se(e);
256
+ return U(r, (s) => {
257
257
  t(s ? "focus" : "blur", e.value);
258
258
  }), {
259
- focused: n
259
+ focused: r
260
260
  };
261
261
  }
262
- const me = {
262
+ const he = {
263
263
  inheritAttrs: !1
264
- }, ge = /* @__PURE__ */ I({
265
- ...me,
264
+ }, Ae = /* @__PURE__ */ F({
265
+ ...he,
266
266
  __name: "VvRadio",
267
- props: fe,
268
- emits: de,
267
+ props: pe,
268
+ emits: ye,
269
269
  setup(e, { emit: t }) {
270
- const n = e, s = M(), { disabled: r, readonly: l, modelValue: o, valid: u, error: i } = ye(
271
- n,
270
+ const r = e, s = W(), { disabled: n, readonly: a, modelValue: o, valid: l, error: u } = me(
271
+ r,
272
272
  t
273
- ), c = W(), p = f(() => Array.isArray(o.value) ? g.contains(n.value, o.value) : g.equals(n.value, o.value)), { focused: d } = ve(c, t), { bemCssClasses: a } = S("vv-input-radio", {
274
- valid: u,
275
- invalid: i
276
- }), { bemCssClasses: y } = S(
273
+ ), p = J(), y = f(() => Array.isArray(o.value) ? h.contains(r.value, o.value) : h.equals(r.value, o.value)), { focused: c } = ge(p, t), { bemCssClasses: A } = I("vv-input-radio", {
274
+ valid: l,
275
+ invalid: u
276
+ }), { bemCssClasses: i } = I(
277
277
  "vv-input-radio__input",
278
278
  {
279
- checked: p,
280
- disabled: r,
281
- readonly: l
279
+ checked: y,
280
+ disabled: n,
281
+ readonly: a
282
282
  }
283
- ), h = f(() => {
283
+ ), d = f(() => {
284
284
  const { class: m } = s;
285
285
  return {
286
286
  class: m,
287
- ...a.value
287
+ ...A.value
288
288
  };
289
- }), _ = f(() => ({
290
- "focus-visible": d.value,
291
- ...y.value
289
+ }), g = f(() => ({
290
+ "focus-visible": c.value,
291
+ ...i.value
292
292
  })), v = f(() => {
293
- const { id: m, name: k, style: j } = s, N = g.pickBy(
293
+ const { id: m, name: k, style: B } = s, N = h.pickBy(
294
294
  s,
295
- (w) => w.startsWith("data-")
295
+ (x) => x.startsWith("data-")
296
296
  );
297
297
  return {
298
298
  for: m || k,
299
- style: j,
299
+ style: B,
300
300
  ...N
301
301
  };
302
- }), O = f(() => {
302
+ }), b = f(() => {
303
303
  const { id: m = "", name: k = "" } = s;
304
304
  return {
305
305
  type: "radio",
306
306
  id: m || k,
307
307
  name: k,
308
- value: n.value,
309
- disabled: r.value,
310
- readonly: l.value,
311
- checked: p.value,
312
- ...V.value
308
+ value: r.value,
309
+ disabled: n.value,
310
+ readonly: a.value,
311
+ checked: y.value,
312
+ ..._.value
313
313
  };
314
- }), V = f(() => {
315
- const { name: m } = s, k = g.pickBy(
314
+ }), _ = f(() => {
315
+ const { name: m } = s, k = h.pickBy(
316
316
  s,
317
- (j) => j.startsWith("aria-")
317
+ (B) => B.startsWith("aria-")
318
318
  );
319
319
  return {
320
320
  "aria-label": m,
321
- "aria-checked": p.value,
321
+ "aria-checked": y.value,
322
322
  ...k
323
323
  };
324
324
  });
325
- function A() {
326
- p.value || t("change", n.value), o.value = n.value;
325
+ function C() {
326
+ y.value || t("change", r.value), o.value = r.value;
327
327
  }
328
328
  function H(m) {
329
- r.value || (t("click", m), d.value = !0);
329
+ n.value || (t("click", m), c.value = !0);
330
330
  }
331
- return (m, k) => (b(), R("label", B({ class: C(h) }, C(v), { onClick: H }), [
332
- F("input", B({
331
+ return (m, k) => (V(), E("label", S({ class: O(d) }, O(v), { onClick: H }), [
332
+ P("input", S({
333
333
  ref_key: "input",
334
- ref: c,
335
- class: C(_)
336
- }, C(O), { onInput: A }), null, 16),
337
- P(m.$slots, "default", { value: C(o) }, () => [
338
- J(D(m.label), 1)
334
+ ref: p,
335
+ class: O(g)
336
+ }, O(b), { onInput: C }), null, 16),
337
+ D(m.$slots, "default", { value: O(o) }, () => [
338
+ K(G(m.label), 1)
339
339
  ])
340
340
  ], 16));
341
341
  }
342
342
  });
343
- function he(e) {
344
- return Array.isArray(e) ? e.filter((t) => g.isString(t)).reduce((t, n) => t.length > 0 ? t + `
345
- ` + n : n, "") : e;
343
+ function R(e) {
344
+ return Array.isArray(e) ? e.filter((t) => h.isString(t)).reduce((t, r) => t.length > 0 ? t + `
345
+ ` + r : r, "") : e;
346
346
  }
347
- function Ae(e, t) {
347
+ function Ce(e, t) {
348
348
  return {
349
349
  name: "HintSlot",
350
- setup() {
351
- const n = E(e), {
352
- error: s,
353
- valid: r,
354
- hint: l,
355
- loading: o
350
+ props: {
351
+ params: { type: Object, default: () => {
352
+ } }
353
+ },
354
+ setup(r) {
355
+ const s = j(e), {
356
+ error: n,
357
+ valid: a,
358
+ hint: o,
359
+ loading: l
356
360
  } = t, {
357
361
  hintLabel: u,
358
- modelValue: i,
359
- valid: c,
360
- validLabel: p,
361
- error: d,
362
- errorLabel: a
363
- } = n, y = g.resolveFieldData(n, "loading"), h = g.resolveFieldData(
364
- n,
362
+ modelValue: p,
363
+ valid: y,
364
+ validLabel: c,
365
+ error: A,
366
+ errorLabel: i
367
+ } = s, d = h.resolveFieldData(s, "loading"), g = h.resolveFieldData(
368
+ s,
365
369
  "loadingLabel"
366
- ), _ = f(() => d.value ? !!(d.value && s || (a == null ? void 0 : a.value) && Array.isArray(a.value) && a.value.length > 0 || (a == null ? void 0 : a.value) && g.isNotEmpty(a.value)) : !1), v = f(() => !!(u && u.value || l || r || p && p.value || _.value || (y == null ? void 0 : y.value) && o || (y == null ? void 0 : y.value) && (h == null ? void 0 : h.value))), O = f(() => Array.isArray(a == null ? void 0 : a.value) ? he((a == null ? void 0 : a.value) || "") : a == null ? void 0 : a.value), V = f(() => {
367
- const A = { modelValue: i, error: d, valid: c };
368
- return d != null && d.value ? (s == null ? void 0 : s(A)) || (O == null ? void 0 : O.value) || (u == null ? void 0 : u.value) : c != null && c.value ? (r == null ? void 0 : r(A)) || (p == null ? void 0 : p.value) || (u == null ? void 0 : u.value) : y != null && y.value ? (o == null ? void 0 : o(A)) || (h == null ? void 0 : h.value) || (u == null ? void 0 : u.value) : (l == null ? void 0 : l(A)) || (u == null ? void 0 : u.value) || (u == null ? void 0 : u.value);
370
+ ), v = f(() => A.value ? !!(A.value && n || (i == null ? void 0 : i.value) && Array.isArray(i.value) && i.value.length > 0 || (i == null ? void 0 : i.value) && h.isNotEmpty(i.value)) : !1), b = f(() => !!(u && u.value || o || a || c && c.value || v.value || (d == null ? void 0 : d.value) && l || (d == null ? void 0 : d.value) && (g == null ? void 0 : g.value))), _ = f(() => {
371
+ const C = oe({
372
+ hintLabel: u,
373
+ modelValue: p,
374
+ valid: y,
375
+ validLabel: c,
376
+ error: A,
377
+ errorLabel: i,
378
+ loading: d,
379
+ loadingLabel: g,
380
+ ...r.params
381
+ });
382
+ return A != null && A.value ? (n == null ? void 0 : n(C)) || R(i == null ? void 0 : i.value) || (u == null ? void 0 : u.value) : y != null && y.value ? (a == null ? void 0 : a(C)) || R(c == null ? void 0 : c.value) || (u == null ? void 0 : u.value) : d != null && d.value ? (l == null ? void 0 : l(C)) || R(g == null ? void 0 : g.value) || (u == null ? void 0 : u.value) : (o == null ? void 0 : o(C)) || R(u == null ? void 0 : u.value) || (u == null ? void 0 : u.value);
369
383
  });
370
384
  return {
371
- hasHint: v,
372
- hintContent: V
385
+ hasHint: b,
386
+ hintContent: _
373
387
  };
374
388
  },
375
389
  render() {
376
390
  if (this.hasHint)
377
- return K("span", null, this.hintContent);
391
+ return Q(
392
+ "pre",
393
+ { style: { "white-space": "pre" } },
394
+ this.hintContent
395
+ );
378
396
  }
379
397
  };
380
398
  }
381
- const Ce = ["textContent"], Oe = { class: "vv-input-radio-group__wrapper" }, Ve = /* @__PURE__ */ I({
399
+ const Oe = ["textContent"], ke = { class: "vv-input-radio-group__wrapper" }, Ve = /* @__PURE__ */ F({
382
400
  __name: "VvRadioGroup",
383
- props: ae,
384
- emits: le,
401
+ props: ce,
402
+ emits: ie,
385
403
  setup(e, { emit: t }) {
386
- const n = e, s = Q(), r = se(n, "modelValue", t), { disabled: l, readonly: o, vertical: u, valid: i, error: c } = E(n);
387
- ie({
388
- key: q,
389
- modelValue: r,
390
- disabled: l,
404
+ const r = e, s = X(), n = ue(r, "modelValue", t), { disabled: a, readonly: o, vertical: l, valid: u, error: p } = j(r);
405
+ fe({
406
+ key: w,
407
+ modelValue: n,
408
+ disabled: a,
391
409
  readonly: o
392
410
  });
393
- const { getOptionLabel: d, getOptionValue: a } = ce(n), { bemCssClasses: y } = S("vv-input-radio-group", {
394
- horizontal: f(() => !u.value),
395
- valid: i,
396
- invalid: c
411
+ const { getOptionLabel: c, getOptionValue: A } = de(r), { bemCssClasses: i } = I("vv-input-radio-group", {
412
+ horizontal: f(() => !l.value),
413
+ valid: u,
414
+ invalid: p
397
415
  });
398
- function h(v, O) {
416
+ function d(v, b) {
399
417
  return {
400
- id: `${n.name}_opt${O}`,
401
- name: n.name,
402
- label: d(v),
403
- value: a(v)
418
+ id: `${r.name}_opt${b}`,
419
+ name: r.name,
420
+ label: c(v),
421
+ value: A(v)
404
422
  };
405
423
  }
406
- const _ = Ae(n, s);
407
- return (v, O) => (b(), R("fieldset", {
408
- class: X(C(y))
424
+ const g = Ce(r, s);
425
+ return (v, b) => (V(), E("fieldset", {
426
+ class: Y(O(i))
409
427
  }, [
410
- v.label ? (b(), R("legend", {
428
+ v.label ? (V(), E("legend", {
411
429
  key: 0,
412
- textContent: D(v.label)
413
- }, null, 8, Ce)) : Y("", !0),
414
- F("div", Oe, [
415
- v.options.length > 0 ? (b(!0), R(L, { key: 0 }, ee(v.options, (V, A) => (b(), te(ge, B({ key: A }, h(V, A)), null, 16))), 128)) : P(v.$slots, "default", { key: 1 })
430
+ textContent: G(v.label)
431
+ }, null, 8, Oe)) : L("", !0),
432
+ P("div", ke, [
433
+ v.options.length > 0 ? (V(!0), E(ee, { key: 0 }, te(v.options, (_, C) => (V(), re(Ae, S({ key: C }, d(_, C)), null, 16))), 128)) : D(v.$slots, "default", { key: 1 })
416
434
  ]),
417
- ne(C(_), { class: "vv-input-radio-group__hint" })
435
+ ne(O(g), { class: "vv-input-radio-group__hint" })
418
436
  ], 2));
419
437
  }
420
438
  });