@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,8 +1,8 @@
|
|
|
1
|
-
import { Fragment as
|
|
2
|
-
import { arrow as It, autoPlacement as Je, autoUpdate as
|
|
3
|
-
import { onClickOutside as
|
|
1
|
+
import { Fragment as De, Transition as yt, computed as i, createBlock as K, createCommentVNode as V, createElementBlock as k, createElementVNode as z, createSlots as St, createTextVNode as ke, createVNode as ce, defineComponent as M, guardReactiveProps as $, h as Z, inject as ot, isRef as Ne, mergeDefaults as wt, mergeProps as N, nextTick as ue, normalizeClass as Ae, normalizeProps as E, normalizeStyle as We, onMounted as lt, openBlock as S, provide as Fe, ref as w, renderList as _t, renderSlot as _, toDisplayString as fe, toHandlers as Lt, toRefs as ee, unref as n, useAttrs as xt, useId as $t, useSlots as Et, vModelText as Ot, vShow as Pt, watch as A, withCtx as D, withDirectives as rt, withModifiers as qe } from "vue";
|
|
2
|
+
import { arrow as It, autoPlacement as Je, autoUpdate as Ct, flip as Ke, offset as Ue, shift as Ye, size as Ge, useFloating as Vt } from "@floating-ui/vue";
|
|
3
|
+
import { onClickOutside as kt, onKeyStroke as de, useElementHover as nt, useElementVisibility as Bt, useFocus as it, useFocusWithin as st, useMutationObserver as Dt, useStorage as Qe, useVModel as Nt } from "@vueuse/core";
|
|
4
4
|
import At from "mitt";
|
|
5
|
-
import { Icon as Ft, addIcon as jt, iconLoaded as
|
|
5
|
+
import { Icon as Ft, addIcon as jt, iconLoaded as Ce } from "@iconify/vue";
|
|
6
6
|
var ut = {
|
|
7
7
|
showPassword: "eye-on",
|
|
8
8
|
hidePassword: "eye-off",
|
|
@@ -14,13 +14,13 @@ var ut = {
|
|
|
14
14
|
remove: "trash",
|
|
15
15
|
edit: "edit",
|
|
16
16
|
download: "download"
|
|
17
|
-
},
|
|
17
|
+
}, Tt = { prefix: "normal" }, U = /* @__PURE__ */ (function(e) {
|
|
18
18
|
return e.local = "local", e.session = "session", e;
|
|
19
19
|
})({}), dt = /* @__PURE__ */ (function(e) {
|
|
20
20
|
return e.absolute = "absolute", e.fixed = "fixed", e;
|
|
21
21
|
})({}), x = /* @__PURE__ */ (function(e) {
|
|
22
22
|
return e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e;
|
|
23
|
-
})({}),
|
|
23
|
+
})({}), Ht = /* @__PURE__ */ (function(e) {
|
|
24
24
|
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;
|
|
25
25
|
})({}), pe = /* @__PURE__ */ (function(e) {
|
|
26
26
|
return e.before = "before", e.after = "after", e;
|
|
@@ -30,7 +30,7 @@ var ut = {
|
|
|
30
30
|
return e.nuxtLink = "nuxt-link", e.routerLink = "router-link", e.a = "a", e.button = "button", e;
|
|
31
31
|
})({}), zt = /* @__PURE__ */ (function(e) {
|
|
32
32
|
return e.button = "button", e.link = "link", e.menuitem = "menuitem", e;
|
|
33
|
-
})({}),
|
|
33
|
+
})({}), Be = /* @__PURE__ */ (function(e) {
|
|
34
34
|
return e.listbox = "listbox", e.menu = "menu", e;
|
|
35
35
|
})({}), Ze = /* @__PURE__ */ (function(e) {
|
|
36
36
|
return e.option = "option", e.presentation = "presentation", e;
|
|
@@ -51,7 +51,7 @@ var ut = {
|
|
|
51
51
|
type: [String, Array],
|
|
52
52
|
default: void 0
|
|
53
53
|
}
|
|
54
|
-
},
|
|
54
|
+
}, Te = {
|
|
55
55
|
invalid: {
|
|
56
56
|
type: Boolean,
|
|
57
57
|
default: !1
|
|
@@ -60,7 +60,7 @@ var ut = {
|
|
|
60
60
|
type: [String, Array],
|
|
61
61
|
default: void 0
|
|
62
62
|
}
|
|
63
|
-
},
|
|
63
|
+
}, He = {
|
|
64
64
|
loading: {
|
|
65
65
|
type: Boolean,
|
|
66
66
|
default: !1
|
|
@@ -84,7 +84,7 @@ var ut = {
|
|
|
84
84
|
} }, Yt = { current: {
|
|
85
85
|
type: Boolean,
|
|
86
86
|
default: !1
|
|
87
|
-
} },
|
|
87
|
+
} }, eo = {
|
|
88
88
|
showClearAction: {
|
|
89
89
|
type: Boolean,
|
|
90
90
|
default: !1
|
|
@@ -164,7 +164,7 @@ var ut = {
|
|
|
164
164
|
placement: {
|
|
165
165
|
type: String,
|
|
166
166
|
default: x.bottom,
|
|
167
|
-
validator: (e) => Object.values(x).includes(e) || Object.values(
|
|
167
|
+
validator: (e) => Object.values(x).includes(e) || Object.values(Ht).includes(e)
|
|
168
168
|
},
|
|
169
169
|
strategy: {
|
|
170
170
|
type: String,
|
|
@@ -221,23 +221,23 @@ var ut = {
|
|
|
221
221
|
type: String,
|
|
222
222
|
required: !0
|
|
223
223
|
}
|
|
224
|
-
},
|
|
224
|
+
}, la = { autofocus: {
|
|
225
225
|
type: Boolean,
|
|
226
226
|
default: !1
|
|
227
|
-
} },
|
|
227
|
+
} }, ra = { autocomplete: {
|
|
228
228
|
type: String,
|
|
229
229
|
default: "off"
|
|
230
230
|
} }, na = {
|
|
231
231
|
...mt,
|
|
232
|
-
...ra,
|
|
233
232
|
...la,
|
|
233
|
+
...ra,
|
|
234
234
|
...ct,
|
|
235
235
|
...te,
|
|
236
236
|
...Re,
|
|
237
237
|
...je,
|
|
238
|
-
...He,
|
|
239
|
-
...ze,
|
|
240
238
|
...Te,
|
|
239
|
+
...ze,
|
|
240
|
+
...He,
|
|
241
241
|
...ae,
|
|
242
242
|
...Xt,
|
|
243
243
|
...Zt,
|
|
@@ -257,17 +257,17 @@ var ut = {
|
|
|
257
257
|
default: void 0
|
|
258
258
|
},
|
|
259
259
|
...ft
|
|
260
|
-
},
|
|
260
|
+
}, to = {
|
|
261
261
|
...mt,
|
|
262
262
|
...ct,
|
|
263
263
|
...je,
|
|
264
|
-
...
|
|
264
|
+
...Te,
|
|
265
265
|
...ze,
|
|
266
266
|
...te,
|
|
267
267
|
...Re,
|
|
268
268
|
...ae,
|
|
269
269
|
...me,
|
|
270
|
-
...
|
|
270
|
+
...He,
|
|
271
271
|
value: {
|
|
272
272
|
type: [
|
|
273
273
|
String,
|
|
@@ -285,16 +285,16 @@ var ut = {
|
|
|
285
285
|
],
|
|
286
286
|
default: void 0
|
|
287
287
|
}
|
|
288
|
-
},
|
|
288
|
+
}, ao = {
|
|
289
289
|
...je,
|
|
290
|
-
...
|
|
290
|
+
...Te,
|
|
291
291
|
...Qt,
|
|
292
292
|
...ze,
|
|
293
293
|
...te,
|
|
294
294
|
...Re,
|
|
295
295
|
...ae,
|
|
296
296
|
...me,
|
|
297
|
-
...
|
|
297
|
+
...He,
|
|
298
298
|
...ft,
|
|
299
299
|
modelValue: {
|
|
300
300
|
type: [
|
|
@@ -314,7 +314,7 @@ var ut = {
|
|
|
314
314
|
type: Boolean,
|
|
315
315
|
default: !1
|
|
316
316
|
}
|
|
317
|
-
},
|
|
317
|
+
}, oo = {
|
|
318
318
|
...te,
|
|
319
319
|
...me,
|
|
320
320
|
...Gt,
|
|
@@ -394,7 +394,7 @@ var ut = {
|
|
|
394
394
|
resizable: Boolean
|
|
395
395
|
};
|
|
396
396
|
function ve(e) {
|
|
397
|
-
return ((a) => a == null || a === "" || Array.isArray(a) && a.length === 0 || !(a instanceof Date) && typeof a == "object" && Object.keys(a).length === 0)(
|
|
397
|
+
return ((a) => a == null || a === "" || Array.isArray(a) && a.length === 0 || !(a instanceof Date) && typeof a == "object" && Object.keys(a).length === 0)(n(e));
|
|
398
398
|
}
|
|
399
399
|
function va(e) {
|
|
400
400
|
return typeof e == "string";
|
|
@@ -403,13 +403,13 @@ function tt(e) {
|
|
|
403
403
|
return Array.isArray(e) ? e.filter((a) => va(a)).join(" ") : e;
|
|
404
404
|
}
|
|
405
405
|
function fa(e, a) {
|
|
406
|
-
const t =
|
|
406
|
+
const t = i(() => Ne(e) ? e.value : e), o = i(() => tt(t.value.invalidLabel)), r = i(() => tt(t.value.validLabel)), s = i(() => t.value.loadingLabel), v = i(() => t.value.hintLabel), u = i(() => !!(t.value.loading && (a.loading || s.value))), b = i(() => !u.value && !!(t.value.invalid && (a.invalid || o.value))), h = i(() => !u.value && !b.value && !!(t.value.valid && (a.valid || r.value))), L = i(() => !u.value && !b.value && !h.value && !!(a.hint || v.value)), d = i(() => b.value || h.value || u.value || L.value);
|
|
407
407
|
return {
|
|
408
|
-
hasInvalidLabelOrSlot:
|
|
409
|
-
hasHintLabelOrSlot:
|
|
410
|
-
hasValidLabelOrSlot:
|
|
411
|
-
hasLoadingLabelOrSlot:
|
|
412
|
-
hintSlotScope:
|
|
408
|
+
hasInvalidLabelOrSlot: b,
|
|
409
|
+
hasHintLabelOrSlot: L,
|
|
410
|
+
hasValidLabelOrSlot: h,
|
|
411
|
+
hasLoadingLabelOrSlot: u,
|
|
412
|
+
hintSlotScope: i(() => ({
|
|
413
413
|
modelValue: t.value.modelValue,
|
|
414
414
|
valid: t.value.valid,
|
|
415
415
|
invalid: t.value.invalid,
|
|
@@ -423,21 +423,21 @@ function fa(e, a) {
|
|
|
423
423
|
} },
|
|
424
424
|
setup() {
|
|
425
425
|
return {
|
|
426
|
-
isVisible:
|
|
426
|
+
isVisible: d,
|
|
427
427
|
invalidLabel: o,
|
|
428
|
-
validLabel:
|
|
428
|
+
validLabel: r,
|
|
429
429
|
loadingLabel: s,
|
|
430
|
-
hintLabel:
|
|
431
|
-
hasInvalidLabelOrSlot:
|
|
432
|
-
hasValidLabelOrSlot:
|
|
433
|
-
hasLoadingLabelOrSlot:
|
|
434
|
-
hasHintLabelOrSlot:
|
|
430
|
+
hintLabel: v,
|
|
431
|
+
hasInvalidLabelOrSlot: b,
|
|
432
|
+
hasValidLabelOrSlot: h,
|
|
433
|
+
hasLoadingLabelOrSlot: u,
|
|
434
|
+
hasHintLabelOrSlot: L
|
|
435
435
|
};
|
|
436
436
|
},
|
|
437
437
|
render() {
|
|
438
438
|
if (this.isVisible) {
|
|
439
|
-
let
|
|
440
|
-
return this.hasInvalidLabelOrSlot && (
|
|
439
|
+
let m;
|
|
440
|
+
return this.hasInvalidLabelOrSlot && (m = "alert"), this.hasValidLabelOrSlot && (m = "status"), this.hasLoadingLabelOrSlot ? Z(this.tag, { role: m }, this.$slots.loading?.() ?? this.loadingLabel) : this.hasInvalidLabelOrSlot ? Z(this.tag, { role: m }, this.$slots.invalid?.() ?? this.$slots.invalid ?? this.invalidLabel) : this.hasValidLabelOrSlot ? Z(this.tag, { role: m }, this.$slots.valid?.() ?? this.validLabel) : Z(this.tag, { role: m }, this.$slots.hint?.() ?? this.$slots.hint ?? this.hintLabel);
|
|
441
441
|
}
|
|
442
442
|
return null;
|
|
443
443
|
}
|
|
@@ -458,8 +458,8 @@ var ca = {
|
|
|
458
458
|
},
|
|
459
459
|
role: {
|
|
460
460
|
type: String,
|
|
461
|
-
default:
|
|
462
|
-
validator: (e) => Object.values(
|
|
461
|
+
default: Be.menu,
|
|
462
|
+
validator: (e) => Object.values(Be).includes(e)
|
|
463
463
|
}
|
|
464
464
|
}, pa = { focusOnHover: {
|
|
465
465
|
type: Boolean,
|
|
@@ -478,12 +478,12 @@ var ca = {
|
|
|
478
478
|
}
|
|
479
479
|
};
|
|
480
480
|
function gt(e) {
|
|
481
|
-
return
|
|
481
|
+
return i(() => String(e?.value || $t()));
|
|
482
482
|
}
|
|
483
483
|
function ga({ reference: e, id: a, expanded: t, aria: o }) {
|
|
484
|
-
const
|
|
484
|
+
const r = At();
|
|
485
485
|
return {
|
|
486
|
-
bus:
|
|
486
|
+
bus: r,
|
|
487
487
|
component: M({
|
|
488
488
|
name: "VvDropdownTriggerProvider",
|
|
489
489
|
setup() {
|
|
@@ -492,17 +492,17 @@ function ga({ reference: e, id: a, expanded: t, aria: o }) {
|
|
|
492
492
|
id: a,
|
|
493
493
|
expanded: t,
|
|
494
494
|
aria: o,
|
|
495
|
-
bus:
|
|
495
|
+
bus: r
|
|
496
496
|
});
|
|
497
497
|
},
|
|
498
498
|
render() {
|
|
499
|
-
return Z(
|
|
499
|
+
return Z(De, {}, this.$slots.default?.());
|
|
500
500
|
}
|
|
501
501
|
})
|
|
502
502
|
};
|
|
503
503
|
}
|
|
504
504
|
function ba({ role: e, ...a }) {
|
|
505
|
-
const t =
|
|
505
|
+
const t = i(() => e.value === Be.listbox ? Ze.option : Ze.presentation);
|
|
506
506
|
return Fe(vt, {
|
|
507
507
|
role: t,
|
|
508
508
|
...a
|
|
@@ -510,17 +510,17 @@ function ba({ role: e, ...a }) {
|
|
|
510
510
|
}
|
|
511
511
|
function ha({ expanded: e }) {
|
|
512
512
|
Fe(qt, {
|
|
513
|
-
role:
|
|
513
|
+
role: w(zt.menuitem),
|
|
514
514
|
expanded: e
|
|
515
515
|
});
|
|
516
516
|
}
|
|
517
517
|
function ge(e, a, t) {
|
|
518
|
-
return
|
|
519
|
-
const o = { [e]: !0 },
|
|
520
|
-
return
|
|
518
|
+
return i(() => {
|
|
519
|
+
const o = { [e]: !0 }, r = typeof a?.value == "string" ? a.value.split(" ") : a?.value;
|
|
520
|
+
return r && Array.isArray(r) && r.forEach((s) => {
|
|
521
521
|
s && (o[`${e}--${s}`] = !0);
|
|
522
522
|
}), t && Object.keys(t.value).forEach((s) => {
|
|
523
|
-
o[`${e}--${s}`] =
|
|
523
|
+
o[`${e}--${s}`] = n(t.value[s]);
|
|
524
524
|
}), o;
|
|
525
525
|
});
|
|
526
526
|
}
|
|
@@ -553,145 +553,145 @@ var ya = [
|
|
|
553
553
|
"leaveCancelled"
|
|
554
554
|
],
|
|
555
555
|
setup(e, { expose: a, emit: t }) {
|
|
556
|
-
const o = e,
|
|
557
|
-
get: () => o.reference ??
|
|
558
|
-
set: (
|
|
559
|
-
|
|
556
|
+
const o = e, r = t, { id: s } = ee(o), v = gt(s), u = xt(), b = w("auto"), h = w("auto"), L = w(), d = w(), m = w(), P = w(), O = i({
|
|
557
|
+
get: () => o.reference ?? L.value,
|
|
558
|
+
set: (l) => {
|
|
559
|
+
L.value = l;
|
|
560
560
|
}
|
|
561
|
-
}), F =
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
F.value =
|
|
561
|
+
}), F = w(!1);
|
|
562
|
+
lt(() => {
|
|
563
|
+
Dt(d.value, () => {
|
|
564
|
+
F.value = globalThis.getComputedStyle(d.value).getPropertyValue("--dropdown-custom-position")?.trim() === "true";
|
|
565
565
|
}, {
|
|
566
566
|
attributeFilter: ["style"],
|
|
567
|
-
window
|
|
567
|
+
window: globalThis.window
|
|
568
568
|
});
|
|
569
569
|
});
|
|
570
|
-
function j(
|
|
571
|
-
return typeof
|
|
570
|
+
function j(l, c, H) {
|
|
571
|
+
return typeof l == "boolean" ? c() : H(l);
|
|
572
572
|
}
|
|
573
|
-
const oe =
|
|
574
|
-
const
|
|
575
|
-
if (o.autoPlacement ?
|
|
576
|
-
const
|
|
577
|
-
|
|
573
|
+
const oe = i(() => {
|
|
574
|
+
const l = [];
|
|
575
|
+
if (o.autoPlacement ? l.push(j(o.autoPlacement, () => Je(), (c) => Je(c))) : o.flip && l.push(j(o.flip, () => Ke({ fallbackStrategy: "initialPlacement" }), (c) => Ke(c))), o.shift && l.push(j(o.shift, () => Ye(), (c) => Ye(c))), o.size) {
|
|
576
|
+
const c = ({ availableWidth: H, availableHeight: X }) => {
|
|
577
|
+
b.value = `${H}px`, h.value = `${X}px`;
|
|
578
578
|
};
|
|
579
|
-
|
|
580
|
-
...
|
|
581
|
-
apply:
|
|
579
|
+
l.push(j(o.size, () => Ge({ apply: c }), (H) => Ge({
|
|
580
|
+
...H,
|
|
581
|
+
apply: c
|
|
582
582
|
})));
|
|
583
583
|
}
|
|
584
|
-
return o.offset &&
|
|
585
|
-
}), { x: be, y: he, middlewareData: W, placement: ye, strategy: Se } =
|
|
586
|
-
whileElementsMounted: (...
|
|
587
|
-
placement:
|
|
588
|
-
strategy:
|
|
584
|
+
return o.offset && l.push(["string", "number"].includes(typeof o.offset) ? Ue(Number(o.offset)) : Ue(o.offset)), o.arrow && l.push(It({ element: m })), l;
|
|
585
|
+
}), { x: be, y: he, middlewareData: W, placement: ye, strategy: Se } = Vt(O, d, {
|
|
586
|
+
whileElementsMounted: (...l) => Ct(...l, { animationFrame: o.strategy === dt.fixed }),
|
|
587
|
+
placement: i(() => o.placement),
|
|
588
|
+
strategy: i(() => o.strategy),
|
|
589
589
|
middleware: oe
|
|
590
|
-
}), we =
|
|
590
|
+
}), we = i(() => {
|
|
591
591
|
if (F.value) return;
|
|
592
|
-
const
|
|
592
|
+
const l = o.triggerWidth && O.value ? `${O.value?.offsetWidth}px` : void 0;
|
|
593
593
|
return {
|
|
594
594
|
position: Se.value,
|
|
595
595
|
top: `${he.value ?? 0}px`,
|
|
596
596
|
left: `${be.value ?? 0}px`,
|
|
597
|
-
maxWidth:
|
|
598
|
-
maxHeight:
|
|
599
|
-
width:
|
|
597
|
+
maxWidth: l ? void 0 : b.value,
|
|
598
|
+
maxHeight: h.value,
|
|
599
|
+
width: l
|
|
600
600
|
};
|
|
601
|
-
}), _e =
|
|
601
|
+
}), _e = i(() => ye.value.split("-")[0]), Le = i(() => {
|
|
602
602
|
if (F.value) return;
|
|
603
|
-
const
|
|
603
|
+
const l = {
|
|
604
604
|
[x.top]: x.bottom,
|
|
605
605
|
[x.right]: x.left,
|
|
606
606
|
[x.bottom]: x.top,
|
|
607
607
|
[x.left]: x.right
|
|
608
608
|
}[_e.value];
|
|
609
609
|
return {
|
|
610
|
-
left: W.value.arrow?.x
|
|
611
|
-
top: W.value.arrow?.y
|
|
612
|
-
[
|
|
610
|
+
left: W.value.arrow?.x === void 0 ? void 0 : `${W.value.arrow?.x}px`,
|
|
611
|
+
top: W.value.arrow?.y === void 0 ? void 0 : `${W.value.arrow?.y}px`,
|
|
612
|
+
[l]: `${-(m.value?.offsetWidth ?? 0) / 2}px`
|
|
613
613
|
};
|
|
614
|
-
}),
|
|
615
|
-
get: () =>
|
|
616
|
-
set: (
|
|
617
|
-
if (
|
|
618
|
-
q.value =
|
|
614
|
+
}), T = Nt(o, "modelValue", r), q = w(!1), p = i({
|
|
615
|
+
get: () => T.value ?? q.value,
|
|
616
|
+
set: (l) => {
|
|
617
|
+
if (T.value === void 0) {
|
|
618
|
+
q.value = l;
|
|
619
619
|
return;
|
|
620
620
|
}
|
|
621
|
-
|
|
621
|
+
T.value = l;
|
|
622
622
|
}
|
|
623
623
|
});
|
|
624
|
-
function
|
|
625
|
-
|
|
624
|
+
function y() {
|
|
625
|
+
p.value = !0;
|
|
626
626
|
}
|
|
627
627
|
function I() {
|
|
628
|
-
|
|
628
|
+
p.value = !1;
|
|
629
629
|
}
|
|
630
|
-
function
|
|
631
|
-
|
|
630
|
+
function C() {
|
|
631
|
+
p.value = !p.value;
|
|
632
632
|
}
|
|
633
|
-
function Y(
|
|
634
|
-
O.value =
|
|
633
|
+
function Y(l) {
|
|
634
|
+
O.value = l;
|
|
635
635
|
}
|
|
636
|
-
|
|
637
|
-
!o.keepOpen &&
|
|
636
|
+
kt(d, () => {
|
|
637
|
+
!o.keepOpen && p.value && (p.value = !1);
|
|
638
638
|
}, { ignore: [O] });
|
|
639
|
-
const G =
|
|
640
|
-
"aria-controls":
|
|
639
|
+
const G = i(() => O.value?.getAttribute?.("id") ?? void 0), le = i(() => ({
|
|
640
|
+
"aria-controls": v.value,
|
|
641
641
|
"aria-haspopup": !0,
|
|
642
|
-
"aria-expanded":
|
|
642
|
+
"aria-expanded": p.value
|
|
643
643
|
})), { component: xe, bus: $e } = ga({
|
|
644
644
|
reference: O,
|
|
645
|
-
id:
|
|
646
|
-
expanded:
|
|
647
|
-
aria:
|
|
645
|
+
id: v,
|
|
646
|
+
expanded: p,
|
|
647
|
+
aria: le
|
|
648
648
|
});
|
|
649
|
-
$e.on("click",
|
|
650
|
-
const { role: Q, modifiers: Ee } = ee(o),
|
|
651
|
-
function J(
|
|
652
|
-
return
|
|
649
|
+
$e.on("click", C);
|
|
650
|
+
const { role: Q, modifiers: Ee } = ee(o), re = ge("vv-dropdown", Ee, i(() => ({ arrow: o.arrow }))), { focused: g } = st(d);
|
|
651
|
+
function J(l) {
|
|
652
|
+
return l ? [...l.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter((c) => !c.hasAttribute("disabled") && !c.getAttribute("aria-hidden")) : [];
|
|
653
653
|
}
|
|
654
654
|
function ne() {
|
|
655
655
|
ue(() => {
|
|
656
|
-
const
|
|
657
|
-
|
|
656
|
+
const l = J(d.value);
|
|
657
|
+
l.length > 0 && l[0].focus({ preventScroll: !0 });
|
|
658
658
|
});
|
|
659
659
|
}
|
|
660
660
|
function Oe() {
|
|
661
661
|
ue(() => {
|
|
662
|
-
const
|
|
663
|
-
|
|
662
|
+
const l = J(P.value);
|
|
663
|
+
l.length > 0 && l[0].focus({ preventScroll: !0 });
|
|
664
664
|
});
|
|
665
665
|
}
|
|
666
666
|
function ie() {
|
|
667
667
|
ue(() => {
|
|
668
|
-
if (
|
|
669
|
-
const
|
|
670
|
-
if (
|
|
671
|
-
const
|
|
672
|
-
|
|
668
|
+
if (g.value) {
|
|
669
|
+
const l = J(d.value);
|
|
670
|
+
if (l.length === 0 || !document.activeElement) return;
|
|
671
|
+
const c = l.indexOf(document.activeElement);
|
|
672
|
+
c < l.length - 1 ? l[c + 1].focus({ preventScroll: !0 }) : l[0].focus({ preventScroll: !0 });
|
|
673
673
|
}
|
|
674
674
|
});
|
|
675
675
|
}
|
|
676
676
|
function se() {
|
|
677
677
|
ue(() => {
|
|
678
|
-
if (
|
|
679
|
-
const
|
|
680
|
-
if (
|
|
681
|
-
const
|
|
682
|
-
if (
|
|
683
|
-
|
|
678
|
+
if (g.value) {
|
|
679
|
+
const l = J(d.value);
|
|
680
|
+
if (l.length === 0 || !document.activeElement) return;
|
|
681
|
+
const c = l.indexOf(document.activeElement);
|
|
682
|
+
if (c > 0) {
|
|
683
|
+
l[c - 1].focus({ preventScroll: !0 });
|
|
684
684
|
return;
|
|
685
685
|
}
|
|
686
|
-
|
|
686
|
+
l.at(-1)?.focus({ preventScroll: !0 });
|
|
687
687
|
}
|
|
688
688
|
});
|
|
689
689
|
}
|
|
690
|
-
A(
|
|
691
|
-
|
|
690
|
+
A(p, (l) => {
|
|
691
|
+
l && o.autofocusFirst && ne();
|
|
692
692
|
}), a({
|
|
693
|
-
toggle:
|
|
694
|
-
show:
|
|
693
|
+
toggle: C,
|
|
694
|
+
show: y,
|
|
695
695
|
hide: I,
|
|
696
696
|
init: Y,
|
|
697
697
|
focusFirst: ne,
|
|
@@ -702,98 +702,98 @@ var ya = [
|
|
|
702
702
|
});
|
|
703
703
|
const { itemRole: Pe } = ba({
|
|
704
704
|
role: Q,
|
|
705
|
-
expanded:
|
|
706
|
-
focused:
|
|
707
|
-
hovered: nt(
|
|
705
|
+
expanded: p,
|
|
706
|
+
focused: g,
|
|
707
|
+
hovered: nt(d)
|
|
708
708
|
});
|
|
709
|
-
de("Escape", (
|
|
710
|
-
|
|
711
|
-
}), de("ArrowDown", (
|
|
712
|
-
|
|
713
|
-
}), de("ArrowUp", (
|
|
714
|
-
|
|
715
|
-
}), de([" ", "Enter"], (
|
|
716
|
-
const
|
|
717
|
-
|
|
709
|
+
de("Escape", (l) => {
|
|
710
|
+
p.value && (l.preventDefault(), I());
|
|
711
|
+
}), de("ArrowDown", (l) => {
|
|
712
|
+
p.value && g.value && (l.preventDefault(), ie());
|
|
713
|
+
}), de("ArrowUp", (l) => {
|
|
714
|
+
p.value && g.value && (l.preventDefault(), se());
|
|
715
|
+
}), de([" ", "Enter"], (l) => {
|
|
716
|
+
const c = l.target;
|
|
717
|
+
p.value && g.value && c && c?.click();
|
|
718
718
|
});
|
|
719
719
|
const Ie = {
|
|
720
720
|
"before-enter": () => {
|
|
721
|
-
|
|
721
|
+
r(p.value ? "beforeExpand" : "beforeCollapse"), r("beforeEnter");
|
|
722
722
|
},
|
|
723
723
|
"after-leave": () => {
|
|
724
|
-
|
|
724
|
+
r(p.value ? "afterExpand" : "afterCollapse"), r("afterLeave");
|
|
725
725
|
},
|
|
726
726
|
enter: () => {
|
|
727
|
-
|
|
727
|
+
r("enter");
|
|
728
728
|
},
|
|
729
729
|
"after-enter": () => {
|
|
730
|
-
|
|
730
|
+
r("afterEnter");
|
|
731
731
|
},
|
|
732
732
|
"enter-cancelled": () => {
|
|
733
|
-
|
|
733
|
+
r("enterCancelled");
|
|
734
734
|
},
|
|
735
735
|
"before-leave": () => {
|
|
736
|
-
|
|
736
|
+
r("beforeLeave");
|
|
737
737
|
},
|
|
738
738
|
leave: () => {
|
|
739
|
-
|
|
739
|
+
r("leave");
|
|
740
740
|
},
|
|
741
741
|
"leave-cancelled": () => {
|
|
742
|
-
|
|
742
|
+
r("leaveCancelled");
|
|
743
743
|
}
|
|
744
744
|
};
|
|
745
|
-
return (
|
|
746
|
-
default:
|
|
745
|
+
return (l, c) => (S(), k(De, null, [ce(n(xe), null, {
|
|
746
|
+
default: D(() => [_(l.$slots, "default", E($({
|
|
747
747
|
init: Y,
|
|
748
|
-
show:
|
|
748
|
+
show: y,
|
|
749
749
|
hide: I,
|
|
750
|
-
toggle:
|
|
751
|
-
expanded:
|
|
752
|
-
aria:
|
|
750
|
+
toggle: C,
|
|
751
|
+
expanded: n(p),
|
|
752
|
+
aria: n(le)
|
|
753
753
|
})))]),
|
|
754
754
|
_: 3
|
|
755
|
-
}), ce(yt,
|
|
756
|
-
default:
|
|
755
|
+
}), ce(yt, N({ name: l.transitionName }, Lt(Ie), { persisted: "" }), {
|
|
756
|
+
default: D(() => [rt(z("div", {
|
|
757
757
|
ref_key: "floatingEl",
|
|
758
|
-
ref:
|
|
759
|
-
style: We(
|
|
760
|
-
class: Ae(
|
|
758
|
+
ref: d,
|
|
759
|
+
style: We(n(we)),
|
|
760
|
+
class: Ae(n(re))
|
|
761
761
|
}, [
|
|
762
|
-
o.arrow ? (
|
|
762
|
+
o.arrow ? (S(), k("div", {
|
|
763
763
|
key: 0,
|
|
764
764
|
ref_key: "arrowEl",
|
|
765
|
-
ref:
|
|
766
|
-
style: We(
|
|
765
|
+
ref: m,
|
|
766
|
+
style: We(n(Le)),
|
|
767
767
|
class: "vv-dropdown__arrow"
|
|
768
|
-
}, null, 4)) :
|
|
769
|
-
|
|
770
|
-
show:
|
|
768
|
+
}, null, 4)) : V("v-if", !0),
|
|
769
|
+
_(l.$slots, "before", E($({
|
|
770
|
+
show: y,
|
|
771
771
|
hide: I,
|
|
772
|
-
toggle:
|
|
773
|
-
expanded:
|
|
772
|
+
toggle: C,
|
|
773
|
+
expanded: n(p)
|
|
774
774
|
}))),
|
|
775
|
-
z("div",
|
|
776
|
-
id:
|
|
775
|
+
z("div", N(n(u), {
|
|
776
|
+
id: n(v),
|
|
777
777
|
ref_key: "listEl",
|
|
778
778
|
ref: P,
|
|
779
|
-
tabindex:
|
|
780
|
-
role:
|
|
781
|
-
"aria-labelledby":
|
|
779
|
+
tabindex: n(p) ? void 0 : -1,
|
|
780
|
+
role: n(Q),
|
|
781
|
+
"aria-labelledby": n(G),
|
|
782
782
|
class: "vv-dropdown__list"
|
|
783
|
-
}), [
|
|
784
|
-
show:
|
|
783
|
+
}), [_(l.$slots, "items", E($({
|
|
784
|
+
show: y,
|
|
785
785
|
hide: I,
|
|
786
|
-
toggle:
|
|
787
|
-
expanded:
|
|
788
|
-
role:
|
|
786
|
+
toggle: C,
|
|
787
|
+
expanded: n(p),
|
|
788
|
+
role: n(Pe)
|
|
789
789
|
})))], 16, ya),
|
|
790
|
-
|
|
791
|
-
show:
|
|
790
|
+
_(l.$slots, "after", E($({
|
|
791
|
+
show: y,
|
|
792
792
|
hide: I,
|
|
793
|
-
toggle:
|
|
794
|
-
expanded:
|
|
793
|
+
toggle: C,
|
|
794
|
+
expanded: n(p)
|
|
795
795
|
})))
|
|
796
|
-
], 6), [[Pt,
|
|
796
|
+
], 6), [[Pt, n(p)]])]),
|
|
797
797
|
_: 3
|
|
798
798
|
}, 16, ["name"])], 64));
|
|
799
799
|
}
|
|
@@ -805,41 +805,41 @@ var xa = { name: "VvDropdownItem" }, $a = /* @__PURE__ */ M({
|
|
|
805
805
|
...xa,
|
|
806
806
|
props: pa,
|
|
807
807
|
setup(e) {
|
|
808
|
-
const a = e, { role: t, expanded: o } = La(),
|
|
808
|
+
const a = e, { role: t, expanded: o } = La(), r = w(null);
|
|
809
809
|
ha({ expanded: o });
|
|
810
|
-
const s = nt(
|
|
811
|
-
return A(s, (
|
|
812
|
-
|
|
813
|
-
}), (
|
|
810
|
+
const s = nt(r), { focused: v } = it(r), { focused: u } = st(r);
|
|
811
|
+
return A(s, (b) => {
|
|
812
|
+
b && a.focusOnHover && (v.value = !0);
|
|
813
|
+
}), (b, h) => (S(), k("div", N({ role: n(t) }, {
|
|
814
814
|
ref_key: "element",
|
|
815
|
-
ref:
|
|
816
|
-
class: ["vv-dropdown__item", { "focus-visible":
|
|
817
|
-
}), [
|
|
815
|
+
ref: r,
|
|
816
|
+
class: ["vv-dropdown__item", { "focus-visible": n(v) || n(u) }]
|
|
817
|
+
}), [_(b.$slots, "default")], 16));
|
|
818
818
|
}
|
|
819
819
|
}), Ea = $a, Oa = ["title"], Pa = { name: "VvDropdownOption" }, Ia = /* @__PURE__ */ M({
|
|
820
820
|
...Pa,
|
|
821
821
|
props: ma,
|
|
822
822
|
setup(e) {
|
|
823
|
-
const a = e, { modifiers: t } = ee(a), o = ge("vv-dropdown-option", t,
|
|
823
|
+
const a = e, { modifiers: t } = ee(a), o = ge("vv-dropdown-option", t, i(() => ({
|
|
824
824
|
disabled: a.disabled,
|
|
825
825
|
selected: a.selected,
|
|
826
826
|
unselectable: a.unselectable && a.selected
|
|
827
|
-
}))),
|
|
828
|
-
return (s,
|
|
829
|
-
class: Ae(
|
|
827
|
+
}))), r = i(() => a.selected ? a.unselectable ? a.deselectHintLabel : a.selectedHintLabel : a.disabled ? "" : a.selectHintLabel);
|
|
828
|
+
return (s, v) => (S(), K(Ea, {
|
|
829
|
+
class: Ae(n(o)),
|
|
830
830
|
tabindex: s.disabled ? -1 : 0,
|
|
831
831
|
"aria-selected": s.selected,
|
|
832
832
|
"aria-disabled": s.disabled,
|
|
833
833
|
"focus-on-hover": s.focusOnHover
|
|
834
834
|
}, {
|
|
835
|
-
default:
|
|
835
|
+
default: D(() => [_(s.$slots, "default"), z("span", {
|
|
836
836
|
class: "vv-dropdown-option__hint",
|
|
837
|
-
title:
|
|
838
|
-
}, [
|
|
837
|
+
title: n(r)
|
|
838
|
+
}, [_(s.$slots, "hint", E($({
|
|
839
839
|
disabled: s.disabled,
|
|
840
840
|
selected: s.selected,
|
|
841
841
|
unselectable: s.unselectable
|
|
842
|
-
})), () => [
|
|
842
|
+
})), () => [ke(fe(n(r)), 1)])], 8, Oa)]),
|
|
843
843
|
_: 3
|
|
844
844
|
}, 8, [
|
|
845
845
|
"class",
|
|
@@ -849,12 +849,12 @@ var xa = { name: "VvDropdownItem" }, $a = /* @__PURE__ */ M({
|
|
|
849
849
|
"focus-on-hover"
|
|
850
850
|
]));
|
|
851
851
|
}
|
|
852
|
-
}),
|
|
852
|
+
}), Ca = Ia;
|
|
853
853
|
function Me() {
|
|
854
854
|
return ot(Mt, void 0);
|
|
855
855
|
}
|
|
856
|
-
var
|
|
857
|
-
...
|
|
856
|
+
var Va = { name: "VvIcon" }, ka = /* @__PURE__ */ M({
|
|
857
|
+
...Va,
|
|
858
858
|
props: /* @__PURE__ */ wt({
|
|
859
859
|
name: {},
|
|
860
860
|
color: {},
|
|
@@ -872,33 +872,32 @@ var Ca = { name: "VvIcon" }, Ba = /* @__PURE__ */ M({
|
|
|
872
872
|
onLoad: { type: Function },
|
|
873
873
|
svg: {},
|
|
874
874
|
modifiers: {}
|
|
875
|
-
},
|
|
875
|
+
}, Tt),
|
|
876
876
|
setup(e) {
|
|
877
|
-
const a = e, t =
|
|
878
|
-
const
|
|
879
|
-
if (
|
|
880
|
-
const P =
|
|
881
|
-
return P ? `@${
|
|
877
|
+
const a = e, t = i(() => typeof a.rotate == "string" ? Number.parseFloat(a.rotate) : a.rotate), o = w(!0), r = Me(), { modifiers: s } = ee(a), v = ge("vv-icon", s), u = i(() => a.provider || r?.iconsProvider), b = i(() => {
|
|
878
|
+
const d = a.name ?? "", m = `@${u.value}:${a.prefix}:${d}`;
|
|
879
|
+
if (Ce(m)) return m;
|
|
880
|
+
const P = r?.iconsCollections.find((O) => Ce(`@${u.value}:${O.prefix}:${d}`));
|
|
881
|
+
return P ? `@${u.value}:${P.prefix}:${d}` : d;
|
|
882
882
|
});
|
|
883
|
-
function
|
|
884
|
-
|
|
885
|
-
return g ? g.parseFromString(u, "text/html").querySelector("svg") : null;
|
|
883
|
+
function h(d) {
|
|
884
|
+
return globalThis.window === void 0 ? null : new globalThis.DOMParser().parseFromString(d, "text/html").querySelector("svg");
|
|
886
885
|
}
|
|
887
|
-
function
|
|
888
|
-
const
|
|
889
|
-
|
|
886
|
+
function L(d) {
|
|
887
|
+
const m = h(d), P = m?.innerHTML.trim() || "";
|
|
888
|
+
m && P && jt(`@${u.value}:${a.prefix}:${a.name}`, {
|
|
890
889
|
body: P,
|
|
891
|
-
height:
|
|
892
|
-
width:
|
|
890
|
+
height: m.viewBox.baseVal.height,
|
|
891
|
+
width: m.viewBox.baseVal.width
|
|
893
892
|
});
|
|
894
893
|
}
|
|
895
|
-
return
|
|
896
|
-
|
|
897
|
-
}).catch((
|
|
898
|
-
throw o.value = !0, new Error(`Error during fetch icon: ${
|
|
899
|
-
})), a.svg &&
|
|
894
|
+
return r && a.src && !Ce(`@${u.value}:${a.prefix}:${a.name}`) && (o.value = !1, r.fetchIcon(a.src).then((d) => {
|
|
895
|
+
d && L(d), o.value = !0;
|
|
896
|
+
}).catch((d) => {
|
|
897
|
+
throw o.value = !0, new Error(`Error during fetch icon: ${d?.message}`);
|
|
898
|
+
})), a.svg && L(a.svg), (d, m) => n(o) ? (S(), K(n(Ft), N({
|
|
900
899
|
key: 0,
|
|
901
|
-
class:
|
|
900
|
+
class: n(v)
|
|
902
901
|
}, {
|
|
903
902
|
inline: e.inline,
|
|
904
903
|
width: e.width,
|
|
@@ -906,147 +905,145 @@ var Ca = { name: "VvIcon" }, Ba = /* @__PURE__ */ M({
|
|
|
906
905
|
horizontalFlip: e.horizontalFlip,
|
|
907
906
|
verticalFlip: e.verticalFlip,
|
|
908
907
|
flip: e.flip,
|
|
909
|
-
rotate:
|
|
908
|
+
rotate: n(t),
|
|
910
909
|
color: e.color,
|
|
911
|
-
icon:
|
|
912
|
-
}, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) :
|
|
910
|
+
icon: n(b)
|
|
911
|
+
}, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) : V("v-if", !0);
|
|
912
|
+
}
|
|
913
|
+
}), Ve = ka;
|
|
914
|
+
function Ba(e, a, t) {
|
|
915
|
+
let o = a;
|
|
916
|
+
if (Array.isArray(e) && e.length) {
|
|
917
|
+
const r = e[0];
|
|
918
|
+
r() === a && (o = t);
|
|
919
|
+
}
|
|
920
|
+
if (typeof e == "function" && e() === a && (o = t), typeof e == "object") {
|
|
921
|
+
let r = e.default;
|
|
922
|
+
typeof r == "function" && (r = r()), (typeof r == "object" ? JSON.stringify(r) === JSON.stringify(a) : r === a) && (o = t);
|
|
913
923
|
}
|
|
914
|
-
|
|
924
|
+
return o;
|
|
925
|
+
}
|
|
915
926
|
function Da(e, a, t) {
|
|
916
|
-
const o = Me(),
|
|
917
|
-
if (
|
|
927
|
+
const o = Me(), r = i(() => {
|
|
928
|
+
if (o?.defaults.value?.[e])
|
|
918
929
|
return o.defaults.value[e];
|
|
919
930
|
});
|
|
920
|
-
return
|
|
921
|
-
if (
|
|
922
|
-
const s =
|
|
923
|
-
return Object.keys(
|
|
924
|
-
const
|
|
925
|
-
|
|
926
|
-
if (Array.isArray(d[v])) {
|
|
927
|
-
const u = d[v];
|
|
928
|
-
u.length && u[0] === y && (m[v] = s[v]);
|
|
929
|
-
}
|
|
930
|
-
if (typeof d[v] == "function") {
|
|
931
|
-
const u = d[v];
|
|
932
|
-
u() === y && (m[v] = s[v]);
|
|
933
|
-
}
|
|
934
|
-
if (typeof d[v] == "object") {
|
|
935
|
-
let u = d[v].default;
|
|
936
|
-
typeof u == "function" && (u = u()), typeof u == "object" ? JSON.stringify(u) === JSON.stringify(y) && (m[v] = s[v]) : u === y && (m[v] = s[v]);
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
return m;
|
|
931
|
+
return i(() => {
|
|
932
|
+
if (r.value === void 0) return t;
|
|
933
|
+
const s = r.value, v = a, u = t;
|
|
934
|
+
return Object.keys(v).reduce((b, h) => {
|
|
935
|
+
const L = u[h];
|
|
936
|
+
return b[h] = h in s ? Ba(v[h], L, s[h]) : L, b;
|
|
940
937
|
}, {});
|
|
941
938
|
});
|
|
942
939
|
}
|
|
943
|
-
function Na(e, a, t = 0, { getter: o = (s) => s, setter:
|
|
940
|
+
function Na(e, a, t = 0, { getter: o = (s) => s, setter: r = (s) => s } = {}) {
|
|
944
941
|
let s;
|
|
945
|
-
return typeof t == "string" && (t = Number.parseInt(t)),
|
|
942
|
+
return typeof t == "string" && (t = Number.parseInt(t)), i({
|
|
946
943
|
get: () => o(e?.value),
|
|
947
|
-
set: (
|
|
944
|
+
set: (v) => {
|
|
948
945
|
s && clearTimeout(s), s = setTimeout(() => {
|
|
949
|
-
a("update:modelValue",
|
|
946
|
+
a("update:modelValue", r(v));
|
|
950
947
|
}, t);
|
|
951
948
|
}
|
|
952
949
|
});
|
|
953
950
|
}
|
|
954
951
|
function at(e, a) {
|
|
955
|
-
const t =
|
|
952
|
+
const t = i(() => typeof e?.value == "string" ? { name: e?.value } : e?.value), o = i(() => a?.value === pe.before ? t.value : void 0), r = i(() => a?.value === pe.after ? t.value : void 0);
|
|
956
953
|
return {
|
|
957
954
|
hasIcon: t,
|
|
958
|
-
hasIconLeft:
|
|
959
|
-
hasIconRight:
|
|
960
|
-
hasIconTop:
|
|
961
|
-
hasIconBottom:
|
|
955
|
+
hasIconLeft: i(() => a?.value === x.left ? t.value : void 0),
|
|
956
|
+
hasIconRight: i(() => a?.value === x.right ? t.value : void 0),
|
|
957
|
+
hasIconTop: i(() => a?.value === x.top ? t.value : void 0),
|
|
958
|
+
hasIconBottom: i(() => a?.value === x.bottom ? t.value : void 0),
|
|
962
959
|
hasIconBefore: o,
|
|
963
|
-
hasIconAfter:
|
|
960
|
+
hasIconAfter: r
|
|
964
961
|
};
|
|
965
962
|
}
|
|
966
|
-
function
|
|
963
|
+
function Aa(e, a) {
|
|
967
964
|
const { focused: t } = it(e);
|
|
968
965
|
return A(t, (o) => {
|
|
969
|
-
a(o ? "focus" : "blur",
|
|
966
|
+
a(o ? "focus" : "blur", n(e));
|
|
970
967
|
}), { focused: t };
|
|
971
968
|
}
|
|
972
|
-
function
|
|
973
|
-
const t =
|
|
969
|
+
function Fa(e, a) {
|
|
970
|
+
const t = i(() => (n(e) ?? "").length), o = i(() => a?.lowerLimit !== void 0 && t.value < a?.lowerLimit ? t.value - a.lowerLimit : a?.upperLimit !== void 0 ? a.upperLimit - t.value : 0);
|
|
974
971
|
return {
|
|
975
972
|
length: t,
|
|
976
973
|
gap: o,
|
|
977
|
-
formatted:
|
|
974
|
+
formatted: i(() => a?.mode === !1 ? "" : a?.mode === "limit" && a?.upperLimit ? `${t.value} / ${a.lowerLimit ? `${a.lowerLimit}-` : ""}${a.upperLimit}` : a?.mode === "countdown" ? o.value === 0 ? void 0 : o.value : t.value)
|
|
978
975
|
};
|
|
979
976
|
}
|
|
980
|
-
function
|
|
981
|
-
const o =
|
|
977
|
+
function ja(e, a = U.local, t) {
|
|
978
|
+
const o = w();
|
|
982
979
|
t && (o.value = t);
|
|
983
|
-
let
|
|
984
|
-
return
|
|
985
|
-
e && A(e, (s,
|
|
986
|
-
const
|
|
987
|
-
if (
|
|
988
|
-
|
|
980
|
+
let r;
|
|
981
|
+
return lt(() => {
|
|
982
|
+
e && A(e, (s, v) => {
|
|
983
|
+
const u = n(a) === U.session ? sessionStorage : localStorage;
|
|
984
|
+
if (v && v !== s && u.removeItem(v), s) {
|
|
985
|
+
r = Qe(s, r?.value ?? o.value, u), r.value && (o.value = r.value);
|
|
989
986
|
return;
|
|
990
987
|
}
|
|
991
|
-
|
|
992
|
-
}, { immediate: !0 }),
|
|
988
|
+
r = void 0;
|
|
989
|
+
}, { immediate: !0 }), Ne(a) && A(a, (s, v) => {
|
|
993
990
|
if (e?.value) {
|
|
994
991
|
if (s) {
|
|
995
|
-
const
|
|
996
|
-
|
|
992
|
+
const u = s === U.session ? sessionStorage : localStorage;
|
|
993
|
+
r = Qe(e.value, r?.value ?? o.value, u);
|
|
997
994
|
}
|
|
998
|
-
|
|
995
|
+
v && v !== s && (v === U.session ? sessionStorage : localStorage).removeItem(e.value);
|
|
999
996
|
}
|
|
1000
997
|
});
|
|
1001
998
|
}), A(o, (s) => {
|
|
1002
|
-
|
|
999
|
+
r && (r.value = s);
|
|
1003
1000
|
}, {
|
|
1004
1001
|
deep: !0,
|
|
1005
1002
|
immediate: !0
|
|
1006
1003
|
}), o;
|
|
1007
1004
|
}
|
|
1008
|
-
var
|
|
1005
|
+
var Ta = ["for"], Ha = {
|
|
1009
1006
|
key: 0,
|
|
1010
1007
|
class: "vv-textarea__input-before"
|
|
1011
|
-
},
|
|
1008
|
+
}, Ra = { class: "vv-textarea__inner" }, za = ["id"], Ma = {
|
|
1012
1009
|
key: 1,
|
|
1013
1010
|
class: "vv-textarea__input-after"
|
|
1014
|
-
},
|
|
1011
|
+
}, Wa = {
|
|
1015
1012
|
key: 2,
|
|
1016
1013
|
class: "vv-textarea__limit"
|
|
1017
|
-
},
|
|
1018
|
-
...
|
|
1014
|
+
}, qa = { class: "flex-1" }, Ja = ["title", "onClick"], Ka = { name: "VvTextarea" }, Ua = /* @__PURE__ */ M({
|
|
1015
|
+
...Ka,
|
|
1019
1016
|
props: et,
|
|
1020
1017
|
emits: da,
|
|
1021
1018
|
setup(e, { emit: a }) {
|
|
1022
|
-
const t = e, o = a,
|
|
1023
|
-
A(
|
|
1024
|
-
if (
|
|
1025
|
-
|
|
1019
|
+
const t = e, o = a, r = Et(), s = Me(), v = Da("VvTextarea", et, t), u = w(), b = w(), h = w(), { id: L, icon: d, iconPosition: m, iconRemoveSuggestion: P, labelRemoveSuggestion: O, label: F, modelValue: j, count: oe, valid: be, invalid: he, loading: W, modifiers: ye, debounce: Se, minlength: we, maxlength: _e, storageType: Le } = ee(t), T = gt(L), q = i(() => `${T.value}-hint`), p = i(() => t.floating && ve(t.placeholder) ? " " : t.placeholder), y = Na(j, o, Se?.value), { hasIconBefore: I, hasIconAfter: C } = at(d, m), { hasIcon: Y } = at(P), { focused: G } = Aa(u, o);
|
|
1020
|
+
A(i(() => G.value && !t.disabled && !t.readonly), (f) => {
|
|
1021
|
+
if (f && v.value.selectOnFocus && u.value && u.value.select(), f && g.value?.size) {
|
|
1022
|
+
h.value?.show();
|
|
1026
1023
|
return;
|
|
1027
1024
|
}
|
|
1028
|
-
if (Q.value &&
|
|
1025
|
+
if (Q.value && g.value) {
|
|
1029
1026
|
const R = t.maxSuggestions;
|
|
1030
|
-
|
|
1027
|
+
g.value.size >= R && !g.value.has(y.value) && (g.value = new Set([...g.value].slice(g.value.size - R + 1))), g.value.add(y.value);
|
|
1031
1028
|
}
|
|
1032
|
-
}), A(
|
|
1033
|
-
|
|
1029
|
+
}), A(Bt(u), (f) => {
|
|
1030
|
+
f && t.autofocus && (G.value = !0);
|
|
1034
1031
|
});
|
|
1035
|
-
const { formatted:
|
|
1032
|
+
const { formatted: le } = Fa(y, {
|
|
1036
1033
|
mode: oe?.value,
|
|
1037
1034
|
upperLimit: Number(_e?.value),
|
|
1038
1035
|
lowerLimit: Number(we?.value)
|
|
1039
|
-
}), xe =
|
|
1036
|
+
}), xe = i(() => !t.disabled && !t.readonly), $e = i(() => xe.value ? t.tabindex : -1), Q = i(() => !ve(j)), Ee = i(() => {
|
|
1040
1037
|
if (t.invalid === !0) return !0;
|
|
1041
1038
|
if (t.valid === !0) return !1;
|
|
1042
|
-
}),
|
|
1043
|
-
function Oe(
|
|
1044
|
-
|
|
1039
|
+
}), re = i(() => t.storageKey ?? (s?.experimentalFeatures.forceInputSuggestions ? t.name : void 0)), g = ja(re, Le, /* @__PURE__ */ new Set()), J = i(() => g.value ? [...g.value].filter((f) => ve(y.value) || `${f}`.toLowerCase().includes(`${y.value}`.toLowerCase()) && f !== y.value).reverse() : []), ne = i(() => re?.value && g.value && g.value.size > 0);
|
|
1040
|
+
function Oe(f) {
|
|
1041
|
+
y.value = f, h.value?.hide(), o("suggestion:selected", f);
|
|
1045
1042
|
}
|
|
1046
|
-
function ie(
|
|
1047
|
-
|
|
1043
|
+
function ie(f) {
|
|
1044
|
+
g.value?.delete(f), o("suggestion:removed", f);
|
|
1048
1045
|
}
|
|
1049
|
-
const { HintSlot: se, hasHintLabelOrSlot: Pe, hasInvalidLabelOrSlot: Ie, hintSlotScope:
|
|
1046
|
+
const { HintSlot: se, hasHintLabelOrSlot: Pe, hasInvalidLabelOrSlot: Ie, hintSlotScope: l } = fa(v, r), c = ge("vv-textarea", ye, i(() => ({
|
|
1050
1047
|
valid: be.value,
|
|
1051
1048
|
invalid: he.value,
|
|
1052
1049
|
loading: W.value,
|
|
@@ -1054,14 +1051,14 @@ var ja = ["for"], Ha = {
|
|
|
1054
1051
|
readonly: t.readonly,
|
|
1055
1052
|
required: t.required,
|
|
1056
1053
|
"icon-before": I.value !== void 0,
|
|
1057
|
-
"icon-after":
|
|
1054
|
+
"icon-after": C.value !== void 0,
|
|
1058
1055
|
floating: t.floating && !ve(t.label),
|
|
1059
1056
|
dirty: Q.value,
|
|
1060
1057
|
focus: G.value,
|
|
1061
1058
|
resizable: t.resizable
|
|
1062
|
-
}))),
|
|
1059
|
+
}))), H = i(() => ({
|
|
1063
1060
|
name: t.name,
|
|
1064
|
-
placeholder:
|
|
1061
|
+
placeholder: p.value,
|
|
1065
1062
|
tabindex: $e.value,
|
|
1066
1063
|
disabled: t.disabled,
|
|
1067
1064
|
readonly: t.readonly,
|
|
@@ -1076,7 +1073,7 @@ var ja = ["for"], Ha = {
|
|
|
1076
1073
|
"aria-invalid": Ee.value,
|
|
1077
1074
|
"aria-describedby": Pe.value ? q.value : void 0,
|
|
1078
1075
|
"aria-errormessage": Ie.value ? q.value : void 0
|
|
1079
|
-
})), X =
|
|
1076
|
+
})), X = i(() => ({
|
|
1080
1077
|
valid: t.valid,
|
|
1081
1078
|
invalid: t.invalid,
|
|
1082
1079
|
modelValue: t.modelValue,
|
|
@@ -1086,85 +1083,85 @@ var ja = ["for"], Ha = {
|
|
|
1086
1083
|
clear: bt
|
|
1087
1084
|
}));
|
|
1088
1085
|
function bt() {
|
|
1089
|
-
|
|
1086
|
+
y.value = void 0;
|
|
1090
1087
|
}
|
|
1091
|
-
return (
|
|
1092
|
-
|
|
1088
|
+
return (f, R) => (S(), k("div", { class: Ae(n(c)) }, [
|
|
1089
|
+
n(F) ? (S(), k("label", {
|
|
1093
1090
|
key: 0,
|
|
1094
|
-
for:
|
|
1091
|
+
for: n(T),
|
|
1095
1092
|
class: "vv-textarea__label"
|
|
1096
|
-
}, fe(
|
|
1093
|
+
}, fe(n(F)), 9, Ta)) : V("v-if", !0),
|
|
1097
1094
|
z("div", {
|
|
1098
1095
|
ref_key: "wrapperEl",
|
|
1099
|
-
ref:
|
|
1096
|
+
ref: b,
|
|
1100
1097
|
class: "vv-textarea__wrapper"
|
|
1101
1098
|
}, [
|
|
1102
|
-
|
|
1103
|
-
z("div",
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
id:
|
|
1099
|
+
f.$slots.before ? (S(), k("div", Ha, [_(f.$slots, "before", E($(n(X))))])) : V("v-if", !0),
|
|
1100
|
+
z("div", Ra, [
|
|
1101
|
+
n(I) ? (S(), K(Ve, N({ key: 0 }, n(I), { class: "vv-textarea__icon" }), null, 16)) : V("v-if", !0),
|
|
1102
|
+
rt(z("textarea", N({
|
|
1103
|
+
id: n(T),
|
|
1107
1104
|
ref_key: "textareaEl",
|
|
1108
|
-
ref:
|
|
1109
|
-
"onUpdate:modelValue": R[0] || (R[0] = (
|
|
1110
|
-
},
|
|
1111
|
-
|
|
1105
|
+
ref: u,
|
|
1106
|
+
"onUpdate:modelValue": R[0] || (R[0] = (B) => Ne(y) ? y.value = B : null)
|
|
1107
|
+
}, n(H), { onKeyup: R[1] || (R[1] = (B) => o("keyup", B)) }), null, 16, za), [[Ot, n(y)]]),
|
|
1108
|
+
n(C) ? (S(), K(Ve, N({ key: 1 }, n(C), { class: "vv-textarea__icon vv-textarea__icon-after" }), null, 16)) : V("v-if", !0)
|
|
1112
1109
|
]),
|
|
1113
|
-
|
|
1114
|
-
|
|
1110
|
+
f.$slots.after ? (S(), k("div", Ma, [_(f.$slots, "after", E($(n(X))))])) : V("v-if", !0),
|
|
1111
|
+
n(oe) ? (S(), k("span", Wa, [_(f.$slots, "count", E($(n(X))), () => [ke(fe(n(le)), 1)])])) : V("v-if", !0)
|
|
1115
1112
|
], 512),
|
|
1116
|
-
ce(
|
|
1117
|
-
id:
|
|
1113
|
+
ce(n(se), {
|
|
1114
|
+
id: n(q),
|
|
1118
1115
|
class: "vv-textarea__hint"
|
|
1119
1116
|
}, St({ _: 2 }, [
|
|
1120
|
-
|
|
1117
|
+
f.$slots.hint ? {
|
|
1121
1118
|
name: "hint",
|
|
1122
|
-
fn:
|
|
1119
|
+
fn: D(() => [_(f.$slots, "hint", E($(n(l))))]),
|
|
1123
1120
|
key: "0"
|
|
1124
1121
|
} : void 0,
|
|
1125
|
-
|
|
1122
|
+
f.$slots.loading ? {
|
|
1126
1123
|
name: "loading",
|
|
1127
|
-
fn:
|
|
1124
|
+
fn: D(() => [_(f.$slots, "loading", E($(n(l))))]),
|
|
1128
1125
|
key: "1"
|
|
1129
1126
|
} : void 0,
|
|
1130
|
-
|
|
1127
|
+
f.$slots.valid ? {
|
|
1131
1128
|
name: "valid",
|
|
1132
|
-
fn:
|
|
1129
|
+
fn: D(() => [_(f.$slots, "valid", E($(n(l))))]),
|
|
1133
1130
|
key: "2"
|
|
1134
1131
|
} : void 0,
|
|
1135
|
-
|
|
1132
|
+
f.$slots.invalid ? {
|
|
1136
1133
|
name: "invalid",
|
|
1137
|
-
fn:
|
|
1134
|
+
fn: D(() => [_(f.$slots, "invalid", E($(n(l))))]),
|
|
1138
1135
|
key: "3"
|
|
1139
1136
|
} : void 0
|
|
1140
1137
|
]), 1032, ["id"]),
|
|
1141
|
-
|
|
1138
|
+
n(ne) ? (S(), K(_a, {
|
|
1142
1139
|
key: 1,
|
|
1143
1140
|
ref_key: "suggestionsDropdownEl",
|
|
1144
|
-
ref:
|
|
1145
|
-
reference:
|
|
1141
|
+
ref: h,
|
|
1142
|
+
reference: n(b),
|
|
1146
1143
|
"autofocus-first": !1,
|
|
1147
1144
|
"trigger-width": !0
|
|
1148
1145
|
}, {
|
|
1149
|
-
items:
|
|
1150
|
-
key:
|
|
1151
|
-
onClick: qe((ht) => Oe(
|
|
1146
|
+
items: D(() => [(S(!0), k(De, null, _t(n(J), (B) => (S(), K(Ca, {
|
|
1147
|
+
key: B,
|
|
1148
|
+
onClick: qe((ht) => Oe(B), ["stop"])
|
|
1152
1149
|
}, {
|
|
1153
|
-
default:
|
|
1150
|
+
default: D(() => [z("div", qa, [_(f.$slots, "suggestion", N({ ref_for: !0 }, { value: B }), () => [ke(fe(B), 1)])]), n(g) && n(Y) ? (S(), k("button", {
|
|
1154
1151
|
key: 0,
|
|
1155
1152
|
type: "button",
|
|
1156
1153
|
tabindex: "-1",
|
|
1157
1154
|
class: "cursor-pointer",
|
|
1158
|
-
title:
|
|
1159
|
-
onClick: qe((ht) => ie(
|
|
1160
|
-
}, [ce(
|
|
1155
|
+
title: n(O),
|
|
1156
|
+
onClick: qe((ht) => ie(B), ["stop"])
|
|
1157
|
+
}, [ce(Ve, N({ ref_for: !0 }, n(Y)), null, 16)], 8, Ja)) : V("v-if", !0)]),
|
|
1161
1158
|
_: 2
|
|
1162
1159
|
}, 1032, ["onClick"]))), 128))]),
|
|
1163
1160
|
_: 3
|
|
1164
|
-
}, 8, ["reference"])) :
|
|
1161
|
+
}, 8, ["reference"])) : V("v-if", !0)
|
|
1165
1162
|
], 2));
|
|
1166
1163
|
}
|
|
1167
|
-
}),
|
|
1164
|
+
}), lo = Ua;
|
|
1168
1165
|
export {
|
|
1169
|
-
|
|
1166
|
+
lo as default
|
|
1170
1167
|
};
|