@volverjs/ui-vue 0.0.3 → 0.0.4
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/LICENSE +1 -1
- package/README.md +52 -13
- package/dist/Volver.d.ts +5 -1
- package/dist/components/VvAccordion/VvAccordion.es.js +113 -66
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +159 -101
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAction/VvAction.es.js +170 -0
- package/dist/components/VvAction/VvAction.umd.js +1 -0
- package/dist/components/VvAction/VvAction.vue.d.ts +63 -0
- package/dist/components/VvAction/index.d.ts +24 -0
- package/dist/components/VvBadge/VvBadge.es.js +86 -16
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +97 -41
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvButton/VvButton.es.js +434 -251
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +50 -50
- package/dist/components/VvButton/index.d.ts +22 -67
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +118 -43
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvCard/VvCard.es.js +38 -25
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +334 -154
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +2 -2
- package/dist/components/VvCheckbox/index.d.ts +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +401 -204
- 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 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +950 -594
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +54 -30
- package/dist/components/VvCombobox/index.d.ts +18 -13
- package/dist/components/VvDialog/VvDialog.es.js +139 -64
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +276 -158
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +9 -9
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +61 -0
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +52 -0
- package/dist/components/VvDropdown/index.d.ts +6 -9
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +251 -0
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -0
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +30 -15
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +176 -0
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -0
- package/dist/components/VvIcon/VvIcon.es.js +48 -32
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +508 -344
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +11 -4
- package/dist/components/VvInputText/index.d.ts +13 -2
- package/dist/components/VvProgress/VvProgress.es.js +90 -20
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +305 -125
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +2 -2
- package/dist/components/VvRadio/index.d.ts +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +372 -175
- 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 -1
- package/dist/components/VvSelect/VvSelect.es.js +371 -216
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +11 -4
- package/dist/components/VvSelect/index.d.ts +5 -5
- package/dist/components/VvTextarea/VvTextarea.es.js +408 -244
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +11 -4
- package/dist/components/VvTextarea/index.d.ts +5 -5
- package/dist/components/VvTooltip/VvTooltip.es.js +88 -18
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/index.es.js +1913 -1521
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/dropdown/useInjectDropdown.d.ts +1 -1
- package/dist/composables/dropdown/useProvideDropdown.d.ts +2 -2
- package/dist/constants.d.ts +30 -0
- package/dist/directives/index.es.js +128 -0
- package/dist/directives/index.umd.js +1 -0
- package/dist/directives/v-tooltip.es.js +126 -0
- package/dist/directives/v-tooltip.umd.js +1 -0
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/index.es.js +2102 -1761
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +179 -11
- package/dist/resolvers/unplugin.d.ts +8 -8
- package/dist/resolvers/unplugin.es.js +51 -30
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/Combobox/Combobox.settings.d.ts +44 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +3 -2
- package/package.json +60 -34
- package/src/Volver.ts +12 -5
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAction/VvAction.vue +144 -0
- package/src/components/VvAction/index.ts +5 -0
- package/src/components/VvButton/VvButton.vue +31 -114
- package/src/components/VvButton/index.ts +6 -79
- package/src/components/VvCombobox/VvCombobox.vue +54 -42
- package/src/components/VvCombobox/index.ts +11 -9
- package/src/components/VvDropdown/VvDropdownAction.vue +44 -0
- package/src/components/VvDropdown/VvDropdownOption.vue +65 -0
- package/src/components/VvDropdown/index.ts +4 -9
- package/src/components/VvSelect/index.ts +2 -4
- package/src/composables/dropdown/useInjectDropdown.ts +1 -1
- package/src/composables/dropdown/useProvideDropdown.ts +7 -9
- package/src/composables/useModifiers.ts +4 -7
- package/src/constants.ts +36 -0
- package/src/props/index.ts +106 -14
- package/src/resolvers/unplugin.ts +81 -48
- package/src/stories/Accordion/AccordionSlots.stories.mdx +2 -2
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +2 -1
- package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +2 -1
- package/src/stories/Button/Button.stories.mdx +4 -2
- package/src/stories/Button/Button.test.ts +3 -1
- package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
- package/src/stories/Button/ButtonSlots.stories.mdx +8 -7
- package/src/stories/Button/ButtonState.stories.mdx +2 -11
- package/src/stories/Card/Card.stories.mdx +2 -1
- package/src/stories/Checkbox/Checkbox.stories.mdx +2 -1
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +2 -1
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +2 -1
- package/src/stories/Combobox/Combobox.settings.ts +44 -0
- package/src/stories/Combobox/Combobox.stories.mdx +40 -1
- package/src/stories/Dialog/Dialog.stories.mdx +2 -1
- package/src/stories/Dropdown/Dropdown.settings.ts +3 -2
- package/src/stories/Dropdown/Dropdown.stories.mdx +14 -12
- package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +56 -0
- package/src/stories/Dropdown/DropdownSlots.stories.mdx +14 -13
- package/src/stories/Icon/Icon.stories.mdx +2 -1
- package/src/stories/Icon/IconsCollection.stories.mdx +2 -1
- package/src/stories/InputText/InputText.stories.mdx +2 -1
- package/src/stories/Progress/Progress.stories.mdx +2 -1
- package/src/stories/Radio/Radio.stories.mdx +2 -1
- package/src/stories/RadioGroup/RadioGroup.stories.mdx +2 -1
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +2 -1
- package/src/stories/Select/Select.stories.mdx +2 -1
- package/src/stories/Textarea/Textarea.stories.mdx +2 -1
- package/src/stories/Tooltip/Tooltip.stories.mdx +2 -1
- package/src/stories/Tooltip/TooltipDirective.stories.mdx +2 -1
|
@@ -1,34 +1,104 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { iconExists as
|
|
3
|
-
import { autoPlacement as
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { inject as Ze, computed as i, unref as o, defineComponent as ne, ref as P, toRefs as Q, openBlock as p, createBlock as x, mergeProps as j, createCommentVNode as k, h as et, Fragment as K, provide as tt, useAttrs as Pt, watch as Y, nextTick as Ee, createElementBlock as g, createVNode as pe, withCtx as F, renderSlot as O, normalizeProps as T, guardReactiveProps as M, Transition as It, withDirectives as Te, createElementVNode as G, normalizeStyle as Je, normalizeClass as _e, vShow as lt, createTextVNode as J, toDisplayString as D, useSlots as ot, isRef as Ne, renderList as Le, vModelSelect as Bt, createSlots as At, withModifiers as Dt, vModelText as Ct } from "vue";
|
|
2
|
+
import { iconExists as $e, Icon as Nt, addIcon as Lt } from "@iconify/vue";
|
|
3
|
+
import { autoPlacement as Ye, flip as Ge, shift as Qe, size as Xe, offset as Ce, arrow as jt, useFloating as Ht, autoUpdate as Ft } from "@floating-ui/vue";
|
|
4
|
+
import { nanoid as xt } from "nanoid";
|
|
5
|
+
import { useVModel as Tt, onClickOutside as Mt, useFocusWithin as Me, onKeyStroke as ye, useElementHover as Rt, useFocus as nt, toReactive as Wt, useElementVisibility as Kt, refDebounced as zt } from "@vueuse/core";
|
|
6
|
+
import qt from "mitt";
|
|
7
|
+
var de = /* @__PURE__ */ ((t) => (t.left = "left", t.right = "right", t.top = "top", t.bottom = "bottom", t))(de || {}), at = /* @__PURE__ */ ((t) => (t.topStart = "top-start", t.topEnd = "top-end", t.bottomStart = "bottom-start", t.bottomEnd = "bottom-end", t.leftStart = "left-start", t.leftEnd = "left-end", t.rightStart = "right-start", t.rightEnd = "right-end", t))(at || {}), he = /* @__PURE__ */ ((t) => (t.before = "before", t.after = "after", t))(he || {}), je = /* @__PURE__ */ ((t) => (t.button = "button", t.submit = "submit", t.reset = "reset", t))(je || {}), st = /* @__PURE__ */ ((t) => (t.button = "button", t.link = "link", t.menuitem = "menuitem", t))(st || {}), Se = /* @__PURE__ */ ((t) => (t.listbox = "listbox", t.menu = "menu", t))(Se || {}), He = /* @__PURE__ */ ((t) => (t.option = "option", t.presentation = "presentation", t))(He || {}), rt = /* @__PURE__ */ ((t) => (t._blank = "_blank", t._self = "_self", t._parent = "_parent", t._top = "_top", t))(rt || {});
|
|
8
|
+
const Ut = Symbol.for("volver"), Jt = Symbol.for("dropdownTrigger"), it = Symbol.for("dropdownItem"), Yt = Symbol.for("dropdownAction"), Gt = {
|
|
9
|
+
/**
|
|
10
|
+
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
11
|
+
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
12
|
+
*/
|
|
13
|
+
to: {
|
|
14
|
+
type: [String, Object]
|
|
15
|
+
},
|
|
16
|
+
/**
|
|
17
|
+
* Anchor href
|
|
18
|
+
*/
|
|
19
|
+
href: String,
|
|
20
|
+
/**
|
|
21
|
+
* Anchor target
|
|
22
|
+
*/
|
|
23
|
+
target: {
|
|
24
|
+
type: String,
|
|
25
|
+
validator: (t) => Object.values(rt).includes(t)
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* Anchor rel
|
|
29
|
+
*/
|
|
30
|
+
rel: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "noopener noreferrer"
|
|
33
|
+
}
|
|
34
|
+
}, ut = {
|
|
35
|
+
/**
|
|
36
|
+
* Valid status
|
|
37
|
+
*/
|
|
6
38
|
valid: Boolean,
|
|
39
|
+
/**
|
|
40
|
+
* Valid label
|
|
41
|
+
*/
|
|
7
42
|
validLabel: [String, Array]
|
|
8
|
-
},
|
|
43
|
+
}, dt = {
|
|
44
|
+
/**
|
|
45
|
+
* Invalid status
|
|
46
|
+
*/
|
|
9
47
|
invalid: Boolean,
|
|
48
|
+
/**
|
|
49
|
+
* Invalid label
|
|
50
|
+
*/
|
|
10
51
|
invalidLabel: [String, Array]
|
|
11
|
-
},
|
|
52
|
+
}, ct = {
|
|
53
|
+
/**
|
|
54
|
+
* Loading status
|
|
55
|
+
*/
|
|
12
56
|
loading: Boolean,
|
|
13
|
-
|
|
14
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Loading label
|
|
59
|
+
*/
|
|
60
|
+
loadingLabel: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: "Loading..."
|
|
63
|
+
}
|
|
64
|
+
}, Ae = {
|
|
15
65
|
/**
|
|
16
66
|
* Whether the form control is disabled
|
|
17
67
|
*/
|
|
18
68
|
disabled: Boolean
|
|
69
|
+
}, Qt = {
|
|
70
|
+
/**
|
|
71
|
+
* Whether the item is selected
|
|
72
|
+
*/
|
|
73
|
+
selected: Boolean
|
|
74
|
+
}, Xt = {
|
|
75
|
+
/**
|
|
76
|
+
* Whether the item is active
|
|
77
|
+
*/
|
|
78
|
+
active: Boolean
|
|
79
|
+
}, Zt = {
|
|
80
|
+
/**
|
|
81
|
+
* Whether the item is pressed
|
|
82
|
+
*/
|
|
83
|
+
pressed: Boolean
|
|
19
84
|
}, Re = {
|
|
85
|
+
/**
|
|
86
|
+
* The item label
|
|
87
|
+
*/
|
|
88
|
+
label: [String, Number]
|
|
89
|
+
}, ft = {
|
|
20
90
|
/**
|
|
21
91
|
* The value is not editable
|
|
22
92
|
*/
|
|
23
93
|
readonly: Boolean
|
|
24
|
-
},
|
|
94
|
+
}, Ve = {
|
|
25
95
|
/**
|
|
26
96
|
* Component BEM modifiers
|
|
27
97
|
*/
|
|
28
98
|
modifiers: [String, Array]
|
|
29
|
-
},
|
|
99
|
+
}, vt = {
|
|
30
100
|
hintLabel: { type: String, default: "" }
|
|
31
|
-
},
|
|
101
|
+
}, pt = {
|
|
32
102
|
/**
|
|
33
103
|
* List of options, can be string[] or object[]
|
|
34
104
|
*/
|
|
@@ -48,7 +118,7 @@ const Ne = {
|
|
|
48
118
|
* Used when options are objects: key to use for option disabled
|
|
49
119
|
*/
|
|
50
120
|
disabledKey: { type: [String, Function], default: "disabled" }
|
|
51
|
-
},
|
|
121
|
+
}, mt = {
|
|
52
122
|
/**
|
|
53
123
|
* VvIcon name or props
|
|
54
124
|
* @see VVIcon
|
|
@@ -59,39 +129,39 @@ const Ne = {
|
|
|
59
129
|
*/
|
|
60
130
|
iconPosition: {
|
|
61
131
|
type: String,
|
|
62
|
-
default:
|
|
63
|
-
validation: (
|
|
132
|
+
default: he.before,
|
|
133
|
+
validation: (t) => Object.values(he).includes(t)
|
|
64
134
|
}
|
|
65
|
-
},
|
|
135
|
+
}, bt = {
|
|
66
136
|
/**
|
|
67
137
|
* Global attribute tabindex
|
|
68
138
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
|
|
69
139
|
*/
|
|
70
140
|
tabindex: { type: [String, Number], default: 0 }
|
|
71
|
-
},
|
|
141
|
+
}, yt = {
|
|
72
142
|
/**
|
|
73
143
|
* If true the label will be floating
|
|
74
144
|
*/
|
|
75
145
|
floating: Boolean
|
|
76
|
-
},
|
|
146
|
+
}, We = {
|
|
77
147
|
/**
|
|
78
148
|
* If true the input will be unselectable
|
|
79
149
|
*/
|
|
80
150
|
unselectable: { type: Boolean, default: !0 }
|
|
81
|
-
},
|
|
151
|
+
}, gt = {
|
|
82
152
|
/**
|
|
83
153
|
* Global attribute id
|
|
84
154
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
|
|
85
155
|
*/
|
|
86
156
|
id: [String, Number]
|
|
87
|
-
},
|
|
157
|
+
}, Fe = {
|
|
88
158
|
/**
|
|
89
159
|
* Dropdown placement
|
|
90
160
|
*/
|
|
91
161
|
placement: {
|
|
92
162
|
type: String,
|
|
93
|
-
default:
|
|
94
|
-
validator: (
|
|
163
|
+
default: de.bottom,
|
|
164
|
+
validator: (t) => Object.values(de).includes(t) || Object.values(at).includes(t)
|
|
95
165
|
},
|
|
96
166
|
/**
|
|
97
167
|
* Dropdown show / hide transition name
|
|
@@ -167,46 +237,59 @@ const Ne = {
|
|
|
167
237
|
triggerWidth: {
|
|
168
238
|
type: Boolean
|
|
169
239
|
}
|
|
170
|
-
},
|
|
171
|
-
...
|
|
240
|
+
}, ht = {
|
|
241
|
+
...gt,
|
|
172
242
|
/**
|
|
173
243
|
* Input / Textarea name
|
|
174
244
|
* Name of the form control. Submitted with the form as part of a name/value pair
|
|
175
245
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name
|
|
176
246
|
*/
|
|
177
247
|
name: { type: String, required: !0 }
|
|
178
|
-
},
|
|
248
|
+
}, el = {
|
|
179
249
|
/**
|
|
180
250
|
* Global attribute autofocus
|
|
181
251
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
|
|
182
252
|
*/
|
|
183
253
|
autofocus: Boolean
|
|
184
|
-
},
|
|
254
|
+
}, tl = {
|
|
185
255
|
/**
|
|
186
256
|
* Global attribute autocomplete
|
|
187
257
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
|
|
188
258
|
*/
|
|
189
259
|
autocomplete: { type: String, default: "off" }
|
|
190
|
-
}
|
|
260
|
+
};
|
|
261
|
+
({
|
|
262
|
+
...Ae,
|
|
263
|
+
...Re,
|
|
264
|
+
...Zt,
|
|
265
|
+
...Xt,
|
|
266
|
+
...Gt,
|
|
267
|
+
/**
|
|
268
|
+
* Button type
|
|
269
|
+
*/
|
|
270
|
+
type: je.button
|
|
271
|
+
});
|
|
272
|
+
const ll = [
|
|
191
273
|
"update:modelValue",
|
|
192
274
|
"change:search",
|
|
193
275
|
"focus",
|
|
194
276
|
"blur"
|
|
195
|
-
],
|
|
196
|
-
...
|
|
197
|
-
...
|
|
198
|
-
...
|
|
199
|
-
...
|
|
200
|
-
...
|
|
201
|
-
...
|
|
202
|
-
...
|
|
203
|
-
...
|
|
204
|
-
...
|
|
277
|
+
], ol = {
|
|
278
|
+
...ht,
|
|
279
|
+
...bt,
|
|
280
|
+
...ut,
|
|
281
|
+
...dt,
|
|
282
|
+
...vt,
|
|
283
|
+
...ct,
|
|
284
|
+
...Ae,
|
|
285
|
+
...ft,
|
|
286
|
+
...Ve,
|
|
287
|
+
...pt,
|
|
288
|
+
...mt,
|
|
289
|
+
...yt,
|
|
205
290
|
...We,
|
|
206
|
-
...
|
|
207
|
-
...
|
|
208
|
-
...Ke,
|
|
209
|
-
...$e,
|
|
291
|
+
...Fe,
|
|
292
|
+
...Re,
|
|
210
293
|
/**
|
|
211
294
|
* modelValue can be a string, number, boolean, object or array of string, number, boolean, object
|
|
212
295
|
*/
|
|
@@ -214,30 +297,30 @@ const Ne = {
|
|
|
214
297
|
type: [String, Number, Boolean, Object, Array],
|
|
215
298
|
default: void 0
|
|
216
299
|
},
|
|
217
|
-
/**
|
|
218
|
-
* Select input label
|
|
219
|
-
*/
|
|
220
|
-
label: String,
|
|
221
300
|
/**
|
|
222
301
|
* Label for no search results
|
|
223
302
|
*/
|
|
224
303
|
noResultsLabel: { type: String, default: "No results" },
|
|
304
|
+
/**
|
|
305
|
+
* Label for no options available
|
|
306
|
+
*/
|
|
307
|
+
noOptionsLabel: { type: String, default: "No options available" },
|
|
225
308
|
/**
|
|
226
309
|
* Label for selected option hint
|
|
227
310
|
*/
|
|
228
|
-
|
|
311
|
+
selectedHintLabel: { type: String, default: "Selected" },
|
|
229
312
|
/**
|
|
230
|
-
* Label for deselect button
|
|
313
|
+
* Label for deselect action button
|
|
231
314
|
*/
|
|
232
|
-
|
|
315
|
+
deselectActionLabel: { type: String, default: "Deselect" },
|
|
233
316
|
/**
|
|
234
317
|
* Label for select option hint
|
|
235
318
|
*/
|
|
236
|
-
|
|
319
|
+
selectHintLabel: { type: String, default: "Press enter to select" },
|
|
237
320
|
/**
|
|
238
321
|
* Label for deselected option hint
|
|
239
322
|
*/
|
|
240
|
-
|
|
323
|
+
deselectHintLabel: { type: String, default: "Press enter to remove" },
|
|
241
324
|
/**
|
|
242
325
|
* Select input placeholder
|
|
243
326
|
*/
|
|
@@ -291,7 +374,7 @@ const Ne = {
|
|
|
291
374
|
* Set dropdown width to the same as the trigger
|
|
292
375
|
*/
|
|
293
376
|
triggerWidth: {
|
|
294
|
-
|
|
377
|
+
...Fe.triggerWidth,
|
|
295
378
|
default: !0
|
|
296
379
|
},
|
|
297
380
|
/**
|
|
@@ -308,7 +391,7 @@ const Ne = {
|
|
|
308
391
|
* Close dropdown on select (not multiple)
|
|
309
392
|
*/
|
|
310
393
|
autoClose: Boolean
|
|
311
|
-
},
|
|
394
|
+
}, nl = {
|
|
312
395
|
/**
|
|
313
396
|
* Color
|
|
314
397
|
*/
|
|
@@ -401,63 +484,79 @@ const Ne = {
|
|
|
401
484
|
modifiers: {
|
|
402
485
|
type: [String, Array]
|
|
403
486
|
}
|
|
404
|
-
}
|
|
487
|
+
};
|
|
488
|
+
function al() {
|
|
489
|
+
return Ze(Ut);
|
|
490
|
+
}
|
|
491
|
+
function me(t, l, e) {
|
|
492
|
+
return i(() => {
|
|
493
|
+
const s = {
|
|
494
|
+
[t]: !0
|
|
495
|
+
}, n = typeof (l == null ? void 0 : l.value) == "string" ? l.value.split(" ") : l == null ? void 0 : l.value;
|
|
496
|
+
return n && Array.isArray(n) && n.forEach((f) => {
|
|
497
|
+
s[`${t}--${f}`] = !0;
|
|
498
|
+
}), e && Object.keys(e.value).forEach((f) => {
|
|
499
|
+
s[`${t}--${f}`] = o(e.value[f]);
|
|
500
|
+
}), s;
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
const sl = {
|
|
405
504
|
name: "VvIcon"
|
|
406
|
-
},
|
|
407
|
-
...
|
|
408
|
-
props:
|
|
409
|
-
setup(
|
|
410
|
-
const
|
|
411
|
-
const
|
|
412
|
-
return
|
|
413
|
-
(
|
|
414
|
-
const
|
|
415
|
-
if (
|
|
416
|
-
return
|
|
505
|
+
}, ge = /* @__PURE__ */ ne({
|
|
506
|
+
...sl,
|
|
507
|
+
props: nl,
|
|
508
|
+
setup(t) {
|
|
509
|
+
const l = t, e = P(!0), s = al(), { modifiers: n } = Q(l), f = me("vv-icon", n), d = i(() => l.provider || (s == null ? void 0 : s.provider)), b = i(() => {
|
|
510
|
+
const u = l.name ?? "", c = `@${d.value}:${l.prefix}:${l.name}`;
|
|
511
|
+
return $e(u) ? u : $e(c) ? c : (s == null ? void 0 : s.iconsCollections.find(
|
|
512
|
+
(m) => {
|
|
513
|
+
const V = `@${d.value}:${m.prefix}:${u}`;
|
|
514
|
+
if ($e(V))
|
|
515
|
+
return V;
|
|
417
516
|
}
|
|
418
|
-
)) ||
|
|
517
|
+
)) || u;
|
|
419
518
|
});
|
|
420
|
-
function
|
|
421
|
-
let
|
|
519
|
+
function v(u) {
|
|
520
|
+
let c = null;
|
|
422
521
|
if (typeof window > "u") {
|
|
423
522
|
const { JSDOM: B } = require("jsdom");
|
|
424
|
-
|
|
523
|
+
c = new B().window;
|
|
425
524
|
}
|
|
426
|
-
return (
|
|
525
|
+
return (c ? new c.DOMParser() : new window.DOMParser()).parseFromString(u, "text/html").querySelector("svg");
|
|
427
526
|
}
|
|
428
|
-
function
|
|
429
|
-
const
|
|
430
|
-
|
|
431
|
-
body:
|
|
527
|
+
function y(u) {
|
|
528
|
+
const c = v(u), m = (c == null ? void 0 : c.innerHTML.trim()) || "";
|
|
529
|
+
c && m && Lt(`@${d.value}:${l.prefix}:${l.name}`, {
|
|
530
|
+
body: m,
|
|
432
531
|
// Set height and width from svg content
|
|
433
|
-
height:
|
|
434
|
-
width:
|
|
532
|
+
height: c.viewBox.baseVal.height,
|
|
533
|
+
width: c.viewBox.baseVal.width
|
|
435
534
|
});
|
|
436
535
|
}
|
|
437
|
-
return
|
|
438
|
-
|
|
439
|
-
}).catch((
|
|
440
|
-
throw new Error(`During fetch icon: ${
|
|
441
|
-
})) :
|
|
536
|
+
return s && (l.src && !$e(`@${d.value}:${l.prefix}:${l.name}`) ? (e.value = !1, s.fetchIcon(l.src).then((u) => {
|
|
537
|
+
u && (y(u), e.value = !0);
|
|
538
|
+
}).catch((u) => {
|
|
539
|
+
throw new Error(`During fetch icon: ${u == null ? void 0 : u.message}`);
|
|
540
|
+
})) : l.svg && y(l.svg)), (u, c) => o(e) ? (p(), x(o(Nt), j({
|
|
442
541
|
key: 0,
|
|
443
|
-
class:
|
|
542
|
+
class: o(f)
|
|
444
543
|
}, {
|
|
445
|
-
inline:
|
|
446
|
-
width:
|
|
447
|
-
height:
|
|
448
|
-
horizontalFlip:
|
|
449
|
-
verticalFlip:
|
|
450
|
-
flip:
|
|
451
|
-
rotate:
|
|
452
|
-
color:
|
|
453
|
-
onLoad:
|
|
454
|
-
icon:
|
|
544
|
+
inline: u.inline,
|
|
545
|
+
width: u.width,
|
|
546
|
+
height: u.height,
|
|
547
|
+
horizontalFlip: u.horizontalFlip,
|
|
548
|
+
verticalFlip: u.verticalFlip,
|
|
549
|
+
flip: u.flip,
|
|
550
|
+
rotate: u.rotate,
|
|
551
|
+
color: u.color,
|
|
552
|
+
onLoad: u.onLoad,
|
|
553
|
+
icon: o(b)
|
|
455
554
|
}), null, 16, ["class"])) : k("", !0);
|
|
456
555
|
}
|
|
457
|
-
}),
|
|
458
|
-
...
|
|
459
|
-
...
|
|
460
|
-
|
|
556
|
+
}), rl = {
|
|
557
|
+
...gt,
|
|
558
|
+
...Ve,
|
|
559
|
+
...Fe,
|
|
461
560
|
/**
|
|
462
561
|
* Show / hide dropdown programmatically
|
|
463
562
|
*/
|
|
@@ -477,274 +576,469 @@ const Ne = {
|
|
|
477
576
|
*/
|
|
478
577
|
role: {
|
|
479
578
|
type: String,
|
|
480
|
-
default:
|
|
481
|
-
validator: (
|
|
579
|
+
default: Se.menu,
|
|
580
|
+
validator: (t) => Object.values(Se).includes(t)
|
|
482
581
|
}
|
|
483
|
-
},
|
|
582
|
+
}, Ke = (t) => i(() => String((t == null ? void 0 : t.value) || xt()));
|
|
583
|
+
function il({
|
|
584
|
+
reference: t,
|
|
585
|
+
id: l,
|
|
586
|
+
expanded: e,
|
|
587
|
+
aria: s
|
|
588
|
+
}) {
|
|
589
|
+
const n = qt(), f = ne({
|
|
590
|
+
name: "VvDropdownTriggerProvider",
|
|
591
|
+
provide() {
|
|
592
|
+
return {
|
|
593
|
+
[Jt]: {
|
|
594
|
+
reference: t,
|
|
595
|
+
id: l,
|
|
596
|
+
expanded: e,
|
|
597
|
+
aria: s,
|
|
598
|
+
bus: n
|
|
599
|
+
}
|
|
600
|
+
};
|
|
601
|
+
},
|
|
602
|
+
setup() {
|
|
603
|
+
return {};
|
|
604
|
+
},
|
|
605
|
+
render() {
|
|
606
|
+
var d, b;
|
|
607
|
+
return et(K, {}, (b = (d = this.$slots).default) == null ? void 0 : b.call(d));
|
|
608
|
+
}
|
|
609
|
+
});
|
|
610
|
+
return {
|
|
611
|
+
bus: n,
|
|
612
|
+
component: f
|
|
613
|
+
};
|
|
614
|
+
}
|
|
615
|
+
function ul({
|
|
616
|
+
role: t,
|
|
617
|
+
expanded: l
|
|
618
|
+
}) {
|
|
619
|
+
const e = i(
|
|
620
|
+
() => t.value === Se.listbox ? He.option : He.presentation
|
|
621
|
+
);
|
|
622
|
+
return tt(it, {
|
|
623
|
+
role: e,
|
|
624
|
+
expanded: l
|
|
625
|
+
}), { itemRole: e };
|
|
626
|
+
}
|
|
627
|
+
function dl({
|
|
628
|
+
expanded: t
|
|
629
|
+
}) {
|
|
630
|
+
tt(Yt, {
|
|
631
|
+
role: st.menuitem,
|
|
632
|
+
expanded: t
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
const cl = ["id", "tabindex", "role", "aria-labelledby"], fl = {
|
|
484
636
|
name: "VvDropdown",
|
|
485
637
|
inheritAttrs: !1
|
|
486
|
-
},
|
|
487
|
-
...
|
|
488
|
-
props:
|
|
638
|
+
}, St = /* @__PURE__ */ ne({
|
|
639
|
+
...fl,
|
|
640
|
+
props: rl,
|
|
489
641
|
emits: ["update:modelValue"],
|
|
490
|
-
setup(
|
|
491
|
-
const e =
|
|
492
|
-
get: () => e.reference ??
|
|
493
|
-
set: (
|
|
494
|
-
|
|
642
|
+
setup(t, { emit: l }) {
|
|
643
|
+
const e = t, { id: s } = Q(e), n = Ke(s), f = Pt(), d = P("auto"), b = P("auto"), v = P(null), y = P(null), u = P(null), c = P(null), m = i({
|
|
644
|
+
get: () => e.reference ?? v.value,
|
|
645
|
+
set: (a) => {
|
|
646
|
+
v.value = a;
|
|
495
647
|
}
|
|
496
|
-
}),
|
|
497
|
-
const
|
|
498
|
-
if (e.autoPlacement ? typeof e.autoPlacement == "boolean" ?
|
|
499
|
-
|
|
500
|
-
) : e.flip && (typeof e.flip == "boolean" ?
|
|
501
|
-
const
|
|
502
|
-
availableWidth:
|
|
503
|
-
availableHeight:
|
|
648
|
+
}), V = i(() => {
|
|
649
|
+
const a = [];
|
|
650
|
+
if (e.autoPlacement ? typeof e.autoPlacement == "boolean" ? a.push(Ye()) : a.push(
|
|
651
|
+
Ye(e.autoPlacement)
|
|
652
|
+
) : e.flip && (typeof e.flip == "boolean" ? a.push(Ge()) : a.push(Ge(e.flip))), e.shift && (typeof e.shift == "boolean" ? a.push(Qe()) : a.push(Qe(e.shift))), e.size) {
|
|
653
|
+
const _ = ({
|
|
654
|
+
availableWidth: W,
|
|
655
|
+
availableHeight: ie
|
|
504
656
|
}) => {
|
|
505
|
-
|
|
657
|
+
d.value = `${W}px`, b.value = `${ie}px`;
|
|
506
658
|
};
|
|
507
|
-
typeof e.size == "boolean" ?
|
|
508
|
-
|
|
509
|
-
apply:
|
|
659
|
+
typeof e.size == "boolean" ? a.push(
|
|
660
|
+
Xe({
|
|
661
|
+
apply: _
|
|
510
662
|
})
|
|
511
|
-
) :
|
|
512
|
-
|
|
663
|
+
) : a.push(
|
|
664
|
+
Xe({
|
|
513
665
|
...e.size,
|
|
514
|
-
apply:
|
|
666
|
+
apply: _
|
|
515
667
|
})
|
|
516
668
|
);
|
|
517
669
|
}
|
|
518
|
-
return e.offset && (
|
|
519
|
-
|
|
520
|
-
element:
|
|
670
|
+
return e.offset && (a.push(Ce(Number(e.offset))), ["string", "number"].includes(typeof e.offset) ? a.push(Ce(Number(e.offset))) : a.push(Ce(e.offset))), e.arrow && a.push(
|
|
671
|
+
jt({
|
|
672
|
+
element: u
|
|
521
673
|
})
|
|
522
|
-
),
|
|
523
|
-
}), { x:
|
|
524
|
-
|
|
525
|
-
|
|
674
|
+
), a;
|
|
675
|
+
}), { x: E, y: B, strategy: X, middlewareData: R, placement: Z } = Ht(
|
|
676
|
+
m,
|
|
677
|
+
y,
|
|
526
678
|
{
|
|
527
|
-
whileElementsMounted:
|
|
679
|
+
whileElementsMounted: Ft,
|
|
528
680
|
placement: e.placement,
|
|
529
|
-
middleware:
|
|
681
|
+
middleware: V
|
|
530
682
|
}
|
|
531
|
-
),
|
|
532
|
-
position:
|
|
683
|
+
), z = i(() => ({
|
|
684
|
+
position: X.value,
|
|
533
685
|
top: `${B.value ?? 0}px`,
|
|
534
|
-
left: `${
|
|
535
|
-
maxWidth:
|
|
536
|
-
maxHeight:
|
|
537
|
-
width: e.triggerWidth &&
|
|
538
|
-
})),
|
|
686
|
+
left: `${E.value ?? 0}px`,
|
|
687
|
+
maxWidth: d.value,
|
|
688
|
+
maxHeight: b.value,
|
|
689
|
+
width: e.triggerWidth && m.value ? `${m.value.offsetWidth}px` : void 0
|
|
690
|
+
})), C = i(() => Z.value.split("-")[0]), A = i(
|
|
539
691
|
() => ({
|
|
540
692
|
top: "bottom",
|
|
541
693
|
right: "left",
|
|
542
694
|
bottom: "top",
|
|
543
695
|
left: "right"
|
|
544
|
-
})[
|
|
545
|
-
),
|
|
546
|
-
var
|
|
547
|
-
return ["bottom", "top"].includes(
|
|
548
|
-
right: `${((
|
|
549
|
-
[
|
|
696
|
+
})[C.value] ?? "bottom"
|
|
697
|
+
), H = i(() => {
|
|
698
|
+
var a, _, W, ie;
|
|
699
|
+
return ["bottom", "top"].includes(A.value) ? {
|
|
700
|
+
right: `${((a = R.value.arrow) == null ? void 0 : a.x) ?? 0}px`,
|
|
701
|
+
[A.value]: `${-(((_ = u.value) == null ? void 0 : _.offsetWidth) ?? 0) / 2}px`
|
|
550
702
|
} : {
|
|
551
|
-
top: `${((
|
|
552
|
-
[
|
|
703
|
+
top: `${((W = R.value.arrow) == null ? void 0 : W.y) ?? 0}px`,
|
|
704
|
+
[A.value]: `${-(((ie = u.value) == null ? void 0 : ie.offsetWidth) ?? 0) / 2}px`
|
|
553
705
|
};
|
|
554
|
-
}),
|
|
555
|
-
get: () =>
|
|
556
|
-
set: (
|
|
557
|
-
if (
|
|
558
|
-
|
|
706
|
+
}), q = Tt(e, "modelValue", l), ee = P(!1), h = i({
|
|
707
|
+
get: () => q.value ?? ee.value,
|
|
708
|
+
set: (a) => {
|
|
709
|
+
if (q.value === void 0) {
|
|
710
|
+
ee.value = a;
|
|
559
711
|
return;
|
|
560
712
|
}
|
|
561
|
-
|
|
713
|
+
q.value = a;
|
|
562
714
|
}
|
|
563
|
-
}),
|
|
564
|
-
|
|
565
|
-
},
|
|
566
|
-
|
|
567
|
-
},
|
|
568
|
-
|
|
569
|
-
},
|
|
570
|
-
|
|
715
|
+
}), U = () => {
|
|
716
|
+
h.value = !0;
|
|
717
|
+
}, N = () => {
|
|
718
|
+
h.value = !1;
|
|
719
|
+
}, ae = () => {
|
|
720
|
+
h.value = !h.value;
|
|
721
|
+
}, ce = (a) => {
|
|
722
|
+
m.value = a;
|
|
571
723
|
};
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
const
|
|
575
|
-
|
|
724
|
+
Y(h, (a) => {
|
|
725
|
+
a && e.autofocusFirst && Ee(() => {
|
|
726
|
+
const _ = I(
|
|
727
|
+
y.value
|
|
576
728
|
);
|
|
577
|
-
|
|
729
|
+
_.length > 0 && _[0].focus();
|
|
578
730
|
});
|
|
579
|
-
}),
|
|
580
|
-
|
|
731
|
+
}), Mt(
|
|
732
|
+
y,
|
|
581
733
|
() => {
|
|
582
|
-
e.autoClose && (
|
|
734
|
+
e.autoClose && (h.value = !1);
|
|
583
735
|
},
|
|
584
|
-
{ ignore: [
|
|
736
|
+
{ ignore: [m] }
|
|
585
737
|
);
|
|
586
|
-
const
|
|
587
|
-
var
|
|
588
|
-
return ((
|
|
589
|
-
}),
|
|
590
|
-
"aria-controls":
|
|
738
|
+
const fe = i(() => {
|
|
739
|
+
var a;
|
|
740
|
+
return ((a = m.value) == null ? void 0 : a.getAttribute("id")) ?? void 0;
|
|
741
|
+
}), te = i(() => ({
|
|
742
|
+
"aria-controls": n.value,
|
|
591
743
|
"aria-haspopup": !0,
|
|
592
|
-
"aria-expanded":
|
|
593
|
-
})), { component:
|
|
594
|
-
reference:
|
|
595
|
-
id:
|
|
596
|
-
expanded:
|
|
597
|
-
aria:
|
|
744
|
+
"aria-expanded": h.value
|
|
745
|
+
})), { component: se, bus: ve } = il({
|
|
746
|
+
reference: m,
|
|
747
|
+
id: n,
|
|
748
|
+
expanded: h,
|
|
749
|
+
aria: te
|
|
598
750
|
});
|
|
599
|
-
|
|
600
|
-
const { role:
|
|
751
|
+
ve.on("click", ae);
|
|
752
|
+
const { role: re, modifiers: be } = Q(e), { itemRole: le } = ul({ role: re, expanded: h }), S = me(
|
|
601
753
|
"vv-dropdown",
|
|
602
|
-
|
|
603
|
-
|
|
754
|
+
be,
|
|
755
|
+
i(() => ({
|
|
604
756
|
arrow: e.arrow
|
|
605
757
|
}))
|
|
606
|
-
), { focused:
|
|
607
|
-
function
|
|
608
|
-
return
|
|
609
|
-
...
|
|
758
|
+
), { focused: L } = Me(y);
|
|
759
|
+
function I(a) {
|
|
760
|
+
return a ? [
|
|
761
|
+
...a.querySelectorAll(
|
|
610
762
|
'a[href], button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])'
|
|
611
763
|
)
|
|
612
764
|
].filter(
|
|
613
|
-
(
|
|
765
|
+
(_) => !_.hasAttribute("disabled") && !_.getAttribute("aria-hidden")
|
|
614
766
|
) : [];
|
|
615
767
|
}
|
|
616
|
-
const
|
|
617
|
-
|
|
618
|
-
if (
|
|
619
|
-
const
|
|
620
|
-
|
|
768
|
+
const oe = () => {
|
|
769
|
+
Ee(() => {
|
|
770
|
+
if (L.value) {
|
|
771
|
+
const a = I(
|
|
772
|
+
y.value
|
|
621
773
|
);
|
|
622
|
-
if (
|
|
774
|
+
if (a.length === 0 || !document.activeElement)
|
|
623
775
|
return;
|
|
624
|
-
const
|
|
776
|
+
const _ = a.indexOf(
|
|
625
777
|
document.activeElement
|
|
626
778
|
);
|
|
627
|
-
|
|
779
|
+
_ < a.length - 1 ? a[_ + 1].focus() : a[0].focus();
|
|
628
780
|
}
|
|
629
781
|
});
|
|
630
|
-
},
|
|
631
|
-
|
|
632
|
-
if (
|
|
633
|
-
const
|
|
634
|
-
|
|
782
|
+
}, we = () => {
|
|
783
|
+
Ee(() => {
|
|
784
|
+
if (L.value) {
|
|
785
|
+
const a = I(
|
|
786
|
+
y.value
|
|
635
787
|
);
|
|
636
|
-
if (
|
|
788
|
+
if (a.length === 0 || !document.activeElement)
|
|
637
789
|
return;
|
|
638
|
-
const
|
|
790
|
+
const _ = a.indexOf(
|
|
639
791
|
document.activeElement
|
|
640
792
|
);
|
|
641
|
-
|
|
793
|
+
_ > 0 ? a[_ - 1].focus() : a[a.length - 1].focus();
|
|
642
794
|
}
|
|
643
795
|
});
|
|
644
796
|
};
|
|
645
|
-
return
|
|
646
|
-
|
|
647
|
-
}),
|
|
648
|
-
|
|
649
|
-
}),
|
|
650
|
-
|
|
651
|
-
}),
|
|
652
|
-
|
|
653
|
-
}), (
|
|
654
|
-
|
|
655
|
-
default:
|
|
656
|
-
|
|
797
|
+
return ye("Escape", (a) => {
|
|
798
|
+
h.value && (a.preventDefault(), N());
|
|
799
|
+
}), ye("ArrowDown", (a) => {
|
|
800
|
+
h.value && L.value && (a.preventDefault(), oe());
|
|
801
|
+
}), ye("ArrowUp", (a) => {
|
|
802
|
+
h.value && L.value && (a.preventDefault(), we());
|
|
803
|
+
}), ye([" ", "Enter"], (a) => {
|
|
804
|
+
h.value && L.value && (a.preventDefault(), document.activeElement.click());
|
|
805
|
+
}), (a, _) => (p(), g(K, null, [
|
|
806
|
+
pe(o(se), null, {
|
|
807
|
+
default: F(() => [
|
|
808
|
+
O(a.$slots, "default", T(M({ init: ce, show: U, hide: N, toggle: ae, expanded: o(h), aria: o(te) })))
|
|
657
809
|
]),
|
|
658
810
|
_: 3
|
|
659
811
|
}),
|
|
660
|
-
|
|
661
|
-
default:
|
|
662
|
-
|
|
812
|
+
pe(It, { name: a.transitionName }, {
|
|
813
|
+
default: F(() => [
|
|
814
|
+
Te(G("div", {
|
|
663
815
|
ref_key: "floatingEl",
|
|
664
|
-
ref:
|
|
665
|
-
style:
|
|
666
|
-
class:
|
|
816
|
+
ref: y,
|
|
817
|
+
style: Je(o(z)),
|
|
818
|
+
class: _e(o(S))
|
|
667
819
|
}, [
|
|
668
|
-
e.arrow ? (
|
|
820
|
+
e.arrow ? (p(), g("div", {
|
|
669
821
|
key: 0,
|
|
670
822
|
ref_key: "arrowEl",
|
|
671
|
-
ref:
|
|
672
|
-
style:
|
|
823
|
+
ref: u,
|
|
824
|
+
style: Je(o(H)),
|
|
673
825
|
class: "vv-dropdown__arrow"
|
|
674
826
|
}, null, 4)) : k("", !0),
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
id:
|
|
827
|
+
O(a.$slots, "before", T(M({ expanded: o(h) }))),
|
|
828
|
+
G("ul", j(o(f), {
|
|
829
|
+
id: o(n),
|
|
678
830
|
ref_key: "listEl",
|
|
679
|
-
ref:
|
|
680
|
-
tabindex:
|
|
681
|
-
role:
|
|
682
|
-
"aria-labelledby":
|
|
831
|
+
ref: c,
|
|
832
|
+
tabindex: o(h) ? void 0 : -1,
|
|
833
|
+
role: o(re),
|
|
834
|
+
"aria-labelledby": o(fe),
|
|
683
835
|
class: "vv-dropdown__list"
|
|
684
836
|
}), [
|
|
685
|
-
|
|
686
|
-
role:
|
|
837
|
+
O(a.$slots, "items", T(M({
|
|
838
|
+
role: o(le)
|
|
687
839
|
})))
|
|
688
|
-
], 16,
|
|
689
|
-
|
|
840
|
+
], 16, cl),
|
|
841
|
+
O(a.$slots, "after", T(M({ expanded: o(h) })))
|
|
690
842
|
], 6), [
|
|
691
|
-
[
|
|
843
|
+
[lt, o(h)]
|
|
692
844
|
])
|
|
693
845
|
]),
|
|
694
846
|
_: 3
|
|
695
847
|
}, 8, ["name"])
|
|
696
848
|
], 64));
|
|
697
849
|
}
|
|
698
|
-
})
|
|
850
|
+
});
|
|
851
|
+
function vl() {
|
|
852
|
+
return Ze(it, {});
|
|
853
|
+
}
|
|
854
|
+
const pl = {
|
|
699
855
|
name: "VvDropdownItem"
|
|
700
|
-
},
|
|
701
|
-
...
|
|
702
|
-
setup(
|
|
703
|
-
const { role:
|
|
704
|
-
|
|
705
|
-
const
|
|
706
|
-
return
|
|
707
|
-
|
|
708
|
-
}), (
|
|
856
|
+
}, ml = /* @__PURE__ */ ne({
|
|
857
|
+
...pl,
|
|
858
|
+
setup(t) {
|
|
859
|
+
const { role: l, expanded: e } = vl(), s = P(null);
|
|
860
|
+
dl({ expanded: e });
|
|
861
|
+
const n = Rt(s), { focused: f } = nt(s), { focused: d } = Me(s);
|
|
862
|
+
return Y(n, (b) => {
|
|
863
|
+
b && (f.value = !0);
|
|
864
|
+
}), (b, v) => (p(), g("li", j({ role: o(l) }, {
|
|
709
865
|
ref_key: "element",
|
|
710
|
-
ref:
|
|
711
|
-
class: ["vv-dropdown__item", { "focus-visible":
|
|
866
|
+
ref: s,
|
|
867
|
+
class: ["vv-dropdown__item", { "focus-visible": o(f) || o(d) }]
|
|
712
868
|
}), [
|
|
713
|
-
|
|
869
|
+
O(b.$slots, "default")
|
|
714
870
|
], 16));
|
|
715
871
|
}
|
|
872
|
+
}), bl = { class: "vv-dropdown-option__hint" }, yl = {
|
|
873
|
+
name: "VvDropdownOption"
|
|
874
|
+
}, Pe = /* @__PURE__ */ ne({
|
|
875
|
+
...yl,
|
|
876
|
+
props: {
|
|
877
|
+
...Ae,
|
|
878
|
+
...Qt,
|
|
879
|
+
...We,
|
|
880
|
+
...Ve,
|
|
881
|
+
deselectHintLabel: {
|
|
882
|
+
type: String
|
|
883
|
+
},
|
|
884
|
+
selectHintLabel: {
|
|
885
|
+
type: String
|
|
886
|
+
},
|
|
887
|
+
selectedHintLabel: {
|
|
888
|
+
type: String
|
|
889
|
+
}
|
|
890
|
+
},
|
|
891
|
+
setup(t) {
|
|
892
|
+
const l = t, { modifiers: e } = Q(l), s = me(
|
|
893
|
+
"vv-dropdown-option",
|
|
894
|
+
e,
|
|
895
|
+
i(() => ({
|
|
896
|
+
disabled: l.disabled,
|
|
897
|
+
selected: l.selected,
|
|
898
|
+
unselectable: l.unselectable && l.selected
|
|
899
|
+
}))
|
|
900
|
+
);
|
|
901
|
+
return (n, f) => (p(), x(ml, {
|
|
902
|
+
class: _e(o(s)),
|
|
903
|
+
tabindex: n.disabled ? -1 : 0,
|
|
904
|
+
"aria-selected": n.selected,
|
|
905
|
+
"aria-disabled": n.disabled
|
|
906
|
+
}, {
|
|
907
|
+
default: F(() => [
|
|
908
|
+
O(n.$slots, "default"),
|
|
909
|
+
G("span", bl, [
|
|
910
|
+
O(n.$slots, "hint", T(M({ disabled: n.disabled, selected: n.selected, unselectable: n.unselectable })), () => [
|
|
911
|
+
n.selected ? (p(), g(K, { key: 0 }, [
|
|
912
|
+
J(D(n.unselectable ? t.deselectHintLabel : t.selectedHintLabel), 1)
|
|
913
|
+
], 64)) : n.disabled ? k("", !0) : (p(), g(K, { key: 1 }, [
|
|
914
|
+
J(D(t.selectHintLabel), 1)
|
|
915
|
+
], 64))
|
|
916
|
+
])
|
|
917
|
+
])
|
|
918
|
+
]),
|
|
919
|
+
_: 3
|
|
920
|
+
}, 8, ["class", "tabindex", "aria-selected", "aria-disabled"]));
|
|
921
|
+
}
|
|
716
922
|
});
|
|
717
|
-
function
|
|
718
|
-
return
|
|
923
|
+
function Ie(t, l, e) {
|
|
924
|
+
return e ? Be(t, e) === Be(l, e) : xe(t, l);
|
|
925
|
+
}
|
|
926
|
+
function xe(t, l) {
|
|
927
|
+
if (t === l)
|
|
928
|
+
return !0;
|
|
929
|
+
if (t && l && typeof t == "object" && typeof l == "object") {
|
|
930
|
+
const e = Array.isArray(t), s = Array.isArray(l);
|
|
931
|
+
let n, f, d;
|
|
932
|
+
if (e && s) {
|
|
933
|
+
if (f = t.length, f != l.length)
|
|
934
|
+
return !1;
|
|
935
|
+
for (n = f; n-- !== 0; )
|
|
936
|
+
if (!xe(t[n], l[n]))
|
|
937
|
+
return !1;
|
|
938
|
+
return !0;
|
|
939
|
+
}
|
|
940
|
+
if (e != s)
|
|
941
|
+
return !1;
|
|
942
|
+
const b = t instanceof Date, v = l instanceof Date;
|
|
943
|
+
if (b != v)
|
|
944
|
+
return !1;
|
|
945
|
+
if (b && v)
|
|
946
|
+
return t.getTime() == l.getTime();
|
|
947
|
+
const y = t instanceof RegExp, u = l instanceof RegExp;
|
|
948
|
+
if (y != u)
|
|
949
|
+
return !1;
|
|
950
|
+
if (y && u)
|
|
951
|
+
return t.toString() == l.toString();
|
|
952
|
+
const c = Object.keys(t);
|
|
953
|
+
if (f = c.length, f !== Object.keys(l).length)
|
|
954
|
+
return !1;
|
|
955
|
+
for (n = f; n-- !== 0; )
|
|
956
|
+
if (!Object.prototype.hasOwnProperty.call(l, c[n]))
|
|
957
|
+
return !1;
|
|
958
|
+
for (n = f; n-- !== 0; )
|
|
959
|
+
if (d = c[n], !xe(t[d], l[d]))
|
|
960
|
+
return !1;
|
|
961
|
+
return !0;
|
|
962
|
+
}
|
|
963
|
+
return t !== t && l !== l;
|
|
964
|
+
}
|
|
965
|
+
function Be(t, l) {
|
|
966
|
+
if (t && Object.keys(t).length && l) {
|
|
967
|
+
if (l.indexOf(".") === -1)
|
|
968
|
+
return t[l];
|
|
969
|
+
{
|
|
970
|
+
const e = l.split(".");
|
|
971
|
+
let s = t;
|
|
972
|
+
for (let n = 0, f = e.length; n < f; ++n) {
|
|
973
|
+
if (t == null)
|
|
974
|
+
return null;
|
|
975
|
+
s = s[e[n]];
|
|
976
|
+
}
|
|
977
|
+
return s;
|
|
978
|
+
}
|
|
979
|
+
} else
|
|
980
|
+
return null;
|
|
981
|
+
}
|
|
982
|
+
function gl(t, l) {
|
|
983
|
+
let e = -1;
|
|
984
|
+
if (l) {
|
|
985
|
+
for (let s = 0; s < l.length; s++)
|
|
986
|
+
if (Ie(l[s], t)) {
|
|
987
|
+
e = s;
|
|
988
|
+
break;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
return e;
|
|
992
|
+
}
|
|
993
|
+
function Oe(t, l) {
|
|
994
|
+
if (t != null && l && l.length) {
|
|
995
|
+
for (const e of l)
|
|
996
|
+
if (Ie(t, e))
|
|
997
|
+
return !0;
|
|
998
|
+
}
|
|
999
|
+
return !1;
|
|
1000
|
+
}
|
|
1001
|
+
function ze(t) {
|
|
1002
|
+
return ((l) => l == null || l === "" || Array.isArray(l) && l.length === 0 || !(l instanceof Date) && typeof l == "object" && Object.keys(l).length === 0)(o(t));
|
|
1003
|
+
}
|
|
1004
|
+
function hl(t, l) {
|
|
1005
|
+
const e = gl(t, l);
|
|
1006
|
+
return e > -1 ? l.filter((s, n) => n !== e) : l;
|
|
1007
|
+
}
|
|
1008
|
+
function Sl(t) {
|
|
1009
|
+
return typeof t == "string" || t instanceof String;
|
|
719
1010
|
}
|
|
720
|
-
function
|
|
1011
|
+
function ke(t) {
|
|
1012
|
+
return Array.isArray(t) ? t.filter((l) => Sl(l)).join(" ") : t;
|
|
1013
|
+
}
|
|
1014
|
+
function _t(t, l) {
|
|
721
1015
|
const {
|
|
722
1016
|
invalid: e,
|
|
723
|
-
valid:
|
|
724
|
-
hint:
|
|
725
|
-
loading:
|
|
726
|
-
} =
|
|
727
|
-
hintLabel:
|
|
728
|
-
modelValue:
|
|
729
|
-
valid:
|
|
730
|
-
validLabel:
|
|
731
|
-
invalid:
|
|
732
|
-
invalidLabel:
|
|
733
|
-
...
|
|
734
|
-
} =
|
|
735
|
-
() => !!(
|
|
736
|
-
),
|
|
737
|
-
() => !!(
|
|
738
|
-
),
|
|
739
|
-
() => !!(
|
|
740
|
-
),
|
|
741
|
-
() =>
|
|
1017
|
+
valid: s,
|
|
1018
|
+
hint: n,
|
|
1019
|
+
loading: f
|
|
1020
|
+
} = l, {
|
|
1021
|
+
hintLabel: d,
|
|
1022
|
+
modelValue: b,
|
|
1023
|
+
valid: v,
|
|
1024
|
+
validLabel: y,
|
|
1025
|
+
invalid: u,
|
|
1026
|
+
invalidLabel: c,
|
|
1027
|
+
...m
|
|
1028
|
+
} = Q(t), V = Be(m, "loading"), E = Be(m, "loadingLabel"), B = i(() => u.value ? !!(u.value && e || c != null && c.value && Array.isArray(c.value) && c.value.length > 0 || c != null && c.value && !ze(c)) : !1), X = i(
|
|
1029
|
+
() => !!(d && d.value || n)
|
|
1030
|
+
), R = i(
|
|
1031
|
+
() => !!(y && y.value || s)
|
|
1032
|
+
), Z = i(
|
|
1033
|
+
() => !!(V != null && V.value && f || V != null && V.value && (E != null && E.value))
|
|
1034
|
+
), z = i(
|
|
1035
|
+
() => X.value || R.value || B.value || Z.value
|
|
742
1036
|
);
|
|
743
1037
|
return {
|
|
744
1038
|
hasInvalid: B,
|
|
745
|
-
hasHint:
|
|
746
|
-
hasValid:
|
|
747
|
-
hasLoading:
|
|
1039
|
+
hasHint: X,
|
|
1040
|
+
hasValid: R,
|
|
1041
|
+
hasLoading: Z,
|
|
748
1042
|
HintSlot: {
|
|
749
1043
|
name: "HintSlot",
|
|
750
1044
|
props: {
|
|
@@ -753,31 +1047,31 @@ function Xe(s, d) {
|
|
|
753
1047
|
default: () => ({})
|
|
754
1048
|
}
|
|
755
1049
|
},
|
|
756
|
-
setup(
|
|
757
|
-
const
|
|
758
|
-
const
|
|
759
|
-
hintLabel:
|
|
760
|
-
modelValue:
|
|
761
|
-
valid:
|
|
762
|
-
validLabel:
|
|
763
|
-
invalid:
|
|
764
|
-
invalidLabel:
|
|
765
|
-
loading:
|
|
766
|
-
loadingLabel:
|
|
767
|
-
...
|
|
1050
|
+
setup(C) {
|
|
1051
|
+
const A = i(() => {
|
|
1052
|
+
const H = Wt({
|
|
1053
|
+
hintLabel: d,
|
|
1054
|
+
modelValue: b,
|
|
1055
|
+
valid: v,
|
|
1056
|
+
validLabel: y,
|
|
1057
|
+
invalid: u,
|
|
1058
|
+
invalidLabel: c,
|
|
1059
|
+
loading: V,
|
|
1060
|
+
loadingLabel: E,
|
|
1061
|
+
...C.params
|
|
768
1062
|
});
|
|
769
|
-
return
|
|
1063
|
+
return u != null && u.value ? (e == null ? void 0 : e(H)) || ke(c == null ? void 0 : c.value) || (d == null ? void 0 : d.value) : v != null && v.value ? (s == null ? void 0 : s(H)) || ke(y == null ? void 0 : y.value) || (d == null ? void 0 : d.value) : V != null && V.value ? (f == null ? void 0 : f(H)) || ke(E == null ? void 0 : E.value) || (d == null ? void 0 : d.value) : (n == null ? void 0 : n(H)) || ke(d == null ? void 0 : d.value) || (d == null ? void 0 : d.value);
|
|
770
1064
|
});
|
|
771
1065
|
return {
|
|
772
|
-
isVisible:
|
|
1066
|
+
isVisible: z,
|
|
773
1067
|
hasInvalid: B,
|
|
774
|
-
hasValid:
|
|
775
|
-
hintContent:
|
|
1068
|
+
hasValid: R,
|
|
1069
|
+
hintContent: A
|
|
776
1070
|
};
|
|
777
1071
|
},
|
|
778
1072
|
render() {
|
|
779
1073
|
if (this.isVisible)
|
|
780
|
-
return
|
|
1074
|
+
return et(
|
|
781
1075
|
"small",
|
|
782
1076
|
{
|
|
783
1077
|
role: this.hasInvalid ? "alert" : this.hasValid ? "status" : void 0
|
|
@@ -788,22 +1082,23 @@ function Xe(s, d) {
|
|
|
788
1082
|
}
|
|
789
1083
|
};
|
|
790
1084
|
}
|
|
791
|
-
const
|
|
792
|
-
...
|
|
1085
|
+
const _l = {
|
|
1086
|
+
...ht,
|
|
1087
|
+
...el,
|
|
1088
|
+
...tl,
|
|
1089
|
+
...bt,
|
|
1090
|
+
...ut,
|
|
1091
|
+
...dt,
|
|
1092
|
+
...vt,
|
|
793
1093
|
...ct,
|
|
1094
|
+
...Ae,
|
|
794
1095
|
...ft,
|
|
795
|
-
...
|
|
796
|
-
...
|
|
797
|
-
...
|
|
798
|
-
...
|
|
799
|
-
...Me,
|
|
800
|
-
...Te,
|
|
801
|
-
...Re,
|
|
802
|
-
...he,
|
|
1096
|
+
...Ve,
|
|
1097
|
+
...pt,
|
|
1098
|
+
...mt,
|
|
1099
|
+
...yt,
|
|
803
1100
|
...We,
|
|
804
|
-
...
|
|
805
|
-
...He,
|
|
806
|
-
...Ke,
|
|
1101
|
+
...Re,
|
|
807
1102
|
/**
|
|
808
1103
|
* This Boolean attribute indicates that multiple options can be selected in the list.
|
|
809
1104
|
* If it is not specified, then only one option can be selected at a time.
|
|
@@ -830,289 +1125,327 @@ const St = {
|
|
|
830
1125
|
type: [String, Number, Boolean, Object, Array],
|
|
831
1126
|
default: void 0
|
|
832
1127
|
},
|
|
833
|
-
/**
|
|
834
|
-
* <label> value for the select
|
|
835
|
-
*/
|
|
836
|
-
label: String,
|
|
837
1128
|
/**
|
|
838
1129
|
* Select placeholder
|
|
839
1130
|
*/
|
|
840
1131
|
placeholder: String
|
|
841
|
-
},
|
|
1132
|
+
}, Vl = ["update:modelValue", "focus", "blur"];
|
|
1133
|
+
function Vt(t, l) {
|
|
1134
|
+
const { focused: e } = nt(t);
|
|
1135
|
+
return Y(e, (s) => {
|
|
1136
|
+
l(s ? "focus" : "blur", o(t));
|
|
1137
|
+
}), {
|
|
1138
|
+
focused: e
|
|
1139
|
+
};
|
|
1140
|
+
}
|
|
1141
|
+
function wt(t, l) {
|
|
1142
|
+
const e = i(
|
|
1143
|
+
() => Boolean((t == null ? void 0 : t.value) && l.value === he.before)
|
|
1144
|
+
), s = i(
|
|
1145
|
+
() => Boolean((t == null ? void 0 : t.value) && l.value === he.after)
|
|
1146
|
+
), n = i(
|
|
1147
|
+
() => Boolean((t == null ? void 0 : t.value) && l.value === de.left)
|
|
1148
|
+
), f = i(
|
|
1149
|
+
() => Boolean((t == null ? void 0 : t.value) && l.value === de.right)
|
|
1150
|
+
), d = i(
|
|
1151
|
+
() => Boolean((t == null ? void 0 : t.value) && l.value === de.top)
|
|
1152
|
+
), b = i(
|
|
1153
|
+
() => Boolean((t == null ? void 0 : t.value) && l.value === de.bottom)
|
|
1154
|
+
);
|
|
1155
|
+
return {
|
|
1156
|
+
hasIcon: i(() => typeof (t == null ? void 0 : t.value) == "string" ? { name: t == null ? void 0 : t.value } : t == null ? void 0 : t.value),
|
|
1157
|
+
hasIconLeft: n,
|
|
1158
|
+
hasIconRight: f,
|
|
1159
|
+
hasIconTop: d,
|
|
1160
|
+
hasIconBottom: b,
|
|
1161
|
+
hasIconBefore: e,
|
|
1162
|
+
hasIconAfter: s
|
|
1163
|
+
};
|
|
1164
|
+
}
|
|
1165
|
+
function $t(t) {
|
|
1166
|
+
const { options: l, labelKey: e, valueKey: s, disabledKey: n } = Q(t);
|
|
1167
|
+
return {
|
|
1168
|
+
options: l,
|
|
1169
|
+
getOptionLabel: (v) => typeof v != "object" && v !== null ? v : typeof e.value == "function" ? e.value(v) : v[e.value],
|
|
1170
|
+
getOptionValue: (v) => typeof v != "object" && v !== null ? v : typeof s.value == "function" ? s.value(v) : v[s.value],
|
|
1171
|
+
getOptionDisabled: (v) => typeof v != "object" && v !== null ? !1 : typeof n.value == "function" ? n.value(v) : v[n.value]
|
|
1172
|
+
};
|
|
1173
|
+
}
|
|
1174
|
+
const wl = ["for"], $l = { class: "vv-select__wrapper" }, Ol = {
|
|
842
1175
|
key: 0,
|
|
843
1176
|
class: "vv-select__input-before"
|
|
844
|
-
},
|
|
1177
|
+
}, kl = { class: "vv-select__inner" }, El = ["id"], Pl = ["disabled", "hidden"], Il = ["disabled", "value"], Bl = {
|
|
845
1178
|
key: 1,
|
|
846
1179
|
class: "vv-select__input-after"
|
|
847
|
-
},
|
|
1180
|
+
}, Al = {
|
|
848
1181
|
name: "VvSelect"
|
|
849
|
-
},
|
|
850
|
-
...
|
|
851
|
-
props:
|
|
852
|
-
emits:
|
|
853
|
-
setup(
|
|
854
|
-
const e =
|
|
855
|
-
id:
|
|
856
|
-
modifiers:
|
|
857
|
-
disabled:
|
|
858
|
-
readonly:
|
|
859
|
-
loading:
|
|
860
|
-
icon:
|
|
861
|
-
iconPosition:
|
|
1182
|
+
}, Dl = /* @__PURE__ */ ne({
|
|
1183
|
+
...Al,
|
|
1184
|
+
props: _l,
|
|
1185
|
+
emits: Vl,
|
|
1186
|
+
setup(t, { emit: l }) {
|
|
1187
|
+
const e = t, s = ot(), n = P(), { HintSlot: f, hasHint: d, hasInvalid: b } = _t(e, s), {
|
|
1188
|
+
id: v,
|
|
1189
|
+
modifiers: y,
|
|
1190
|
+
disabled: u,
|
|
1191
|
+
readonly: c,
|
|
1192
|
+
loading: m,
|
|
1193
|
+
icon: V,
|
|
1194
|
+
iconPosition: E,
|
|
862
1195
|
invalid: B,
|
|
863
|
-
valid:
|
|
864
|
-
floating:
|
|
865
|
-
multiple:
|
|
866
|
-
} =
|
|
867
|
-
|
|
868
|
-
|
|
1196
|
+
valid: X,
|
|
1197
|
+
floating: R,
|
|
1198
|
+
multiple: Z
|
|
1199
|
+
} = Q(e), z = Ke(v), C = i(() => `${z.value}-hint`), { focused: A } = Vt(n, l), H = Kt(n);
|
|
1200
|
+
Y(H, (S) => {
|
|
1201
|
+
S && e.autofocus && (A.value = !0);
|
|
869
1202
|
});
|
|
870
|
-
const { hasIcon:
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
),
|
|
1203
|
+
const { hasIcon: q, hasIconBefore: ee, hasIconAfter: h } = wt(
|
|
1204
|
+
V,
|
|
1205
|
+
E
|
|
1206
|
+
), U = i(() => !ze(e.modelValue)), N = i(() => e.disabled || e.readonly), ae = i(() => N.value ? -1 : e.tabindex), ce = i(() => {
|
|
874
1207
|
if (e.invalid === !0)
|
|
875
1208
|
return !0;
|
|
876
1209
|
if (e.valid === !0)
|
|
877
1210
|
return !1;
|
|
878
|
-
}),
|
|
1211
|
+
}), fe = me(
|
|
879
1212
|
"vv-select",
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
valid:
|
|
1213
|
+
y,
|
|
1214
|
+
i(() => ({
|
|
1215
|
+
valid: X.value,
|
|
883
1216
|
invalid: B.value,
|
|
884
|
-
loading:
|
|
885
|
-
disabled:
|
|
886
|
-
readonly:
|
|
887
|
-
"icon-before":
|
|
888
|
-
"icon-after":
|
|
889
|
-
dirty:
|
|
890
|
-
focus:
|
|
891
|
-
floating:
|
|
892
|
-
multiple:
|
|
1217
|
+
loading: m.value,
|
|
1218
|
+
disabled: u.value,
|
|
1219
|
+
readonly: c.value,
|
|
1220
|
+
"icon-before": ee.value,
|
|
1221
|
+
"icon-after": h.value,
|
|
1222
|
+
dirty: U.value,
|
|
1223
|
+
focus: A.value,
|
|
1224
|
+
floating: R.value,
|
|
1225
|
+
multiple: Z.value
|
|
893
1226
|
}))
|
|
894
|
-
),
|
|
1227
|
+
), te = i(() => ({
|
|
895
1228
|
name: e.name,
|
|
896
|
-
tabindex:
|
|
897
|
-
disabled:
|
|
1229
|
+
tabindex: ae.value,
|
|
1230
|
+
disabled: N.value,
|
|
898
1231
|
required: e.required,
|
|
899
1232
|
size: e.size,
|
|
900
1233
|
autocomplete: e.autocomplete,
|
|
901
1234
|
multiple: e.multiple,
|
|
902
|
-
"aria-invalid":
|
|
903
|
-
"aria-describedby": !
|
|
904
|
-
"aria-errormessage":
|
|
905
|
-
})),
|
|
1235
|
+
"aria-invalid": ce.value,
|
|
1236
|
+
"aria-describedby": !b.value && d.value ? C.value : void 0,
|
|
1237
|
+
"aria-errormessage": b.value ? C.value : void 0
|
|
1238
|
+
})), se = i(() => ({
|
|
906
1239
|
valid: e.valid,
|
|
907
1240
|
invalid: e.invalid,
|
|
908
1241
|
modelValue: e.modelValue
|
|
909
|
-
})), { getOptionLabel:
|
|
1242
|
+
})), { getOptionLabel: ve, getOptionValue: re, getOptionDisabled: be } = $t(e), le = i({
|
|
910
1243
|
get: () => e.modelValue,
|
|
911
|
-
set: (
|
|
912
|
-
Array.isArray(
|
|
1244
|
+
set: (S) => {
|
|
1245
|
+
Array.isArray(S) && (S = S.filter((L) => L !== void 0)), l("update:modelValue", S);
|
|
913
1246
|
}
|
|
914
1247
|
});
|
|
915
|
-
return (
|
|
916
|
-
class:
|
|
1248
|
+
return (S, L) => (p(), g("div", {
|
|
1249
|
+
class: _e(o(fe))
|
|
917
1250
|
}, [
|
|
918
|
-
|
|
1251
|
+
S.label ? (p(), g("label", {
|
|
919
1252
|
key: 0,
|
|
920
|
-
for:
|
|
921
|
-
},
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
1253
|
+
for: o(z)
|
|
1254
|
+
}, D(S.label), 9, wl)) : k("", !0),
|
|
1255
|
+
G("div", $l, [
|
|
1256
|
+
S.$slots.before ? (p(), g("div", Ol, [
|
|
1257
|
+
O(S.$slots, "before", T(M(o(se))))
|
|
925
1258
|
])) : k("", !0),
|
|
926
|
-
|
|
927
|
-
|
|
1259
|
+
G("div", kl, [
|
|
1260
|
+
o(ee) ? (p(), x(ge, j({
|
|
928
1261
|
key: 0,
|
|
929
1262
|
class: "vv-select__icon"
|
|
930
|
-
},
|
|
931
|
-
|
|
932
|
-
id:
|
|
1263
|
+
}, o(q)), null, 16)) : k("", !0),
|
|
1264
|
+
Te(G("select", j({
|
|
1265
|
+
id: o(z),
|
|
933
1266
|
ref_key: "select",
|
|
934
|
-
ref:
|
|
935
|
-
"onUpdate:modelValue":
|
|
936
|
-
},
|
|
937
|
-
|
|
1267
|
+
ref: n,
|
|
1268
|
+
"onUpdate:modelValue": L[0] || (L[0] = (I) => Ne(le) ? le.value = I : null)
|
|
1269
|
+
}, o(te)), [
|
|
1270
|
+
S.placeholder ? (p(), g("option", {
|
|
938
1271
|
key: 0,
|
|
939
1272
|
value: void 0,
|
|
940
|
-
disabled: !
|
|
941
|
-
hidden: !
|
|
942
|
-
},
|
|
943
|
-
(
|
|
944
|
-
key:
|
|
945
|
-
disabled:
|
|
946
|
-
value:
|
|
947
|
-
},
|
|
948
|
-
], 16,
|
|
949
|
-
[
|
|
1273
|
+
disabled: !S.unselectable,
|
|
1274
|
+
hidden: !S.unselectable
|
|
1275
|
+
}, D(S.placeholder), 9, Pl)) : k("", !0),
|
|
1276
|
+
(p(!0), g(K, null, Le(S.options, (I, oe) => (p(), g("option", {
|
|
1277
|
+
key: oe,
|
|
1278
|
+
disabled: o(be)(I),
|
|
1279
|
+
value: o(re)(I)
|
|
1280
|
+
}, D(o(ve)(I)), 9, Il))), 128))
|
|
1281
|
+
], 16, El), [
|
|
1282
|
+
[Bt, o(le)]
|
|
950
1283
|
]),
|
|
951
|
-
|
|
1284
|
+
o(h) ? (p(), x(ge, j({
|
|
952
1285
|
key: 1,
|
|
953
1286
|
class: "vv-select__icon vv-select__icon-after"
|
|
954
|
-
},
|
|
1287
|
+
}, o(q)), null, 16)) : k("", !0)
|
|
955
1288
|
]),
|
|
956
|
-
|
|
957
|
-
|
|
1289
|
+
S.$slots.after ? (p(), g("div", Bl, [
|
|
1290
|
+
O(S.$slots, "after", T(M(o(se))))
|
|
958
1291
|
])) : k("", !0)
|
|
959
1292
|
]),
|
|
960
|
-
|
|
961
|
-
id:
|
|
1293
|
+
pe(o(f), {
|
|
1294
|
+
id: o(C),
|
|
962
1295
|
class: "vv-select__hint"
|
|
963
1296
|
}, null, 8, ["id"])
|
|
964
1297
|
], 2));
|
|
965
1298
|
}
|
|
966
|
-
}),
|
|
967
|
-
...
|
|
1299
|
+
}), Cl = {
|
|
1300
|
+
...Ve,
|
|
968
1301
|
value: [String, Number]
|
|
969
|
-
},
|
|
1302
|
+
}, Nl = {
|
|
970
1303
|
name: "VvBadge"
|
|
971
|
-
},
|
|
972
|
-
...
|
|
973
|
-
props:
|
|
974
|
-
setup(
|
|
975
|
-
const
|
|
976
|
-
return (
|
|
977
|
-
class:
|
|
1304
|
+
}, Ll = /* @__PURE__ */ ne({
|
|
1305
|
+
...Nl,
|
|
1306
|
+
props: Cl,
|
|
1307
|
+
setup(t) {
|
|
1308
|
+
const l = t, { modifiers: e } = Q(l), s = me("vv-badge", e);
|
|
1309
|
+
return (n, f) => (p(), g("span", {
|
|
1310
|
+
class: _e(o(s)),
|
|
978
1311
|
role: "status"
|
|
979
1312
|
}, [
|
|
980
|
-
|
|
981
|
-
|
|
1313
|
+
O(n.$slots, "default", {}, () => [
|
|
1314
|
+
J(D(n.value), 1)
|
|
982
1315
|
])
|
|
983
1316
|
], 2));
|
|
984
1317
|
}
|
|
985
|
-
}),
|
|
1318
|
+
}), jl = ["id"], Hl = ["id", "for"], Fl = ["id", "aria-controls", "aria-labelledby", "aria-describedby", "placeholder"], xl = {
|
|
986
1319
|
key: 0,
|
|
987
1320
|
class: "vv-select__input-before"
|
|
988
|
-
},
|
|
1321
|
+
}, Tl = { class: "vv-select__inner" }, Ml = ["aria-labelledby", "tabindex"], Rl = ["aria-label", "onClick"], Wl = {
|
|
989
1322
|
key: 1,
|
|
990
1323
|
class: "vv-select__input-after"
|
|
991
|
-
},
|
|
1324
|
+
}, Kl = {
|
|
992
1325
|
name: "VvCombobox",
|
|
993
|
-
components: { VvDropdown:
|
|
994
|
-
},
|
|
995
|
-
...
|
|
996
|
-
props:
|
|
997
|
-
emits:
|
|
998
|
-
setup(
|
|
999
|
-
const e =
|
|
1000
|
-
|
|
1326
|
+
components: { VvDropdown: St, VvDropdownOption: Pe }
|
|
1327
|
+
}, Xl = /* @__PURE__ */ ne({
|
|
1328
|
+
...Kl,
|
|
1329
|
+
props: ol,
|
|
1330
|
+
emits: ll,
|
|
1331
|
+
setup(t, { emit: l }) {
|
|
1332
|
+
const e = t, s = ot(), { HintSlot: n } = _t(e, s), f = P(null), d = P(null), b = P(null), { focused: v } = Vt(f, l), { focused: y } = Me(b);
|
|
1333
|
+
Y(v, (r) => {
|
|
1001
1334
|
if (e.autoOpen) {
|
|
1002
|
-
if (
|
|
1003
|
-
|
|
1335
|
+
if (r && !m.value) {
|
|
1336
|
+
E();
|
|
1004
1337
|
return;
|
|
1005
1338
|
}
|
|
1006
|
-
!
|
|
1339
|
+
!r && m.value && !y.value && B();
|
|
1007
1340
|
}
|
|
1008
|
-
}),
|
|
1009
|
-
|
|
1341
|
+
}), Y(y, (r) => {
|
|
1342
|
+
!v.value && !r && m.value && B();
|
|
1010
1343
|
});
|
|
1011
|
-
const
|
|
1012
|
-
|
|
1344
|
+
const u = P(""), c = zt(
|
|
1345
|
+
u,
|
|
1013
1346
|
Number(e.debounceSearch)
|
|
1014
1347
|
);
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
() =>
|
|
1348
|
+
Y(
|
|
1349
|
+
c,
|
|
1350
|
+
() => l("change:search", c.value)
|
|
1018
1351
|
);
|
|
1019
|
-
const
|
|
1020
|
-
e.disabled || e.readonly || (
|
|
1021
|
-
},
|
|
1022
|
-
e.disabled || e.readonly ||
|
|
1352
|
+
const m = P(!1), V = () => {
|
|
1353
|
+
e.disabled || e.readonly || (m.value = !m.value);
|
|
1354
|
+
}, E = () => {
|
|
1355
|
+
e.disabled || e.readonly || m.value || (m.value = !0);
|
|
1023
1356
|
}, B = () => {
|
|
1024
|
-
e.disabled || e.readonly || !
|
|
1357
|
+
e.disabled || e.readonly || !m.value || (m.value = !1);
|
|
1025
1358
|
};
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
if (
|
|
1029
|
-
|
|
1359
|
+
Y(m, (r) => {
|
|
1360
|
+
U.value && Ee(() => {
|
|
1361
|
+
if (r) {
|
|
1362
|
+
d.value && d.value.focus();
|
|
1030
1363
|
return;
|
|
1031
1364
|
}
|
|
1032
|
-
|
|
1365
|
+
u.value = "";
|
|
1033
1366
|
});
|
|
1034
1367
|
});
|
|
1035
1368
|
const {
|
|
1036
|
-
id:
|
|
1037
|
-
icon:
|
|
1038
|
-
iconPosition:
|
|
1039
|
-
modifiers:
|
|
1040
|
-
disabled:
|
|
1041
|
-
readonly:
|
|
1042
|
-
loading:
|
|
1043
|
-
valid:
|
|
1044
|
-
invalid:
|
|
1045
|
-
floating:
|
|
1046
|
-
searchable:
|
|
1047
|
-
} =
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
),
|
|
1369
|
+
id: X,
|
|
1370
|
+
icon: R,
|
|
1371
|
+
iconPosition: Z,
|
|
1372
|
+
modifiers: z,
|
|
1373
|
+
disabled: C,
|
|
1374
|
+
readonly: A,
|
|
1375
|
+
loading: H,
|
|
1376
|
+
valid: q,
|
|
1377
|
+
invalid: ee,
|
|
1378
|
+
floating: h,
|
|
1379
|
+
searchable: U
|
|
1380
|
+
} = Q(e), N = Ke(X), ae = i(() => `${N.value}-hint`), ce = i(() => `${N.value}-dropdown`), fe = i(() => `${N.value}-search`), te = i(() => `${N.value}-label`), { hasIcon: se, hasIconBefore: ve, hasIconAfter: re } = wt(
|
|
1381
|
+
R,
|
|
1382
|
+
Z
|
|
1383
|
+
), be = i(() => !ze(e.modelValue)), le = i(() => C.value || A.value ? -1 : e.tabindex), S = me(
|
|
1051
1384
|
"vv-select",
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
disabled:
|
|
1055
|
-
loading:
|
|
1056
|
-
readonly:
|
|
1057
|
-
"icon-before": Boolean(
|
|
1058
|
-
"icon-after": Boolean(
|
|
1059
|
-
valid:
|
|
1060
|
-
invalid:
|
|
1061
|
-
dirty:
|
|
1062
|
-
focus:
|
|
1063
|
-
floating:
|
|
1385
|
+
z,
|
|
1386
|
+
i(() => ({
|
|
1387
|
+
disabled: C.value,
|
|
1388
|
+
loading: H.value,
|
|
1389
|
+
readonly: A.value,
|
|
1390
|
+
"icon-before": Boolean(ve.value),
|
|
1391
|
+
"icon-after": Boolean(re.value),
|
|
1392
|
+
valid: q.value,
|
|
1393
|
+
invalid: ee.value,
|
|
1394
|
+
dirty: be.value,
|
|
1395
|
+
focus: v.value,
|
|
1396
|
+
floating: h.value
|
|
1064
1397
|
}))
|
|
1065
|
-
),
|
|
1066
|
-
() => e.searchable ?
|
|
1067
|
-
), { getOptionLabel:
|
|
1068
|
-
var
|
|
1069
|
-
return (
|
|
1398
|
+
), L = i(
|
|
1399
|
+
() => e.searchable ? a.value : e.options
|
|
1400
|
+
), { getOptionLabel: I, getOptionValue: oe, getOptionDisabled: we } = $t(e), a = i(() => {
|
|
1401
|
+
var r;
|
|
1402
|
+
return (r = e.options) == null ? void 0 : r.filter(($) => I($).toLowerCase().includes(c.value.toLowerCase().trim()));
|
|
1070
1403
|
});
|
|
1071
|
-
function
|
|
1072
|
-
return Array.isArray(e.modelValue) ?
|
|
1404
|
+
function _(r) {
|
|
1405
|
+
return Array.isArray(e.modelValue) ? Oe(r, e.modelValue) || Oe(oe(r), e.modelValue) : Ie(r, e.modelValue) || Ie(oe(r), e.modelValue);
|
|
1073
1406
|
}
|
|
1074
|
-
const
|
|
1075
|
-
let
|
|
1076
|
-
return Array.isArray(e.modelValue) ?
|
|
1077
|
-
(
|
|
1407
|
+
const W = i(() => {
|
|
1408
|
+
let r = [];
|
|
1409
|
+
return Array.isArray(e.modelValue) ? r = e.modelValue : e.modelValue && (r = [e.modelValue]), e.options.filter(
|
|
1410
|
+
($) => r.includes(oe($))
|
|
1078
1411
|
);
|
|
1079
|
-
}),
|
|
1080
|
-
|
|
1412
|
+
}), ie = i(() => W.value.map((r) => I(r)).join(e.separator));
|
|
1413
|
+
Y(W, () => {
|
|
1081
1414
|
!e.multiple && e.autoClose && B();
|
|
1082
1415
|
});
|
|
1083
|
-
const
|
|
1084
|
-
e.autoOpen ?
|
|
1085
|
-
},
|
|
1086
|
-
var
|
|
1416
|
+
const Ot = () => {
|
|
1417
|
+
e.autoOpen ? E() : V();
|
|
1418
|
+
}, De = (r) => {
|
|
1419
|
+
var ue;
|
|
1087
1420
|
if (e.disabled || e.readonly)
|
|
1088
1421
|
return;
|
|
1089
|
-
const
|
|
1090
|
-
let
|
|
1422
|
+
const $ = oe(r);
|
|
1423
|
+
let w = $;
|
|
1091
1424
|
if (e.multiple)
|
|
1092
1425
|
if (Array.isArray(e.modelValue)) {
|
|
1093
|
-
if (e.maxValues !== void 0 && e.maxValues >= 0 && ((
|
|
1426
|
+
if (e.maxValues !== void 0 && e.maxValues >= 0 && ((ue = e.modelValue) == null ? void 0 : ue.length) >= e.maxValues && !Oe($, e.modelValue))
|
|
1094
1427
|
return;
|
|
1095
|
-
|
|
1428
|
+
w = Oe($, e.modelValue) ? hl($, e.modelValue) : [...e.modelValue, $];
|
|
1096
1429
|
} else
|
|
1097
|
-
|
|
1430
|
+
w = [$];
|
|
1098
1431
|
else
|
|
1099
|
-
e.unselectable &&
|
|
1100
|
-
|
|
1101
|
-
},
|
|
1102
|
-
id:
|
|
1432
|
+
e.unselectable && $ === e.modelValue && (w = void 0);
|
|
1433
|
+
l("update:modelValue", w);
|
|
1434
|
+
}, kt = i(() => ({
|
|
1435
|
+
id: N.value,
|
|
1103
1436
|
name: e.name,
|
|
1104
|
-
tabindex:
|
|
1105
|
-
valid:
|
|
1437
|
+
tabindex: le.value,
|
|
1438
|
+
valid: q.value,
|
|
1106
1439
|
validLabel: e.validLabel,
|
|
1107
|
-
invalid:
|
|
1440
|
+
invalid: ee.value,
|
|
1108
1441
|
invalidLabel: e.invalidLabel,
|
|
1109
1442
|
hintLabel: e.hintLabel,
|
|
1110
|
-
loading:
|
|
1443
|
+
loading: H.value,
|
|
1111
1444
|
loadingLabel: e.loadingLabel,
|
|
1112
|
-
disabled:
|
|
1113
|
-
readonly:
|
|
1445
|
+
disabled: C.value,
|
|
1446
|
+
readonly: A.value,
|
|
1114
1447
|
modifiers: e.modifiers,
|
|
1115
|
-
options:
|
|
1448
|
+
options: L.value,
|
|
1116
1449
|
labelKey: e.labelKey,
|
|
1117
1450
|
valueKey: e.valueKey,
|
|
1118
1451
|
icon: e.icon,
|
|
@@ -1123,9 +1456,9 @@ const St = {
|
|
|
1123
1456
|
label: e.label,
|
|
1124
1457
|
placeholder: e.placeholder,
|
|
1125
1458
|
modelValue: e.modelValue
|
|
1126
|
-
})),
|
|
1127
|
-
id:
|
|
1128
|
-
reference:
|
|
1459
|
+
})), Et = i(() => ({
|
|
1460
|
+
id: ce.value,
|
|
1461
|
+
reference: b.value,
|
|
1129
1462
|
placement: e.placement,
|
|
1130
1463
|
transitionName: e.transitionName,
|
|
1131
1464
|
offset: e.offset,
|
|
@@ -1134,160 +1467,183 @@ const St = {
|
|
|
1134
1467
|
autoPlacement: e.autoPlacement,
|
|
1135
1468
|
arrow: e.arrow,
|
|
1136
1469
|
autoClose: e.autoClose,
|
|
1137
|
-
autofocusFirst:
|
|
1470
|
+
autofocusFirst: U.value ? !1 : e.autofocusFirst,
|
|
1138
1471
|
triggerWidth: e.triggerWidth,
|
|
1139
1472
|
modifiers: e.dropdownModifiers
|
|
1140
|
-
})),
|
|
1473
|
+
})), qe = i(() => ({
|
|
1141
1474
|
valid: e.valid,
|
|
1142
1475
|
invalid: e.invalid,
|
|
1143
1476
|
modelValue: e.modelValue
|
|
1144
1477
|
}));
|
|
1145
|
-
return
|
|
1146
|
-
e.autoOpen || !
|
|
1147
|
-
}), (
|
|
1148
|
-
"onUpdate:modelValue":
|
|
1149
|
-
}), null, 16)) : (
|
|
1478
|
+
return ye([" ", "Enter"], (r) => {
|
|
1479
|
+
e.autoOpen || !m.value && v.value && (r.preventDefault(), r.stopImmediatePropagation(), V());
|
|
1480
|
+
}), (r, $) => r.native ? (p(), x(Dl, j({ key: 1 }, o(kt), {
|
|
1481
|
+
"onUpdate:modelValue": $[2] || ($[2] = (w) => l("update:modelValue", w))
|
|
1482
|
+
}), null, 16)) : (p(), g("div", {
|
|
1150
1483
|
key: 0,
|
|
1151
|
-
id:
|
|
1152
|
-
class:
|
|
1484
|
+
id: o(N),
|
|
1485
|
+
class: _e(o(S))
|
|
1153
1486
|
}, [
|
|
1154
|
-
|
|
1487
|
+
r.label ? (p(), g("label", {
|
|
1155
1488
|
key: 0,
|
|
1156
|
-
id:
|
|
1157
|
-
for:
|
|
1158
|
-
},
|
|
1159
|
-
|
|
1489
|
+
id: o(te),
|
|
1490
|
+
for: o(U) ? o(fe) : void 0
|
|
1491
|
+
}, D(r.label), 9, Hl)) : k("", !0),
|
|
1492
|
+
G("div", {
|
|
1160
1493
|
ref_key: "wrapperEl",
|
|
1161
|
-
ref:
|
|
1494
|
+
ref: b,
|
|
1162
1495
|
class: "vv-select__wrapper"
|
|
1163
1496
|
}, [
|
|
1164
|
-
|
|
1165
|
-
modelValue:
|
|
1166
|
-
"onUpdate:modelValue":
|
|
1167
|
-
},
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1497
|
+
pe(St, j({
|
|
1498
|
+
modelValue: o(m),
|
|
1499
|
+
"onUpdate:modelValue": $[1] || ($[1] = (w) => Ne(m) ? m.value = w : null)
|
|
1500
|
+
}, o(Et), {
|
|
1501
|
+
role: o(Se).listbox
|
|
1502
|
+
}), At({
|
|
1503
|
+
default: F(({ aria: w }) => [
|
|
1504
|
+
r.$slots.before ? (p(), g("div", xl, [
|
|
1505
|
+
O(r.$slots, "before", T(M(o(qe))))
|
|
1171
1506
|
])) : k("", !0),
|
|
1172
|
-
|
|
1173
|
-
|
|
1507
|
+
G("div", Tl, [
|
|
1508
|
+
o(ve) ? (p(), x(ge, j({
|
|
1174
1509
|
key: 0,
|
|
1175
1510
|
class: "vv-select__icon"
|
|
1176
|
-
},
|
|
1177
|
-
|
|
1511
|
+
}, o(se)), null, 16)) : k("", !0),
|
|
1512
|
+
G("div", j({
|
|
1178
1513
|
ref_key: "inputEl",
|
|
1179
|
-
ref:
|
|
1180
|
-
},
|
|
1181
|
-
"aria-labelledby":
|
|
1514
|
+
ref: f
|
|
1515
|
+
}, w, {
|
|
1516
|
+
"aria-labelledby": o(te),
|
|
1182
1517
|
class: "vv-select__input",
|
|
1183
1518
|
role: "combobox",
|
|
1184
|
-
tabindex:
|
|
1185
|
-
onClickPassive:
|
|
1519
|
+
tabindex: o(le),
|
|
1520
|
+
onClickPassive: Ot
|
|
1186
1521
|
}), [
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
key:
|
|
1191
|
-
modifiers:
|
|
1522
|
+
O(r.$slots, "value", T(M({ selectedOptions: o(W), onInput: De })), () => [
|
|
1523
|
+
o(ie) ? (p(), g(K, { key: 0 }, [
|
|
1524
|
+
r.badges ? (p(!0), g(K, { key: 1 }, Le(o(W), (ue, Ue) => (p(), x(Ll, {
|
|
1525
|
+
key: Ue,
|
|
1526
|
+
modifiers: r.badgeModifiers,
|
|
1192
1527
|
class: "vv-select__badge"
|
|
1193
1528
|
}, {
|
|
1194
|
-
default:
|
|
1195
|
-
|
|
1196
|
-
|
|
1529
|
+
default: F(() => [
|
|
1530
|
+
J(D(o(I)(ue)) + " ", 1),
|
|
1531
|
+
r.unselectable && !o(A) && !o(C) ? (p(), g("button", {
|
|
1197
1532
|
key: 0,
|
|
1198
|
-
"aria-label":
|
|
1199
|
-
onClick:
|
|
1533
|
+
"aria-label": r.deselectActionLabel,
|
|
1534
|
+
onClick: Dt((zl) => De(ue), ["stop"])
|
|
1200
1535
|
}, [
|
|
1201
|
-
|
|
1202
|
-
], 8,
|
|
1536
|
+
pe(ge, { name: "close" })
|
|
1537
|
+
], 8, Rl)) : k("", !0)
|
|
1203
1538
|
]),
|
|
1204
1539
|
_: 2
|
|
1205
|
-
}, 1032, ["modifiers"]))), 128)) : (
|
|
1206
|
-
|
|
1540
|
+
}, 1032, ["modifiers"]))), 128)) : (p(), g(K, { key: 0 }, [
|
|
1541
|
+
J(D(o(ie)), 1)
|
|
1207
1542
|
], 64))
|
|
1208
|
-
], 64)) : (
|
|
1209
|
-
|
|
1543
|
+
], 64)) : (p(), g(K, { key: 1 }, [
|
|
1544
|
+
J(D(r.placeholder), 1)
|
|
1210
1545
|
], 64))
|
|
1211
1546
|
])
|
|
1212
|
-
], 16,
|
|
1213
|
-
|
|
1547
|
+
], 16, Ml),
|
|
1548
|
+
o(re) ? (p(), x(ge, j({
|
|
1214
1549
|
key: 1,
|
|
1215
1550
|
class: "vv-select__icon vv-select__icon-after"
|
|
1216
|
-
},
|
|
1551
|
+
}, o(se)), null, 16)) : k("", !0)
|
|
1217
1552
|
]),
|
|
1218
|
-
|
|
1219
|
-
|
|
1553
|
+
r.$slots.after ? (p(), g("div", Wl, [
|
|
1554
|
+
O(r.$slots, "after", T(M(o(qe))))
|
|
1220
1555
|
])) : k("", !0)
|
|
1221
1556
|
]),
|
|
1222
|
-
items:
|
|
1223
|
-
(
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
tabindex: t(oe)(f) ? -1 : 0,
|
|
1231
|
-
"aria-selected": p(f),
|
|
1232
|
-
"aria-disabled": t(oe)(f),
|
|
1233
|
-
onClickPassive: (Ee) => ye(f)
|
|
1557
|
+
items: F(() => [
|
|
1558
|
+
o(a).length ? (p(!0), g(K, { key: 0 }, Le(o(a), (w, ue) => (p(), x(Pe, j({
|
|
1559
|
+
disabled: o(we)(w),
|
|
1560
|
+
selected: _(w),
|
|
1561
|
+
unselectable: r.unselectable,
|
|
1562
|
+
deselectHintLabel: r.deselectHintLabel,
|
|
1563
|
+
selectHintLabel: r.selectHintLabel,
|
|
1564
|
+
selectedHintLabel: r.selectedHintLabel
|
|
1234
1565
|
}, {
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1566
|
+
key: ue,
|
|
1567
|
+
class: "vv-dropdown-option",
|
|
1568
|
+
onClickPassive: (Ue) => De(w)
|
|
1569
|
+
}), {
|
|
1570
|
+
default: F(() => [
|
|
1571
|
+
O(r.$slots, "option", T(M({
|
|
1572
|
+
option: w,
|
|
1573
|
+
selectedOptions: o(W),
|
|
1574
|
+
selected: _(w),
|
|
1575
|
+
disabled: o(we)(w)
|
|
1241
1576
|
})), () => [
|
|
1242
|
-
|
|
1243
|
-
H("span", qt, [
|
|
1244
|
-
p(f) ? (u(), v(q, { key: 0 }, [
|
|
1245
|
-
se(F(l.unselectable ? l.pressToDeselectLabel : l.selectedLabel), 1)
|
|
1246
|
-
], 64)) : t(oe)(f) ? k("", !0) : (u(), v(q, { key: 1 }, [
|
|
1247
|
-
se(F(l.pressToSelectLabel), 1)
|
|
1248
|
-
], 64))
|
|
1249
|
-
])
|
|
1577
|
+
J(D(o(I)(w)), 1)
|
|
1250
1578
|
])
|
|
1251
1579
|
]),
|
|
1252
1580
|
_: 2
|
|
1253
|
-
},
|
|
1581
|
+
}, 1040, ["onClickPassive"]))), 128)) : r.options.length ? (p(), x(Pe, {
|
|
1582
|
+
key: 2,
|
|
1583
|
+
modifiers: "inert"
|
|
1584
|
+
}, {
|
|
1585
|
+
default: F(() => [
|
|
1586
|
+
O(r.$slots, "no-results", {}, () => [
|
|
1587
|
+
J(D(r.noResultsLabel), 1)
|
|
1588
|
+
])
|
|
1589
|
+
]),
|
|
1590
|
+
_: 3
|
|
1591
|
+
})) : (p(), x(Pe, {
|
|
1592
|
+
key: 1,
|
|
1593
|
+
modifiers: "inert"
|
|
1594
|
+
}, {
|
|
1595
|
+
default: F(() => [
|
|
1596
|
+
O(r.$slots, "no-options", {}, () => [
|
|
1597
|
+
J(D(r.noOptionsLabel), 1)
|
|
1598
|
+
])
|
|
1599
|
+
]),
|
|
1600
|
+
_: 3
|
|
1601
|
+
}))
|
|
1254
1602
|
]),
|
|
1255
1603
|
_: 2
|
|
1256
1604
|
}, [
|
|
1257
|
-
|
|
1605
|
+
o(U) || r.$slots["dropdown::before"] ? {
|
|
1258
1606
|
name: "before",
|
|
1259
|
-
fn:
|
|
1260
|
-
|
|
1607
|
+
fn: F(() => [
|
|
1608
|
+
O(r.$slots, "dropdown::before"),
|
|
1609
|
+
o(U) ? Te((p(), g("input", {
|
|
1261
1610
|
key: 0,
|
|
1262
|
-
id:
|
|
1611
|
+
id: o(fe),
|
|
1263
1612
|
ref_key: "inputSearchEl",
|
|
1264
|
-
ref:
|
|
1265
|
-
"onUpdate:modelValue":
|
|
1613
|
+
ref: d,
|
|
1614
|
+
"onUpdate:modelValue": $[0] || ($[0] = (w) => Ne(u) ? u.value = w : null),
|
|
1266
1615
|
"aria-autocomplete": "list",
|
|
1267
|
-
"aria-controls":
|
|
1268
|
-
"aria-labelledby":
|
|
1269
|
-
"aria-describedby":
|
|
1616
|
+
"aria-controls": o(ce),
|
|
1617
|
+
"aria-labelledby": o(te),
|
|
1618
|
+
"aria-describedby": o(ae),
|
|
1270
1619
|
autocomplete: "off",
|
|
1271
1620
|
spellcheck: "false",
|
|
1272
1621
|
type: "search",
|
|
1273
1622
|
class: "vv-dropdown__search",
|
|
1274
|
-
placeholder:
|
|
1275
|
-
}, null, 8,
|
|
1276
|
-
[
|
|
1277
|
-
[
|
|
1623
|
+
placeholder: r.searchPlaceholder
|
|
1624
|
+
}, null, 8, Fl)), [
|
|
1625
|
+
[lt, o(m)],
|
|
1626
|
+
[Ct, o(u)]
|
|
1278
1627
|
]) : k("", !0)
|
|
1279
1628
|
]),
|
|
1280
1629
|
key: "0"
|
|
1630
|
+
} : void 0,
|
|
1631
|
+
r.$slots["dropdown::after"] ? {
|
|
1632
|
+
name: "after",
|
|
1633
|
+
fn: F(() => [
|
|
1634
|
+
O(r.$slots, "dropdown::after")
|
|
1635
|
+
]),
|
|
1636
|
+
key: "1"
|
|
1281
1637
|
} : void 0
|
|
1282
|
-
]), 1040, ["modelValue"])
|
|
1638
|
+
]), 1040, ["modelValue", "role"])
|
|
1283
1639
|
], 512),
|
|
1284
|
-
|
|
1285
|
-
id:
|
|
1640
|
+
pe(o(n), {
|
|
1641
|
+
id: o(ae),
|
|
1286
1642
|
class: "vv-select__hint"
|
|
1287
1643
|
}, null, 8, ["id"])
|
|
1288
|
-
], 10,
|
|
1644
|
+
], 10, jl));
|
|
1289
1645
|
}
|
|
1290
1646
|
});
|
|
1291
1647
|
export {
|
|
1292
|
-
|
|
1648
|
+
Xl as default
|
|
1293
1649
|
};
|