@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,10 +1,10 @@
|
|
|
1
|
-
import { Fragment as le, Transition as yl, computed as
|
|
1
|
+
import { Fragment as le, Transition as yl, computed as s, createBlock as H, createCommentVNode as I, createElementBlock as L, createElementVNode as fe, createSlots as vt, createTextVNode as ee, createVNode as we, defineComponent as U, getCurrentInstance as hl, guardReactiveProps as K, h as Ve, inject as Ke, isRef as ct, mergeDefaults as _l, mergeModels as Ct, mergeProps as A, nextTick as Qe, normalizeClass as Ge, normalizeProps as F, normalizeStyle as Et, onBeforeUnmount as Sl, onMounted as Ol, openBlock as v, provide as pt, ref as N, renderList as xe, renderSlot as _, resolveComponent as Ll, resolveDynamicComponent as $l, toDisplayString as j, toHandlers as wl, toRef as Vl, toRefs as pe, unref as l, useAttrs as qt, useId as kl, useModel as Pl, useSlots as bt, vModelSelect as Cl, vModelText as El, vShow as Il, watch as ae, withCtx as E, withDirectives as gt, withKeys as Bl, withModifiers as Al } from "vue";
|
|
2
2
|
import { Icon as Nl, addIcon as Dl, iconLoaded as st } from "@iconify/vue";
|
|
3
|
-
import { arrow as Hl, autoPlacement as It, autoUpdate as
|
|
4
|
-
import { computedAsync as Tl, onClickOutside as Ml, onKeyStroke as Me, refDebounced as Rl, useElementHover as
|
|
5
|
-
import
|
|
3
|
+
import { arrow as Hl, autoPlacement as It, autoUpdate as jl, flip as Bt, offset as At, shift as Nt, size as Dt, useFloating as Fl } from "@floating-ui/vue";
|
|
4
|
+
import { computedAsync as Tl, onClickOutside as Ml, onKeyStroke as Me, refDebounced as Rl, useElementHover as Wt, useElementVisibility as xl, useFocus as zt, useFocusWithin as mt, useMutationObserver as Kl, useVModel as Gl } from "@vueuse/core";
|
|
5
|
+
import ql from "mitt";
|
|
6
6
|
import { getProperty as ut } from "dot-prop";
|
|
7
|
-
var
|
|
7
|
+
var Wl = {
|
|
8
8
|
showPassword: "eye-on",
|
|
9
9
|
hidePassword: "eye-off",
|
|
10
10
|
showDatePicker: "calendar",
|
|
@@ -25,7 +25,7 @@ var ql = {
|
|
|
25
25
|
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;
|
|
26
26
|
})({}), Xe = /* @__PURE__ */ (function(e) {
|
|
27
27
|
return e.before = "before", e.after = "after", e;
|
|
28
|
-
})({}),
|
|
28
|
+
})({}), jt = /* @__PURE__ */ (function(e) {
|
|
29
29
|
return e.button = "button", e.submit = "submit", e.reset = "reset", e;
|
|
30
30
|
})({}), ve = /* @__PURE__ */ (function(e) {
|
|
31
31
|
return e.nuxtLink = "nuxt-link", e.routerLink = "router-link", e.a = "a", e.button = "button", e;
|
|
@@ -33,7 +33,7 @@ var ql = {
|
|
|
33
33
|
return e.button = "button", e.link = "link", e.menuitem = "menuitem", e;
|
|
34
34
|
})({}), Ze = /* @__PURE__ */ (function(e) {
|
|
35
35
|
return e.listbox = "listbox", e.menu = "menu", e;
|
|
36
|
-
})({}),
|
|
36
|
+
})({}), Ft = /* @__PURE__ */ (function(e) {
|
|
37
37
|
return e.option = "option", e.presentation = "presentation", e;
|
|
38
38
|
})({}), Yl = /* @__PURE__ */ Symbol.for("volver"), Ql = /* @__PURE__ */ Symbol.for("buttonGroup"), Ut = /* @__PURE__ */ Symbol.for("dropdownTrigger"), Yt = /* @__PURE__ */ Symbol.for("dropdownItem"), Qt = /* @__PURE__ */ Symbol.for("dropdownAction"), Xl = {
|
|
39
39
|
to: { type: [String, Object] },
|
|
@@ -43,7 +43,7 @@ var ql = {
|
|
|
43
43
|
type: String,
|
|
44
44
|
default: "noopener noreferrer"
|
|
45
45
|
}
|
|
46
|
-
},
|
|
46
|
+
}, qe = {
|
|
47
47
|
valid: {
|
|
48
48
|
type: Boolean,
|
|
49
49
|
default: !1
|
|
@@ -52,7 +52,7 @@ var ql = {
|
|
|
52
52
|
type: [String, Array],
|
|
53
53
|
default: void 0
|
|
54
54
|
}
|
|
55
|
-
},
|
|
55
|
+
}, We = {
|
|
56
56
|
invalid: {
|
|
57
57
|
type: Boolean,
|
|
58
58
|
default: !1
|
|
@@ -61,7 +61,7 @@ var ql = {
|
|
|
61
61
|
type: [String, Array],
|
|
62
62
|
default: void 0
|
|
63
63
|
}
|
|
64
|
-
},
|
|
64
|
+
}, je = {
|
|
65
65
|
loading: {
|
|
66
66
|
type: Boolean,
|
|
67
67
|
default: !1
|
|
@@ -73,7 +73,7 @@ var ql = {
|
|
|
73
73
|
}, ke = { disabled: {
|
|
74
74
|
type: Boolean,
|
|
75
75
|
default: !1
|
|
76
|
-
} },
|
|
76
|
+
} }, yt = { required: {
|
|
77
77
|
type: Boolean,
|
|
78
78
|
default: !1
|
|
79
79
|
} }, Zl = { selected: {
|
|
@@ -92,7 +92,7 @@ var ql = {
|
|
|
92
92
|
},
|
|
93
93
|
iconClear: {
|
|
94
94
|
type: [String, Object],
|
|
95
|
-
default:
|
|
95
|
+
default: Wl.clear
|
|
96
96
|
},
|
|
97
97
|
labelClear: {
|
|
98
98
|
type: String,
|
|
@@ -113,7 +113,7 @@ var ql = {
|
|
|
113
113
|
} }, Je = { hintLabel: {
|
|
114
114
|
type: String,
|
|
115
115
|
default: ""
|
|
116
|
-
} },
|
|
116
|
+
} }, ht = {
|
|
117
117
|
options: {
|
|
118
118
|
type: Array,
|
|
119
119
|
default: () => []
|
|
@@ -155,13 +155,13 @@ var ql = {
|
|
|
155
155
|
}, tt = { tabindex: {
|
|
156
156
|
type: [String, Number],
|
|
157
157
|
default: 0
|
|
158
|
-
} },
|
|
158
|
+
} }, _t = { floating: {
|
|
159
159
|
type: Boolean,
|
|
160
160
|
default: !1
|
|
161
|
-
} },
|
|
161
|
+
} }, St = { unselectable: {
|
|
162
162
|
type: Boolean,
|
|
163
163
|
default: !0
|
|
164
|
-
} },
|
|
164
|
+
} }, Ot = { id: [String, Number] }, ft = {
|
|
165
165
|
placement: {
|
|
166
166
|
type: String,
|
|
167
167
|
default: D.bottom,
|
|
@@ -217,7 +217,7 @@ var ql = {
|
|
|
217
217
|
default: !1
|
|
218
218
|
}
|
|
219
219
|
}, lt = {
|
|
220
|
-
...
|
|
220
|
+
...Ot,
|
|
221
221
|
name: {
|
|
222
222
|
type: String,
|
|
223
223
|
required: !0
|
|
@@ -228,22 +228,22 @@ var ql = {
|
|
|
228
228
|
} }, el = { autocomplete: {
|
|
229
229
|
type: String,
|
|
230
230
|
default: "off"
|
|
231
|
-
} },
|
|
231
|
+
} }, Vo = {
|
|
232
232
|
...lt,
|
|
233
233
|
...Zt,
|
|
234
234
|
...el,
|
|
235
235
|
...tt,
|
|
236
236
|
...ke,
|
|
237
237
|
...ze,
|
|
238
|
-
...We,
|
|
239
238
|
...qe,
|
|
239
|
+
...We,
|
|
240
240
|
...Je,
|
|
241
|
-
...
|
|
241
|
+
...je,
|
|
242
242
|
...be,
|
|
243
243
|
...aa,
|
|
244
244
|
...oa,
|
|
245
245
|
...et,
|
|
246
|
-
...
|
|
246
|
+
..._t,
|
|
247
247
|
...Pe,
|
|
248
248
|
minlength: {
|
|
249
249
|
type: [String, Number],
|
|
@@ -257,18 +257,18 @@ var ql = {
|
|
|
257
257
|
type: String,
|
|
258
258
|
default: void 0
|
|
259
259
|
},
|
|
260
|
-
...
|
|
261
|
-
},
|
|
260
|
+
...yt
|
|
261
|
+
}, ko = {
|
|
262
262
|
...lt,
|
|
263
263
|
...tt,
|
|
264
|
-
...We,
|
|
265
264
|
...qe,
|
|
265
|
+
...We,
|
|
266
266
|
...Je,
|
|
267
267
|
...ke,
|
|
268
268
|
...ze,
|
|
269
269
|
...be,
|
|
270
270
|
...Pe,
|
|
271
|
-
...
|
|
271
|
+
...je,
|
|
272
272
|
value: {
|
|
273
273
|
type: [
|
|
274
274
|
String,
|
|
@@ -286,17 +286,17 @@ var ql = {
|
|
|
286
286
|
],
|
|
287
287
|
default: void 0
|
|
288
288
|
}
|
|
289
|
-
},
|
|
290
|
-
...We,
|
|
289
|
+
}, Po = {
|
|
291
290
|
...qe,
|
|
292
|
-
...
|
|
291
|
+
...We,
|
|
292
|
+
...ht,
|
|
293
293
|
...Je,
|
|
294
294
|
...ke,
|
|
295
295
|
...ze,
|
|
296
296
|
...be,
|
|
297
297
|
...Pe,
|
|
298
|
-
...
|
|
299
|
-
...
|
|
298
|
+
...je,
|
|
299
|
+
...yt,
|
|
300
300
|
modelValue: {
|
|
301
301
|
type: [
|
|
302
302
|
String,
|
|
@@ -324,8 +324,8 @@ var ql = {
|
|
|
324
324
|
...Xl,
|
|
325
325
|
type: {
|
|
326
326
|
type: String,
|
|
327
|
-
default:
|
|
328
|
-
validator: (e) => Object.values(
|
|
327
|
+
default: jt.button,
|
|
328
|
+
validator: (e) => Object.values(jt).includes(e)
|
|
329
329
|
},
|
|
330
330
|
ariaLabel: {
|
|
331
331
|
type: String,
|
|
@@ -335,7 +335,7 @@ var ql = {
|
|
|
335
335
|
type: String,
|
|
336
336
|
default: ve.button
|
|
337
337
|
}
|
|
338
|
-
},
|
|
338
|
+
}, Co = {
|
|
339
339
|
storageType: {
|
|
340
340
|
type: String,
|
|
341
341
|
default: Ht.local,
|
|
@@ -345,19 +345,19 @@ var ql = {
|
|
|
345
345
|
}, dt = {
|
|
346
346
|
...lt,
|
|
347
347
|
...tt,
|
|
348
|
-
...We,
|
|
349
348
|
...qe,
|
|
349
|
+
...We,
|
|
350
350
|
...Je,
|
|
351
|
-
...
|
|
351
|
+
...je,
|
|
352
352
|
...ke,
|
|
353
353
|
...ze,
|
|
354
354
|
...be,
|
|
355
|
-
...
|
|
355
|
+
...ht,
|
|
356
356
|
...et,
|
|
357
|
-
...
|
|
357
|
+
..._t,
|
|
358
358
|
...ft,
|
|
359
359
|
...Pe,
|
|
360
|
-
...
|
|
360
|
+
...yt,
|
|
361
361
|
...Xt,
|
|
362
362
|
transitionName: {
|
|
363
363
|
type: String,
|
|
@@ -483,72 +483,72 @@ function Tt() {
|
|
|
483
483
|
}
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
|
-
function ll(e,
|
|
487
|
-
return
|
|
486
|
+
function ll(e, o, t) {
|
|
487
|
+
return t ? Mt(e, t) === Mt(o, t) : Lt(e, o);
|
|
488
488
|
}
|
|
489
|
-
function
|
|
490
|
-
if (e
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
if (g !== y) return !1;
|
|
502
|
-
if (g && y) return e.getTime() === r.getTime();
|
|
503
|
-
const u = e instanceof RegExp, _ = r instanceof RegExp;
|
|
504
|
-
if (u !== _) return !1;
|
|
505
|
-
if (u && _) return e.toString() === r.toString();
|
|
506
|
-
const v = Object.keys(e);
|
|
507
|
-
if (a = v.length, a !== Object.keys(r).length) return !1;
|
|
508
|
-
for (s = a; s-- !== 0; ) if (!Object.hasOwn(r, v[s])) return !1;
|
|
509
|
-
for (s = a; s-- !== 0; )
|
|
510
|
-
if (b = v[s], !ct(e[b], r[b])) return !1;
|
|
511
|
-
return !0;
|
|
489
|
+
function ra(e, o) {
|
|
490
|
+
if (e.length !== o.length) return !1;
|
|
491
|
+
for (let t = e.length; t-- !== 0; ) if (!Lt(e[t], o[t])) return !1;
|
|
492
|
+
return !0;
|
|
493
|
+
}
|
|
494
|
+
function na(e, o) {
|
|
495
|
+
const t = Object.keys(e), { length: a } = t;
|
|
496
|
+
if (a !== Object.keys(o).length) return !1;
|
|
497
|
+
for (let i = a; i-- !== 0; ) if (!Object.hasOwn(o, t[i])) return !1;
|
|
498
|
+
for (let i = a; i-- !== 0; ) {
|
|
499
|
+
const r = t[i];
|
|
500
|
+
if (!Lt(e[r], o[r])) return !1;
|
|
512
501
|
}
|
|
513
|
-
return
|
|
502
|
+
return !0;
|
|
503
|
+
}
|
|
504
|
+
function Lt(e, o) {
|
|
505
|
+
if (e === o) return !0;
|
|
506
|
+
if (!e || !o || typeof e != "object" || typeof o != "object") return Number.isNaN(e) && Number.isNaN(o);
|
|
507
|
+
const t = Array.isArray(e), a = Array.isArray(o);
|
|
508
|
+
if (t !== a) return !1;
|
|
509
|
+
if (t && a) return ra(e, o);
|
|
510
|
+
const i = e instanceof Date, r = o instanceof Date;
|
|
511
|
+
if (i !== r) return !1;
|
|
512
|
+
if (i && r) return e.getTime() === o.getTime();
|
|
513
|
+
const y = e instanceof RegExp, g = o instanceof RegExp;
|
|
514
|
+
return y !== g ? !1 : y && g ? e.toString() === o.toString() : na(e, o);
|
|
514
515
|
}
|
|
515
|
-
function Mt(e,
|
|
516
|
-
if (e && Object.keys(e).length &&
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
516
|
+
function Mt(e, o) {
|
|
517
|
+
if (e && Object.keys(e).length && o) {
|
|
518
|
+
if (!o.includes(".")) return e[o];
|
|
519
|
+
const t = o.split(".");
|
|
520
|
+
let a = e;
|
|
521
|
+
for (let i = 0, r = t.length; i < r; ++i) {
|
|
522
|
+
if (a == null) return null;
|
|
523
|
+
a = a[t[i]];
|
|
522
524
|
}
|
|
523
|
-
return
|
|
524
|
-
} else
|
|
525
|
-
return e[r];
|
|
526
|
-
else return null;
|
|
525
|
+
return a;
|
|
526
|
+
} else return null;
|
|
527
527
|
}
|
|
528
|
-
function Rt(e,
|
|
529
|
-
if (e != null &&
|
|
530
|
-
for (const
|
|
528
|
+
function Rt(e, o) {
|
|
529
|
+
if (e != null && o?.length) {
|
|
530
|
+
for (const t of o) if (ll(e, t)) return !0;
|
|
531
531
|
}
|
|
532
532
|
return !1;
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function ia(e) {
|
|
535
535
|
return typeof e == "string";
|
|
536
536
|
}
|
|
537
537
|
function xt(e) {
|
|
538
|
-
return Array.isArray(e) ? e.filter((
|
|
538
|
+
return Array.isArray(e) ? e.filter((o) => ia(o)).join(" ") : e;
|
|
539
539
|
}
|
|
540
|
-
function al(e,
|
|
541
|
-
const
|
|
540
|
+
function al(e, o) {
|
|
541
|
+
const t = s(() => ct(e) ? e.value : e), a = s(() => xt(t.value.invalidLabel)), i = s(() => xt(t.value.validLabel)), r = s(() => t.value.loadingLabel), y = s(() => t.value.hintLabel), g = s(() => !!(t.value.loading && (o.loading || r.value))), O = s(() => !g.value && !!(t.value.invalid && (o.invalid || a.value))), d = s(() => !g.value && !O.value && !!(t.value.valid && (o.valid || i.value))), $ = s(() => !g.value && !O.value && !d.value && !!(o.hint || y.value)), c = s(() => O.value || d.value || g.value || $.value);
|
|
542
542
|
return {
|
|
543
|
-
hasInvalidLabelOrSlot:
|
|
544
|
-
hasHintLabelOrSlot:
|
|
545
|
-
hasValidLabelOrSlot:
|
|
543
|
+
hasInvalidLabelOrSlot: O,
|
|
544
|
+
hasHintLabelOrSlot: $,
|
|
545
|
+
hasValidLabelOrSlot: d,
|
|
546
546
|
hasLoadingLabelOrSlot: g,
|
|
547
|
-
hintSlotScope:
|
|
548
|
-
modelValue:
|
|
549
|
-
valid:
|
|
550
|
-
invalid:
|
|
551
|
-
loading:
|
|
547
|
+
hintSlotScope: s(() => ({
|
|
548
|
+
modelValue: t.value.modelValue,
|
|
549
|
+
valid: t.value.valid,
|
|
550
|
+
invalid: t.value.invalid,
|
|
551
|
+
loading: t.value.loading
|
|
552
552
|
})),
|
|
553
553
|
HintSlot: U({
|
|
554
554
|
name: "HintSlot",
|
|
@@ -558,42 +558,42 @@ function al(e, r) {
|
|
|
558
558
|
} },
|
|
559
559
|
setup() {
|
|
560
560
|
return {
|
|
561
|
-
isVisible:
|
|
562
|
-
invalidLabel:
|
|
563
|
-
validLabel:
|
|
564
|
-
loadingLabel:
|
|
565
|
-
hintLabel:
|
|
566
|
-
hasInvalidLabelOrSlot:
|
|
567
|
-
hasValidLabelOrSlot:
|
|
561
|
+
isVisible: c,
|
|
562
|
+
invalidLabel: a,
|
|
563
|
+
validLabel: i,
|
|
564
|
+
loadingLabel: r,
|
|
565
|
+
hintLabel: y,
|
|
566
|
+
hasInvalidLabelOrSlot: O,
|
|
567
|
+
hasValidLabelOrSlot: d,
|
|
568
568
|
hasLoadingLabelOrSlot: g,
|
|
569
|
-
hasHintLabelOrSlot:
|
|
569
|
+
hasHintLabelOrSlot: $
|
|
570
570
|
};
|
|
571
571
|
},
|
|
572
572
|
render() {
|
|
573
573
|
if (this.isVisible) {
|
|
574
|
-
let
|
|
575
|
-
return this.hasInvalidLabelOrSlot && (
|
|
574
|
+
let b;
|
|
575
|
+
return this.hasInvalidLabelOrSlot && (b = "alert"), this.hasValidLabelOrSlot && (b = "status"), this.hasLoadingLabelOrSlot ? Ve(this.tag, { role: b }, this.$slots.loading?.() ?? this.loadingLabel) : this.hasInvalidLabelOrSlot ? Ve(this.tag, { role: b }, this.$slots.invalid?.() ?? this.$slots.invalid ?? this.invalidLabel) : this.hasValidLabelOrSlot ? Ve(this.tag, { role: b }, this.$slots.valid?.() ?? this.validLabel) : Ve(this.tag, { role: b }, this.$slots.hint?.() ?? this.$slots.hint ?? this.hintLabel);
|
|
576
576
|
}
|
|
577
577
|
return null;
|
|
578
578
|
}
|
|
579
579
|
})
|
|
580
580
|
};
|
|
581
581
|
}
|
|
582
|
-
function
|
|
582
|
+
function $t() {
|
|
583
583
|
return Ke(Yl, void 0);
|
|
584
584
|
}
|
|
585
|
-
function Ce(e,
|
|
586
|
-
return
|
|
587
|
-
const
|
|
588
|
-
return
|
|
589
|
-
|
|
590
|
-
}),
|
|
591
|
-
|
|
592
|
-
}),
|
|
585
|
+
function Ce(e, o, t) {
|
|
586
|
+
return s(() => {
|
|
587
|
+
const a = { [e]: !0 }, i = typeof o?.value == "string" ? o.value.split(" ") : o?.value;
|
|
588
|
+
return i && Array.isArray(i) && i.forEach((r) => {
|
|
589
|
+
r && (a[`${e}--${r}`] = !0);
|
|
590
|
+
}), t && Object.keys(t.value).forEach((r) => {
|
|
591
|
+
a[`${e}--${r}`] = l(t.value[r]);
|
|
592
|
+
}), a;
|
|
593
593
|
});
|
|
594
594
|
}
|
|
595
|
-
var
|
|
596
|
-
...
|
|
595
|
+
var sa = { name: "VvIcon" }, ua = /* @__PURE__ */ U({
|
|
596
|
+
...sa,
|
|
597
597
|
props: /* @__PURE__ */ _l({
|
|
598
598
|
name: {},
|
|
599
599
|
color: {},
|
|
@@ -613,31 +613,30 @@ var na = { name: "VvIcon" }, ia = /* @__PURE__ */ U({
|
|
|
613
613
|
modifiers: {}
|
|
614
614
|
}, zl),
|
|
615
615
|
setup(e) {
|
|
616
|
-
const
|
|
617
|
-
const
|
|
618
|
-
if (st(
|
|
619
|
-
const C =
|
|
620
|
-
return C ? `@${g.value}:${C.prefix}:${
|
|
616
|
+
const o = e, t = s(() => typeof o.rotate == "string" ? Number.parseFloat(o.rotate) : o.rotate), a = N(!0), i = $t(), { modifiers: r } = pe(o), y = Ce("vv-icon", r), g = s(() => o.provider || i?.iconsProvider), O = s(() => {
|
|
617
|
+
const c = o.name ?? "", b = `@${g.value}:${o.prefix}:${c}`;
|
|
618
|
+
if (st(b)) return b;
|
|
619
|
+
const C = i?.iconsCollections.find((P) => st(`@${g.value}:${P.prefix}:${c}`));
|
|
620
|
+
return C ? `@${g.value}:${C.prefix}:${c}` : c;
|
|
621
621
|
});
|
|
622
|
-
function
|
|
623
|
-
|
|
624
|
-
return c ? c.parseFromString(v, "text/html").querySelector("svg") : null;
|
|
622
|
+
function d(c) {
|
|
623
|
+
return globalThis.window === void 0 ? null : new globalThis.DOMParser().parseFromString(c, "text/html").querySelector("svg");
|
|
625
624
|
}
|
|
626
|
-
function
|
|
627
|
-
const
|
|
628
|
-
|
|
625
|
+
function $(c) {
|
|
626
|
+
const b = d(c), C = b?.innerHTML.trim() || "";
|
|
627
|
+
b && C && Dl(`@${g.value}:${o.prefix}:${o.name}`, {
|
|
629
628
|
body: C,
|
|
630
|
-
height:
|
|
631
|
-
width:
|
|
629
|
+
height: b.viewBox.baseVal.height,
|
|
630
|
+
width: b.viewBox.baseVal.width
|
|
632
631
|
});
|
|
633
632
|
}
|
|
634
|
-
return
|
|
635
|
-
|
|
636
|
-
}).catch((
|
|
637
|
-
throw
|
|
638
|
-
})),
|
|
633
|
+
return i && o.src && !st(`@${g.value}:${o.prefix}:${o.name}`) && (a.value = !1, i.fetchIcon(o.src).then((c) => {
|
|
634
|
+
c && $(c), a.value = !0;
|
|
635
|
+
}).catch((c) => {
|
|
636
|
+
throw a.value = !0, new Error(`Error during fetch icon: ${c?.message}`);
|
|
637
|
+
})), o.svg && $(o.svg), (c, b) => l(a) ? (v(), H(l(Nl), A({
|
|
639
638
|
key: 0,
|
|
640
|
-
class:
|
|
639
|
+
class: l(y)
|
|
641
640
|
}, {
|
|
642
641
|
inline: e.inline,
|
|
643
642
|
width: e.width,
|
|
@@ -645,22 +644,22 @@ var na = { name: "VvIcon" }, ia = /* @__PURE__ */ U({
|
|
|
645
644
|
horizontalFlip: e.horizontalFlip,
|
|
646
645
|
verticalFlip: e.verticalFlip,
|
|
647
646
|
flip: e.flip,
|
|
648
|
-
rotate: t
|
|
647
|
+
rotate: l(t),
|
|
649
648
|
color: e.color,
|
|
650
|
-
icon:
|
|
649
|
+
icon: l(O)
|
|
651
650
|
}, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) : I("v-if", !0);
|
|
652
651
|
}
|
|
653
|
-
}), ce =
|
|
654
|
-
function at(e,
|
|
655
|
-
const
|
|
652
|
+
}), ce = ua;
|
|
653
|
+
function at(e, o) {
|
|
654
|
+
const t = s(() => typeof e?.value == "string" ? { name: e?.value } : e?.value), a = s(() => o?.value === Xe.before ? t.value : void 0), i = s(() => o?.value === Xe.after ? t.value : void 0);
|
|
656
655
|
return {
|
|
657
|
-
hasIcon:
|
|
658
|
-
hasIconLeft:
|
|
659
|
-
hasIconRight:
|
|
660
|
-
hasIconTop:
|
|
661
|
-
hasIconBottom:
|
|
662
|
-
hasIconBefore:
|
|
663
|
-
hasIconAfter:
|
|
656
|
+
hasIcon: t,
|
|
657
|
+
hasIconLeft: s(() => o?.value === D.left ? t.value : void 0),
|
|
658
|
+
hasIconRight: s(() => o?.value === D.right ? t.value : void 0),
|
|
659
|
+
hasIconTop: s(() => o?.value === D.top ? t.value : void 0),
|
|
660
|
+
hasIconBottom: s(() => o?.value === D.bottom ? t.value : void 0),
|
|
661
|
+
hasIconBefore: a,
|
|
662
|
+
hasIconAfter: i
|
|
664
663
|
};
|
|
665
664
|
}
|
|
666
665
|
var ol = U({
|
|
@@ -684,22 +683,22 @@ var ol = U({
|
|
|
684
683
|
}
|
|
685
684
|
},
|
|
686
685
|
emits: ["clear"],
|
|
687
|
-
setup(e, { emit:
|
|
688
|
-
const { hasIcon:
|
|
689
|
-
function
|
|
690
|
-
|
|
686
|
+
setup(e, { emit: o }) {
|
|
687
|
+
const { hasIcon: t } = at(s(() => e.icon));
|
|
688
|
+
function a(i) {
|
|
689
|
+
i?.stopPropagation(), e.disabled || o("clear");
|
|
691
690
|
}
|
|
692
691
|
return {
|
|
693
|
-
hasIcon:
|
|
694
|
-
onClick:
|
|
692
|
+
hasIcon: t,
|
|
693
|
+
onClick: a
|
|
695
694
|
};
|
|
696
695
|
},
|
|
697
696
|
render() {
|
|
698
|
-
const e = this.hasIcon ?
|
|
697
|
+
const e = this.hasIcon ? Ve(ce, {
|
|
699
698
|
...this.hasIcon,
|
|
700
699
|
class: `vv-${this.inputType}__icon`
|
|
701
700
|
}) : void 0;
|
|
702
|
-
return
|
|
701
|
+
return Ve("button", {
|
|
703
702
|
disabled: this.disabled,
|
|
704
703
|
class: `vv-${this.inputType}__action`,
|
|
705
704
|
ariaLabel: this.label,
|
|
@@ -707,51 +706,51 @@ var ol = U({
|
|
|
707
706
|
onClick: this.onClick
|
|
708
707
|
}, e);
|
|
709
708
|
}
|
|
710
|
-
}),
|
|
709
|
+
}), da = {
|
|
711
710
|
...be,
|
|
712
711
|
value: [String, Number]
|
|
713
|
-
},
|
|
714
|
-
...
|
|
715
|
-
props:
|
|
712
|
+
}, va = { name: "VvBadge" }, fa = /* @__PURE__ */ U({
|
|
713
|
+
...va,
|
|
714
|
+
props: da,
|
|
716
715
|
setup(e) {
|
|
717
|
-
const { modifiers:
|
|
718
|
-
return (
|
|
716
|
+
const { modifiers: o } = pe(e), t = Ce("vv-badge", o);
|
|
717
|
+
return (a, i) => (v(), L("span", { class: Ge(l(t)) }, [_(a.$slots, "default", {}, () => [ee(j(a.value), 1)])], 2));
|
|
719
718
|
}
|
|
720
|
-
}),
|
|
721
|
-
function
|
|
722
|
-
const
|
|
723
|
-
function
|
|
724
|
-
const g =
|
|
725
|
-
if (g) return
|
|
719
|
+
}), ca = fa;
|
|
720
|
+
function pa(e) {
|
|
721
|
+
const o = Ke(e, void 0), t = s(() => o !== void 0);
|
|
722
|
+
function a(i, r, y) {
|
|
723
|
+
const g = o?.[i];
|
|
724
|
+
if (g) return s({
|
|
726
725
|
get() {
|
|
727
726
|
return g.value;
|
|
728
727
|
},
|
|
729
|
-
set(
|
|
730
|
-
g.value =
|
|
728
|
+
set(d) {
|
|
729
|
+
g.value = d;
|
|
731
730
|
}
|
|
732
731
|
});
|
|
733
|
-
const
|
|
734
|
-
return
|
|
732
|
+
const O = Vl(r, i);
|
|
733
|
+
return s({
|
|
735
734
|
get() {
|
|
736
|
-
return
|
|
735
|
+
return O.value;
|
|
737
736
|
},
|
|
738
|
-
set(
|
|
739
|
-
|
|
737
|
+
set(d) {
|
|
738
|
+
y && y(`update:${i}`, d);
|
|
740
739
|
}
|
|
741
740
|
});
|
|
742
741
|
}
|
|
743
742
|
return {
|
|
744
|
-
group:
|
|
745
|
-
isInGroup:
|
|
746
|
-
getGroupOrLocalRef:
|
|
743
|
+
group: o,
|
|
744
|
+
isInGroup: t,
|
|
745
|
+
getGroupOrLocalRef: a
|
|
747
746
|
};
|
|
748
747
|
}
|
|
749
|
-
var
|
|
748
|
+
var ba = ["update:modelValue"], ga = {
|
|
750
749
|
...tl,
|
|
751
|
-
...Vt,
|
|
752
|
-
...be,
|
|
753
750
|
...Ot,
|
|
754
|
-
...
|
|
751
|
+
...be,
|
|
752
|
+
...St,
|
|
753
|
+
...je,
|
|
755
754
|
...et,
|
|
756
755
|
iconPosition: {
|
|
757
756
|
type: String,
|
|
@@ -791,216 +790,216 @@ var ca = ["update:modelValue"], pa = {
|
|
|
791
790
|
default: void 0
|
|
792
791
|
}
|
|
793
792
|
};
|
|
794
|
-
function
|
|
795
|
-
const { group:
|
|
793
|
+
function ma(e, o) {
|
|
794
|
+
const { group: t, isInGroup: a, getGroupOrLocalRef: i } = pa(Ql), { id: r, iconPosition: y, icon: g, label: O, pressed: d } = pe(e);
|
|
796
795
|
return {
|
|
797
|
-
group:
|
|
798
|
-
isInGroup:
|
|
799
|
-
modelValue:
|
|
800
|
-
toggle:
|
|
801
|
-
unselectable:
|
|
802
|
-
multiple:
|
|
803
|
-
modifiers:
|
|
804
|
-
let
|
|
805
|
-
const
|
|
806
|
-
return
|
|
796
|
+
group: t,
|
|
797
|
+
isInGroup: a,
|
|
798
|
+
modelValue: i("modelValue", e, o),
|
|
799
|
+
toggle: i("toggle", e),
|
|
800
|
+
unselectable: i("unselectable", e),
|
|
801
|
+
multiple: s(() => t?.multiple.value ?? !1),
|
|
802
|
+
modifiers: s(() => {
|
|
803
|
+
let $ = e.modifiers, c = t?.modifiers.value;
|
|
804
|
+
const b = /* @__PURE__ */ new Set();
|
|
805
|
+
return $ && (Array.isArray($) || ($ = $.split(" ")), $.forEach((C) => b.add(C))), c && (Array.isArray(c) || (c = c.split(" ")), c.forEach((C) => b.add(C))), [...b];
|
|
807
806
|
}),
|
|
808
|
-
disabled:
|
|
809
|
-
id:
|
|
810
|
-
pressed:
|
|
811
|
-
iconPosition:
|
|
807
|
+
disabled: s(() => !!(e.disabled || t?.disabled.value)),
|
|
808
|
+
id: r,
|
|
809
|
+
pressed: d,
|
|
810
|
+
iconPosition: y,
|
|
812
811
|
icon: g,
|
|
813
|
-
label:
|
|
812
|
+
label: O
|
|
814
813
|
};
|
|
815
814
|
}
|
|
816
|
-
var
|
|
815
|
+
var ya = [
|
|
817
816
|
"click",
|
|
818
817
|
"mouseover",
|
|
819
818
|
"mouseleave"
|
|
820
|
-
]
|
|
821
|
-
function
|
|
819
|
+
];
|
|
820
|
+
function ha() {
|
|
822
821
|
return Ke(Ut, {});
|
|
823
822
|
}
|
|
824
|
-
function
|
|
823
|
+
function _a() {
|
|
825
824
|
return Ke(Yt, {});
|
|
826
825
|
}
|
|
827
|
-
function
|
|
826
|
+
function Sa() {
|
|
828
827
|
return Ke(Qt, {});
|
|
829
828
|
}
|
|
830
|
-
var
|
|
831
|
-
...
|
|
832
|
-
props:
|
|
833
|
-
emits:
|
|
834
|
-
setup(e, { expose:
|
|
835
|
-
const
|
|
836
|
-
|
|
837
|
-
const { reference:
|
|
838
|
-
ae(() => g.value, (
|
|
839
|
-
|
|
829
|
+
var Oa = { name: "VvAction" }, La = /* @__PURE__ */ U({
|
|
830
|
+
...Oa,
|
|
831
|
+
props: tl,
|
|
832
|
+
emits: ya,
|
|
833
|
+
setup(e, { expose: o, emit: t }) {
|
|
834
|
+
const a = e, i = t, r = hl(), y = $t(), g = N(null);
|
|
835
|
+
o({ $el: g });
|
|
836
|
+
const { reference: O, bus: d, aria: $, expanded: c } = ha();
|
|
837
|
+
ae(() => g.value, (S) => {
|
|
838
|
+
O && (O.value = S);
|
|
840
839
|
});
|
|
841
|
-
const
|
|
840
|
+
const b = s(() => a.pressed || c?.value), { role: C } = Sa(), P = s(() => {
|
|
842
841
|
switch (!0) {
|
|
843
|
-
case
|
|
842
|
+
case a.disabled:
|
|
844
843
|
return ve.button;
|
|
845
|
-
case
|
|
846
|
-
return
|
|
847
|
-
case
|
|
844
|
+
case a.to !== void 0:
|
|
845
|
+
return y?.nuxt ? Ll(ve.nuxtLink) : ve.routerLink;
|
|
846
|
+
case a.href !== void 0:
|
|
848
847
|
return ve.a;
|
|
849
848
|
default:
|
|
850
|
-
return
|
|
849
|
+
return a.defaultTag;
|
|
851
850
|
}
|
|
852
|
-
}), G =
|
|
853
|
-
const
|
|
854
|
-
|
|
855
|
-
ariaPressed:
|
|
856
|
-
ariaLabel:
|
|
851
|
+
}), G = s(() => {
|
|
852
|
+
const S = {
|
|
853
|
+
...$?.value,
|
|
854
|
+
ariaPressed: b.value ? !0 : void 0,
|
|
855
|
+
ariaLabel: a.ariaLabel,
|
|
857
856
|
role: C?.value
|
|
858
857
|
};
|
|
859
858
|
switch (P.value) {
|
|
860
859
|
case ve.a:
|
|
861
860
|
return {
|
|
862
|
-
...
|
|
863
|
-
href:
|
|
864
|
-
target:
|
|
865
|
-
rel:
|
|
861
|
+
...S,
|
|
862
|
+
href: a.href,
|
|
863
|
+
target: a.target,
|
|
864
|
+
rel: a.rel
|
|
866
865
|
};
|
|
867
866
|
case ve.routerLink:
|
|
868
867
|
case ve.nuxtLink:
|
|
869
868
|
return {
|
|
870
|
-
...
|
|
871
|
-
to:
|
|
872
|
-
target:
|
|
869
|
+
...S,
|
|
870
|
+
to: a.to,
|
|
871
|
+
target: a.target
|
|
873
872
|
};
|
|
874
873
|
case ve.button:
|
|
875
874
|
return {
|
|
876
|
-
...
|
|
877
|
-
type:
|
|
878
|
-
disabled:
|
|
875
|
+
...S,
|
|
876
|
+
type: a.type,
|
|
877
|
+
disabled: a.disabled
|
|
879
878
|
};
|
|
880
879
|
default:
|
|
881
|
-
return
|
|
880
|
+
return S;
|
|
882
881
|
}
|
|
883
882
|
});
|
|
884
|
-
function T(
|
|
885
|
-
if (
|
|
886
|
-
|
|
883
|
+
function T(S) {
|
|
884
|
+
if (a.disabled) {
|
|
885
|
+
S.preventDefault();
|
|
887
886
|
return;
|
|
888
887
|
}
|
|
889
|
-
if (
|
|
890
|
-
|
|
888
|
+
if (r?.vnode.props?.onClick) {
|
|
889
|
+
i("click", S);
|
|
891
890
|
return;
|
|
892
891
|
}
|
|
893
|
-
|
|
892
|
+
d?.emit("click", S);
|
|
894
893
|
}
|
|
895
|
-
function Y(
|
|
896
|
-
if (
|
|
897
|
-
|
|
894
|
+
function Y(S) {
|
|
895
|
+
if (r?.vnode.props?.onMouseover) {
|
|
896
|
+
i("mouseover", S);
|
|
898
897
|
return;
|
|
899
898
|
}
|
|
900
|
-
|
|
899
|
+
d?.emit("mouseover", S);
|
|
901
900
|
}
|
|
902
|
-
function
|
|
903
|
-
if (
|
|
904
|
-
|
|
901
|
+
function q(S) {
|
|
902
|
+
if (r?.vnode.props?.onMouseleave) {
|
|
903
|
+
i("mouseleave", S);
|
|
905
904
|
return;
|
|
906
905
|
}
|
|
907
|
-
|
|
906
|
+
d?.emit("mouseleave", S);
|
|
908
907
|
}
|
|
909
|
-
return (
|
|
908
|
+
return (S, k) => (v(), H($l(l(P)), A(l(G), {
|
|
910
909
|
ref_key: "rootEl",
|
|
911
910
|
ref: g,
|
|
912
911
|
class: {
|
|
913
|
-
active:
|
|
914
|
-
pressed:
|
|
915
|
-
disabled:
|
|
916
|
-
current:
|
|
912
|
+
active: S.active,
|
|
913
|
+
pressed: l(b),
|
|
914
|
+
disabled: S.disabled,
|
|
915
|
+
current: S.current
|
|
917
916
|
},
|
|
918
917
|
onClickPassive: T,
|
|
919
918
|
onMouseoverPassive: Y,
|
|
920
|
-
onMouseleavePassive:
|
|
919
|
+
onMouseleavePassive: q
|
|
921
920
|
}), {
|
|
922
|
-
default: E(() => [
|
|
921
|
+
default: E(() => [_(S.$slots, "default", {}, () => [ee(j(S.label), 1)])]),
|
|
923
922
|
_: 3
|
|
924
923
|
}, 16, ["class"]));
|
|
925
924
|
}
|
|
926
|
-
}),
|
|
925
|
+
}), $a = La;
|
|
927
926
|
function ot(e) {
|
|
928
|
-
return
|
|
927
|
+
return s(() => String(e?.value || kl()));
|
|
929
928
|
}
|
|
930
|
-
var
|
|
929
|
+
var wa = {
|
|
931
930
|
key: 1,
|
|
932
931
|
class: "vv-button__label"
|
|
933
|
-
},
|
|
932
|
+
}, Va = {
|
|
934
933
|
key: 1,
|
|
935
934
|
class: "vv-button__label"
|
|
936
|
-
},
|
|
935
|
+
}, ka = {
|
|
937
936
|
name: "VvButton",
|
|
938
937
|
inheritAttrs: !1
|
|
939
|
-
},
|
|
940
|
-
|
|
941
|
-
props:
|
|
942
|
-
emits:
|
|
943
|
-
setup(e, { expose:
|
|
944
|
-
const
|
|
945
|
-
|
|
946
|
-
const
|
|
947
|
-
reverse: [D.right, D.bottom].includes(
|
|
948
|
-
column: [D.top, D.bottom].includes(
|
|
949
|
-
"icon-only": !!(
|
|
950
|
-
}))), { hasIcon: ie } = at(
|
|
938
|
+
}, Pa = /* @__PURE__ */ U({
|
|
939
|
+
...ka,
|
|
940
|
+
props: ga,
|
|
941
|
+
emits: ba,
|
|
942
|
+
setup(e, { expose: o, emit: t }) {
|
|
943
|
+
const a = e, i = t, r = qt(), y = bt(), { id: g, modifiers: O, iconPosition: d, icon: $, label: c, modelValue: b, disabled: C, toggle: P, unselectable: G } = ma(a, i), T = ot(g), Y = s(() => r?.name || T.value), q = N(null);
|
|
944
|
+
o({ $el: s(() => q.value?.$el) });
|
|
945
|
+
const S = s(() => P.value ? Array.isArray(b.value) ? Rt(Y.value, b.value) : ll(Y.value, b.value) : a.pressed), k = Ce("vv-button", O, s(() => ({
|
|
946
|
+
reverse: [D.right, D.bottom].includes(d.value),
|
|
947
|
+
column: [D.top, D.bottom].includes(d.value),
|
|
948
|
+
"icon-only": !!($?.value && !c?.value && !y.default)
|
|
949
|
+
}))), { hasIcon: ie } = at($), Q = s(() => a.value === void 0 ? Y.value : a.value), ge = s(() => {
|
|
951
950
|
if (P.value)
|
|
952
951
|
return { onClick: se };
|
|
953
952
|
});
|
|
954
953
|
function se() {
|
|
955
954
|
if (P.value) {
|
|
956
|
-
if (Array.isArray(
|
|
957
|
-
if (Rt(Q.value,
|
|
958
|
-
G.value && (
|
|
955
|
+
if (Array.isArray(b.value)) {
|
|
956
|
+
if (Rt(Q.value, b.value)) {
|
|
957
|
+
G.value && (b.value = b.value.filter((V) => V !== Q.value));
|
|
959
958
|
return;
|
|
960
959
|
}
|
|
961
|
-
|
|
960
|
+
b.value.push(Q.value);
|
|
962
961
|
return;
|
|
963
962
|
}
|
|
964
|
-
if (Q.value ===
|
|
965
|
-
|
|
963
|
+
if (Q.value === b.value && G.value) {
|
|
964
|
+
b.value = a.uncheckedValue;
|
|
966
965
|
return;
|
|
967
966
|
}
|
|
968
|
-
|
|
967
|
+
b.value = Q.value;
|
|
969
968
|
}
|
|
970
969
|
}
|
|
971
|
-
return (
|
|
972
|
-
...
|
|
973
|
-
...
|
|
974
|
-
disabled:
|
|
975
|
-
pressed:
|
|
976
|
-
active:
|
|
977
|
-
type:
|
|
978
|
-
to:
|
|
979
|
-
href:
|
|
980
|
-
target:
|
|
981
|
-
rel:
|
|
982
|
-
ariaLabel:
|
|
970
|
+
return (V, M) => (v(), H($a, A({
|
|
971
|
+
...l(r),
|
|
972
|
+
...l(ge),
|
|
973
|
+
disabled: l(C),
|
|
974
|
+
pressed: l(S),
|
|
975
|
+
active: V.active,
|
|
976
|
+
type: V.type,
|
|
977
|
+
to: V.to,
|
|
978
|
+
href: V.href,
|
|
979
|
+
target: V.target,
|
|
980
|
+
rel: V.rel,
|
|
981
|
+
ariaLabel: V.ariaLabel
|
|
983
982
|
}, {
|
|
984
|
-
id:
|
|
983
|
+
id: l(T),
|
|
985
984
|
ref_key: "rootEl",
|
|
986
|
-
ref:
|
|
987
|
-
class:
|
|
985
|
+
ref: q,
|
|
986
|
+
class: l(k)
|
|
988
987
|
}), {
|
|
989
|
-
default: E(() => [
|
|
988
|
+
default: E(() => [_(V.$slots, "default", {}, () => [V.loading ? _(V.$slots, "loading", { key: 0 }, () => [V.loadingIcon ? (v(), H(ce, {
|
|
990
989
|
key: 0,
|
|
991
990
|
class: "vv-button__loading-icon",
|
|
992
|
-
name:
|
|
993
|
-
}, null, 8, ["name"])) : I("v-if", !0),
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
991
|
+
name: V.loadingIcon
|
|
992
|
+
}, null, 8, ["name"])) : I("v-if", !0), V.loadingLabel ? (v(), L("span", wa, j(V.loadingLabel), 1)) : I("v-if", !0)]) : (v(), L(le, { key: 1 }, [
|
|
993
|
+
_(V.$slots, "before"),
|
|
994
|
+
l(ie) ? (v(), H(ce, A({ key: 0 }, l(ie), { class: "vv-button__icon" }), null, 16)) : I("v-if", !0),
|
|
995
|
+
l(c) ? (v(), L("span", Va, [_(V.$slots, "label", {}, () => [ee(j(l(c)), 1)])])) : I("v-if", !0),
|
|
996
|
+
_(V.$slots, "after")
|
|
998
997
|
], 64))])]),
|
|
999
998
|
_: 3
|
|
1000
999
|
}, 16, ["id", "class"]));
|
|
1001
1000
|
}
|
|
1002
|
-
}), rl =
|
|
1003
|
-
...
|
|
1001
|
+
}), rl = Pa, Ca = {
|
|
1002
|
+
...Ot,
|
|
1004
1003
|
...ft,
|
|
1005
1004
|
...be,
|
|
1006
1005
|
modelValue: {
|
|
@@ -1016,13 +1015,13 @@ var La = {
|
|
|
1016
1015
|
default: Ze.menu,
|
|
1017
1016
|
validator: (e) => Object.values(Ze).includes(e)
|
|
1018
1017
|
}
|
|
1019
|
-
},
|
|
1018
|
+
}, Ea = { focusOnHover: {
|
|
1020
1019
|
type: Boolean,
|
|
1021
1020
|
default: !1
|
|
1022
|
-
} },
|
|
1021
|
+
} }, Ia = {
|
|
1023
1022
|
...ke,
|
|
1024
1023
|
...Zl,
|
|
1025
|
-
...
|
|
1024
|
+
...St,
|
|
1026
1025
|
...be,
|
|
1027
1026
|
deselectHintLabel: { type: String },
|
|
1028
1027
|
selectHintLabel: { type: String },
|
|
@@ -1032,51 +1031,51 @@ var La = {
|
|
|
1032
1031
|
default: !1
|
|
1033
1032
|
}
|
|
1034
1033
|
};
|
|
1035
|
-
function
|
|
1036
|
-
const
|
|
1034
|
+
function Ba({ reference: e, id: o, expanded: t, aria: a }) {
|
|
1035
|
+
const i = ql();
|
|
1037
1036
|
return {
|
|
1038
|
-
bus:
|
|
1037
|
+
bus: i,
|
|
1039
1038
|
component: U({
|
|
1040
1039
|
name: "VvDropdownTriggerProvider",
|
|
1041
1040
|
setup() {
|
|
1042
|
-
|
|
1041
|
+
pt(Ut, {
|
|
1043
1042
|
reference: e,
|
|
1044
|
-
id:
|
|
1045
|
-
expanded:
|
|
1046
|
-
aria:
|
|
1047
|
-
bus:
|
|
1043
|
+
id: o,
|
|
1044
|
+
expanded: t,
|
|
1045
|
+
aria: a,
|
|
1046
|
+
bus: i
|
|
1048
1047
|
});
|
|
1049
1048
|
},
|
|
1050
1049
|
render() {
|
|
1051
|
-
return
|
|
1050
|
+
return Ve(le, {}, this.$slots.default?.());
|
|
1052
1051
|
}
|
|
1053
1052
|
})
|
|
1054
1053
|
};
|
|
1055
1054
|
}
|
|
1056
|
-
function
|
|
1057
|
-
const
|
|
1058
|
-
return
|
|
1059
|
-
role:
|
|
1060
|
-
...
|
|
1061
|
-
}), { itemRole:
|
|
1055
|
+
function Aa({ role: e, ...o }) {
|
|
1056
|
+
const t = s(() => e.value === Ze.listbox ? Ft.option : Ft.presentation);
|
|
1057
|
+
return pt(Yt, {
|
|
1058
|
+
role: t,
|
|
1059
|
+
...o
|
|
1060
|
+
}), { itemRole: t };
|
|
1062
1061
|
}
|
|
1063
|
-
function
|
|
1064
|
-
|
|
1062
|
+
function Na({ expanded: e }) {
|
|
1063
|
+
pt(Qt, {
|
|
1065
1064
|
role: N(Ul.menuitem),
|
|
1066
1065
|
expanded: e
|
|
1067
1066
|
});
|
|
1068
1067
|
}
|
|
1069
|
-
var
|
|
1068
|
+
var Da = [
|
|
1070
1069
|
"id",
|
|
1071
1070
|
"tabindex",
|
|
1072
1071
|
"role",
|
|
1073
1072
|
"aria-labelledby"
|
|
1074
|
-
],
|
|
1073
|
+
], Ha = {
|
|
1075
1074
|
name: "VvDropdown",
|
|
1076
1075
|
inheritAttrs: !1
|
|
1077
|
-
},
|
|
1078
|
-
...
|
|
1079
|
-
props:
|
|
1076
|
+
}, ja = /* @__PURE__ */ U({
|
|
1077
|
+
...Ha,
|
|
1078
|
+
props: Ca,
|
|
1080
1079
|
emits: [
|
|
1081
1080
|
"update:modelValue",
|
|
1082
1081
|
"beforeEnter",
|
|
@@ -1094,301 +1093,301 @@ var Na = [
|
|
|
1094
1093
|
"leave",
|
|
1095
1094
|
"leaveCancelled"
|
|
1096
1095
|
],
|
|
1097
|
-
setup(e, { expose:
|
|
1098
|
-
const
|
|
1099
|
-
get: () =>
|
|
1100
|
-
set: (
|
|
1101
|
-
|
|
1096
|
+
setup(e, { expose: o, emit: t }) {
|
|
1097
|
+
const a = e, i = t, { id: r } = pe(a), y = ot(r), g = qt(), O = N("auto"), d = N("auto"), $ = N(), c = N(), b = N(), C = N(), P = s({
|
|
1098
|
+
get: () => a.reference ?? $.value,
|
|
1099
|
+
set: (u) => {
|
|
1100
|
+
$.value = u;
|
|
1102
1101
|
}
|
|
1103
1102
|
}), G = N(!1);
|
|
1104
1103
|
Ol(() => {
|
|
1105
|
-
Kl(
|
|
1106
|
-
G.value =
|
|
1104
|
+
Kl(c.value, () => {
|
|
1105
|
+
G.value = globalThis.getComputedStyle(c.value).getPropertyValue("--dropdown-custom-position")?.trim() === "true";
|
|
1107
1106
|
}, {
|
|
1108
1107
|
attributeFilter: ["style"],
|
|
1109
|
-
window
|
|
1108
|
+
window: globalThis.window
|
|
1110
1109
|
});
|
|
1111
1110
|
});
|
|
1112
|
-
function T(
|
|
1113
|
-
return typeof
|
|
1111
|
+
function T(u, w, Se) {
|
|
1112
|
+
return typeof u == "boolean" ? w() : Se(u);
|
|
1114
1113
|
}
|
|
1115
|
-
const Y =
|
|
1116
|
-
const
|
|
1117
|
-
if (
|
|
1118
|
-
const w = ({ availableWidth: Se, availableHeight:
|
|
1119
|
-
|
|
1114
|
+
const Y = s(() => {
|
|
1115
|
+
const u = [];
|
|
1116
|
+
if (a.autoPlacement ? u.push(T(a.autoPlacement, () => It(), (w) => It(w))) : a.flip && u.push(T(a.flip, () => Bt({ fallbackStrategy: "initialPlacement" }), (w) => Bt(w))), a.shift && u.push(T(a.shift, () => Nt(), (w) => Nt(w))), a.size) {
|
|
1117
|
+
const w = ({ availableWidth: Se, availableHeight: Fe }) => {
|
|
1118
|
+
O.value = `${Se}px`, d.value = `${Fe}px`;
|
|
1120
1119
|
};
|
|
1121
|
-
|
|
1120
|
+
u.push(T(a.size, () => Dt({ apply: w }), (Se) => Dt({
|
|
1122
1121
|
...Se,
|
|
1123
1122
|
apply: w
|
|
1124
1123
|
})));
|
|
1125
1124
|
}
|
|
1126
|
-
return
|
|
1127
|
-
}), { x:
|
|
1128
|
-
whileElementsMounted: (...
|
|
1129
|
-
placement:
|
|
1130
|
-
strategy:
|
|
1125
|
+
return a.offset && u.push(["string", "number"].includes(typeof a.offset) ? At(Number(a.offset)) : At(a.offset)), a.arrow && u.push(Hl({ element: b })), u;
|
|
1126
|
+
}), { x: q, y: S, middlewareData: k, placement: ie, strategy: Q } = Fl(P, c, {
|
|
1127
|
+
whileElementsMounted: (...u) => jl(...u, { animationFrame: a.strategy === Jt.fixed }),
|
|
1128
|
+
placement: s(() => a.placement),
|
|
1129
|
+
strategy: s(() => a.strategy),
|
|
1131
1130
|
middleware: Y
|
|
1132
|
-
}),
|
|
1131
|
+
}), ge = s(() => {
|
|
1133
1132
|
if (G.value) return;
|
|
1134
|
-
const
|
|
1133
|
+
const u = a.triggerWidth && P.value ? `${P.value?.offsetWidth}px` : void 0;
|
|
1135
1134
|
return {
|
|
1136
1135
|
position: Q.value,
|
|
1137
|
-
top: `${
|
|
1138
|
-
left: `${
|
|
1139
|
-
maxWidth:
|
|
1140
|
-
maxHeight:
|
|
1141
|
-
width:
|
|
1136
|
+
top: `${S.value ?? 0}px`,
|
|
1137
|
+
left: `${q.value ?? 0}px`,
|
|
1138
|
+
maxWidth: u ? void 0 : O.value,
|
|
1139
|
+
maxHeight: d.value,
|
|
1140
|
+
width: u
|
|
1142
1141
|
};
|
|
1143
|
-
}), se =
|
|
1142
|
+
}), se = s(() => ie.value.split("-")[0]), V = s(() => {
|
|
1144
1143
|
if (G.value) return;
|
|
1145
|
-
const
|
|
1144
|
+
const u = {
|
|
1146
1145
|
[D.top]: D.bottom,
|
|
1147
1146
|
[D.right]: D.left,
|
|
1148
1147
|
[D.bottom]: D.top,
|
|
1149
1148
|
[D.left]: D.right
|
|
1150
1149
|
}[se.value];
|
|
1151
1150
|
return {
|
|
1152
|
-
left: k.value.arrow?.x
|
|
1153
|
-
top: k.value.arrow?.y
|
|
1154
|
-
[
|
|
1151
|
+
left: k.value.arrow?.x === void 0 ? void 0 : `${k.value.arrow?.x}px`,
|
|
1152
|
+
top: k.value.arrow?.y === void 0 ? void 0 : `${k.value.arrow?.y}px`,
|
|
1153
|
+
[u]: `${-(b.value?.offsetWidth ?? 0) / 2}px`
|
|
1155
1154
|
};
|
|
1156
|
-
}), M = Gl(
|
|
1155
|
+
}), M = Gl(a, "modelValue", i), Ee = N(!1), h = s({
|
|
1157
1156
|
get: () => M.value ?? Ee.value,
|
|
1158
|
-
set: (
|
|
1157
|
+
set: (u) => {
|
|
1159
1158
|
if (M.value === void 0) {
|
|
1160
|
-
Ee.value =
|
|
1159
|
+
Ee.value = u;
|
|
1161
1160
|
return;
|
|
1162
1161
|
}
|
|
1163
|
-
M.value =
|
|
1162
|
+
M.value = u;
|
|
1164
1163
|
}
|
|
1165
1164
|
});
|
|
1166
1165
|
function te() {
|
|
1167
|
-
|
|
1166
|
+
h.value = !0;
|
|
1168
1167
|
}
|
|
1169
1168
|
function X() {
|
|
1170
|
-
|
|
1169
|
+
h.value = !1;
|
|
1171
1170
|
}
|
|
1172
|
-
function
|
|
1173
|
-
|
|
1171
|
+
function W() {
|
|
1172
|
+
h.value = !h.value;
|
|
1174
1173
|
}
|
|
1175
|
-
function
|
|
1176
|
-
P.value =
|
|
1174
|
+
function me(u) {
|
|
1175
|
+
P.value = u;
|
|
1177
1176
|
}
|
|
1178
|
-
Ml(
|
|
1179
|
-
!
|
|
1177
|
+
Ml(c, () => {
|
|
1178
|
+
!a.keepOpen && h.value && (h.value = !1);
|
|
1180
1179
|
}, { ignore: [P] });
|
|
1181
|
-
const Ie =
|
|
1182
|
-
"aria-controls":
|
|
1180
|
+
const Ie = s(() => P.value?.getAttribute?.("id") ?? void 0), Be = s(() => ({
|
|
1181
|
+
"aria-controls": y.value,
|
|
1183
1182
|
"aria-haspopup": !0,
|
|
1184
|
-
"aria-expanded":
|
|
1185
|
-
})), { component: ye, bus: he } =
|
|
1183
|
+
"aria-expanded": h.value
|
|
1184
|
+
})), { component: ye, bus: he } = Ba({
|
|
1186
1185
|
reference: P,
|
|
1187
|
-
id:
|
|
1188
|
-
expanded:
|
|
1186
|
+
id: y,
|
|
1187
|
+
expanded: h,
|
|
1189
1188
|
aria: Be
|
|
1190
1189
|
});
|
|
1191
|
-
he.on("click",
|
|
1192
|
-
const { role: _e, modifiers: oe } = pe(
|
|
1193
|
-
function re(
|
|
1194
|
-
return
|
|
1190
|
+
he.on("click", W);
|
|
1191
|
+
const { role: _e, modifiers: oe } = pe(a), Oe = Ce("vv-dropdown", oe, s(() => ({ arrow: a.arrow }))), { focused: Z } = mt(c);
|
|
1192
|
+
function re(u) {
|
|
1193
|
+
return u ? [...u.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter((w) => !w.hasAttribute("disabled") && !w.getAttribute("aria-hidden")) : [];
|
|
1195
1194
|
}
|
|
1196
|
-
function
|
|
1195
|
+
function m() {
|
|
1197
1196
|
Qe(() => {
|
|
1198
|
-
const
|
|
1199
|
-
|
|
1197
|
+
const u = re(c.value);
|
|
1198
|
+
u.length > 0 && u[0].focus({ preventScroll: !0 });
|
|
1200
1199
|
});
|
|
1201
1200
|
}
|
|
1202
1201
|
function R() {
|
|
1203
1202
|
Qe(() => {
|
|
1204
|
-
const
|
|
1205
|
-
|
|
1203
|
+
const u = re(C.value);
|
|
1204
|
+
u.length > 0 && u[0].focus({ preventScroll: !0 });
|
|
1206
1205
|
});
|
|
1207
1206
|
}
|
|
1208
1207
|
function z() {
|
|
1209
1208
|
Qe(() => {
|
|
1210
1209
|
if (Z.value) {
|
|
1211
|
-
const
|
|
1212
|
-
if (
|
|
1213
|
-
const w =
|
|
1214
|
-
w <
|
|
1210
|
+
const u = re(c.value);
|
|
1211
|
+
if (u.length === 0 || !document.activeElement) return;
|
|
1212
|
+
const w = u.indexOf(document.activeElement);
|
|
1213
|
+
w < u.length - 1 ? u[w + 1].focus({ preventScroll: !0 }) : u[0].focus({ preventScroll: !0 });
|
|
1215
1214
|
}
|
|
1216
1215
|
});
|
|
1217
1216
|
}
|
|
1218
1217
|
function x() {
|
|
1219
1218
|
Qe(() => {
|
|
1220
1219
|
if (Z.value) {
|
|
1221
|
-
const
|
|
1222
|
-
if (
|
|
1223
|
-
const w =
|
|
1220
|
+
const u = re(c.value);
|
|
1221
|
+
if (u.length === 0 || !document.activeElement) return;
|
|
1222
|
+
const w = u.indexOf(document.activeElement);
|
|
1224
1223
|
if (w > 0) {
|
|
1225
|
-
|
|
1224
|
+
u[w - 1].focus({ preventScroll: !0 });
|
|
1226
1225
|
return;
|
|
1227
1226
|
}
|
|
1228
|
-
|
|
1227
|
+
u.at(-1)?.focus({ preventScroll: !0 });
|
|
1229
1228
|
}
|
|
1230
1229
|
});
|
|
1231
1230
|
}
|
|
1232
|
-
ae(
|
|
1233
|
-
|
|
1234
|
-
}),
|
|
1235
|
-
toggle:
|
|
1231
|
+
ae(h, (u) => {
|
|
1232
|
+
u && a.autofocusFirst && m();
|
|
1233
|
+
}), o({
|
|
1234
|
+
toggle: W,
|
|
1236
1235
|
show: te,
|
|
1237
1236
|
hide: X,
|
|
1238
|
-
init:
|
|
1239
|
-
focusFirst:
|
|
1237
|
+
init: me,
|
|
1238
|
+
focusFirst: m,
|
|
1240
1239
|
focusFirstListElement: R,
|
|
1241
1240
|
focusNext: z,
|
|
1242
1241
|
focusPrev: x,
|
|
1243
1242
|
customPosition: G
|
|
1244
1243
|
});
|
|
1245
|
-
const { itemRole: ue } =
|
|
1244
|
+
const { itemRole: ue } = Aa({
|
|
1246
1245
|
role: _e,
|
|
1247
|
-
expanded:
|
|
1246
|
+
expanded: h,
|
|
1248
1247
|
focused: Z,
|
|
1249
|
-
hovered:
|
|
1248
|
+
hovered: Wt(c)
|
|
1250
1249
|
});
|
|
1251
|
-
Me("Escape", (
|
|
1252
|
-
|
|
1253
|
-
}), Me("ArrowDown", (
|
|
1254
|
-
|
|
1255
|
-
}), Me("ArrowUp", (
|
|
1256
|
-
|
|
1257
|
-
}), Me([" ", "Enter"], (
|
|
1258
|
-
const w =
|
|
1259
|
-
|
|
1250
|
+
Me("Escape", (u) => {
|
|
1251
|
+
h.value && (u.preventDefault(), X());
|
|
1252
|
+
}), Me("ArrowDown", (u) => {
|
|
1253
|
+
h.value && Z.value && (u.preventDefault(), z());
|
|
1254
|
+
}), Me("ArrowUp", (u) => {
|
|
1255
|
+
h.value && Z.value && (u.preventDefault(), x());
|
|
1256
|
+
}), Me([" ", "Enter"], (u) => {
|
|
1257
|
+
const w = u.target;
|
|
1258
|
+
h.value && Z.value && w && w?.click();
|
|
1260
1259
|
});
|
|
1261
|
-
const
|
|
1260
|
+
const Le = {
|
|
1262
1261
|
"before-enter": () => {
|
|
1263
|
-
|
|
1262
|
+
i(h.value ? "beforeExpand" : "beforeCollapse"), i("beforeEnter");
|
|
1264
1263
|
},
|
|
1265
1264
|
"after-leave": () => {
|
|
1266
|
-
|
|
1265
|
+
i(h.value ? "afterExpand" : "afterCollapse"), i("afterLeave");
|
|
1267
1266
|
},
|
|
1268
1267
|
enter: () => {
|
|
1269
|
-
|
|
1268
|
+
i("enter");
|
|
1270
1269
|
},
|
|
1271
1270
|
"after-enter": () => {
|
|
1272
|
-
|
|
1271
|
+
i("afterEnter");
|
|
1273
1272
|
},
|
|
1274
1273
|
"enter-cancelled": () => {
|
|
1275
|
-
|
|
1274
|
+
i("enterCancelled");
|
|
1276
1275
|
},
|
|
1277
1276
|
"before-leave": () => {
|
|
1278
|
-
|
|
1277
|
+
i("beforeLeave");
|
|
1279
1278
|
},
|
|
1280
1279
|
leave: () => {
|
|
1281
|
-
|
|
1280
|
+
i("leave");
|
|
1282
1281
|
},
|
|
1283
1282
|
"leave-cancelled": () => {
|
|
1284
|
-
|
|
1283
|
+
i("leaveCancelled");
|
|
1285
1284
|
}
|
|
1286
1285
|
};
|
|
1287
|
-
return (
|
|
1288
|
-
default: E(() => [
|
|
1289
|
-
init:
|
|
1286
|
+
return (u, w) => (v(), L(le, null, [we(l(ye), null, {
|
|
1287
|
+
default: E(() => [_(u.$slots, "default", F(K({
|
|
1288
|
+
init: me,
|
|
1290
1289
|
show: te,
|
|
1291
1290
|
hide: X,
|
|
1292
|
-
toggle:
|
|
1293
|
-
expanded:
|
|
1294
|
-
aria:
|
|
1291
|
+
toggle: W,
|
|
1292
|
+
expanded: l(h),
|
|
1293
|
+
aria: l(Be)
|
|
1295
1294
|
})))]),
|
|
1296
1295
|
_: 3
|
|
1297
|
-
}), we(yl, A({ name:
|
|
1296
|
+
}), we(yl, A({ name: u.transitionName }, wl(Le), { persisted: "" }), {
|
|
1298
1297
|
default: E(() => [gt(fe("div", {
|
|
1299
1298
|
ref_key: "floatingEl",
|
|
1300
|
-
ref:
|
|
1301
|
-
style: Et(
|
|
1302
|
-
class: Ge(
|
|
1299
|
+
ref: c,
|
|
1300
|
+
style: Et(l(ge)),
|
|
1301
|
+
class: Ge(l(Oe))
|
|
1303
1302
|
}, [
|
|
1304
|
-
|
|
1303
|
+
a.arrow ? (v(), L("div", {
|
|
1305
1304
|
key: 0,
|
|
1306
1305
|
ref_key: "arrowEl",
|
|
1307
|
-
ref:
|
|
1308
|
-
style: Et(
|
|
1306
|
+
ref: b,
|
|
1307
|
+
style: Et(l(V)),
|
|
1309
1308
|
class: "vv-dropdown__arrow"
|
|
1310
1309
|
}, null, 4)) : I("v-if", !0),
|
|
1311
|
-
|
|
1310
|
+
_(u.$slots, "before", F(K({
|
|
1312
1311
|
show: te,
|
|
1313
1312
|
hide: X,
|
|
1314
|
-
toggle:
|
|
1315
|
-
expanded:
|
|
1313
|
+
toggle: W,
|
|
1314
|
+
expanded: l(h)
|
|
1316
1315
|
}))),
|
|
1317
|
-
fe("div", A(
|
|
1318
|
-
id:
|
|
1316
|
+
fe("div", A(l(g), {
|
|
1317
|
+
id: l(y),
|
|
1319
1318
|
ref_key: "listEl",
|
|
1320
1319
|
ref: C,
|
|
1321
|
-
tabindex:
|
|
1322
|
-
role:
|
|
1323
|
-
"aria-labelledby":
|
|
1320
|
+
tabindex: l(h) ? void 0 : -1,
|
|
1321
|
+
role: l(_e),
|
|
1322
|
+
"aria-labelledby": l(Ie),
|
|
1324
1323
|
class: "vv-dropdown__list"
|
|
1325
|
-
}), [
|
|
1324
|
+
}), [_(u.$slots, "items", F(K({
|
|
1326
1325
|
show: te,
|
|
1327
1326
|
hide: X,
|
|
1328
|
-
toggle:
|
|
1329
|
-
expanded:
|
|
1330
|
-
role:
|
|
1331
|
-
})))], 16,
|
|
1332
|
-
|
|
1327
|
+
toggle: W,
|
|
1328
|
+
expanded: l(h),
|
|
1329
|
+
role: l(ue)
|
|
1330
|
+
})))], 16, Da),
|
|
1331
|
+
_(u.$slots, "after", F(K({
|
|
1333
1332
|
show: te,
|
|
1334
1333
|
hide: X,
|
|
1335
|
-
toggle:
|
|
1336
|
-
expanded:
|
|
1334
|
+
toggle: W,
|
|
1335
|
+
expanded: l(h)
|
|
1337
1336
|
})))
|
|
1338
|
-
], 6), [[Il,
|
|
1337
|
+
], 6), [[Il, l(h)]])]),
|
|
1339
1338
|
_: 3
|
|
1340
1339
|
}, 16, ["name"])], 64));
|
|
1341
1340
|
}
|
|
1342
|
-
}), nl =
|
|
1341
|
+
}), nl = ja, Fa = {
|
|
1343
1342
|
class: "vv-dropdown-optgroup",
|
|
1344
1343
|
role: "presentation",
|
|
1345
1344
|
tabindex: "-1"
|
|
1346
|
-
},
|
|
1347
|
-
...
|
|
1345
|
+
}, Ta = { name: "VvDropdownOptgroup" }, Ma = /* @__PURE__ */ U({
|
|
1346
|
+
...Ta,
|
|
1348
1347
|
props: { ...Pe },
|
|
1349
1348
|
setup(e) {
|
|
1350
|
-
const
|
|
1351
|
-
return (
|
|
1349
|
+
const o = e;
|
|
1350
|
+
return (t, a) => (v(), L("li", Fa, [_(t.$slots, "default", {}, () => [ee(j(o.label), 1)])]));
|
|
1352
1351
|
}
|
|
1353
|
-
}), il =
|
|
1354
|
-
...
|
|
1355
|
-
props:
|
|
1352
|
+
}), il = Ma, Ra = { name: "VvDropdownItem" }, xa = /* @__PURE__ */ U({
|
|
1353
|
+
...Ra,
|
|
1354
|
+
props: Ea,
|
|
1356
1355
|
setup(e) {
|
|
1357
|
-
const
|
|
1358
|
-
|
|
1359
|
-
const
|
|
1360
|
-
return ae(
|
|
1361
|
-
|
|
1362
|
-
}), (
|
|
1356
|
+
const o = e, { role: t, expanded: a } = _a(), i = N(null);
|
|
1357
|
+
Na({ expanded: a });
|
|
1358
|
+
const r = Wt(i), { focused: y } = zt(i), { focused: g } = mt(i);
|
|
1359
|
+
return ae(r, (O) => {
|
|
1360
|
+
O && o.focusOnHover && (y.value = !0);
|
|
1361
|
+
}), (O, d) => (v(), L("div", A({ role: l(t) }, {
|
|
1363
1362
|
ref_key: "element",
|
|
1364
|
-
ref:
|
|
1365
|
-
class: ["vv-dropdown__item", { "focus-visible":
|
|
1366
|
-
}), [O
|
|
1363
|
+
ref: i,
|
|
1364
|
+
class: ["vv-dropdown__item", { "focus-visible": l(y) || l(g) }]
|
|
1365
|
+
}), [_(O.$slots, "default")], 16));
|
|
1367
1366
|
}
|
|
1368
|
-
}),
|
|
1369
|
-
...
|
|
1370
|
-
props:
|
|
1367
|
+
}), Ka = xa, Ga = ["title"], qa = { name: "VvDropdownOption" }, Wa = /* @__PURE__ */ U({
|
|
1368
|
+
...qa,
|
|
1369
|
+
props: Ia,
|
|
1371
1370
|
setup(e) {
|
|
1372
|
-
const
|
|
1373
|
-
disabled:
|
|
1374
|
-
selected:
|
|
1375
|
-
unselectable:
|
|
1376
|
-
}))),
|
|
1377
|
-
return (
|
|
1378
|
-
class: Ge(
|
|
1379
|
-
tabindex:
|
|
1380
|
-
"aria-selected":
|
|
1381
|
-
"aria-disabled":
|
|
1382
|
-
"focus-on-hover":
|
|
1371
|
+
const o = e, { modifiers: t } = pe(o), a = Ce("vv-dropdown-option", t, s(() => ({
|
|
1372
|
+
disabled: o.disabled,
|
|
1373
|
+
selected: o.selected,
|
|
1374
|
+
unselectable: o.unselectable && o.selected
|
|
1375
|
+
}))), i = s(() => o.selected ? o.unselectable ? o.deselectHintLabel : o.selectedHintLabel : o.disabled ? "" : o.selectHintLabel);
|
|
1376
|
+
return (r, y) => (v(), H(Ka, {
|
|
1377
|
+
class: Ge(l(a)),
|
|
1378
|
+
tabindex: r.disabled ? -1 : 0,
|
|
1379
|
+
"aria-selected": r.selected,
|
|
1380
|
+
"aria-disabled": r.disabled,
|
|
1381
|
+
"focus-on-hover": r.focusOnHover
|
|
1383
1382
|
}, {
|
|
1384
|
-
default: E(() => [
|
|
1383
|
+
default: E(() => [_(r.$slots, "default"), fe("span", {
|
|
1385
1384
|
class: "vv-dropdown-option__hint",
|
|
1386
|
-
title:
|
|
1387
|
-
}, [
|
|
1388
|
-
disabled:
|
|
1389
|
-
selected:
|
|
1390
|
-
unselectable:
|
|
1391
|
-
})), () => [ee(
|
|
1385
|
+
title: l(i)
|
|
1386
|
+
}, [_(r.$slots, "hint", F(K({
|
|
1387
|
+
disabled: r.disabled,
|
|
1388
|
+
selected: r.selected,
|
|
1389
|
+
unselectable: r.unselectable
|
|
1390
|
+
})), () => [ee(j(l(i)), 1)])], 8, Ga)]),
|
|
1392
1391
|
_: 3
|
|
1393
1392
|
}, 8, [
|
|
1394
1393
|
"class",
|
|
@@ -1403,17 +1402,17 @@ var Na = [
|
|
|
1403
1402
|
...Zt,
|
|
1404
1403
|
...el,
|
|
1405
1404
|
...tt,
|
|
1406
|
-
...We,
|
|
1407
1405
|
...qe,
|
|
1406
|
+
...We,
|
|
1408
1407
|
...Je,
|
|
1409
|
-
...
|
|
1408
|
+
...je,
|
|
1410
1409
|
...ke,
|
|
1411
1410
|
...ze,
|
|
1412
1411
|
...be,
|
|
1413
|
-
...
|
|
1412
|
+
...ht,
|
|
1414
1413
|
...et,
|
|
1414
|
+
..._t,
|
|
1415
1415
|
...St,
|
|
1416
|
-
...Ot,
|
|
1417
1416
|
...Pe,
|
|
1418
1417
|
...Xt,
|
|
1419
1418
|
multiple: Boolean,
|
|
@@ -1445,58 +1444,56 @@ function Gt() {
|
|
|
1445
1444
|
}
|
|
1446
1445
|
};
|
|
1447
1446
|
}
|
|
1448
|
-
function
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1447
|
+
function za(e, o, t) {
|
|
1448
|
+
let a = o;
|
|
1449
|
+
if (Array.isArray(e) && e.length) {
|
|
1450
|
+
const i = e[0];
|
|
1451
|
+
i() === o && (a = t);
|
|
1452
|
+
}
|
|
1453
|
+
if (typeof e == "function" && e() === o && (a = t), typeof e == "object") {
|
|
1454
|
+
let i = e.default;
|
|
1455
|
+
typeof i == "function" && (i = i()), (typeof i == "object" ? JSON.stringify(i) === JSON.stringify(o) : i === o) && (a = t);
|
|
1456
|
+
}
|
|
1457
|
+
return a;
|
|
1458
|
+
}
|
|
1459
|
+
function sl(e, o, t) {
|
|
1460
|
+
const a = $t(), i = s(() => {
|
|
1461
|
+
if (a?.defaults.value?.[e])
|
|
1462
|
+
return a.defaults.value[e];
|
|
1452
1463
|
});
|
|
1453
|
-
return
|
|
1454
|
-
if (
|
|
1455
|
-
const
|
|
1456
|
-
return Object.keys(
|
|
1457
|
-
const
|
|
1458
|
-
|
|
1459
|
-
if (Array.isArray(b[u])) {
|
|
1460
|
-
const v = b[u];
|
|
1461
|
-
v.length && v[0] === _ && (y[u] = a[u]);
|
|
1462
|
-
}
|
|
1463
|
-
if (typeof b[u] == "function") {
|
|
1464
|
-
const v = b[u];
|
|
1465
|
-
v() === _ && (y[u] = a[u]);
|
|
1466
|
-
}
|
|
1467
|
-
if (typeof b[u] == "object") {
|
|
1468
|
-
let v = b[u].default;
|
|
1469
|
-
typeof v == "function" && (v = v()), typeof v == "object" ? JSON.stringify(v) === JSON.stringify(_) && (y[u] = a[u]) : v === _ && (y[u] = a[u]);
|
|
1470
|
-
}
|
|
1471
|
-
}
|
|
1472
|
-
return y;
|
|
1464
|
+
return s(() => {
|
|
1465
|
+
if (i.value === void 0) return t;
|
|
1466
|
+
const r = i.value, y = o, g = t;
|
|
1467
|
+
return Object.keys(y).reduce((O, d) => {
|
|
1468
|
+
const $ = g[d];
|
|
1469
|
+
return O[d] = d in r ? za(y[d], $, r[d]) : $, O;
|
|
1473
1470
|
}, {});
|
|
1474
1471
|
});
|
|
1475
1472
|
}
|
|
1476
|
-
function ul(e,
|
|
1477
|
-
const { focused:
|
|
1478
|
-
return ae(
|
|
1479
|
-
|
|
1480
|
-
}), { focused:
|
|
1473
|
+
function ul(e, o) {
|
|
1474
|
+
const { focused: t } = zt(e);
|
|
1475
|
+
return ae(t, (a) => {
|
|
1476
|
+
o(a ? "focus" : "blur", l(e));
|
|
1477
|
+
}), { focused: t };
|
|
1481
1478
|
}
|
|
1482
1479
|
function dl(e) {
|
|
1483
|
-
const { options:
|
|
1480
|
+
const { options: o, labelKey: t, valueKey: a, disabledKey: i } = pe(e);
|
|
1484
1481
|
return {
|
|
1485
|
-
options:
|
|
1486
|
-
getOptionLabel: (
|
|
1487
|
-
getOptionValue: (
|
|
1488
|
-
isOptionDisabled: (
|
|
1489
|
-
getOptionGrouped: (
|
|
1482
|
+
options: o,
|
|
1483
|
+
getOptionLabel: (d) => typeof d == "string" ? d : typeof t.value == "function" ? t.value(d) : String(t.value ? ut(d, t.value) : d),
|
|
1484
|
+
getOptionValue: (d) => typeof d == "string" ? d : typeof a.value == "function" ? a.value(d) : a.value ? ut(d, a.value) : d,
|
|
1485
|
+
isOptionDisabled: (d) => typeof d == "string" ? !1 : typeof i.value == "function" ? i.value(d) : i.value ? !!ut(d, i.value) : !1,
|
|
1486
|
+
getOptionGrouped: (d) => typeof d == "string" ? [] : typeof d == "object" && d && "options" in d ? d.options : []
|
|
1490
1487
|
};
|
|
1491
1488
|
}
|
|
1492
|
-
var
|
|
1489
|
+
var Ja = ["for"], Ua = { class: "vv-select__wrapper" }, Ya = {
|
|
1493
1490
|
key: 0,
|
|
1494
1491
|
class: "vv-select__input-before"
|
|
1495
|
-
},
|
|
1492
|
+
}, Qa = { class: "vv-select__inner" }, Xa = ["id"], Za = ["disabled", "hidden"], eo = ["disabled", "value"], to = ["disabled", "label"], lo = ["disabled", "value"], ao = {
|
|
1496
1493
|
key: 2,
|
|
1497
1494
|
class: "vv-select__input-after"
|
|
1498
|
-
},
|
|
1499
|
-
...
|
|
1495
|
+
}, oo = { name: "VvSelect" }, ro = /* @__PURE__ */ U({
|
|
1496
|
+
...oo,
|
|
1500
1497
|
props: Gt(),
|
|
1501
1498
|
emits: [
|
|
1502
1499
|
"update:modelValue",
|
|
@@ -1504,160 +1501,160 @@ var qa = ["for"], za = { class: "vv-select__wrapper" }, Ja = {
|
|
|
1504
1501
|
"blur",
|
|
1505
1502
|
"clear"
|
|
1506
1503
|
],
|
|
1507
|
-
setup(e, { emit:
|
|
1508
|
-
const
|
|
1509
|
-
function
|
|
1510
|
-
return typeof
|
|
1504
|
+
setup(e, { emit: o }) {
|
|
1505
|
+
const t = e, a = o, i = bt(), r = sl("VvSelect", Gt(), t), y = N(), { HintSlot: g, hasHintLabelOrSlot: O, hasInvalidLabelOrSlot: d, hintSlotScope: $ } = al(r, i), { focused: c } = ul(y, a);
|
|
1506
|
+
function b(m) {
|
|
1507
|
+
return typeof m == "string" ? !1 : m.options?.length;
|
|
1511
1508
|
}
|
|
1512
|
-
const { id: C, modifiers: P, disabled: G, readonly: T, loading: Y, icon:
|
|
1513
|
-
get: () =>
|
|
1514
|
-
set: (
|
|
1515
|
-
if (Array.isArray(
|
|
1516
|
-
|
|
1509
|
+
const { id: C, modifiers: P, disabled: G, readonly: T, loading: Y, icon: q, iconPosition: S, invalid: k, valid: ie, floating: Q, multiple: ge } = pe(t), se = ot(C), V = s(() => `${se.value}-hint`), M = s(() => t.disabled || t.readonly), Ee = s(() => M.value ? -1 : t.tabindex), h = s({
|
|
1510
|
+
get: () => t.modelValue,
|
|
1511
|
+
set: (m) => {
|
|
1512
|
+
if (Array.isArray(m) && (m = m.filter((R) => R !== void 0), m.length === 0 && !t.unselectable && y.value)) {
|
|
1513
|
+
y.value.value = String(t.modelValue);
|
|
1517
1514
|
return;
|
|
1518
1515
|
}
|
|
1519
|
-
|
|
1516
|
+
a("update:modelValue", m);
|
|
1520
1517
|
}
|
|
1521
|
-
}), te =
|
|
1522
|
-
ae(xl(
|
|
1523
|
-
|
|
1518
|
+
}), te = s(() => Array.isArray(h.value) ? h.value.length > 0 : h.value !== void 0 && h.value !== null), X = s(() => M.value ? !1 : t.unselectable);
|
|
1519
|
+
ae(xl(y), (m) => {
|
|
1520
|
+
m && t.autofocus && (c.value = !0);
|
|
1524
1521
|
});
|
|
1525
|
-
const { hasIconBefore:
|
|
1526
|
-
if (
|
|
1527
|
-
if (
|
|
1528
|
-
}), Be = Ce("vv-select", P,
|
|
1522
|
+
const { hasIconBefore: W, hasIconAfter: me } = at(q, S), Ie = s(() => {
|
|
1523
|
+
if (t.invalid === !0) return !0;
|
|
1524
|
+
if (t.valid === !0) return !1;
|
|
1525
|
+
}), Be = Ce("vv-select", P, s(() => ({
|
|
1529
1526
|
valid: ie.value,
|
|
1530
1527
|
invalid: k.value,
|
|
1531
1528
|
loading: Y.value,
|
|
1532
1529
|
disabled: G.value,
|
|
1533
1530
|
readonly: T.value,
|
|
1534
|
-
"icon-before":
|
|
1535
|
-
"icon-after":
|
|
1531
|
+
"icon-before": W.value !== void 0,
|
|
1532
|
+
"icon-after": me.value !== void 0,
|
|
1536
1533
|
dirty: te.value,
|
|
1537
|
-
focus:
|
|
1534
|
+
focus: c.value && !M.value,
|
|
1538
1535
|
floating: Q.value,
|
|
1539
|
-
multiple:
|
|
1540
|
-
}))), { getOptionLabel: ye, getOptionValue: he, isOptionDisabled: _e, getOptionGrouped: oe } = dl(
|
|
1541
|
-
ae(() =>
|
|
1542
|
-
if (
|
|
1543
|
-
const R = he(
|
|
1544
|
-
|
|
1536
|
+
multiple: ge.value
|
|
1537
|
+
}))), { getOptionLabel: ye, getOptionValue: he, isOptionDisabled: _e, getOptionGrouped: oe } = dl(t);
|
|
1538
|
+
ae(() => t.options, (m) => {
|
|
1539
|
+
if (m?.length && t.autoselectFirst && !te.value) {
|
|
1540
|
+
const R = he(m[0]);
|
|
1541
|
+
h.value = t.multiple ? [R] : R;
|
|
1545
1542
|
}
|
|
1546
1543
|
}, { immediate: !0 });
|
|
1547
1544
|
function Oe() {
|
|
1548
|
-
Array.isArray(
|
|
1545
|
+
Array.isArray(h.value) ? h.value = [] : h.value = void 0, a("clear");
|
|
1549
1546
|
}
|
|
1550
|
-
const Z =
|
|
1551
|
-
name:
|
|
1547
|
+
const Z = s(() => ({
|
|
1548
|
+
name: t.name,
|
|
1552
1549
|
tabindex: Ee.value,
|
|
1553
1550
|
disabled: M.value,
|
|
1554
|
-
required:
|
|
1555
|
-
size:
|
|
1556
|
-
autocomplete:
|
|
1557
|
-
multiple:
|
|
1551
|
+
required: t.required,
|
|
1552
|
+
size: t.size,
|
|
1553
|
+
autocomplete: t.autocomplete,
|
|
1554
|
+
multiple: t.multiple,
|
|
1558
1555
|
"aria-invalid": Ie.value,
|
|
1559
|
-
"aria-describedby":
|
|
1560
|
-
"aria-errormessage":
|
|
1561
|
-
})), re =
|
|
1562
|
-
valid:
|
|
1563
|
-
invalid:
|
|
1564
|
-
modelValue:
|
|
1556
|
+
"aria-describedby": O.value ? V.value : void 0,
|
|
1557
|
+
"aria-errormessage": d.value ? V.value : void 0
|
|
1558
|
+
})), re = s(() => ({
|
|
1559
|
+
valid: t.valid,
|
|
1560
|
+
invalid: t.invalid,
|
|
1561
|
+
modelValue: t.modelValue
|
|
1565
1562
|
}));
|
|
1566
|
-
return (
|
|
1567
|
-
|
|
1563
|
+
return (m, R) => (v(), L("div", { class: Ge(l(Be)) }, [
|
|
1564
|
+
m.label ? (v(), L("label", {
|
|
1568
1565
|
key: 0,
|
|
1569
|
-
for:
|
|
1570
|
-
},
|
|
1571
|
-
fe("div",
|
|
1572
|
-
|
|
1573
|
-
fe("div",
|
|
1574
|
-
|
|
1566
|
+
for: l(se)
|
|
1567
|
+
}, j(m.label), 9, Ja)) : I("v-if", !0),
|
|
1568
|
+
fe("div", Ua, [
|
|
1569
|
+
m.$slots.before ? (v(), L("div", Ya, [_(m.$slots, "before", F(K(l(re))))])) : I("v-if", !0),
|
|
1570
|
+
fe("div", Qa, [
|
|
1571
|
+
l(W) ? (v(), H(ce, A({ key: 0 }, l(W), { class: "vv-select__icon" }), null, 16)) : I("v-if", !0),
|
|
1575
1572
|
gt(fe("select", A({
|
|
1576
|
-
id:
|
|
1573
|
+
id: l(se),
|
|
1577
1574
|
ref_key: "selectEl",
|
|
1578
|
-
ref:
|
|
1579
|
-
},
|
|
1575
|
+
ref: y
|
|
1576
|
+
}, l(Z), { "onUpdate:modelValue": R[0] || (R[0] = (z) => ct(h) ? h.value = z : null) }), [m.placeholder ? (v(), L("option", {
|
|
1580
1577
|
key: 0,
|
|
1581
1578
|
value: void 0,
|
|
1582
|
-
disabled: !
|
|
1583
|
-
hidden: !
|
|
1584
|
-
},
|
|
1579
|
+
disabled: !l(X),
|
|
1580
|
+
hidden: !l(X)
|
|
1581
|
+
}, j(m.placeholder), 9, Za)) : I("v-if", !0), (v(!0), L(le, null, xe(m.options, (z, x) => (v(), L(le, null, [b(z) ? (v(), L("optgroup", {
|
|
1585
1582
|
key: `group-${x}`,
|
|
1586
|
-
disabled:
|
|
1587
|
-
label:
|
|
1588
|
-
}, [(
|
|
1589
|
-
key: `group-${x}-item-${
|
|
1590
|
-
disabled:
|
|
1591
|
-
value:
|
|
1592
|
-
},
|
|
1583
|
+
disabled: l(_e)(z),
|
|
1584
|
+
label: l(ye)(z)
|
|
1585
|
+
}, [(v(!0), L(le, null, xe(l(oe)(z), (ue, Le) => (v(), L("option", {
|
|
1586
|
+
key: `group-${x}-item-${Le}`,
|
|
1587
|
+
disabled: l(_e)(ue),
|
|
1588
|
+
value: l(he)(ue)
|
|
1589
|
+
}, j(l(ye)(ue)), 9, lo))), 128))], 8, to)) : (v(), L("option", {
|
|
1593
1590
|
key: x,
|
|
1594
|
-
disabled:
|
|
1595
|
-
value:
|
|
1596
|
-
},
|
|
1597
|
-
|
|
1591
|
+
disabled: l(_e)(z),
|
|
1592
|
+
value: l(he)(z)
|
|
1593
|
+
}, j(l(ye)(z)), 9, eo))], 64))), 256))], 16, Xa), [[Cl, l(h)]]),
|
|
1594
|
+
l(me) ? (v(), H(ce, A({ key: 1 }, l(me), { class: "vv-select__icon vv-select__icon-after" }), null, 16)) : I("v-if", !0)
|
|
1598
1595
|
]),
|
|
1599
|
-
|
|
1596
|
+
l(X) && l(r).showClearAction ? (v(), H(l(ol), {
|
|
1600
1597
|
key: 1,
|
|
1601
1598
|
"input-type": "select",
|
|
1602
|
-
label:
|
|
1603
|
-
icon:
|
|
1604
|
-
disabled: !
|
|
1599
|
+
label: m.labelClear,
|
|
1600
|
+
icon: m.iconClear,
|
|
1601
|
+
disabled: !l(te),
|
|
1605
1602
|
onClear: Oe
|
|
1606
1603
|
}, null, 8, [
|
|
1607
1604
|
"label",
|
|
1608
1605
|
"icon",
|
|
1609
1606
|
"disabled"
|
|
1610
1607
|
])) : I("v-if", !0),
|
|
1611
|
-
|
|
1608
|
+
m.$slots.after ? (v(), L("div", ao, [_(m.$slots, "after", F(K(l(re))))])) : I("v-if", !0)
|
|
1612
1609
|
]),
|
|
1613
|
-
we(
|
|
1614
|
-
id:
|
|
1610
|
+
we(l(g), {
|
|
1611
|
+
id: l(V),
|
|
1615
1612
|
class: "vv-select__hint"
|
|
1616
1613
|
}, vt({ _: 2 }, [
|
|
1617
|
-
|
|
1614
|
+
m.$slots.hint ? {
|
|
1618
1615
|
name: "hint",
|
|
1619
|
-
fn: E(() => [
|
|
1616
|
+
fn: E(() => [_(m.$slots, "hint", F(K(l($))))]),
|
|
1620
1617
|
key: "0"
|
|
1621
1618
|
} : void 0,
|
|
1622
|
-
|
|
1619
|
+
m.$slots.loading ? {
|
|
1623
1620
|
name: "loading",
|
|
1624
|
-
fn: E(() => [
|
|
1621
|
+
fn: E(() => [_(m.$slots, "loading", F(K(l($))))]),
|
|
1625
1622
|
key: "1"
|
|
1626
1623
|
} : void 0,
|
|
1627
|
-
|
|
1624
|
+
m.$slots.valid ? {
|
|
1628
1625
|
name: "valid",
|
|
1629
|
-
fn: E(() => [
|
|
1626
|
+
fn: E(() => [_(m.$slots, "valid", F(K(l($))))]),
|
|
1630
1627
|
key: "2"
|
|
1631
1628
|
} : void 0,
|
|
1632
|
-
|
|
1629
|
+
m.$slots.invalid ? {
|
|
1633
1630
|
name: "invalid",
|
|
1634
|
-
fn: E(() => [
|
|
1631
|
+
fn: E(() => [_(m.$slots, "invalid", F(K(l($))))]),
|
|
1635
1632
|
key: "3"
|
|
1636
1633
|
} : void 0
|
|
1637
1634
|
]), 1032, ["id"])
|
|
1638
1635
|
], 2));
|
|
1639
1636
|
}
|
|
1640
|
-
}),
|
|
1637
|
+
}), no = ro, io = ["id"], so = ["id", "for"], uo = [
|
|
1641
1638
|
"id",
|
|
1642
1639
|
"aria-controls",
|
|
1643
1640
|
"placeholder"
|
|
1644
|
-
],
|
|
1641
|
+
], vo = {
|
|
1645
1642
|
key: 0,
|
|
1646
1643
|
class: "vv-select__input-before"
|
|
1647
|
-
},
|
|
1644
|
+
}, fo = { class: "vv-select__inner" }, co = [
|
|
1648
1645
|
"aria-controls",
|
|
1649
1646
|
"aria-expanded",
|
|
1650
1647
|
"aria-labelledby",
|
|
1651
1648
|
"aria-describedby",
|
|
1652
1649
|
"aria-errormessage",
|
|
1653
1650
|
"tabindex"
|
|
1654
|
-
],
|
|
1651
|
+
], po = {
|
|
1655
1652
|
key: 0,
|
|
1656
1653
|
class: "vv-select__value"
|
|
1657
|
-
},
|
|
1654
|
+
}, bo = ["aria-label", "onClick"], go = {
|
|
1658
1655
|
key: 2,
|
|
1659
1656
|
class: "vv-select__input-after"
|
|
1660
|
-
},
|
|
1657
|
+
}, mo = {
|
|
1661
1658
|
name: "VvCombobox",
|
|
1662
1659
|
components: {
|
|
1663
1660
|
VvDropdown: nl,
|
|
@@ -1665,8 +1662,8 @@ var qa = ["for"], za = { class: "vv-select__wrapper" }, Ja = {
|
|
|
1665
1662
|
VvDropdownOptgroup: il,
|
|
1666
1663
|
VvButton: rl
|
|
1667
1664
|
}
|
|
1668
|
-
},
|
|
1669
|
-
...
|
|
1665
|
+
}, yo = /* @__PURE__ */ U({
|
|
1666
|
+
...mo,
|
|
1670
1667
|
props: /* @__PURE__ */ Ct(Tt(), {
|
|
1671
1668
|
search: {
|
|
1672
1669
|
type: String,
|
|
@@ -1684,16 +1681,16 @@ var qa = ["for"], za = { class: "vv-select__wrapper" }, Ja = {
|
|
|
1684
1681
|
"clear",
|
|
1685
1682
|
"change:search"
|
|
1686
1683
|
], ["update:search"]),
|
|
1687
|
-
setup(e, { emit:
|
|
1688
|
-
const
|
|
1684
|
+
setup(e, { emit: o }) {
|
|
1685
|
+
const t = e, a = o, i = bt(), r = sl("VvCombobox", Tt(), t), y = N(null), g = N(null), O = N(null), d = N(), { HintSlot: $, hasHintLabelOrSlot: c, hasInvalidLabelOrSlot: b, hintSlotScope: C } = al(r, i), { focused: P } = ul(y, a), { focused: G } = mt(O);
|
|
1689
1686
|
let T;
|
|
1690
1687
|
function Y() {
|
|
1691
1688
|
clearTimeout(T), T = setTimeout(() => {
|
|
1692
|
-
!P.value && !G.value && k.value &&
|
|
1689
|
+
!P.value && !G.value && k.value && ge();
|
|
1693
1690
|
}, 50);
|
|
1694
1691
|
}
|
|
1695
1692
|
Sl(() => clearTimeout(T)), ae(P, (n) => {
|
|
1696
|
-
if (
|
|
1693
|
+
if (t.autoOpen) {
|
|
1697
1694
|
if (n && !k.value) {
|
|
1698
1695
|
clearTimeout(T), Q();
|
|
1699
1696
|
return;
|
|
@@ -1707,9 +1704,9 @@ var qa = ["for"], za = { class: "vv-select__wrapper" }, Ja = {
|
|
|
1707
1704
|
}
|
|
1708
1705
|
!P.value && k.value && Y();
|
|
1709
1706
|
});
|
|
1710
|
-
const
|
|
1711
|
-
ae(
|
|
1712
|
-
|
|
1707
|
+
const q = Pl(e, "search"), S = Rl(q, s(() => Number(t.debounceSearch)));
|
|
1708
|
+
ae(S, () => {
|
|
1709
|
+
a("update:search", S.value), a("change:search", S.value);
|
|
1713
1710
|
});
|
|
1714
1711
|
const k = N(!1);
|
|
1715
1712
|
function ie() {
|
|
@@ -1718,363 +1715,363 @@ var qa = ["for"], za = { class: "vv-select__wrapper" }, Ja = {
|
|
|
1718
1715
|
function Q() {
|
|
1719
1716
|
R.value || k.value || (k.value = !0);
|
|
1720
1717
|
}
|
|
1721
|
-
function
|
|
1718
|
+
function ge() {
|
|
1722
1719
|
R.value || !k.value || (k.value = !1);
|
|
1723
1720
|
}
|
|
1724
1721
|
function se() {
|
|
1725
|
-
|
|
1722
|
+
r.value.searchable && g.value && g.value.focus({ preventScroll: !0 });
|
|
1726
1723
|
}
|
|
1727
|
-
function
|
|
1728
|
-
|
|
1724
|
+
function V() {
|
|
1725
|
+
r.value.keepSearch || (q.value = "");
|
|
1729
1726
|
}
|
|
1730
1727
|
function M(n) {
|
|
1731
1728
|
return typeof n == "string" ? !1 : n.options?.length;
|
|
1732
1729
|
}
|
|
1733
|
-
const { id: Ee, icon:
|
|
1734
|
-
get: () => Array.isArray(
|
|
1730
|
+
const { id: Ee, icon: h, iconPosition: te, modifiers: X, disabled: W, required: me, readonly: Ie, loading: Be, valid: ye, invalid: he, floating: _e } = pe(t), oe = ot(Ee), Oe = s(() => `${oe.value}-hint`), Z = s(() => `${oe.value}-dropdown`), re = s(() => `${oe.value}-search`), m = s(() => `${oe.value}-label`), R = s(() => t.disabled || t.readonly), z = s(() => R.value ? -1 : t.tabindex), x = s({
|
|
1731
|
+
get: () => Array.isArray(t.modelValue) ? t.modelValue : t.modelValue !== void 0 && t.modelValue !== null ? [t.modelValue] : [],
|
|
1735
1732
|
set: (n) => {
|
|
1736
|
-
|
|
1733
|
+
a("update:modelValue", t.multiple || Array.isArray(t.modelValue) ? n : n.pop());
|
|
1737
1734
|
}
|
|
1738
|
-
}), ue =
|
|
1739
|
-
disabled:
|
|
1740
|
-
required:
|
|
1735
|
+
}), ue = s(() => x.value.length), Le = s(() => ue.value > 0), u = s(() => t.multiple ? t.maxValues === void 0 ? 1 / 0 : Number(t.maxValues) : 1), w = s(() => R.value || !t.unselectable ? !1 : Number(t.minValues) === 0 || ue.value > Number(t.minValues)), Se = s(() => R.value ? !1 : t.multiple ? ue.value < u.value : !0), Fe = N(!1), wt = s(() => Fe.value || Be.value), { hasIconBefore: rt, hasIconAfter: nt } = at(h, te), vl = Ce("vv-select", X, s(() => ({
|
|
1736
|
+
disabled: W.value,
|
|
1737
|
+
required: me.value,
|
|
1741
1738
|
loading: wt.value,
|
|
1742
1739
|
readonly: Ie.value,
|
|
1743
1740
|
"icon-before": rt.value !== void 0,
|
|
1744
1741
|
"icon-after": nt.value !== void 0,
|
|
1745
1742
|
valid: ye.value,
|
|
1746
1743
|
invalid: he.value,
|
|
1747
|
-
dirty:
|
|
1744
|
+
dirty: Le.value,
|
|
1748
1745
|
focus: (P.value || G.value || k.value) && !R.value,
|
|
1749
1746
|
floating: _e.value,
|
|
1750
|
-
badges:
|
|
1751
|
-
}))), Ue = N(/* @__PURE__ */ new Set()), { getOptionLabel: ne, getOptionValue: it, getOptionGrouped: Ae, isOptionDisabled: fl } = dl(
|
|
1747
|
+
badges: t.badges
|
|
1748
|
+
}))), Ue = N(/* @__PURE__ */ new Set()), { getOptionLabel: ne, getOptionValue: it, getOptionGrouped: Ae, isOptionDisabled: fl } = dl(t), Vt = s(() => {
|
|
1752
1749
|
const n = [...Ue.value];
|
|
1753
|
-
for (const
|
|
1750
|
+
for (const p of t.options) M(p) ? n.push(...Ae(p)) : n.push(p);
|
|
1754
1751
|
return n;
|
|
1755
|
-
}), Ne =
|
|
1756
|
-
const n = [...
|
|
1757
|
-
for (const
|
|
1758
|
-
const B = it(
|
|
1759
|
-
return typeof B == "object" && typeof
|
|
1760
|
-
}) || n.push(
|
|
1752
|
+
}), Ne = s(() => {
|
|
1753
|
+
const n = [...t.options, ...Ue.value];
|
|
1754
|
+
for (const p of x.value) Vt.value.some((f) => {
|
|
1755
|
+
const B = it(f);
|
|
1756
|
+
return typeof B == "object" && typeof p == "object" ? JSON.stringify(B) === JSON.stringify(p) : B === p;
|
|
1757
|
+
}) || n.push(p);
|
|
1761
1758
|
return n;
|
|
1762
1759
|
});
|
|
1763
1760
|
ae(Ue, (n) => {
|
|
1764
|
-
n.size > 0 &&
|
|
1761
|
+
n.size > 0 && a("update:options", Ne.value);
|
|
1765
1762
|
});
|
|
1766
1763
|
function Ye(n) {
|
|
1767
|
-
return fl(n) || !Se.value &&
|
|
1764
|
+
return fl(n) || !Se.value && !$e(n);
|
|
1768
1765
|
}
|
|
1769
1766
|
const Te = Tl(async () => {
|
|
1770
|
-
if (
|
|
1771
|
-
|
|
1772
|
-
const
|
|
1773
|
-
return
|
|
1767
|
+
if (r.value.searchFunction) {
|
|
1768
|
+
Fe.value = !0;
|
|
1769
|
+
const p = await Promise.resolve(r.value.searchFunction(S.value, Ne.value));
|
|
1770
|
+
return Fe.value = !1, p;
|
|
1774
1771
|
}
|
|
1775
|
-
const n =
|
|
1776
|
-
return n ? Ne.value?.reduce((
|
|
1777
|
-
if (M(
|
|
1778
|
-
const B = ne(
|
|
1779
|
-
if (B.includes(n))
|
|
1772
|
+
const n = S.value.toLowerCase().trim();
|
|
1773
|
+
return n ? Ne.value?.reduce((p, f) => {
|
|
1774
|
+
if (M(f)) {
|
|
1775
|
+
const B = ne(f).toLowerCase(), J = Ae(f).filter((He) => ne(He).toLowerCase().includes(n));
|
|
1776
|
+
if (B.includes(n)) p.push(f);
|
|
1780
1777
|
else if (J.length > 0) {
|
|
1781
|
-
const He = typeof
|
|
1782
|
-
...
|
|
1778
|
+
const He = typeof f == "object" ? {
|
|
1779
|
+
...f,
|
|
1783
1780
|
options: J
|
|
1784
|
-
} :
|
|
1785
|
-
|
|
1781
|
+
} : f;
|
|
1782
|
+
p.push(He);
|
|
1786
1783
|
}
|
|
1787
|
-
return
|
|
1784
|
+
return p;
|
|
1788
1785
|
}
|
|
1789
|
-
return ne(
|
|
1786
|
+
return ne(f).toLowerCase().includes(n) && p.push(f), p;
|
|
1790
1787
|
}, []) : Ne.value;
|
|
1791
1788
|
});
|
|
1792
|
-
function
|
|
1793
|
-
const
|
|
1794
|
-
return typeof
|
|
1789
|
+
function $e(n) {
|
|
1790
|
+
const p = it(n);
|
|
1791
|
+
return typeof p == "object" ? x.value.some((f) => typeof f == "object" ? JSON.stringify(f) === JSON.stringify(p) : !1) : x.value.includes(p);
|
|
1795
1792
|
}
|
|
1796
|
-
const De =
|
|
1793
|
+
const De = s(() => Ne.value.reduce((n, p) => M(p) ? [...n, ...Ae(p)] : [...n, p], []).filter((n) => $e(n))), kt = s(() => De.value.map((n) => ne(n)).join(t.separator));
|
|
1797
1794
|
function cl() {
|
|
1798
|
-
|
|
1795
|
+
t.autoOpen ? Q() : ie();
|
|
1799
1796
|
}
|
|
1800
1797
|
function de(n) {
|
|
1801
|
-
const
|
|
1802
|
-
|
|
1798
|
+
const p = $e(n), f = it(n);
|
|
1799
|
+
p && w.value ? x.value = x.value.filter((B) => typeof f == "object" && typeof B == "object" ? JSON.stringify(B) !== JSON.stringify(f) : B !== f) : !p && Se.value && (t.multiple ? x.value = [...x.value, f] : x.value = [f]), !t.multiple && !t.keepOpen && ge();
|
|
1803
1800
|
}
|
|
1804
1801
|
function pl() {
|
|
1805
|
-
x.value = [],
|
|
1802
|
+
x.value = [], a("update:search", ""), a("clear");
|
|
1806
1803
|
}
|
|
1807
1804
|
ae(Ne, (n) => {
|
|
1808
|
-
if (n?.length &&
|
|
1809
|
-
const
|
|
1810
|
-
if (
|
|
1811
|
-
de(
|
|
1805
|
+
if (n?.length && t.autoselectFirst && !Le.value) {
|
|
1806
|
+
const p = n.find((B) => !M(B));
|
|
1807
|
+
if (p) {
|
|
1808
|
+
de(p);
|
|
1812
1809
|
return;
|
|
1813
1810
|
}
|
|
1814
|
-
const
|
|
1815
|
-
if (
|
|
1816
|
-
const B = Ae(
|
|
1811
|
+
const f = n.find((B) => M(B));
|
|
1812
|
+
if (f) {
|
|
1813
|
+
const B = Ae(f);
|
|
1817
1814
|
B.length && de(B[0]);
|
|
1818
1815
|
}
|
|
1819
1816
|
}
|
|
1820
1817
|
}, { immediate: !0 });
|
|
1821
|
-
const bl =
|
|
1818
|
+
const bl = s(() => ({
|
|
1822
1819
|
id: oe.value,
|
|
1823
|
-
name:
|
|
1820
|
+
name: t.name,
|
|
1824
1821
|
tabindex: z.value,
|
|
1825
1822
|
valid: ye.value,
|
|
1826
|
-
validLabel:
|
|
1823
|
+
validLabel: r.value.validLabel,
|
|
1827
1824
|
invalid: he.value,
|
|
1828
|
-
invalidLabel:
|
|
1829
|
-
hintLabel:
|
|
1825
|
+
invalidLabel: r.value.invalidLabel,
|
|
1826
|
+
hintLabel: r.value.hintLabel,
|
|
1830
1827
|
loading: wt.value,
|
|
1831
|
-
loadingLabel:
|
|
1832
|
-
disabled:
|
|
1828
|
+
loadingLabel: r.value.loadingLabel,
|
|
1829
|
+
disabled: W.value,
|
|
1833
1830
|
readonly: Ie.value,
|
|
1834
|
-
modifiers:
|
|
1835
|
-
options:
|
|
1836
|
-
labelKey:
|
|
1837
|
-
valueKey:
|
|
1838
|
-
icon:
|
|
1839
|
-
iconPosition:
|
|
1840
|
-
floating:
|
|
1831
|
+
modifiers: r.value.modifiers,
|
|
1832
|
+
options: r.value.options,
|
|
1833
|
+
labelKey: r.value.labelKey,
|
|
1834
|
+
valueKey: r.value.valueKey,
|
|
1835
|
+
icon: r.value.icon,
|
|
1836
|
+
iconPosition: r.value.iconPosition,
|
|
1837
|
+
floating: r.value.floating,
|
|
1841
1838
|
unselectable: w.value,
|
|
1842
|
-
autoselectFirst:
|
|
1843
|
-
multiple:
|
|
1844
|
-
label:
|
|
1845
|
-
placeholder:
|
|
1846
|
-
modelValue:
|
|
1847
|
-
})),
|
|
1839
|
+
autoselectFirst: r.value.autoselectFirst,
|
|
1840
|
+
multiple: r.value.multiple,
|
|
1841
|
+
label: r.value.label,
|
|
1842
|
+
placeholder: r.value.placeholder,
|
|
1843
|
+
modelValue: t.modelValue
|
|
1844
|
+
})), gl = s(() => ({
|
|
1848
1845
|
id: Z.value,
|
|
1849
|
-
reference:
|
|
1850
|
-
placement:
|
|
1851
|
-
strategy:
|
|
1852
|
-
transitionName:
|
|
1853
|
-
offset:
|
|
1854
|
-
shift:
|
|
1855
|
-
flip:
|
|
1856
|
-
autoPlacement:
|
|
1857
|
-
arrow:
|
|
1858
|
-
autofocusFirst:
|
|
1859
|
-
triggerWidth:
|
|
1860
|
-
modifiers:
|
|
1861
|
-
})), Pt =
|
|
1862
|
-
valid:
|
|
1863
|
-
invalid:
|
|
1864
|
-
modelValue:
|
|
1846
|
+
reference: O.value,
|
|
1847
|
+
placement: r.value.placement,
|
|
1848
|
+
strategy: r.value.strategy,
|
|
1849
|
+
transitionName: r.value.transitionName,
|
|
1850
|
+
offset: r.value.offset,
|
|
1851
|
+
shift: r.value.shift,
|
|
1852
|
+
flip: r.value.flip,
|
|
1853
|
+
autoPlacement: r.value.autoPlacement,
|
|
1854
|
+
arrow: r.value.arrow,
|
|
1855
|
+
autofocusFirst: r.value.searchable ? !0 : r.value.autofocusFirst,
|
|
1856
|
+
triggerWidth: r.value.triggerWidth,
|
|
1857
|
+
modifiers: r.value.dropdownModifiers
|
|
1858
|
+
})), Pt = s(() => ({
|
|
1859
|
+
valid: t.valid,
|
|
1860
|
+
invalid: t.invalid,
|
|
1861
|
+
modelValue: t.modelValue
|
|
1865
1862
|
}));
|
|
1866
1863
|
Me([" ", "Enter"], (n) => {
|
|
1867
|
-
|
|
1868
|
-
}, { target:
|
|
1869
|
-
function
|
|
1864
|
+
t.autoOpen || !k.value && P.value && (n.preventDefault(), n.stopImmediatePropagation(), ie());
|
|
1865
|
+
}, { target: y });
|
|
1866
|
+
function ml() {
|
|
1870
1867
|
if (Te.value?.length) {
|
|
1871
1868
|
if (Te.value.length === 1) {
|
|
1872
1869
|
const n = Te.value[0];
|
|
1873
1870
|
if (M(n)) {
|
|
1874
|
-
const
|
|
1875
|
-
|
|
1871
|
+
const p = Ae(n);
|
|
1872
|
+
p.length && de(p[0]);
|
|
1876
1873
|
return;
|
|
1877
1874
|
}
|
|
1878
1875
|
de(n);
|
|
1879
1876
|
return;
|
|
1880
1877
|
}
|
|
1881
|
-
|
|
1878
|
+
d.value?.focusFirstListElement();
|
|
1882
1879
|
return;
|
|
1883
1880
|
}
|
|
1884
|
-
if (
|
|
1885
|
-
const n =
|
|
1886
|
-
if (!n ||
|
|
1881
|
+
if (r.value.addable) {
|
|
1882
|
+
const n = q.value.trim();
|
|
1883
|
+
if (!n || Vt.value.some((p) => ne(p).toLowerCase() === n.toLowerCase())) return;
|
|
1887
1884
|
Ue.value.add(n), de(n);
|
|
1888
1885
|
}
|
|
1889
1886
|
}
|
|
1890
|
-
return (n,
|
|
1887
|
+
return (n, p) => n.native ? (v(), H(no, A({ key: 1 }, l(bl), { "onUpdate:modelValue": p[3] || (p[3] = (f) => a("update:modelValue", f)) }), null, 16)) : (v(), L("div", {
|
|
1891
1888
|
key: 0,
|
|
1892
|
-
id:
|
|
1893
|
-
class: Ge(
|
|
1889
|
+
id: l(oe),
|
|
1890
|
+
class: Ge(l(vl))
|
|
1894
1891
|
}, [
|
|
1895
|
-
n.label ? (
|
|
1892
|
+
n.label ? (v(), L("label", {
|
|
1896
1893
|
key: 0,
|
|
1897
|
-
id:
|
|
1898
|
-
for:
|
|
1899
|
-
},
|
|
1894
|
+
id: l(m),
|
|
1895
|
+
for: l(r).searchable ? l(re) : void 0
|
|
1896
|
+
}, j(n.label), 9, so)) : I("v-if", !0),
|
|
1900
1897
|
fe("div", {
|
|
1901
1898
|
ref_key: "wrapperEl",
|
|
1902
|
-
ref:
|
|
1899
|
+
ref: O,
|
|
1903
1900
|
class: "vv-select__wrapper"
|
|
1904
1901
|
}, [we(nl, A({
|
|
1905
1902
|
ref_key: "dropdownEl",
|
|
1906
|
-
ref:
|
|
1907
|
-
modelValue:
|
|
1908
|
-
"onUpdate:modelValue":
|
|
1909
|
-
},
|
|
1910
|
-
role:
|
|
1903
|
+
ref: d,
|
|
1904
|
+
modelValue: l(k),
|
|
1905
|
+
"onUpdate:modelValue": p[2] || (p[2] = (f) => ct(k) ? k.value = f : null)
|
|
1906
|
+
}, l(gl), {
|
|
1907
|
+
role: l(Ze).listbox,
|
|
1911
1908
|
onAfterExpand: se,
|
|
1912
|
-
onAfterCollapse:
|
|
1909
|
+
onAfterCollapse: V
|
|
1913
1910
|
}), vt({
|
|
1914
|
-
default: E(({ aria:
|
|
1915
|
-
n.$slots.before ? (
|
|
1916
|
-
fe("div",
|
|
1917
|
-
|
|
1911
|
+
default: E(({ aria: f }) => [
|
|
1912
|
+
n.$slots.before ? (v(), L("div", vo, [_(n.$slots, "before", F(K(l(Pt))))])) : I("v-if", !0),
|
|
1913
|
+
fe("div", fo, [
|
|
1914
|
+
l(rt) ? (v(), H(ce, A({ key: 0 }, l(rt), { class: "vv-select__icon" }), null, 16)) : I("v-if", !0),
|
|
1918
1915
|
fe("div", A({
|
|
1919
1916
|
ref_key: "inputEl",
|
|
1920
|
-
ref:
|
|
1921
|
-
},
|
|
1917
|
+
ref: y
|
|
1918
|
+
}, f, {
|
|
1922
1919
|
class: "vv-select__input",
|
|
1923
1920
|
role: "combobox",
|
|
1924
|
-
"aria-controls":
|
|
1925
|
-
"aria-expanded":
|
|
1926
|
-
"aria-labelledby":
|
|
1927
|
-
"aria-describedby":
|
|
1928
|
-
"aria-errormessage":
|
|
1929
|
-
tabindex:
|
|
1921
|
+
"aria-controls": l(Z),
|
|
1922
|
+
"aria-expanded": l(k),
|
|
1923
|
+
"aria-labelledby": l(m),
|
|
1924
|
+
"aria-describedby": l(c) ? l(Oe) : void 0,
|
|
1925
|
+
"aria-errormessage": l(b) ? l(Oe) : void 0,
|
|
1926
|
+
tabindex: l(z),
|
|
1930
1927
|
onClickPassive: cl
|
|
1931
|
-
}), [
|
|
1932
|
-
selectedOptions:
|
|
1928
|
+
}), [l(kt) ? _(n.$slots, "value", F(A({ key: 0 }, {
|
|
1929
|
+
selectedOptions: l(De),
|
|
1933
1930
|
onInput: de
|
|
1934
|
-
})), () => [n.badges ? (
|
|
1931
|
+
})), () => [n.badges ? (v(!0), L(le, { key: 1 }, xe(l(De), (B, J) => (v(), H(ca, {
|
|
1935
1932
|
key: J,
|
|
1936
1933
|
modifiers: n.badgeModifiers,
|
|
1937
1934
|
class: "vv-select__badge"
|
|
1938
1935
|
}, {
|
|
1939
|
-
default: E(() => [ee(
|
|
1936
|
+
default: E(() => [ee(j(l(ne)(B)) + " ", 1), l(w) ? (v(), L("button", {
|
|
1940
1937
|
key: 0,
|
|
1941
|
-
"aria-label":
|
|
1938
|
+
"aria-label": l(r).deselectActionLabel,
|
|
1942
1939
|
type: "button",
|
|
1943
1940
|
onClick: Al((He) => de(B), ["stop"])
|
|
1944
|
-
}, [we(ce, { name: "close" })], 8,
|
|
1941
|
+
}, [we(ce, { name: "close" })], 8, bo)) : I("v-if", !0)]),
|
|
1945
1942
|
_: 2
|
|
1946
|
-
}, 1032, ["modifiers"]))), 128)) : (
|
|
1947
|
-
|
|
1943
|
+
}, 1032, ["modifiers"]))), 128)) : (v(), L("div", po, j(l(kt)), 1))]) : _(n.$slots, "placeholder", { key: 1 }, () => [ee(j(n.placeholder), 1)])], 16, co),
|
|
1944
|
+
l(nt) ? (v(), H(ce, A({ key: 1 }, l(nt), { class: "vv-select__icon vv-select__icon-after" }), null, 16)) : I("v-if", !0)
|
|
1948
1945
|
]),
|
|
1949
|
-
|
|
1946
|
+
l(w) && l(r).showClearAction ? (v(), H(l(ol), {
|
|
1950
1947
|
key: 1,
|
|
1951
1948
|
"input-type": "select",
|
|
1952
1949
|
label: n.labelClear,
|
|
1953
1950
|
icon: n.iconClear,
|
|
1954
|
-
disabled: !
|
|
1951
|
+
disabled: !l(Le),
|
|
1955
1952
|
onClear: pl
|
|
1956
1953
|
}, null, 8, [
|
|
1957
1954
|
"label",
|
|
1958
1955
|
"icon",
|
|
1959
1956
|
"disabled"
|
|
1960
1957
|
])) : I("v-if", !0),
|
|
1961
|
-
n.$slots.after ? (
|
|
1958
|
+
n.$slots.after ? (v(), L("div", go, [_(n.$slots, "after", F(K(l(Pt))))])) : I("v-if", !0)
|
|
1962
1959
|
]),
|
|
1963
|
-
items: E(() => [!
|
|
1964
|
-
default: E(() => [
|
|
1965
|
-
option:
|
|
1966
|
-
selectedOptions:
|
|
1967
|
-
}), () => [ee(
|
|
1960
|
+
items: E(() => [!l(W) && l(Te)?.length ? (v(!0), L(le, { key: 0 }, xe(l(Te), (f, B) => (v(), L(le, { key: B }, [M(f) ? (v(), L(le, { key: 0 }, [we(il, { label: l(ne)(f) }, {
|
|
1961
|
+
default: E(() => [_(n.$slots, "option-group", A({ ref_for: !0 }, {
|
|
1962
|
+
option: f,
|
|
1963
|
+
selectedOptions: l(De)
|
|
1964
|
+
}), () => [ee(j(l(ne)(f)), 1)])]),
|
|
1968
1965
|
_: 2
|
|
1969
|
-
}, 1032, ["label"]), (
|
|
1970
|
-
selected:
|
|
1966
|
+
}, 1032, ["label"]), (v(!0), L(le, null, xe(l(Ae)(f), (J, He) => (v(), H(Re, A({ ref_for: !0 }, {
|
|
1967
|
+
selected: $e(J),
|
|
1971
1968
|
disabled: Ye(J),
|
|
1972
|
-
unselectable:
|
|
1973
|
-
deselectHintLabel:
|
|
1974
|
-
selectHintLabel:
|
|
1975
|
-
selectedHintLabel:
|
|
1969
|
+
unselectable: l(w),
|
|
1970
|
+
deselectHintLabel: l(r).deselectHintLabel,
|
|
1971
|
+
selectHintLabel: l(r).selectHintLabel,
|
|
1972
|
+
selectedHintLabel: l(r).selectedHintLabel,
|
|
1976
1973
|
focusOnHover: n.focusOnHover
|
|
1977
1974
|
}, {
|
|
1978
1975
|
key: He,
|
|
1979
1976
|
class: "vv-dropdown-option",
|
|
1980
|
-
onClickPassive: (
|
|
1977
|
+
onClickPassive: (ho) => de(J)
|
|
1981
1978
|
}), {
|
|
1982
|
-
default: E(() => [
|
|
1979
|
+
default: E(() => [_(n.$slots, "option", A({ ref_for: !0 }, {
|
|
1983
1980
|
option: J,
|
|
1984
|
-
selectedOptions:
|
|
1985
|
-
selected:
|
|
1981
|
+
selectedOptions: l(De),
|
|
1982
|
+
selected: $e(J),
|
|
1986
1983
|
disabled: Ye(J)
|
|
1987
|
-
}), () => [ee(
|
|
1984
|
+
}), () => [ee(j(l(ne)(J)), 1)])]),
|
|
1988
1985
|
_: 2
|
|
1989
|
-
}, 1040, ["onClickPassive"]))), 128))], 64)) : (
|
|
1986
|
+
}, 1040, ["onClickPassive"]))), 128))], 64)) : (v(), H(Re, A({
|
|
1990
1987
|
key: 1,
|
|
1991
1988
|
ref_for: !0
|
|
1992
1989
|
}, {
|
|
1993
|
-
selected:
|
|
1994
|
-
disabled: Ye(
|
|
1995
|
-
unselectable:
|
|
1996
|
-
deselectHintLabel:
|
|
1997
|
-
selectHintLabel:
|
|
1998
|
-
selectedHintLabel:
|
|
1990
|
+
selected: $e(f),
|
|
1991
|
+
disabled: Ye(f),
|
|
1992
|
+
unselectable: l(w),
|
|
1993
|
+
deselectHintLabel: l(r).deselectHintLabel,
|
|
1994
|
+
selectHintLabel: l(r).selectHintLabel,
|
|
1995
|
+
selectedHintLabel: l(r).selectedHintLabel,
|
|
1999
1996
|
focusOnHover: n.focusOnHover
|
|
2000
1997
|
}, {
|
|
2001
1998
|
class: "vv-dropdown-option",
|
|
2002
|
-
onClickPassive: (J) => de(
|
|
1999
|
+
onClickPassive: (J) => de(f)
|
|
2003
2000
|
}), {
|
|
2004
|
-
default: E(() => [
|
|
2005
|
-
option:
|
|
2006
|
-
selectedOptions:
|
|
2007
|
-
selected:
|
|
2008
|
-
disabled: Ye(
|
|
2009
|
-
}), () => [ee(
|
|
2001
|
+
default: E(() => [_(n.$slots, "option", A({ ref_for: !0 }, {
|
|
2002
|
+
option: f,
|
|
2003
|
+
selectedOptions: l(De),
|
|
2004
|
+
selected: $e(f),
|
|
2005
|
+
disabled: Ye(f)
|
|
2006
|
+
}), () => [ee(j(l(ne)(f)), 1)])]),
|
|
2010
2007
|
_: 2
|
|
2011
|
-
}, 1040, ["onClickPassive"]))], 64))), 128)) : n.options.length ? (
|
|
2008
|
+
}, 1040, ["onClickPassive"]))], 64))), 128)) : n.options.length ? (v(), H(Re, {
|
|
2012
2009
|
key: 2,
|
|
2013
2010
|
modifiers: "inert"
|
|
2014
2011
|
}, {
|
|
2015
|
-
default: E(() => [
|
|
2012
|
+
default: E(() => [_(n.$slots, "no-results", {}, () => [ee(j(l(r).addable ? l(r).addOptionHintLabel : l(r).noResultsLabel), 1)])]),
|
|
2016
2013
|
_: 3
|
|
2017
|
-
})) : (
|
|
2014
|
+
})) : (v(), H(Re, {
|
|
2018
2015
|
key: 1,
|
|
2019
2016
|
modifiers: "inert"
|
|
2020
2017
|
}, {
|
|
2021
|
-
default: E(() => [
|
|
2018
|
+
default: E(() => [_(n.$slots, "no-options", {}, () => [ee(j(l(r).addable && q.value.length ? l(r).addOptionHintLabel : l(r).noOptionsLabel), 1)])]),
|
|
2022
2019
|
_: 3
|
|
2023
2020
|
}))]),
|
|
2024
|
-
after: E(() => [
|
|
2021
|
+
after: E(() => [_(n.$slots, "dropdown::after", {}, () => [l(d)?.customPosition ? (v(), H(rl, {
|
|
2025
2022
|
key: 0,
|
|
2026
|
-
label:
|
|
2023
|
+
label: l(r).closeLabel,
|
|
2027
2024
|
modifiers: "secondary",
|
|
2028
|
-
onClick:
|
|
2025
|
+
onClick: p[1] || (p[1] = (f) => l(d).hide())
|
|
2029
2026
|
}, null, 8, ["label"])) : I("v-if", !0)])]),
|
|
2030
2027
|
_: 2
|
|
2031
|
-
}, [
|
|
2028
|
+
}, [l(r).searchable || n.$slots["dropdown::before"] ? {
|
|
2032
2029
|
name: "before",
|
|
2033
|
-
fn: E(() => [
|
|
2030
|
+
fn: E(() => [_(n.$slots, "dropdown::before"), l(r).searchable && !l(W) ? gt((v(), L("input", {
|
|
2034
2031
|
key: 0,
|
|
2035
|
-
id:
|
|
2032
|
+
id: l(re),
|
|
2036
2033
|
ref_key: "inputSearchEl",
|
|
2037
2034
|
ref: g,
|
|
2038
|
-
"onUpdate:modelValue":
|
|
2035
|
+
"onUpdate:modelValue": p[0] || (p[0] = (f) => q.value = f),
|
|
2039
2036
|
"aria-autocomplete": "list",
|
|
2040
|
-
"aria-controls":
|
|
2037
|
+
"aria-controls": l(Z),
|
|
2041
2038
|
autocomplete: "off",
|
|
2042
2039
|
spellcheck: "false",
|
|
2043
2040
|
type: "search",
|
|
2044
2041
|
class: "vv-dropdown__search",
|
|
2045
|
-
placeholder:
|
|
2046
|
-
onKeyup: Bl(
|
|
2047
|
-
}, null, 40,
|
|
2042
|
+
placeholder: l(r).searchPlaceholder,
|
|
2043
|
+
onKeyup: Bl(ml, ["enter"])
|
|
2044
|
+
}, null, 40, uo)), [[El, q.value]]) : I("v-if", !0)]),
|
|
2048
2045
|
key: "0"
|
|
2049
2046
|
} : void 0]), 1040, ["modelValue", "role"])], 512),
|
|
2050
|
-
we(
|
|
2051
|
-
id:
|
|
2047
|
+
we(l($), {
|
|
2048
|
+
id: l(Oe),
|
|
2052
2049
|
class: "vv-select__hint"
|
|
2053
2050
|
}, vt({ _: 2 }, [
|
|
2054
2051
|
n.$slots.hint ? {
|
|
2055
2052
|
name: "hint",
|
|
2056
|
-
fn: E(() => [
|
|
2053
|
+
fn: E(() => [_(n.$slots, "hint", F(K(l(C))))]),
|
|
2057
2054
|
key: "0"
|
|
2058
2055
|
} : void 0,
|
|
2059
2056
|
n.$slots.loading ? {
|
|
2060
2057
|
name: "loading",
|
|
2061
|
-
fn: E(() => [
|
|
2058
|
+
fn: E(() => [_(n.$slots, "loading", F(K(l(C))))]),
|
|
2062
2059
|
key: "1"
|
|
2063
2060
|
} : void 0,
|
|
2064
2061
|
n.$slots.valid ? {
|
|
2065
2062
|
name: "valid",
|
|
2066
|
-
fn: E(() => [
|
|
2063
|
+
fn: E(() => [_(n.$slots, "valid", F(K(l(C))))]),
|
|
2067
2064
|
key: "2"
|
|
2068
2065
|
} : void 0,
|
|
2069
2066
|
n.$slots.invalid ? {
|
|
2070
2067
|
name: "invalid",
|
|
2071
|
-
fn: E(() => [
|
|
2068
|
+
fn: E(() => [_(n.$slots, "invalid", F(K(l(C))))]),
|
|
2072
2069
|
key: "3"
|
|
2073
2070
|
} : void 0
|
|
2074
2071
|
]), 1032, ["id"])
|
|
2075
|
-
], 10,
|
|
2072
|
+
], 10, io));
|
|
2076
2073
|
}
|
|
2077
|
-
}),
|
|
2074
|
+
}), Eo = yo;
|
|
2078
2075
|
export {
|
|
2079
|
-
|
|
2076
|
+
Eo as default
|
|
2080
2077
|
};
|