@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.
- package/dist/Volver.d.ts +5 -5
- package/dist/components/VvAction/VvAction.es.js +26 -26
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/index.d.ts +1 -44
- package/dist/components/VvAlert/VvAlert.es.js +43 -44
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +54 -55
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +34 -34
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +1 -1
- package/dist/components/VvButton/VvButton.es.js +186 -187
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +215 -217
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +235 -237
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +2 -2
- package/dist/components/VvCheckboxGroup/index.d.ts +1 -78
- package/dist/components/VvCombobox/VvCombobox.es.js +810 -813
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +1 -1
- package/dist/components/VvCombobox/index.d.ts +2 -2
- package/dist/components/VvDropdown/VvDropdown.es.js +4 -4
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +50 -50
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +30 -31
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.es.js +415 -418
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +595 -588
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +6 -6
- package/dist/components/VvInputText/index.d.ts +3 -3
- package/dist/components/VvNav/VvNav.es.js +63 -63
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNavItem/VvNavItem.es.js +41 -41
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +222 -224
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +234 -236
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +2 -2
- package/dist/components/VvRadioGroup/index.d.ts +1 -78
- package/dist/components/VvSelect/VvSelect.es.js +200 -203
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +1 -1
- package/dist/components/VvSelect/index.d.ts +2 -2
- package/dist/components/VvTab/VvTab.es.js +35 -35
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +341 -344
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/index.es.js +1965 -1958
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/index.es.js +34 -34
- package/dist/composables/index.umd.js +2 -2
- package/dist/composables/useModifiers.d.ts +1 -1
- package/dist/constants.d.ts +2 -2
- package/dist/directives/index.es.js +22 -22
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-contextmenu.es.js +13 -13
- package/dist/directives/v-contextmenu.umd.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.es.js +19 -19
- package/dist/index.umd.js +1 -1
- package/dist/json-render/index.es.js +1877 -1870
- package/dist/json-render/index.umd.js +1 -1
- package/dist/props/index.d.ts +1 -1
- package/dist/resolvers/unplugin.es.js +28 -28
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/types/alert.d.ts +1 -1
- package/dist/types/nav.d.ts +1 -1
- package/dist/utils/ObjectUtilities.d.ts +0 -6
- package/package.json +1 -1
- package/src/Volver.ts +8 -6
- package/src/components/VvAction/index.ts +1 -3
- package/src/components/VvButton/VvButton.vue +1 -1
- package/src/components/VvCheckboxGroup/index.ts +1 -3
- package/src/components/VvCombobox/VvCombobox.vue +3 -3
- package/src/components/VvDropdown/VvDropdown.vue +8 -8
- package/src/components/VvIcon/VvIcon.vue +3 -6
- package/src/components/VvInputFile/VvInputFile.vue +6 -6
- package/src/components/VvInputText/VvInputText.vue +95 -78
- package/src/components/VvRadioGroup/index.ts +1 -3
- package/src/composables/useBlurhash.ts +1 -1
- package/src/composables/useDebouncedInput.ts +1 -1
- package/src/composables/useDefaults.ts +55 -44
- package/src/composables/useModifiers.ts +1 -1
- package/src/index.ts +2 -2
- package/src/resolvers/unplugin.ts +6 -6
- package/src/types/alert.ts +1 -1
- package/src/types/nav.ts +1 -1
- package/src/utils/DateUtilities.ts +3 -3
- package/src/utils/DomUtilities.ts +7 -1
- package/src/utils/ObjectUtilities.ts +60 -59
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Fragment as Oe, computed as i, createBlock as
|
|
2
|
-
import { useVModel as
|
|
1
|
+
import { Fragment as Oe, computed as i, createBlock as Le, createCommentVNode as Pe, createElementBlock as j, createElementVNode as ae, createSlots as le, createTextVNode as Ve, createVNode as re, defineComponent as q, guardReactiveProps as b, h as _, inject as ne, isRef as oe, mergeProps as Be, normalizeClass as ie, normalizeProps as h, openBlock as P, provide as $e, ref as ke, renderList as _e, renderSlot as y, toDisplayString as ue, toRef as je, toRefs as A, unref as u, useId as Ae, useSlots as se, vModelRadio as Ne, withCtx as m, withDirectives as Re } from "vue";
|
|
2
|
+
import { useVModel as Ce } from "@vueuse/core";
|
|
3
3
|
import { getProperty as w } from "dot-prop";
|
|
4
|
-
var
|
|
4
|
+
var Ie = {
|
|
5
5
|
showPassword: "eye-on",
|
|
6
6
|
hidePassword: "eye-off",
|
|
7
7
|
showDatePicker: "calendar",
|
|
@@ -14,11 +14,11 @@ var De = {
|
|
|
14
14
|
download: "download"
|
|
15
15
|
}, Y = /* @__PURE__ */ (function(e) {
|
|
16
16
|
return e.local = "local", e.session = "session", e;
|
|
17
|
-
})({}),
|
|
17
|
+
})({}), Ee = /* @__PURE__ */ (function(e) {
|
|
18
18
|
return e.absolute = "absolute", e.fixed = "fixed", e;
|
|
19
19
|
})({}), W = /* @__PURE__ */ (function(e) {
|
|
20
20
|
return e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e;
|
|
21
|
-
})({}),
|
|
21
|
+
})({}), De = /* @__PURE__ */ (function(e) {
|
|
22
22
|
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;
|
|
23
23
|
})({}), Q = /* @__PURE__ */ (function(e) {
|
|
24
24
|
return e.before = "before", e.after = "after", e;
|
|
@@ -34,7 +34,7 @@ var De = {
|
|
|
34
34
|
type: String,
|
|
35
35
|
default: "noopener noreferrer"
|
|
36
36
|
}
|
|
37
|
-
},
|
|
37
|
+
}, F = {
|
|
38
38
|
valid: {
|
|
39
39
|
type: Boolean,
|
|
40
40
|
default: !1
|
|
@@ -43,7 +43,7 @@ var De = {
|
|
|
43
43
|
type: [String, Array],
|
|
44
44
|
default: void 0
|
|
45
45
|
}
|
|
46
|
-
},
|
|
46
|
+
}, H = {
|
|
47
47
|
invalid: {
|
|
48
48
|
type: Boolean,
|
|
49
49
|
default: !1
|
|
@@ -52,7 +52,7 @@ var De = {
|
|
|
52
52
|
type: [String, Array],
|
|
53
53
|
default: void 0
|
|
54
54
|
}
|
|
55
|
-
},
|
|
55
|
+
}, K = {
|
|
56
56
|
loading: {
|
|
57
57
|
type: Boolean,
|
|
58
58
|
default: !1
|
|
@@ -73,14 +73,14 @@ var De = {
|
|
|
73
73
|
} }, He = { current: {
|
|
74
74
|
type: Boolean,
|
|
75
75
|
default: !1
|
|
76
|
-
} },
|
|
76
|
+
} }, Pt = {
|
|
77
77
|
showClearAction: {
|
|
78
78
|
type: Boolean,
|
|
79
79
|
default: !1
|
|
80
80
|
},
|
|
81
81
|
iconClear: {
|
|
82
82
|
type: [String, Object],
|
|
83
|
-
default:
|
|
83
|
+
default: Ie.clear
|
|
84
84
|
},
|
|
85
85
|
labelClear: {
|
|
86
86
|
type: String,
|
|
@@ -89,16 +89,16 @@ var De = {
|
|
|
89
89
|
}, Ke = { pressed: {
|
|
90
90
|
type: Boolean,
|
|
91
91
|
default: !1
|
|
92
|
-
} },
|
|
92
|
+
} }, R = { label: {
|
|
93
93
|
type: [String, Number],
|
|
94
94
|
default: void 0
|
|
95
|
-
} },
|
|
95
|
+
} }, M = { readonly: {
|
|
96
96
|
type: Boolean,
|
|
97
97
|
default: !1
|
|
98
|
-
} },
|
|
98
|
+
} }, T = { modifiers: {
|
|
99
99
|
type: [String, Array],
|
|
100
100
|
default: void 0
|
|
101
|
-
} },
|
|
101
|
+
} }, z = { hintLabel: {
|
|
102
102
|
type: String,
|
|
103
103
|
default: ""
|
|
104
104
|
} }, Me = {
|
|
@@ -150,12 +150,12 @@ var De = {
|
|
|
150
150
|
placement: {
|
|
151
151
|
type: String,
|
|
152
152
|
default: W.bottom,
|
|
153
|
-
validator: (e) => Object.values(W).includes(e) || Object.values(
|
|
153
|
+
validator: (e) => Object.values(W).includes(e) || Object.values(De).includes(e)
|
|
154
154
|
},
|
|
155
155
|
strategy: {
|
|
156
156
|
type: String,
|
|
157
157
|
default: void 0,
|
|
158
|
-
validator: (e) => Object.values(
|
|
158
|
+
validator: (e) => Object.values(Ee).includes(e)
|
|
159
159
|
},
|
|
160
160
|
transitionName: {
|
|
161
161
|
type: String,
|
|
@@ -213,23 +213,23 @@ var De = {
|
|
|
213
213
|
} }, Qe = { autocomplete: {
|
|
214
214
|
type: String,
|
|
215
215
|
default: "off"
|
|
216
|
-
} },
|
|
216
|
+
} }, Bt = {
|
|
217
217
|
...pe,
|
|
218
218
|
...We,
|
|
219
219
|
...Qe,
|
|
220
220
|
...fe,
|
|
221
221
|
...N,
|
|
222
|
-
...T,
|
|
223
|
-
...H,
|
|
224
|
-
...K,
|
|
225
|
-
...J,
|
|
226
222
|
...M,
|
|
223
|
+
...F,
|
|
224
|
+
...H,
|
|
227
225
|
...z,
|
|
226
|
+
...K,
|
|
227
|
+
...T,
|
|
228
228
|
...Te,
|
|
229
229
|
...ze,
|
|
230
230
|
...Je,
|
|
231
231
|
...Ue,
|
|
232
|
-
...
|
|
232
|
+
...R,
|
|
233
233
|
minlength: {
|
|
234
234
|
type: [String, Number],
|
|
235
235
|
default: void 0
|
|
@@ -246,14 +246,14 @@ var De = {
|
|
|
246
246
|
}, Xe = {
|
|
247
247
|
...pe,
|
|
248
248
|
...fe,
|
|
249
|
+
...F,
|
|
249
250
|
...H,
|
|
250
|
-
...K,
|
|
251
|
-
...J,
|
|
252
|
-
...N,
|
|
253
|
-
...T,
|
|
254
251
|
...z,
|
|
255
|
-
...
|
|
252
|
+
...N,
|
|
256
253
|
...M,
|
|
254
|
+
...T,
|
|
255
|
+
...R,
|
|
256
|
+
...K,
|
|
257
257
|
value: {
|
|
258
258
|
type: [
|
|
259
259
|
String,
|
|
@@ -271,16 +271,16 @@ var De = {
|
|
|
271
271
|
],
|
|
272
272
|
default: void 0
|
|
273
273
|
}
|
|
274
|
-
},
|
|
274
|
+
}, Z = {
|
|
275
|
+
...F,
|
|
275
276
|
...H,
|
|
276
|
-
...K,
|
|
277
277
|
...Me,
|
|
278
|
-
...J,
|
|
279
|
-
...N,
|
|
280
|
-
...T,
|
|
281
278
|
...z,
|
|
282
|
-
...
|
|
279
|
+
...N,
|
|
283
280
|
...M,
|
|
281
|
+
...T,
|
|
282
|
+
...R,
|
|
283
|
+
...K,
|
|
284
284
|
...ve,
|
|
285
285
|
modelValue: {
|
|
286
286
|
type: [
|
|
@@ -300,9 +300,9 @@ var De = {
|
|
|
300
300
|
type: Boolean,
|
|
301
301
|
default: !1
|
|
302
302
|
}
|
|
303
|
-
},
|
|
303
|
+
}, $t = {
|
|
304
304
|
...N,
|
|
305
|
-
...
|
|
305
|
+
...R,
|
|
306
306
|
...Ke,
|
|
307
307
|
...Fe,
|
|
308
308
|
...He,
|
|
@@ -320,82 +320,82 @@ var De = {
|
|
|
320
320
|
type: String,
|
|
321
321
|
default: Ge.button
|
|
322
322
|
}
|
|
323
|
-
},
|
|
323
|
+
}, kt = {
|
|
324
324
|
storageType: {
|
|
325
325
|
type: String,
|
|
326
326
|
default: Y.local,
|
|
327
327
|
validator: (e) => Object.values(Y).includes(e)
|
|
328
328
|
},
|
|
329
329
|
storageKey: String
|
|
330
|
-
},
|
|
331
|
-
function ce(e,
|
|
332
|
-
return
|
|
330
|
+
}, Ze = ["update:modelValue", "change"];
|
|
331
|
+
function ce(e, a, t) {
|
|
332
|
+
return t ? x(e, t) === x(a, t) : J(e, a);
|
|
333
333
|
}
|
|
334
|
-
function
|
|
335
|
-
if (e
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
if (f !== s) return !1;
|
|
347
|
-
if (f && s) return e.getTime() === l.getTime();
|
|
348
|
-
const t = e instanceof RegExp, c = l instanceof RegExp;
|
|
349
|
-
if (t !== c) return !1;
|
|
350
|
-
if (t && c) return e.toString() === l.toString();
|
|
351
|
-
const d = Object.keys(e);
|
|
352
|
-
if (o = d.length, o !== Object.keys(l).length) return !1;
|
|
353
|
-
for (r = o; r-- !== 0; ) if (!Object.hasOwn(l, d[r])) return !1;
|
|
354
|
-
for (r = o; r-- !== 0; )
|
|
355
|
-
if (v = d[r], !q(e[v], l[v])) return !1;
|
|
356
|
-
return !0;
|
|
334
|
+
function xe(e, a) {
|
|
335
|
+
if (e.length !== a.length) return !1;
|
|
336
|
+
for (let t = e.length; t-- !== 0; ) if (!J(e[t], a[t])) return !1;
|
|
337
|
+
return !0;
|
|
338
|
+
}
|
|
339
|
+
function et(e, a) {
|
|
340
|
+
const t = Object.keys(e), { length: n } = t;
|
|
341
|
+
if (n !== Object.keys(a).length) return !1;
|
|
342
|
+
for (let l = n; l-- !== 0; ) if (!Object.hasOwn(a, t[l])) return !1;
|
|
343
|
+
for (let l = n; l-- !== 0; ) {
|
|
344
|
+
const o = t[l];
|
|
345
|
+
if (!J(e[o], a[o])) return !1;
|
|
357
346
|
}
|
|
358
|
-
return
|
|
347
|
+
return !0;
|
|
359
348
|
}
|
|
360
|
-
function
|
|
361
|
-
if (e
|
|
362
|
-
|
|
349
|
+
function J(e, a) {
|
|
350
|
+
if (e === a) return !0;
|
|
351
|
+
if (!e || !a || typeof e != "object" || typeof a != "object") return Number.isNaN(e) && Number.isNaN(a);
|
|
352
|
+
const t = Array.isArray(e), n = Array.isArray(a);
|
|
353
|
+
if (t !== n) return !1;
|
|
354
|
+
if (t && n) return xe(e, a);
|
|
355
|
+
const l = e instanceof Date, o = a instanceof Date;
|
|
356
|
+
if (l !== o) return !1;
|
|
357
|
+
if (l && o) return e.getTime() === a.getTime();
|
|
358
|
+
const f = e instanceof RegExp, s = a instanceof RegExp;
|
|
359
|
+
return f !== s ? !1 : f && s ? e.toString() === a.toString() : et(e, a);
|
|
360
|
+
}
|
|
361
|
+
function x(e, a) {
|
|
362
|
+
if (e && Object.keys(e).length && a) {
|
|
363
|
+
if (!a.includes(".")) return e[a];
|
|
364
|
+
const t = a.split(".");
|
|
363
365
|
let n = e;
|
|
364
|
-
for (let
|
|
365
|
-
if (
|
|
366
|
-
n = n[
|
|
366
|
+
for (let l = 0, o = t.length; l < o; ++l) {
|
|
367
|
+
if (n == null) return null;
|
|
368
|
+
n = n[t[l]];
|
|
367
369
|
}
|
|
368
370
|
return n;
|
|
369
|
-
} else
|
|
370
|
-
return e[l];
|
|
371
|
-
else return null;
|
|
371
|
+
} else return null;
|
|
372
372
|
}
|
|
373
|
-
function
|
|
374
|
-
if (e != null &&
|
|
375
|
-
for (const
|
|
373
|
+
function tt(e, a) {
|
|
374
|
+
if (e != null && a?.length) {
|
|
375
|
+
for (const t of a) if (ce(e, t)) return !0;
|
|
376
376
|
}
|
|
377
377
|
return !1;
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function at(e) {
|
|
380
380
|
return typeof e == "string";
|
|
381
381
|
}
|
|
382
382
|
function ee(e) {
|
|
383
|
-
return Array.isArray(e) ? e.filter((
|
|
383
|
+
return Array.isArray(e) ? e.filter((a) => at(a)).join(" ") : e;
|
|
384
384
|
}
|
|
385
|
-
function ge(e,
|
|
386
|
-
const
|
|
385
|
+
function ge(e, a) {
|
|
386
|
+
const t = i(() => oe(e) ? e.value : e), n = i(() => ee(t.value.invalidLabel)), l = i(() => ee(t.value.validLabel)), o = i(() => t.value.loadingLabel), f = i(() => t.value.hintLabel), s = i(() => !!(t.value.loading && (a.loading || o.value))), v = i(() => !s.value && !!(t.value.invalid && (a.invalid || n.value))), r = i(() => !s.value && !v.value && !!(t.value.valid && (a.valid || l.value))), c = i(() => !s.value && !v.value && !r.value && !!(a.hint || f.value)), S = i(() => v.value || r.value || s.value || c.value);
|
|
387
387
|
return {
|
|
388
|
-
hasInvalidLabelOrSlot:
|
|
388
|
+
hasInvalidLabelOrSlot: v,
|
|
389
389
|
hasHintLabelOrSlot: c,
|
|
390
|
-
hasValidLabelOrSlot:
|
|
391
|
-
hasLoadingLabelOrSlot:
|
|
390
|
+
hasValidLabelOrSlot: r,
|
|
391
|
+
hasLoadingLabelOrSlot: s,
|
|
392
392
|
hintSlotScope: i(() => ({
|
|
393
|
-
modelValue:
|
|
394
|
-
valid:
|
|
395
|
-
invalid:
|
|
396
|
-
loading:
|
|
393
|
+
modelValue: t.value.modelValue,
|
|
394
|
+
valid: t.value.valid,
|
|
395
|
+
invalid: t.value.invalid,
|
|
396
|
+
loading: t.value.loading
|
|
397
397
|
})),
|
|
398
|
-
HintSlot:
|
|
398
|
+
HintSlot: q({
|
|
399
399
|
name: "HintSlot",
|
|
400
400
|
props: { tag: {
|
|
401
401
|
type: String,
|
|
@@ -403,68 +403,68 @@ function ge(e, l) {
|
|
|
403
403
|
} },
|
|
404
404
|
setup() {
|
|
405
405
|
return {
|
|
406
|
-
isVisible:
|
|
406
|
+
isVisible: S,
|
|
407
407
|
invalidLabel: n,
|
|
408
|
-
validLabel:
|
|
408
|
+
validLabel: l,
|
|
409
409
|
loadingLabel: o,
|
|
410
|
-
hintLabel:
|
|
411
|
-
hasInvalidLabelOrSlot:
|
|
412
|
-
hasValidLabelOrSlot:
|
|
413
|
-
hasLoadingLabelOrSlot:
|
|
410
|
+
hintLabel: f,
|
|
411
|
+
hasInvalidLabelOrSlot: v,
|
|
412
|
+
hasValidLabelOrSlot: r,
|
|
413
|
+
hasLoadingLabelOrSlot: s,
|
|
414
414
|
hasHintLabelOrSlot: c
|
|
415
415
|
};
|
|
416
416
|
},
|
|
417
417
|
render() {
|
|
418
418
|
if (this.isVisible) {
|
|
419
|
-
let
|
|
420
|
-
return this.hasInvalidLabelOrSlot && (
|
|
419
|
+
let g;
|
|
420
|
+
return this.hasInvalidLabelOrSlot && (g = "alert"), this.hasValidLabelOrSlot && (g = "status"), this.hasLoadingLabelOrSlot ? _(this.tag, { role: g }, this.$slots.loading?.() ?? this.loadingLabel) : this.hasInvalidLabelOrSlot ? _(this.tag, { role: g }, this.$slots.invalid?.() ?? this.$slots.invalid ?? this.invalidLabel) : this.hasValidLabelOrSlot ? _(this.tag, { role: g }, this.$slots.valid?.() ?? this.validLabel) : _(this.tag, { role: g }, this.$slots.hint?.() ?? this.$slots.hint ?? this.hintLabel);
|
|
421
421
|
}
|
|
422
422
|
return null;
|
|
423
423
|
}
|
|
424
424
|
})
|
|
425
425
|
};
|
|
426
426
|
}
|
|
427
|
-
function
|
|
428
|
-
const
|
|
429
|
-
function n(
|
|
430
|
-
const
|
|
431
|
-
if (
|
|
427
|
+
function lt(e) {
|
|
428
|
+
const a = ne(e, void 0), t = i(() => a !== void 0);
|
|
429
|
+
function n(l, o, f) {
|
|
430
|
+
const s = a?.[l];
|
|
431
|
+
if (s) return i({
|
|
432
432
|
get() {
|
|
433
|
-
return
|
|
433
|
+
return s.value;
|
|
434
434
|
},
|
|
435
|
-
set(
|
|
436
|
-
|
|
435
|
+
set(r) {
|
|
436
|
+
s.value = r;
|
|
437
437
|
}
|
|
438
438
|
});
|
|
439
|
-
const
|
|
439
|
+
const v = je(o, l);
|
|
440
440
|
return i({
|
|
441
441
|
get() {
|
|
442
|
-
return
|
|
442
|
+
return v.value;
|
|
443
443
|
},
|
|
444
|
-
set(
|
|
445
|
-
|
|
444
|
+
set(r) {
|
|
445
|
+
f && f(`update:${l}`, r);
|
|
446
446
|
}
|
|
447
447
|
});
|
|
448
448
|
}
|
|
449
449
|
return {
|
|
450
|
-
group:
|
|
451
|
-
isInGroup:
|
|
450
|
+
group: a,
|
|
451
|
+
isInGroup: t,
|
|
452
452
|
getGroupOrLocalRef: n
|
|
453
453
|
};
|
|
454
454
|
}
|
|
455
|
-
var te = Xe,
|
|
455
|
+
var te = Xe, rt = [
|
|
456
456
|
"click",
|
|
457
457
|
"update:modelValue",
|
|
458
458
|
"change",
|
|
459
459
|
"blur"
|
|
460
460
|
];
|
|
461
|
-
function
|
|
462
|
-
const { id:
|
|
461
|
+
function nt(e, a) {
|
|
462
|
+
const { id: t } = A(e), { group: n, isInGroup: l, getGroupOrLocalRef: o } = lt(de);
|
|
463
463
|
return {
|
|
464
|
-
id:
|
|
464
|
+
id: t,
|
|
465
465
|
group: n,
|
|
466
|
-
isInGroup:
|
|
467
|
-
modelValue: o("modelValue", e,
|
|
466
|
+
isInGroup: l,
|
|
467
|
+
modelValue: o("modelValue", e, a),
|
|
468
468
|
valid: o("valid", e),
|
|
469
469
|
invalid: o("invalid", e),
|
|
470
470
|
readonly: i(() => !!(e.readonly || n?.readonly.value)),
|
|
@@ -472,50 +472,48 @@ function rt(e, l) {
|
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
474
|
function ot() {
|
|
475
|
-
return
|
|
475
|
+
return ne(we, void 0);
|
|
476
|
+
}
|
|
477
|
+
function it(e, a, t) {
|
|
478
|
+
let n = a;
|
|
479
|
+
if (Array.isArray(e) && e.length) {
|
|
480
|
+
const l = e[0];
|
|
481
|
+
l() === a && (n = t);
|
|
482
|
+
}
|
|
483
|
+
if (typeof e == "function" && e() === a && (n = t), typeof e == "object") {
|
|
484
|
+
let l = e.default;
|
|
485
|
+
typeof l == "function" && (l = l()), (typeof l == "object" ? JSON.stringify(l) === JSON.stringify(a) : l === a) && (n = t);
|
|
486
|
+
}
|
|
487
|
+
return n;
|
|
476
488
|
}
|
|
477
|
-
function ye(e,
|
|
478
|
-
const n = ot(),
|
|
479
|
-
if (
|
|
489
|
+
function ye(e, a, t) {
|
|
490
|
+
const n = ot(), l = i(() => {
|
|
491
|
+
if (n?.defaults.value?.[e])
|
|
480
492
|
return n.defaults.value[e];
|
|
481
493
|
});
|
|
482
494
|
return i(() => {
|
|
483
|
-
if (
|
|
484
|
-
const o =
|
|
485
|
-
return Object.keys(
|
|
486
|
-
const c =
|
|
487
|
-
|
|
488
|
-
if (Array.isArray(v[t])) {
|
|
489
|
-
const d = v[t];
|
|
490
|
-
d.length && d[0] === c && (s[t] = o[t]);
|
|
491
|
-
}
|
|
492
|
-
if (typeof v[t] == "function") {
|
|
493
|
-
const d = v[t];
|
|
494
|
-
d() === c && (s[t] = o[t]);
|
|
495
|
-
}
|
|
496
|
-
if (typeof v[t] == "object") {
|
|
497
|
-
let d = v[t].default;
|
|
498
|
-
typeof d == "function" && (d = d()), typeof d == "object" ? JSON.stringify(d) === JSON.stringify(c) && (s[t] = o[t]) : d === c && (s[t] = o[t]);
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
return s;
|
|
495
|
+
if (l.value === void 0) return t;
|
|
496
|
+
const o = l.value, f = a, s = t;
|
|
497
|
+
return Object.keys(f).reduce((v, r) => {
|
|
498
|
+
const c = s[r];
|
|
499
|
+
return v[r] = r in o ? it(f[r], c, o[r]) : c, v;
|
|
502
500
|
}, {});
|
|
503
501
|
});
|
|
504
502
|
}
|
|
505
|
-
function
|
|
506
|
-
return i(() => String(e?.value ||
|
|
503
|
+
function ut(e) {
|
|
504
|
+
return i(() => String(e?.value || Ae()));
|
|
507
505
|
}
|
|
508
|
-
function be(e,
|
|
506
|
+
function be(e, a, t) {
|
|
509
507
|
return i(() => {
|
|
510
|
-
const n = { [e]: !0 },
|
|
511
|
-
return
|
|
508
|
+
const n = { [e]: !0 }, l = typeof a?.value == "string" ? a.value.split(" ") : a?.value;
|
|
509
|
+
return l && Array.isArray(l) && l.forEach((o) => {
|
|
512
510
|
o && (n[`${e}--${o}`] = !0);
|
|
513
|
-
}),
|
|
514
|
-
n[`${e}--${o}`] = u(
|
|
511
|
+
}), t && Object.keys(t.value).forEach((o) => {
|
|
512
|
+
n[`${e}--${o}`] = u(t.value[o]);
|
|
515
513
|
}), n;
|
|
516
514
|
});
|
|
517
515
|
}
|
|
518
|
-
var
|
|
516
|
+
var st = ["for"], dt = [
|
|
519
517
|
"id",
|
|
520
518
|
"name",
|
|
521
519
|
"disabled",
|
|
@@ -524,155 +522,155 @@ var it = ["for"], ut = [
|
|
|
524
522
|
"aria-invalid",
|
|
525
523
|
"aria-describedby",
|
|
526
524
|
"aria-errormessage"
|
|
527
|
-
],
|
|
528
|
-
...
|
|
525
|
+
], vt = { name: "VvRadio" }, ft = /* @__PURE__ */ q({
|
|
526
|
+
...vt,
|
|
529
527
|
props: te,
|
|
530
|
-
emits:
|
|
531
|
-
setup(e, { emit:
|
|
532
|
-
const
|
|
533
|
-
if (
|
|
528
|
+
emits: rt,
|
|
529
|
+
setup(e, { emit: a }) {
|
|
530
|
+
const t = e, n = a, l = se(), o = ye("VvRadio", te, t), { id: f, disabled: s, readonly: v, modelValue: r, valid: c, invalid: S } = nt(t, n), g = ut(f), L = i(() => `${g.value}-hint`), C = i(() => V.value ? -1 : t.tabindex), I = ke(), V = i(() => s.value || v.value), E = i(() => {
|
|
531
|
+
if (S.value === !0) return !0;
|
|
534
532
|
if (c.value === !0) return !1;
|
|
535
|
-
}),
|
|
533
|
+
}), D = i(() => Array.isArray(r.value) ? tt(t.value, r.value) : ce(t.value, r.value)), O = i(() => [
|
|
536
534
|
"string",
|
|
537
535
|
"number",
|
|
538
536
|
"boolean"
|
|
539
|
-
].includes(typeof
|
|
537
|
+
].includes(typeof t.value) ? t.value : !0), d = i({
|
|
540
538
|
get() {
|
|
541
|
-
return
|
|
539
|
+
return D.value ? O.value : null;
|
|
542
540
|
},
|
|
543
|
-
set(
|
|
544
|
-
Array.isArray(
|
|
541
|
+
set(p) {
|
|
542
|
+
Array.isArray(r.value) ? r.value = [t.value] : r.value = t.value, n("change", p);
|
|
545
543
|
}
|
|
546
|
-
}), { modifiers: B } =
|
|
544
|
+
}), { modifiers: B } = A(t), G = be("vv-radio", B, i(() => ({
|
|
547
545
|
valid: c.value,
|
|
548
|
-
invalid:
|
|
549
|
-
disabled:
|
|
550
|
-
readonly:
|
|
551
|
-
}))), { HintSlot: $, hasHintLabelOrSlot: he, hasInvalidLabelOrSlot: me, hintSlotScope:
|
|
552
|
-
return (
|
|
546
|
+
invalid: S.value,
|
|
547
|
+
disabled: s.value,
|
|
548
|
+
readonly: v.value
|
|
549
|
+
}))), { HintSlot: $, hasHintLabelOrSlot: he, hasInvalidLabelOrSlot: me, hintSlotScope: k } = ge(o, l);
|
|
550
|
+
return (p, U) => (P(), j("label", {
|
|
553
551
|
class: ie(u(G)),
|
|
554
|
-
for: u(
|
|
552
|
+
for: u(g)
|
|
555
553
|
}, [
|
|
556
|
-
|
|
557
|
-
id: u(
|
|
554
|
+
Re(ae("input", {
|
|
555
|
+
id: u(g),
|
|
558
556
|
ref_key: "input",
|
|
559
|
-
ref:
|
|
560
|
-
"onUpdate:modelValue": U[0] || (U[0] = (Se) =>
|
|
557
|
+
ref: I,
|
|
558
|
+
"onUpdate:modelValue": U[0] || (U[0] = (Se) => oe(d) ? d.value = Se : null),
|
|
561
559
|
type: "radio",
|
|
562
560
|
class: "vv-radio__input",
|
|
563
|
-
name:
|
|
564
|
-
disabled: u(
|
|
561
|
+
name: p.name,
|
|
562
|
+
disabled: u(V),
|
|
565
563
|
value: u(O),
|
|
566
|
-
tabindex: u(
|
|
567
|
-
"aria-invalid": u(
|
|
568
|
-
"aria-describedby": u(he) ? u(
|
|
569
|
-
"aria-errormessage": u(me) ? u(
|
|
570
|
-
}, null, 8,
|
|
571
|
-
|
|
564
|
+
tabindex: u(C),
|
|
565
|
+
"aria-invalid": u(E),
|
|
566
|
+
"aria-describedby": u(he) ? u(L) : void 0,
|
|
567
|
+
"aria-errormessage": u(me) ? u(L) : void 0
|
|
568
|
+
}, null, 8, dt), [[Ne, u(d)]]),
|
|
569
|
+
y(p.$slots, "default", { value: u(r) }, () => [Ve(ue(p.label), 1)]),
|
|
572
570
|
re(u($), {
|
|
573
|
-
id: u(
|
|
571
|
+
id: u(L),
|
|
574
572
|
class: "vv-radio__hint"
|
|
575
573
|
}, le({ _: 2 }, [
|
|
576
|
-
|
|
574
|
+
p.$slots.hint ? {
|
|
577
575
|
name: "hint",
|
|
578
|
-
fn:
|
|
576
|
+
fn: m(() => [y(p.$slots, "hint", h(b(u(k))))]),
|
|
579
577
|
key: "0"
|
|
580
578
|
} : void 0,
|
|
581
|
-
|
|
579
|
+
p.$slots.loading ? {
|
|
582
580
|
name: "loading",
|
|
583
|
-
fn:
|
|
581
|
+
fn: m(() => [y(p.$slots, "loading", h(b(u(k))))]),
|
|
584
582
|
key: "1"
|
|
585
583
|
} : void 0,
|
|
586
|
-
|
|
584
|
+
p.$slots.valid ? {
|
|
587
585
|
name: "valid",
|
|
588
|
-
fn:
|
|
586
|
+
fn: m(() => [y(p.$slots, "valid", h(b(u(k))))]),
|
|
589
587
|
key: "2"
|
|
590
588
|
} : void 0,
|
|
591
|
-
|
|
589
|
+
p.$slots.invalid ? {
|
|
592
590
|
name: "invalid",
|
|
593
|
-
fn:
|
|
591
|
+
fn: m(() => [y(p.$slots, "invalid", h(b(u(k))))]),
|
|
594
592
|
key: "3"
|
|
595
593
|
} : void 0
|
|
596
594
|
]), 1032, ["id"])
|
|
597
|
-
], 10,
|
|
595
|
+
], 10, st));
|
|
598
596
|
}
|
|
599
|
-
}),
|
|
600
|
-
function
|
|
601
|
-
$e(e,
|
|
597
|
+
}), pt = ft;
|
|
598
|
+
function ct(e, a) {
|
|
599
|
+
$e(e, a);
|
|
602
600
|
}
|
|
603
|
-
function
|
|
604
|
-
const { options:
|
|
601
|
+
function gt(e) {
|
|
602
|
+
const { options: a, labelKey: t, valueKey: n, disabledKey: l } = A(e);
|
|
605
603
|
return {
|
|
606
|
-
options:
|
|
607
|
-
getOptionLabel: (
|
|
608
|
-
getOptionValue: (
|
|
609
|
-
isOptionDisabled: (
|
|
610
|
-
getOptionGrouped: (
|
|
604
|
+
options: a,
|
|
605
|
+
getOptionLabel: (r) => typeof r == "string" ? r : typeof t.value == "function" ? t.value(r) : String(t.value ? w(r, t.value) : r),
|
|
606
|
+
getOptionValue: (r) => typeof r == "string" ? r : typeof n.value == "function" ? n.value(r) : n.value ? w(r, n.value) : r,
|
|
607
|
+
isOptionDisabled: (r) => typeof r == "string" ? !1 : typeof l.value == "function" ? l.value(r) : l.value ? !!w(r, l.value) : !1,
|
|
608
|
+
getOptionGrouped: (r) => typeof r == "string" ? [] : typeof r == "object" && r && "options" in r ? r.options : []
|
|
611
609
|
};
|
|
612
610
|
}
|
|
613
|
-
var
|
|
614
|
-
...
|
|
611
|
+
var yt = ["textContent"], bt = { class: "vv-radio-group__wrapper" }, ht = { name: "VvRadioGroup" }, mt = /* @__PURE__ */ q({
|
|
612
|
+
...ht,
|
|
615
613
|
props: Z,
|
|
616
|
-
emits:
|
|
617
|
-
setup(e, { emit:
|
|
618
|
-
const
|
|
619
|
-
|
|
620
|
-
modelValue:
|
|
621
|
-
disabled:
|
|
622
|
-
readonly:
|
|
614
|
+
emits: Ze,
|
|
615
|
+
setup(e, { emit: a }) {
|
|
616
|
+
const t = e, n = a, l = se(), o = ye("VvRadioGroup", Z, t), f = Ce(t, "modelValue", n), { disabled: s, readonly: v, vertical: r, valid: c, invalid: S, modifiers: g } = A(t);
|
|
617
|
+
ct(de, {
|
|
618
|
+
modelValue: f,
|
|
619
|
+
disabled: s,
|
|
620
|
+
readonly: v,
|
|
623
621
|
valid: c,
|
|
624
|
-
invalid:
|
|
622
|
+
invalid: S
|
|
625
623
|
});
|
|
626
|
-
const { getOptionLabel:
|
|
627
|
-
disabled:
|
|
628
|
-
readonly:
|
|
629
|
-
required:
|
|
630
|
-
horizontal: !
|
|
624
|
+
const { getOptionLabel: L, getOptionValue: C, isOptionDisabled: I } = gt(t), V = be("vv-radio-group", g, i(() => ({
|
|
625
|
+
disabled: s.value,
|
|
626
|
+
readonly: v.value,
|
|
627
|
+
required: t.required,
|
|
628
|
+
horizontal: !r.value,
|
|
631
629
|
valid: c.value,
|
|
632
|
-
invalid:
|
|
630
|
+
invalid: S.value
|
|
633
631
|
})));
|
|
634
|
-
function
|
|
632
|
+
function E(d, B) {
|
|
635
633
|
return {
|
|
636
|
-
id: `${
|
|
637
|
-
name:
|
|
638
|
-
label:
|
|
639
|
-
value:
|
|
640
|
-
required:
|
|
641
|
-
disabled:
|
|
634
|
+
id: `${t.name}_opt${B}`,
|
|
635
|
+
name: t.name,
|
|
636
|
+
label: L(d),
|
|
637
|
+
value: C(d),
|
|
638
|
+
required: t.required,
|
|
639
|
+
disabled: I(d)
|
|
642
640
|
};
|
|
643
641
|
}
|
|
644
|
-
const { HintSlot:
|
|
645
|
-
return (
|
|
646
|
-
|
|
642
|
+
const { HintSlot: D, hintSlotScope: O } = ge(o, l);
|
|
643
|
+
return (d, B) => (P(), j("fieldset", { class: ie(u(V)) }, [
|
|
644
|
+
d.label ? (P(), j("legend", {
|
|
647
645
|
key: 0,
|
|
648
|
-
textContent: ue(
|
|
649
|
-
}, null, 8,
|
|
650
|
-
ae("div",
|
|
651
|
-
re(u(
|
|
652
|
-
|
|
646
|
+
textContent: ue(d.label)
|
|
647
|
+
}, null, 8, yt)) : Pe("v-if", !0),
|
|
648
|
+
ae("div", bt, [d.options.length > 0 ? (P(!0), j(Oe, { key: 0 }, _e(d.options, (G, $) => (P(), Le(pt, Be({ key: $ }, { ref_for: !0 }, E(G, $)), null, 16))), 128)) : y(d.$slots, "default", { key: 1 })]),
|
|
649
|
+
re(u(D), { class: "vv-radio-group__hint" }, le({ _: 2 }, [
|
|
650
|
+
d.$slots.hint ? {
|
|
653
651
|
name: "hint",
|
|
654
|
-
fn:
|
|
652
|
+
fn: m(() => [y(d.$slots, "hint", h(b(u(O))))]),
|
|
655
653
|
key: "0"
|
|
656
654
|
} : void 0,
|
|
657
|
-
|
|
655
|
+
d.$slots.loading ? {
|
|
658
656
|
name: "loading",
|
|
659
|
-
fn:
|
|
657
|
+
fn: m(() => [y(d.$slots, "loading", h(b(u(O))))]),
|
|
660
658
|
key: "1"
|
|
661
659
|
} : void 0,
|
|
662
|
-
|
|
660
|
+
d.$slots.valid ? {
|
|
663
661
|
name: "valid",
|
|
664
|
-
fn:
|
|
662
|
+
fn: m(() => [y(d.$slots, "valid", h(b(u(O))))]),
|
|
665
663
|
key: "2"
|
|
666
664
|
} : void 0,
|
|
667
|
-
|
|
665
|
+
d.$slots.invalid ? {
|
|
668
666
|
name: "invalid",
|
|
669
|
-
fn:
|
|
667
|
+
fn: m(() => [y(d.$slots, "invalid", h(b(u(O))))]),
|
|
670
668
|
key: "3"
|
|
671
669
|
} : void 0
|
|
672
670
|
]), 1024)
|
|
673
671
|
], 2));
|
|
674
672
|
}
|
|
675
|
-
}),
|
|
673
|
+
}), _t = mt;
|
|
676
674
|
export {
|
|
677
|
-
|
|
675
|
+
_t as default
|
|
678
676
|
};
|