@volverjs/ui-vue 0.0.10-beta.2 → 0.0.10-beta.21
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 +98 -3
- package/auto-imports.d.ts +6 -2
- package/bin/icons.cjs +1 -1
- package/bin/icons.js +23 -16
- package/dist/Volver.d.ts +1 -1
- package/dist/components/VvAccordion/VvAccordion.es.js +70 -14
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +13 -6
- package/dist/components/VvAccordion/index.d.ts +4 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +117 -38
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -8
- package/dist/components/VvAccordionGroup/index.d.ts +4 -1
- package/dist/components/VvAction/VvAction.es.js +58 -13
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +59 -12
- package/dist/components/VvAction/index.d.ts +25 -4
- package/dist/components/VvAlert/VvAlert.es.js +195 -152
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +18 -8
- package/dist/components/VvAlert/index.d.ts +9 -5
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +240 -174
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +13 -6
- package/dist/components/VvAlertGroup/index.d.ts +6 -2
- package/dist/components/VvAvatar/VvAvatar.es.js +54 -9
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +12 -4
- package/dist/components/VvAvatar/index.d.ts +4 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +111 -36
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +10 -3
- package/dist/components/VvAvatarGroup/index.d.ts +4 -1
- package/dist/components/VvBadge/VvBadge.es.js +73 -17
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +12 -4
- package/dist/components/VvBadge/index.d.ts +4 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +259 -49
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +27 -7
- package/dist/components/VvBreadcrumb/index.d.ts +6 -10
- package/dist/components/VvButton/VvButton.es.js +187 -141
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +101 -27
- package/dist/components/VvButton/index.d.ts +41 -14
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +69 -16
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +23 -10
- package/dist/components/VvButtonGroup/index.d.ts +8 -2
- package/dist/components/VvCard/VvCard.es.js +84 -25
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +12 -4
- package/dist/components/VvCard/index.d.ts +4 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +91 -22
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +104 -32
- package/dist/components/VvCheckbox/index.d.ts +45 -12
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +180 -67
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +100 -29
- package/dist/components/VvCheckboxGroup/index.d.ts +45 -12
- package/dist/components/VvCombobox/VvCombobox.es.js +758 -531
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +181 -108
- package/dist/components/VvCombobox/index.d.ts +53 -22
- package/dist/components/VvDialog/VvDialog.es.js +136 -141
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +4 -4
- package/dist/components/VvDropdown/VvDropdown.es.js +121 -55
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +101 -75
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +72 -11
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +12 -4
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +26 -7
- package/dist/components/VvDropdown/index.d.ts +16 -11
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +82 -22
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +13 -7
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +56 -8
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +76 -17
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +23 -96
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +23 -66
- package/dist/components/VvIcon/index.d.ts +33 -48
- package/dist/components/VvInputFile/VvInputFile.es.js +1734 -0
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +313 -0
- package/dist/components/VvInputFile/index.d.ts +179 -0
- package/dist/components/VvInputText/VvInputClearAction.d.ts +7 -5
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +10 -8
- package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +331 -293
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +162 -55
- package/dist/components/VvInputText/index.d.ts +71 -29
- package/dist/components/VvNav/VvNav.es.js +151 -73
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +41 -14
- package/dist/components/VvNav/VvNavItem.vue.d.ts +9 -0
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +2 -0
- package/dist/components/VvNav/index.d.ts +5 -13
- package/dist/components/VvNavItem/VvNavItem.es.js +436 -0
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -0
- package/dist/components/VvNavSeparator/VvNavSeparator.es.js +24 -0
- package/dist/components/VvNavSeparator/VvNavSeparator.umd.js +1 -0
- package/dist/components/VvProgress/VvProgress.es.js +65 -14
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +10 -3
- package/dist/components/VvProgress/index.d.ts +4 -1
- package/dist/components/VvRadio/VvRadio.es.js +89 -21
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +102 -30
- package/dist/components/VvRadio/index.d.ts +44 -11
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +180 -66
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +100 -29
- package/dist/components/VvRadioGroup/index.d.ts +45 -12
- package/dist/components/VvSelect/VvSelect.es.js +248 -226
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +112 -39
- package/dist/components/VvSelect/index.d.ts +48 -14
- package/dist/components/VvTab/VvTab.es.js +256 -110
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +50 -13
- package/dist/components/VvTab/index.d.ts +13 -4
- package/dist/components/VvTextarea/VvTextarea.es.js +229 -212
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +155 -48
- package/dist/components/VvTextarea/index.d.ts +68 -19
- package/dist/components/VvTooltip/VvTooltip.es.js +72 -17
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +10 -3
- package/dist/components/VvTooltip/index.d.ts +4 -1
- package/dist/components/common/HintSlot.d.ts +1 -1
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.es.js +2902 -1329
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlert.d.ts +37 -4
- package/dist/composables/dropdown/useProvideDropdown.d.ts +1 -1
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/index.es.js +88 -1
- package/dist/composables/index.umd.js +1 -1
- package/dist/composables/useBlurhash.d.ts +7 -0
- package/dist/composables/useComponentIcon.d.ts +9 -8
- package/dist/composables/useVolver.d.ts +1 -1
- package/dist/directives/index.d.ts +3 -5
- package/dist/directives/index.es.js +92 -31
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +90 -26
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.es.js +210 -210
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.es.js +81 -16
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +287 -73
- package/dist/resolvers/unplugin.d.ts +6 -1
- package/dist/resolvers/unplugin.es.js +78 -10
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +72 -84
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +623 -461
- package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
- package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
- package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
- package/dist/stories/Icon/Icon.settings.d.ts +1 -0
- package/dist/stories/InputFile/InputFile.settings.d.ts +56 -0
- package/dist/stories/InputFile/InputFile.stories.d.ts +12 -0
- package/dist/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
- package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
- package/dist/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
- package/dist/stories/Tab/Tab.settings.d.ts +4 -37
- package/dist/types/alert.d.ts +13 -0
- package/dist/types/blurhash.d.ts +12 -0
- package/dist/types/floating-ui.d.ts +6 -0
- package/dist/types/generic.d.ts +4 -0
- package/dist/types/group.d.ts +37 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/input-file.d.ts +16 -0
- package/dist/types/nav.d.ts +18 -0
- package/dist/utils/ObjectUtilities.d.ts +0 -1
- package/dist/workers/blurhash.d.ts +1 -0
- package/package.json +97 -80
- package/src/Volver.ts +31 -20
- 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/VvAccordion/VvAccordion.vue +2 -2
- package/src/components/VvAction/VvAction.vue +5 -2
- package/src/components/VvAlert/index.ts +1 -3
- package/src/components/VvAlertGroup/index.ts +2 -1
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
- package/src/components/VvBreadcrumb/index.ts +2 -8
- package/src/components/VvButton/VvButton.vue +6 -6
- package/src/components/VvButton/index.ts +2 -4
- package/src/components/VvCombobox/VvCombobox.vue +24 -16
- package/src/components/VvCombobox/index.ts +4 -0
- package/src/components/VvIcon/VvIcon.vue +2 -2
- package/src/components/VvIcon/index.ts +35 -48
- package/src/components/VvInputFile/VvInputFile.vue +365 -0
- package/src/components/VvInputFile/index.ts +116 -0
- package/src/components/VvInputText/VvInputClearAction.ts +10 -6
- package/src/components/VvInputText/VvInputPasswordAction.ts +13 -9
- package/src/components/VvInputText/VvInputText.vue +17 -18
- package/src/components/VvInputText/index.ts +7 -15
- package/src/components/VvNav/VvNav.vue +30 -50
- package/src/components/VvNav/VvNavItem.vue +18 -0
- package/src/components/VvNav/VvNavSeparator.vue +11 -0
- package/src/components/VvNav/index.ts +2 -15
- package/src/components/VvSelect/VvSelect.vue +5 -8
- package/src/components/VvTab/VvTab.vue +63 -35
- package/src/components/VvTab/index.ts +10 -4
- package/src/components/VvTextarea/VvTextarea.vue +6 -9
- package/src/components/index.ts +10 -0
- package/src/composables/index.ts +1 -0
- package/src/composables/useBlurhash.ts +76 -0
- package/src/composables/useComponentIcon.ts +15 -14
- package/src/composables/useUniqueId.ts +2 -2
- package/src/directives/index.ts +3 -6
- package/src/directives/v-tooltip.ts +19 -10
- package/src/index.ts +3 -1
- package/src/props/index.ts +115 -27
- package/src/resolvers/unplugin.ts +24 -14
- package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
- package/src/stories/Blurhash/BlurhashComposable.stories.ts +195 -0
- package/src/stories/Combobox/Combobox.settings.ts +8 -0
- package/src/stories/Icon/Icon.settings.ts +3 -3
- package/src/stories/InputFile/InputFile.settings.ts +36 -0
- package/src/stories/InputFile/InputFile.stories.ts +89 -0
- package/src/stories/InputFile/InputFileDropArea.stories.ts +56 -0
- package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
- package/src/stories/InputFile/InputFileSlots.stories.ts +33 -0
- package/src/stories/Nav/Nav.settings.ts +3 -4
- package/src/stories/Nav/Nav.test.ts +4 -15
- package/src/stories/Tab/Tab.settings.ts +9 -9
- package/src/stories/Tab/Tab.stories.ts +2 -2
- package/src/stories/Tab/Tab.test.ts +6 -14
- package/src/stories/argTypes.ts +1 -1
- package/src/types/blurhash.ts +21 -0
- package/src/types/generic.ts +6 -0
- package/src/types/index.ts +7 -0
- package/src/types/input-file.ts +18 -0
- package/src/types/nav.ts +20 -0
- package/src/utils/ObjectUtilities.ts +0 -11
- package/src/workers/blurhash.ts +9 -0
- package/dist/components/VvNav/VvNavItemTitle.vue.d.ts +0 -6
- package/dist/components/VvNav/VvNavSeparator.d.ts +0 -2
- package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +0 -19
- package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +0 -1
- package/src/components/VvNav/VvNavItemTitle.vue +0 -11
- package/src/components/VvNav/VvNavSeparator.ts +0 -8
- package/src/types/generic.d.ts +0 -6
- /package/src/types/{alert.d.ts → alert.ts} +0 -0
- /package/src/types/{floating-ui.d.ts → floating-ui.ts} +0 -0
- /package/src/types/{group.d.ts → group.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { inject, computed, unref, defineComponent, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, provide, h, Fragment, useAttrs, onMounted, watch, nextTick, createElementBlock, createVNode, withCtx, renderSlot, normalizeProps, guardReactiveProps, Transition, toHandlers, withDirectives, createElementVNode, normalizeStyle, normalizeClass, vShow, createTextVNode, toDisplayString, isRef, useSlots, renderList, vModelSelect, createSlots, resolveDynamicComponent, toRef, withModifiers, vModelText } from "vue";
|
|
1
|
+
import { inject, computed, unref, defineComponent, mergeDefaults, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, provide, h, Fragment, useAttrs, onMounted, watch, nextTick, createElementBlock, createVNode, withCtx, renderSlot, normalizeProps, guardReactiveProps, Transition, toHandlers, withDirectives, createElementVNode, normalizeStyle, normalizeClass, vShow, createTextVNode, toDisplayString, isRef, useSlots, renderList, vModelSelect, createSlots, resolveDynamicComponent, toRef, withModifiers, vModelText } from "vue";
|
|
2
2
|
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
3
3
|
import { autoPlacement, flip, shift, size, offset, arrow, useFloating, autoUpdate } from "@floating-ui/vue";
|
|
4
|
-
import {
|
|
4
|
+
import { uid } from "uid";
|
|
5
5
|
import { useMutationObserver, useVModel, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, useElementVisibility, refDebounced, computedAsync } from "@vueuse/core";
|
|
6
6
|
import mitt from "mitt";
|
|
7
7
|
import { get } from "ts-dot-prop";
|
|
@@ -97,6 +97,7 @@ const LinkProps = {
|
|
|
97
97
|
*/
|
|
98
98
|
target: {
|
|
99
99
|
type: String,
|
|
100
|
+
default: void 0,
|
|
100
101
|
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
101
102
|
},
|
|
102
103
|
/**
|
|
@@ -111,27 +112,33 @@ const ValidProps = {
|
|
|
111
112
|
/**
|
|
112
113
|
* Valid status
|
|
113
114
|
*/
|
|
114
|
-
valid: Boolean,
|
|
115
|
+
valid: { type: Boolean, default: false },
|
|
115
116
|
/**
|
|
116
117
|
* Valid label
|
|
117
118
|
*/
|
|
118
|
-
validLabel: [String, Array]
|
|
119
|
+
validLabel: { type: [String, Array], default: void 0 }
|
|
119
120
|
};
|
|
120
121
|
const InvalidProps = {
|
|
121
122
|
/**
|
|
122
123
|
* Invalid status
|
|
123
124
|
*/
|
|
124
|
-
invalid:
|
|
125
|
+
invalid: {
|
|
126
|
+
type: Boolean,
|
|
127
|
+
default: false
|
|
128
|
+
},
|
|
125
129
|
/**
|
|
126
130
|
* Invalid label
|
|
127
131
|
*/
|
|
128
|
-
invalidLabel: [String, Array]
|
|
132
|
+
invalidLabel: { type: [String, Array], default: void 0 }
|
|
129
133
|
};
|
|
130
134
|
const LoadingProps = {
|
|
131
135
|
/**
|
|
132
136
|
* Loading status
|
|
133
137
|
*/
|
|
134
|
-
loading:
|
|
138
|
+
loading: {
|
|
139
|
+
type: Boolean,
|
|
140
|
+
default: false
|
|
141
|
+
},
|
|
135
142
|
/**
|
|
136
143
|
* Loading label
|
|
137
144
|
*/
|
|
@@ -144,43 +151,73 @@ const DisabledProps = {
|
|
|
144
151
|
/**
|
|
145
152
|
* Whether the form control is disabled
|
|
146
153
|
*/
|
|
147
|
-
disabled:
|
|
154
|
+
disabled: {
|
|
155
|
+
type: Boolean,
|
|
156
|
+
default: false
|
|
157
|
+
}
|
|
148
158
|
};
|
|
149
159
|
const SelectedProps = {
|
|
150
160
|
/**
|
|
151
161
|
* Whether the item is selected
|
|
152
162
|
*/
|
|
153
|
-
selected:
|
|
163
|
+
selected: {
|
|
164
|
+
type: Boolean,
|
|
165
|
+
default: false
|
|
166
|
+
}
|
|
154
167
|
};
|
|
155
168
|
const ActiveProps = {
|
|
156
169
|
/**
|
|
157
170
|
* Whether the item is active
|
|
158
171
|
*/
|
|
159
|
-
active:
|
|
172
|
+
active: {
|
|
173
|
+
type: Boolean,
|
|
174
|
+
default: false
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
const CurrentProps = {
|
|
178
|
+
/**
|
|
179
|
+
* Whether the item is current
|
|
180
|
+
*/
|
|
181
|
+
current: {
|
|
182
|
+
type: Boolean,
|
|
183
|
+
default: false
|
|
184
|
+
}
|
|
160
185
|
};
|
|
161
186
|
const PressedProps = {
|
|
162
187
|
/**
|
|
163
188
|
* Whether the item is pressed
|
|
164
189
|
*/
|
|
165
|
-
pressed:
|
|
190
|
+
pressed: {
|
|
191
|
+
type: Boolean,
|
|
192
|
+
default: false
|
|
193
|
+
}
|
|
166
194
|
};
|
|
167
195
|
const LabelProps = {
|
|
168
196
|
/**
|
|
169
197
|
* The item label
|
|
170
198
|
*/
|
|
171
|
-
label:
|
|
199
|
+
label: {
|
|
200
|
+
type: [String, Number],
|
|
201
|
+
default: void 0
|
|
202
|
+
}
|
|
172
203
|
};
|
|
173
204
|
const ReadonlyProps = {
|
|
174
205
|
/**
|
|
175
206
|
* The value is not editable
|
|
176
207
|
*/
|
|
177
|
-
readonly:
|
|
208
|
+
readonly: {
|
|
209
|
+
type: Boolean,
|
|
210
|
+
default: false
|
|
211
|
+
}
|
|
178
212
|
};
|
|
179
213
|
const ModifiersProps = {
|
|
180
214
|
/**
|
|
181
215
|
* Component BEM modifiers
|
|
182
216
|
*/
|
|
183
|
-
modifiers:
|
|
217
|
+
modifiers: {
|
|
218
|
+
type: [String, Array],
|
|
219
|
+
default: void 0
|
|
220
|
+
}
|
|
184
221
|
};
|
|
185
222
|
const HintProps = {
|
|
186
223
|
hintLabel: { type: String, default: "" }
|
|
@@ -211,7 +248,10 @@ const IconProps = {
|
|
|
211
248
|
* VvIcon name or props
|
|
212
249
|
* @see VVIcon
|
|
213
250
|
*/
|
|
214
|
-
icon: {
|
|
251
|
+
icon: {
|
|
252
|
+
type: [String, Object],
|
|
253
|
+
default: void 0
|
|
254
|
+
},
|
|
215
255
|
/**
|
|
216
256
|
* VvIcon position
|
|
217
257
|
*/
|
|
@@ -232,7 +272,10 @@ const FloatingLabelProps = {
|
|
|
232
272
|
/**
|
|
233
273
|
* If true the label will be floating
|
|
234
274
|
*/
|
|
235
|
-
floating:
|
|
275
|
+
floating: {
|
|
276
|
+
type: Boolean,
|
|
277
|
+
default: false
|
|
278
|
+
}
|
|
236
279
|
};
|
|
237
280
|
const UnselectableProps = {
|
|
238
281
|
/**
|
|
@@ -268,7 +311,8 @@ const DropdownProps = {
|
|
|
268
311
|
* Dropdown show / hide transition name
|
|
269
312
|
*/
|
|
270
313
|
transitionName: {
|
|
271
|
-
type: String
|
|
314
|
+
type: String,
|
|
315
|
+
default: void 0
|
|
272
316
|
},
|
|
273
317
|
/**
|
|
274
318
|
* Offset of the dropdown from the trigger
|
|
@@ -336,7 +380,8 @@ const DropdownProps = {
|
|
|
336
380
|
* Set dropdown width to the same as the trigger
|
|
337
381
|
*/
|
|
338
382
|
triggerWidth: {
|
|
339
|
-
type: Boolean
|
|
383
|
+
type: Boolean,
|
|
384
|
+
default: false
|
|
340
385
|
}
|
|
341
386
|
};
|
|
342
387
|
const IdNameProps = {
|
|
@@ -353,7 +398,10 @@ const AutofocusProps = {
|
|
|
353
398
|
* Global attribute autofocus
|
|
354
399
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
|
|
355
400
|
*/
|
|
356
|
-
autofocus:
|
|
401
|
+
autofocus: {
|
|
402
|
+
type: Boolean,
|
|
403
|
+
default: false
|
|
404
|
+
}
|
|
357
405
|
};
|
|
358
406
|
const AutocompleteProps = {
|
|
359
407
|
/**
|
|
@@ -367,6 +415,7 @@ const ActionProps = {
|
|
|
367
415
|
...LabelProps,
|
|
368
416
|
...PressedProps,
|
|
369
417
|
...ActiveProps,
|
|
418
|
+
...CurrentProps,
|
|
370
419
|
...LinkProps,
|
|
371
420
|
/**
|
|
372
421
|
* Button type
|
|
@@ -382,10 +431,21 @@ const ActionProps = {
|
|
|
382
431
|
ariaLabel: {
|
|
383
432
|
type: String,
|
|
384
433
|
default: void 0
|
|
434
|
+
},
|
|
435
|
+
/**
|
|
436
|
+
* Default tag for the action
|
|
437
|
+
*/
|
|
438
|
+
defaultTag: {
|
|
439
|
+
type: String,
|
|
440
|
+
default: ActionTag.button
|
|
385
441
|
}
|
|
386
442
|
};
|
|
387
443
|
const VvComboboxEvents = [
|
|
388
444
|
"update:modelValue",
|
|
445
|
+
"update:search",
|
|
446
|
+
/**
|
|
447
|
+
* @deprecated change:search should not be used, use update:search instead
|
|
448
|
+
*/
|
|
389
449
|
"change:search",
|
|
390
450
|
"focus",
|
|
391
451
|
"blur"
|
|
@@ -533,99 +593,9 @@ const VvComboboxProps = {
|
|
|
533
593
|
default: false
|
|
534
594
|
}
|
|
535
595
|
};
|
|
536
|
-
const
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
*/
|
|
540
|
-
color: String,
|
|
541
|
-
/**
|
|
542
|
-
* Width
|
|
543
|
-
*/
|
|
544
|
-
width: {
|
|
545
|
-
type: [String, Number]
|
|
546
|
-
},
|
|
547
|
-
/**
|
|
548
|
-
* Height
|
|
549
|
-
*/
|
|
550
|
-
height: {
|
|
551
|
-
type: [String, Number]
|
|
552
|
-
},
|
|
553
|
-
/**
|
|
554
|
-
* Icon name
|
|
555
|
-
* Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
|
|
556
|
-
* https://docs.iconify.design/api/providers.html#provider-in-icon-name
|
|
557
|
-
*/
|
|
558
|
-
name: {
|
|
559
|
-
type: String,
|
|
560
|
-
required: true
|
|
561
|
-
},
|
|
562
|
-
/**
|
|
563
|
-
* By default 'vv'
|
|
564
|
-
* If custom collection is not added with "addCollection" DS class method, this prop could not be used
|
|
565
|
-
* Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
|
|
566
|
-
*/
|
|
567
|
-
provider: {
|
|
568
|
-
type: String
|
|
569
|
-
},
|
|
570
|
-
/**
|
|
571
|
-
* The name of icon set.
|
|
572
|
-
* Icon default options prefix: simple | normal | detailed
|
|
573
|
-
*/
|
|
574
|
-
prefix: {
|
|
575
|
-
type: String,
|
|
576
|
-
default: "normal"
|
|
577
|
-
},
|
|
578
|
-
/**
|
|
579
|
-
* Url remote SVG icon
|
|
580
|
-
*/
|
|
581
|
-
src: String,
|
|
582
|
-
/**
|
|
583
|
-
* Horizontal flip
|
|
584
|
-
*/
|
|
585
|
-
horizontalFlip: Boolean,
|
|
586
|
-
/**
|
|
587
|
-
* Vertical flip
|
|
588
|
-
*/
|
|
589
|
-
verticalFlip: Boolean,
|
|
590
|
-
/**
|
|
591
|
-
* String alternative to "horizontalFlip" and "verticalFlip".
|
|
592
|
-
* Example: https://docs.iconify.design/icon-components/vue/transform.html
|
|
593
|
-
*/
|
|
594
|
-
flip: String,
|
|
595
|
-
/**
|
|
596
|
-
* Icon render mode
|
|
597
|
-
* 'style' = 'bg' or 'mask', depending on icon content
|
|
598
|
-
* 'bg' = span with style using `background`
|
|
599
|
-
* 'mask' = span with style using `mask`
|
|
600
|
-
* 'svg' = svg
|
|
601
|
-
* Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
|
|
602
|
-
*/
|
|
603
|
-
mode: String,
|
|
604
|
-
/**
|
|
605
|
-
* Toggles inline or block mode
|
|
606
|
-
* Example https://docs.iconify.design/icon-components/vue/inline.html
|
|
607
|
-
*/
|
|
608
|
-
inline: Boolean,
|
|
609
|
-
/**
|
|
610
|
-
* rotates icon
|
|
611
|
-
* Example https://docs.iconify.design/icon-components/vue/transform.html
|
|
612
|
-
*/
|
|
613
|
-
rotate: [Number, String],
|
|
614
|
-
/**
|
|
615
|
-
* A callback that is called when icon data has been loaded
|
|
616
|
-
*/
|
|
617
|
-
onLoad: Function,
|
|
618
|
-
/**
|
|
619
|
-
* SVG icon string
|
|
620
|
-
*/
|
|
621
|
-
svg: String,
|
|
622
|
-
/**
|
|
623
|
-
* Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
|
|
624
|
-
* @values string | string[]
|
|
625
|
-
*/
|
|
626
|
-
modifiers: {
|
|
627
|
-
type: [String, Array]
|
|
628
|
-
}
|
|
596
|
+
const VvIconPropsDefaults = {
|
|
597
|
+
prefix: "normal"
|
|
598
|
+
/* normal */
|
|
629
599
|
};
|
|
630
600
|
function useVolver() {
|
|
631
601
|
return inject(INJECTION_KEY_VOLVER);
|
|
@@ -658,7 +628,24 @@ const __default__$9 = {
|
|
|
658
628
|
};
|
|
659
629
|
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
660
630
|
...__default__$9,
|
|
661
|
-
props:
|
|
631
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
632
|
+
name: {},
|
|
633
|
+
color: {},
|
|
634
|
+
width: {},
|
|
635
|
+
height: {},
|
|
636
|
+
provider: {},
|
|
637
|
+
prefix: {},
|
|
638
|
+
src: {},
|
|
639
|
+
horizontalFlip: { type: Boolean },
|
|
640
|
+
verticalFlip: { type: Boolean },
|
|
641
|
+
flip: {},
|
|
642
|
+
mode: {},
|
|
643
|
+
inline: { type: Boolean },
|
|
644
|
+
rotate: {},
|
|
645
|
+
onLoad: { type: Function },
|
|
646
|
+
svg: {},
|
|
647
|
+
modifiers: {}
|
|
648
|
+
}, VvIconPropsDefaults),
|
|
662
649
|
setup(__props) {
|
|
663
650
|
const props = __props;
|
|
664
651
|
const hasRotate = computed(() => {
|
|
@@ -745,7 +732,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
745
732
|
color: _ctx.color,
|
|
746
733
|
onLoad: _ctx.onLoad,
|
|
747
734
|
icon: unref(icon)
|
|
748
|
-
}), null, 16, ["class"])) : createCommentVNode("", true);
|
|
735
|
+
}), null, 16, ["class"])) : createCommentVNode("v-if", true);
|
|
749
736
|
};
|
|
750
737
|
}
|
|
751
738
|
});
|
|
@@ -776,7 +763,7 @@ const VvDropdownProps = {
|
|
|
776
763
|
validator: (value) => Object.values(DropdownRole).includes(value)
|
|
777
764
|
}
|
|
778
765
|
};
|
|
779
|
-
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) ||
|
|
766
|
+
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
|
|
780
767
|
function useProvideDropdownTrigger({
|
|
781
768
|
reference,
|
|
782
769
|
id,
|
|
@@ -849,8 +836,9 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
849
836
|
"leave",
|
|
850
837
|
"leave-cancelled"
|
|
851
838
|
],
|
|
852
|
-
setup(__props, { expose: __expose, emit }) {
|
|
839
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
853
840
|
const props = __props;
|
|
841
|
+
const emit = __emit;
|
|
854
842
|
const { id } = toRefs(props);
|
|
855
843
|
const hasId = useUniqueId(id);
|
|
856
844
|
const attrs = useAttrs();
|
|
@@ -1186,50 +1174,70 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
1186
1174
|
}
|
|
1187
1175
|
};
|
|
1188
1176
|
return (_ctx, _cache) => {
|
|
1189
|
-
return openBlock(), createElementBlock(
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1177
|
+
return openBlock(), createElementBlock(
|
|
1178
|
+
Fragment,
|
|
1179
|
+
null,
|
|
1180
|
+
[
|
|
1181
|
+
createVNode(unref(VvDropdownTriggerProvider), null, {
|
|
1182
|
+
default: withCtx(() => [
|
|
1183
|
+
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ init, show, hide, toggle, expanded: unref(expanded), aria: unref(referenceAria) })))
|
|
1184
|
+
]),
|
|
1185
|
+
_: 3
|
|
1186
|
+
/* FORWARDED */
|
|
1187
|
+
}),
|
|
1188
|
+
createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers(dropdownTransitionHandlers), { persisted: "" }), {
|
|
1189
|
+
default: withCtx(() => [
|
|
1190
|
+
withDirectives(createElementVNode(
|
|
1191
|
+
"div",
|
|
1192
|
+
{
|
|
1193
|
+
ref_key: "floatingEl",
|
|
1194
|
+
ref: floatingEl,
|
|
1195
|
+
style: normalizeStyle(unref(dropdownPlacement)),
|
|
1196
|
+
class: normalizeClass(unref(bemCssClasses))
|
|
1197
|
+
},
|
|
1198
|
+
[
|
|
1199
|
+
props.arrow ? (openBlock(), createElementBlock(
|
|
1200
|
+
"div",
|
|
1201
|
+
{
|
|
1202
|
+
key: 0,
|
|
1203
|
+
ref_key: "arrowEl",
|
|
1204
|
+
ref: arrowEl,
|
|
1205
|
+
style: normalizeStyle(unref(arrowPlacement)),
|
|
1206
|
+
class: "vv-dropdown__arrow"
|
|
1207
|
+
},
|
|
1208
|
+
null,
|
|
1209
|
+
4
|
|
1210
|
+
/* STYLE */
|
|
1211
|
+
)) : createCommentVNode("v-if", true),
|
|
1212
|
+
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
|
|
1213
|
+
createElementVNode("div", mergeProps(unref(attrs), {
|
|
1214
|
+
id: unref(hasId),
|
|
1215
|
+
ref_key: "listEl",
|
|
1216
|
+
ref: listEl,
|
|
1217
|
+
tabindex: !unref(expanded) ? -1 : void 0,
|
|
1218
|
+
role: unref(role),
|
|
1219
|
+
"aria-labelledby": unref(hasAriaLabelledby),
|
|
1220
|
+
class: "vv-dropdown__list"
|
|
1221
|
+
}), [
|
|
1222
|
+
renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
|
|
1223
|
+
role: unref(itemRole)
|
|
1224
|
+
})))
|
|
1225
|
+
], 16, _hoisted_1$5),
|
|
1226
|
+
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
|
|
1227
|
+
],
|
|
1228
|
+
6
|
|
1229
|
+
/* CLASS, STYLE */
|
|
1230
|
+
), [
|
|
1231
|
+
[vShow, unref(expanded)]
|
|
1232
|
+
])
|
|
1233
|
+
]),
|
|
1234
|
+
_: 3
|
|
1235
|
+
/* FORWARDED */
|
|
1236
|
+
}, 16, ["name"])
|
|
1237
|
+
],
|
|
1238
|
+
64
|
|
1239
|
+
/* STABLE_FRAGMENT */
|
|
1240
|
+
);
|
|
1233
1241
|
};
|
|
1234
1242
|
}
|
|
1235
1243
|
});
|
|
@@ -1260,13 +1268,19 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1260
1268
|
}
|
|
1261
1269
|
});
|
|
1262
1270
|
return (_ctx, _cache) => {
|
|
1263
|
-
return openBlock(), createElementBlock(
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1271
|
+
return openBlock(), createElementBlock(
|
|
1272
|
+
"div",
|
|
1273
|
+
mergeProps({ role: unref(role) }, {
|
|
1274
|
+
ref_key: "element",
|
|
1275
|
+
ref: element,
|
|
1276
|
+
class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
|
|
1277
|
+
}),
|
|
1278
|
+
[
|
|
1279
|
+
renderSlot(_ctx.$slots, "default")
|
|
1280
|
+
],
|
|
1281
|
+
16
|
|
1282
|
+
/* FULL_PROPS */
|
|
1283
|
+
);
|
|
1270
1284
|
};
|
|
1271
1285
|
}
|
|
1272
1286
|
});
|
|
@@ -1325,11 +1339,16 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1325
1339
|
title: unref(hintLabel)
|
|
1326
1340
|
}, [
|
|
1327
1341
|
renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps({ disabled: _ctx.disabled, selected: _ctx.selected, unselectable: _ctx.unselectable })), () => [
|
|
1328
|
-
createTextVNode(
|
|
1342
|
+
createTextVNode(
|
|
1343
|
+
toDisplayString(unref(hintLabel)),
|
|
1344
|
+
1
|
|
1345
|
+
/* TEXT */
|
|
1346
|
+
)
|
|
1329
1347
|
])
|
|
1330
1348
|
], 8, _hoisted_1$4)
|
|
1331
1349
|
]),
|
|
1332
1350
|
_: 3
|
|
1351
|
+
/* FORWARDED */
|
|
1333
1352
|
}, 8, ["class", "tabindex", "aria-selected", "aria-disabled"]);
|
|
1334
1353
|
};
|
|
1335
1354
|
}
|
|
@@ -1350,7 +1369,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1350
1369
|
setup(__props) {
|
|
1351
1370
|
const props = __props;
|
|
1352
1371
|
return (_ctx, _cache) => {
|
|
1353
|
-
return openBlock(), createElementBlock(
|
|
1372
|
+
return openBlock(), createElementBlock(
|
|
1373
|
+
"li",
|
|
1374
|
+
_hoisted_1$3,
|
|
1375
|
+
toDisplayString(props.label),
|
|
1376
|
+
1
|
|
1377
|
+
/* TEXT */
|
|
1378
|
+
);
|
|
1354
1379
|
};
|
|
1355
1380
|
}
|
|
1356
1381
|
});
|
|
@@ -1689,30 +1714,30 @@ function useComponentFocus(inputTemplateRef, emit) {
|
|
|
1689
1714
|
};
|
|
1690
1715
|
}
|
|
1691
1716
|
function useComponentIcon(icon, iconPosition) {
|
|
1717
|
+
const hasIcon = computed(() => {
|
|
1718
|
+
if (typeof (icon == null ? void 0 : icon.value) === "string") {
|
|
1719
|
+
return { name: icon == null ? void 0 : icon.value };
|
|
1720
|
+
}
|
|
1721
|
+
return icon == null ? void 0 : icon.value;
|
|
1722
|
+
});
|
|
1692
1723
|
const hasIconBefore = computed(
|
|
1693
|
-
() =>
|
|
1724
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
|
|
1694
1725
|
);
|
|
1695
1726
|
const hasIconAfter = computed(
|
|
1696
|
-
() =>
|
|
1727
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
|
|
1697
1728
|
);
|
|
1698
1729
|
const hasIconLeft = computed(
|
|
1699
|
-
() =>
|
|
1730
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
|
|
1700
1731
|
);
|
|
1701
1732
|
const hasIconRight = computed(
|
|
1702
|
-
() =>
|
|
1733
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
|
|
1703
1734
|
);
|
|
1704
1735
|
const hasIconTop = computed(
|
|
1705
|
-
() =>
|
|
1736
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
|
|
1706
1737
|
);
|
|
1707
1738
|
const hasIconBottom = computed(
|
|
1708
|
-
() =>
|
|
1739
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
|
|
1709
1740
|
);
|
|
1710
|
-
const hasIcon = computed(() => {
|
|
1711
|
-
if (typeof (icon == null ? void 0 : icon.value) === "string") {
|
|
1712
|
-
return { name: icon == null ? void 0 : icon.value };
|
|
1713
|
-
}
|
|
1714
|
-
return icon == null ? void 0 : icon.value;
|
|
1715
|
-
});
|
|
1716
1741
|
return {
|
|
1717
1742
|
hasIcon,
|
|
1718
1743
|
hasIconLeft,
|
|
@@ -1778,8 +1803,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1778
1803
|
...__default__$4,
|
|
1779
1804
|
props: VvSelectProps,
|
|
1780
1805
|
emits: VvSelectEmits,
|
|
1781
|
-
setup(__props, { emit }) {
|
|
1806
|
+
setup(__props, { emit: __emit }) {
|
|
1782
1807
|
const props = __props;
|
|
1808
|
+
const emit = __emit;
|
|
1783
1809
|
const slots = useSlots();
|
|
1784
1810
|
const propsDefaults = useDefaults(
|
|
1785
1811
|
"VvSelect",
|
|
@@ -1815,10 +1841,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1815
1841
|
focused.value = true;
|
|
1816
1842
|
}
|
|
1817
1843
|
});
|
|
1818
|
-
const {
|
|
1819
|
-
icon,
|
|
1820
|
-
iconPosition
|
|
1821
|
-
);
|
|
1844
|
+
const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
|
|
1822
1845
|
const isDirty = computed(() => !isEmpty(props.modelValue));
|
|
1823
1846
|
const isDisabled = computed(() => props.disabled || props.readonly);
|
|
1824
1847
|
const hasTabindex = computed(() => {
|
|
@@ -1842,8 +1865,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1842
1865
|
loading: loading.value,
|
|
1843
1866
|
disabled: disabled.value,
|
|
1844
1867
|
readonly: readonly.value,
|
|
1845
|
-
"icon-before": hasIconBefore.value,
|
|
1846
|
-
"icon-after": hasIconAfter.value,
|
|
1868
|
+
"icon-before": hasIconBefore.value !== void 0,
|
|
1869
|
+
"icon-after": hasIconAfter.value !== void 0,
|
|
1847
1870
|
dirty: isDirty.value,
|
|
1848
1871
|
focus: focused.value,
|
|
1849
1872
|
floating: floating.value,
|
|
@@ -1892,101 +1915,138 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1892
1915
|
return option && option.options && option.options.length > 0;
|
|
1893
1916
|
};
|
|
1894
1917
|
return (_ctx, _cache) => {
|
|
1895
|
-
return openBlock(), createElementBlock(
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
createElementVNode("div",
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1918
|
+
return openBlock(), createElementBlock(
|
|
1919
|
+
"div",
|
|
1920
|
+
{
|
|
1921
|
+
class: normalizeClass(unref(bemCssClasses))
|
|
1922
|
+
},
|
|
1923
|
+
[
|
|
1924
|
+
_ctx.label ? (openBlock(), createElementBlock("label", {
|
|
1925
|
+
key: 0,
|
|
1926
|
+
for: unref(hasId)
|
|
1927
|
+
}, toDisplayString(_ctx.label), 9, _hoisted_1$2)) : createCommentVNode("v-if", true),
|
|
1928
|
+
createCommentVNode(" #region native select "),
|
|
1929
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
1930
|
+
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
1931
|
+
createCommentVNode(" @slot Slot before input "),
|
|
1932
|
+
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
1933
|
+
])) : createCommentVNode("v-if", true),
|
|
1934
|
+
createElementVNode("div", _hoisted_4$1, [
|
|
1935
|
+
unref(hasIconBefore) ? (openBlock(), createBlock(
|
|
1936
|
+
_sfc_main$9,
|
|
1937
|
+
mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-select__icon" }),
|
|
1938
|
+
null,
|
|
1939
|
+
16
|
|
1940
|
+
/* FULL_PROPS */
|
|
1941
|
+
)) : createCommentVNode("v-if", true),
|
|
1942
|
+
withDirectives(createElementVNode("select", mergeProps({
|
|
1943
|
+
id: unref(hasId),
|
|
1944
|
+
ref_key: "select",
|
|
1945
|
+
ref: select,
|
|
1946
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
|
|
1947
|
+
}, unref(hasAttrs)), [
|
|
1948
|
+
_ctx.placeholder ? (openBlock(), createElementBlock("option", {
|
|
1949
|
+
key: 0,
|
|
1950
|
+
value: void 0,
|
|
1951
|
+
disabled: !_ctx.unselectable,
|
|
1952
|
+
hidden: !_ctx.unselectable
|
|
1953
|
+
}, toDisplayString(_ctx.placeholder), 9, _hoisted_6$1)) : createCommentVNode("v-if", true),
|
|
1954
|
+
(openBlock(true), createElementBlock(
|
|
1955
|
+
Fragment,
|
|
1956
|
+
null,
|
|
1957
|
+
renderList(_ctx.options, (option, index) => {
|
|
1958
|
+
return openBlock(), createElementBlock(
|
|
1959
|
+
Fragment,
|
|
1960
|
+
null,
|
|
1961
|
+
[
|
|
1962
|
+
!isGroup(option) ? (openBlock(), createElementBlock("option", {
|
|
1963
|
+
key: index,
|
|
1964
|
+
disabled: unref(isOptionDisabled)(option),
|
|
1965
|
+
value: unref(getOptionValue)(option)
|
|
1966
|
+
}, toDisplayString(unref(getOptionLabel)(option)), 9, _hoisted_7$1)) : (openBlock(), createElementBlock("optgroup", {
|
|
1967
|
+
key: `group-${index}`,
|
|
1968
|
+
disabled: unref(isOptionDisabled)(option),
|
|
1969
|
+
label: unref(getOptionLabel)(option)
|
|
1970
|
+
}, [
|
|
1971
|
+
(openBlock(true), createElementBlock(
|
|
1972
|
+
Fragment,
|
|
1973
|
+
null,
|
|
1974
|
+
renderList(unref(getOptionGrouped)(option), (item, i) => {
|
|
1975
|
+
return openBlock(), createElementBlock("option", {
|
|
1976
|
+
key: `group-${index}-item-${i}`,
|
|
1977
|
+
disabled: unref(isOptionDisabled)(item),
|
|
1978
|
+
value: unref(getOptionValue)(item)
|
|
1979
|
+
}, toDisplayString(unref(getOptionLabel)(item)), 9, _hoisted_9$1);
|
|
1980
|
+
}),
|
|
1981
|
+
128
|
|
1982
|
+
/* KEYED_FRAGMENT */
|
|
1983
|
+
))
|
|
1984
|
+
], 8, _hoisted_8$1))
|
|
1985
|
+
],
|
|
1986
|
+
64
|
|
1987
|
+
/* STABLE_FRAGMENT */
|
|
1988
|
+
);
|
|
1989
|
+
}),
|
|
1990
|
+
256
|
|
1991
|
+
/* UNKEYED_FRAGMENT */
|
|
1992
|
+
))
|
|
1993
|
+
], 16, _hoisted_5$1), [
|
|
1994
|
+
[vModelSelect, unref(localModelValue)]
|
|
1995
|
+
]),
|
|
1996
|
+
unref(hasIconAfter) ? (openBlock(), createBlock(
|
|
1997
|
+
_sfc_main$9,
|
|
1998
|
+
mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
|
|
1999
|
+
null,
|
|
2000
|
+
16
|
|
2001
|
+
/* FULL_PROPS */
|
|
2002
|
+
)) : createCommentVNode("v-if", true)
|
|
1946
2003
|
]),
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
2004
|
+
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_10, [
|
|
2005
|
+
createCommentVNode(" @slot Slot after input "),
|
|
2006
|
+
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
2007
|
+
])) : createCommentVNode("v-if", true)
|
|
1951
2008
|
]),
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
2009
|
+
createCommentVNode(" #endregion native select "),
|
|
2010
|
+
createVNode(unref(HintSlot), {
|
|
2011
|
+
id: unref(hasHintId),
|
|
2012
|
+
class: "vv-select__hint"
|
|
2013
|
+
}, createSlots({
|
|
2014
|
+
_: 2
|
|
2015
|
+
/* DYNAMIC */
|
|
2016
|
+
}, [
|
|
2017
|
+
_ctx.$slots.hint ? {
|
|
2018
|
+
name: "hint",
|
|
2019
|
+
fn: withCtx(() => [
|
|
2020
|
+
renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
2021
|
+
]),
|
|
2022
|
+
key: "0"
|
|
2023
|
+
} : void 0,
|
|
2024
|
+
_ctx.$slots.loading ? {
|
|
2025
|
+
name: "loading",
|
|
2026
|
+
fn: withCtx(() => [
|
|
2027
|
+
renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
2028
|
+
]),
|
|
2029
|
+
key: "1"
|
|
2030
|
+
} : void 0,
|
|
2031
|
+
_ctx.$slots.valid ? {
|
|
2032
|
+
name: "valid",
|
|
2033
|
+
fn: withCtx(() => [
|
|
2034
|
+
renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
2035
|
+
]),
|
|
2036
|
+
key: "2"
|
|
2037
|
+
} : void 0,
|
|
2038
|
+
_ctx.$slots.invalid ? {
|
|
2039
|
+
name: "invalid",
|
|
2040
|
+
fn: withCtx(() => [
|
|
2041
|
+
renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
2042
|
+
]),
|
|
2043
|
+
key: "3"
|
|
2044
|
+
} : void 0
|
|
2045
|
+
]), 1032, ["id"])
|
|
2046
|
+
],
|
|
2047
|
+
2
|
|
2048
|
+
/* CLASS */
|
|
2049
|
+
);
|
|
1990
2050
|
};
|
|
1991
2051
|
}
|
|
1992
2052
|
});
|
|
@@ -2005,14 +2065,25 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2005
2065
|
const { modifiers } = toRefs(props);
|
|
2006
2066
|
const bemCssClasses = useModifiers("vv-badge", modifiers);
|
|
2007
2067
|
return (_ctx, _cache) => {
|
|
2008
|
-
return openBlock(), createElementBlock(
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2068
|
+
return openBlock(), createElementBlock(
|
|
2069
|
+
"span",
|
|
2070
|
+
{
|
|
2071
|
+
class: normalizeClass(unref(bemCssClasses)),
|
|
2072
|
+
role: "status"
|
|
2073
|
+
},
|
|
2074
|
+
[
|
|
2075
|
+
createCommentVNode(" @slot Default slot "),
|
|
2076
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
2077
|
+
createTextVNode(
|
|
2078
|
+
toDisplayString(_ctx.value),
|
|
2079
|
+
1
|
|
2080
|
+
/* TEXT */
|
|
2081
|
+
)
|
|
2082
|
+
])
|
|
2083
|
+
],
|
|
2084
|
+
2
|
|
2085
|
+
/* CLASS */
|
|
2086
|
+
);
|
|
2016
2087
|
};
|
|
2017
2088
|
}
|
|
2018
2089
|
});
|
|
@@ -2025,8 +2096,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2025
2096
|
...__default__$2,
|
|
2026
2097
|
props: VvActionProps,
|
|
2027
2098
|
emits: VvActionEvents,
|
|
2028
|
-
setup(__props, { expose: __expose, emit }) {
|
|
2099
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2029
2100
|
const props = __props;
|
|
2101
|
+
const emit = __emit;
|
|
2030
2102
|
const volver = useVolver();
|
|
2031
2103
|
const element = ref(null);
|
|
2032
2104
|
__expose({ $el: element });
|
|
@@ -2057,7 +2129,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2057
2129
|
case props.href !== void 0:
|
|
2058
2130
|
return ActionTag.a;
|
|
2059
2131
|
default:
|
|
2060
|
-
return
|
|
2132
|
+
return props.defaultTag;
|
|
2061
2133
|
}
|
|
2062
2134
|
});
|
|
2063
2135
|
const hasProps = computed(() => {
|
|
@@ -2082,12 +2154,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2082
2154
|
to: props.to,
|
|
2083
2155
|
target: props.target
|
|
2084
2156
|
};
|
|
2085
|
-
|
|
2157
|
+
case ActionTag.button:
|
|
2086
2158
|
return {
|
|
2087
2159
|
...toReturn,
|
|
2088
2160
|
type: props.type,
|
|
2089
2161
|
disabled: props.disabled
|
|
2090
2162
|
};
|
|
2163
|
+
default:
|
|
2164
|
+
return toReturn;
|
|
2091
2165
|
}
|
|
2092
2166
|
});
|
|
2093
2167
|
const onClick = (e) => {
|
|
@@ -2113,18 +2187,25 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2113
2187
|
class: {
|
|
2114
2188
|
active: _ctx.active,
|
|
2115
2189
|
pressed: unref(pressed),
|
|
2116
|
-
disabled: _ctx.disabled
|
|
2190
|
+
disabled: _ctx.disabled,
|
|
2191
|
+
current: _ctx.current
|
|
2117
2192
|
},
|
|
2118
2193
|
onClickPassive: onClick,
|
|
2119
2194
|
onMouseoverPassive: onMouseover,
|
|
2120
2195
|
onMouseleavePassive: onMouseleave
|
|
2121
2196
|
}), {
|
|
2122
2197
|
default: withCtx(() => [
|
|
2198
|
+
createCommentVNode(" @slot Default slot "),
|
|
2123
2199
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
2124
|
-
createTextVNode(
|
|
2200
|
+
createTextVNode(
|
|
2201
|
+
toDisplayString(_ctx.label),
|
|
2202
|
+
1
|
|
2203
|
+
/* TEXT */
|
|
2204
|
+
)
|
|
2125
2205
|
])
|
|
2126
2206
|
]),
|
|
2127
2207
|
_: 3
|
|
2208
|
+
/* FORWARDED */
|
|
2128
2209
|
}, 16, ["class"]);
|
|
2129
2210
|
};
|
|
2130
2211
|
}
|
|
@@ -2168,10 +2249,7 @@ const VvButtonProps = {
|
|
|
2168
2249
|
...ModifiersProps,
|
|
2169
2250
|
...UnselectableProps,
|
|
2170
2251
|
...LoadingProps,
|
|
2171
|
-
|
|
2172
|
-
* Button icon
|
|
2173
|
-
*/
|
|
2174
|
-
icon: [String, Object],
|
|
2252
|
+
...IconProps,
|
|
2175
2253
|
/**
|
|
2176
2254
|
* Button icon position
|
|
2177
2255
|
*/
|
|
@@ -2280,10 +2358,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2280
2358
|
...__default__$1,
|
|
2281
2359
|
props: VvButtonProps,
|
|
2282
2360
|
emits: VvButtonEvents,
|
|
2283
|
-
setup(__props, { expose: __expose, emit }) {
|
|
2361
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2284
2362
|
const props = __props;
|
|
2285
2363
|
const attrs = useAttrs();
|
|
2286
2364
|
const slots = useSlots();
|
|
2365
|
+
const emit = __emit;
|
|
2287
2366
|
const {
|
|
2288
2367
|
id,
|
|
2289
2368
|
modifiers,
|
|
@@ -2327,9 +2406,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2327
2406
|
)
|
|
2328
2407
|
}))
|
|
2329
2408
|
);
|
|
2330
|
-
const
|
|
2331
|
-
() => typeof (icon == null ? void 0 : icon.value) === "string" ? { name: icon == null ? void 0 : icon.value } : icon == null ? void 0 : icon.value
|
|
2332
|
-
);
|
|
2409
|
+
const { hasIcon } = useComponentIcon(icon);
|
|
2333
2410
|
const toggleValue = computed(() => {
|
|
2334
2411
|
return props.value !== void 0 ? props.value : name.value;
|
|
2335
2412
|
});
|
|
@@ -2373,30 +2450,67 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2373
2450
|
onClick
|
|
2374
2451
|
}), {
|
|
2375
2452
|
default: withCtx(() => [
|
|
2453
|
+
createCommentVNode(" @slot Default slot "),
|
|
2376
2454
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2455
|
+
createCommentVNode(" #region loading "),
|
|
2456
|
+
_ctx.loading ? (openBlock(), createElementBlock(
|
|
2457
|
+
Fragment,
|
|
2458
|
+
{ key: 0 },
|
|
2459
|
+
[
|
|
2460
|
+
createCommentVNode(" @slot Slot for loading content "),
|
|
2461
|
+
renderSlot(_ctx.$slots, "loading", {}, () => [
|
|
2462
|
+
_ctx.loadingIcon ? (openBlock(), createBlock(_sfc_main$9, {
|
|
2463
|
+
key: 0,
|
|
2464
|
+
class: "vv-button__loading-icon",
|
|
2465
|
+
name: _ctx.loadingIcon
|
|
2466
|
+
}, null, 8, ["name"])) : createCommentVNode("v-if", true),
|
|
2467
|
+
_ctx.loadingLabel ? (openBlock(), createElementBlock(
|
|
2468
|
+
"span",
|
|
2469
|
+
_hoisted_1$1,
|
|
2470
|
+
toDisplayString(_ctx.loadingLabel),
|
|
2471
|
+
1
|
|
2472
|
+
/* TEXT */
|
|
2473
|
+
)) : createCommentVNode("v-if", true)
|
|
2393
2474
|
])
|
|
2394
|
-
]
|
|
2395
|
-
|
|
2396
|
-
|
|
2475
|
+
],
|
|
2476
|
+
64
|
|
2477
|
+
/* STABLE_FRAGMENT */
|
|
2478
|
+
)) : (openBlock(), createElementBlock(
|
|
2479
|
+
Fragment,
|
|
2480
|
+
{ key: 1 },
|
|
2481
|
+
[
|
|
2482
|
+
createCommentVNode(" #endregion "),
|
|
2483
|
+
createCommentVNode(" #region button "),
|
|
2484
|
+
createCommentVNode(" @slot Before label and icon "),
|
|
2485
|
+
renderSlot(_ctx.$slots, "before"),
|
|
2486
|
+
unref(hasIcon) ? (openBlock(), createBlock(
|
|
2487
|
+
_sfc_main$9,
|
|
2488
|
+
mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-button__icon" }),
|
|
2489
|
+
null,
|
|
2490
|
+
16
|
|
2491
|
+
/* FULL_PROPS */
|
|
2492
|
+
)) : createCommentVNode("v-if", true),
|
|
2493
|
+
unref(label) ? (openBlock(), createElementBlock("span", _hoisted_2$1, [
|
|
2494
|
+
createCommentVNode(" @slot Use this slot for button label "),
|
|
2495
|
+
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
2496
|
+
createTextVNode(
|
|
2497
|
+
toDisplayString(unref(label)),
|
|
2498
|
+
1
|
|
2499
|
+
/* TEXT */
|
|
2500
|
+
)
|
|
2501
|
+
])
|
|
2502
|
+
])) : createCommentVNode("v-if", true),
|
|
2503
|
+
createCommentVNode(" @slot After label and icon "),
|
|
2504
|
+
renderSlot(_ctx.$slots, "after")
|
|
2505
|
+
],
|
|
2506
|
+
64
|
|
2507
|
+
/* STABLE_FRAGMENT */
|
|
2508
|
+
)),
|
|
2509
|
+
createCommentVNode(" #endregion ")
|
|
2397
2510
|
])
|
|
2398
2511
|
]),
|
|
2399
2512
|
_: 3
|
|
2513
|
+
/* FORWARDED */
|
|
2400
2514
|
}, 16, ["id", "class"]);
|
|
2401
2515
|
};
|
|
2402
2516
|
}
|
|
@@ -2432,8 +2546,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2432
2546
|
...__default__,
|
|
2433
2547
|
props: VvComboboxProps,
|
|
2434
2548
|
emits: VvComboboxEvents,
|
|
2435
|
-
setup(__props, { emit }) {
|
|
2549
|
+
setup(__props, { emit: __emit }) {
|
|
2436
2550
|
const props = __props;
|
|
2551
|
+
const emit = __emit;
|
|
2437
2552
|
const slots = useSlots();
|
|
2438
2553
|
const propsDefaults = useDefaults(
|
|
2439
2554
|
"VvCombobox",
|
|
@@ -2479,10 +2594,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2479
2594
|
searchText,
|
|
2480
2595
|
computed(() => Number(props.debounceSearch))
|
|
2481
2596
|
);
|
|
2482
|
-
watch(
|
|
2483
|
-
debouncedSearchText
|
|
2484
|
-
|
|
2485
|
-
);
|
|
2597
|
+
watch(debouncedSearchText, () => {
|
|
2598
|
+
emit("update:search", debouncedSearchText.value);
|
|
2599
|
+
emit("change:search", debouncedSearchText.value);
|
|
2600
|
+
});
|
|
2486
2601
|
const expanded = ref(false);
|
|
2487
2602
|
const toggleExpanded = () => {
|
|
2488
2603
|
if (props.disabled || props.readonly)
|
|
@@ -2533,10 +2648,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2533
2648
|
const localLoading = ref(false);
|
|
2534
2649
|
const isLoading = computed(() => localLoading.value || loading.value);
|
|
2535
2650
|
const dropdownEl = ref();
|
|
2536
|
-
const {
|
|
2537
|
-
icon,
|
|
2538
|
-
iconPosition
|
|
2539
|
-
);
|
|
2651
|
+
const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
|
|
2540
2652
|
const isDirty = computed(() => !isEmpty(props.modelValue));
|
|
2541
2653
|
const hasTabindex = computed(() => {
|
|
2542
2654
|
return disabled.value || readonly.value ? -1 : props.tabindex;
|
|
@@ -2548,12 +2660,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2548
2660
|
disabled: disabled.value,
|
|
2549
2661
|
loading: isLoading.value,
|
|
2550
2662
|
readonly: readonly.value,
|
|
2551
|
-
"icon-before":
|
|
2552
|
-
"icon-after":
|
|
2663
|
+
"icon-before": hasIconBefore.value !== void 0,
|
|
2664
|
+
"icon-after": hasIconAfter.value !== void 0,
|
|
2553
2665
|
valid: valid.value,
|
|
2554
2666
|
invalid: invalid.value,
|
|
2555
2667
|
dirty: isDirty.value,
|
|
2556
|
-
focus: focused.value,
|
|
2668
|
+
focus: focused.value || focusedWithin.value || expanded.value,
|
|
2557
2669
|
floating: floating.value,
|
|
2558
2670
|
badges: props.badges
|
|
2559
2671
|
}))
|
|
@@ -2630,7 +2742,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2630
2742
|
if (!props.keepOpen) {
|
|
2631
2743
|
collapse();
|
|
2632
2744
|
}
|
|
2633
|
-
if (
|
|
2745
|
+
if (Array.isArray(props.modelValue)) {
|
|
2746
|
+
if (props.unselectable && props.modelValue.includes(value)) {
|
|
2747
|
+
toReturn = [];
|
|
2748
|
+
} else {
|
|
2749
|
+
toReturn = [value];
|
|
2750
|
+
}
|
|
2751
|
+
} else if (props.unselectable && value === props.modelValue) {
|
|
2634
2752
|
toReturn = void 0;
|
|
2635
2753
|
}
|
|
2636
2754
|
}
|
|
@@ -2706,208 +2824,311 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2706
2824
|
key: 0,
|
|
2707
2825
|
id: unref(hasLabelId),
|
|
2708
2826
|
for: unref(propsDefaults).searchable ? unref(hasSearchId) : void 0
|
|
2709
|
-
}, toDisplayString(_ctx.label), 9, _hoisted_2)) : createCommentVNode("", true),
|
|
2710
|
-
createElementVNode(
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
"
|
|
2741
|
-
"
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
unref(
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
},
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
})), () => [
|
|
2814
|
-
createTextVNode(toDisplayString(unref(getOptionLabel)(item)), 1)
|
|
2815
|
-
])
|
|
2816
|
-
]),
|
|
2817
|
-
_: 2
|
|
2818
|
-
}, 1040, ["onClickPassive"]);
|
|
2819
|
-
}), 128))
|
|
2820
|
-
], 64)) : (openBlock(), createBlock(_sfc_main$6, mergeProps({ key: 1 }, {
|
|
2821
|
-
selected: isOptionSelected(option),
|
|
2822
|
-
disabled: unref(isOptionDisabled)(option),
|
|
2823
|
-
unselectable: _ctx.unselectable,
|
|
2824
|
-
deselectHintLabel: unref(propsDefaults).deselectHintLabel,
|
|
2825
|
-
selectHintLabel: unref(propsDefaults).selectHintLabel,
|
|
2826
|
-
selectedHintLabel: unref(propsDefaults).selectedHintLabel
|
|
2827
|
-
}, {
|
|
2828
|
-
class: "vv-dropdown-option",
|
|
2829
|
-
onClickPassive: ($event) => onInput(option)
|
|
2830
|
-
}), {
|
|
2831
|
-
default: withCtx(() => [
|
|
2832
|
-
renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
|
|
2833
|
-
option,
|
|
2834
|
-
selectedOptions: unref(selectedOptions),
|
|
2835
|
-
selected: isOptionSelected(option),
|
|
2836
|
-
disabled: unref(isOptionDisabled)(option)
|
|
2837
|
-
})), () => [
|
|
2838
|
-
createTextVNode(toDisplayString(unref(getOptionLabel)(option)), 1)
|
|
2839
|
-
])
|
|
2840
|
-
]),
|
|
2841
|
-
_: 2
|
|
2842
|
-
}, 1040, ["onClickPassive"]))
|
|
2843
|
-
], 64);
|
|
2844
|
-
}), 128)) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$6, {
|
|
2845
|
-
key: 1,
|
|
2846
|
-
modifiers: "inert"
|
|
2847
|
-
}, {
|
|
2848
|
-
default: withCtx(() => [
|
|
2849
|
-
renderSlot(_ctx.$slots, "no-options", {}, () => [
|
|
2850
|
-
createTextVNode(toDisplayString(unref(propsDefaults).noOptionsLabel), 1)
|
|
2851
|
-
])
|
|
2852
|
-
]),
|
|
2853
|
-
_: 3
|
|
2854
|
-
})) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$6, {
|
|
2855
|
-
key: 2,
|
|
2856
|
-
modifiers: "inert"
|
|
2857
|
-
}, {
|
|
2858
|
-
default: withCtx(() => [
|
|
2859
|
-
renderSlot(_ctx.$slots, "no-results", {}, () => [
|
|
2860
|
-
createTextVNode(toDisplayString(unref(propsDefaults).noResultsLabel), 1)
|
|
2827
|
+
}, toDisplayString(_ctx.label), 9, _hoisted_2)) : createCommentVNode("v-if", true),
|
|
2828
|
+
createElementVNode(
|
|
2829
|
+
"div",
|
|
2830
|
+
{
|
|
2831
|
+
ref_key: "wrapperEl",
|
|
2832
|
+
ref: wrapperEl,
|
|
2833
|
+
class: "vv-select__wrapper"
|
|
2834
|
+
},
|
|
2835
|
+
[
|
|
2836
|
+
createVNode(_sfc_main$8, mergeProps({
|
|
2837
|
+
ref_key: "dropdownEl",
|
|
2838
|
+
ref: dropdownEl,
|
|
2839
|
+
modelValue: unref(expanded),
|
|
2840
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(expanded) ? expanded.value = $event : null)
|
|
2841
|
+
}, unref(dropdownProps), {
|
|
2842
|
+
role: unref(DropdownRole).listbox,
|
|
2843
|
+
onAfterExpand,
|
|
2844
|
+
onAfterCollapse
|
|
2845
|
+
}), createSlots({
|
|
2846
|
+
default: withCtx(({ aria }) => [
|
|
2847
|
+
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
2848
|
+
createCommentVNode(" @slot Slot before input "),
|
|
2849
|
+
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
2850
|
+
])) : createCommentVNode("v-if", true),
|
|
2851
|
+
createElementVNode("div", _hoisted_5, [
|
|
2852
|
+
unref(hasIconBefore) ? (openBlock(), createBlock(
|
|
2853
|
+
_sfc_main$9,
|
|
2854
|
+
mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-select__icon" }),
|
|
2855
|
+
null,
|
|
2856
|
+
16
|
|
2857
|
+
/* FULL_PROPS */
|
|
2858
|
+
)) : createCommentVNode("v-if", true),
|
|
2859
|
+
createElementVNode("div", mergeProps({
|
|
2860
|
+
ref_key: "inputEl",
|
|
2861
|
+
ref: inputEl
|
|
2862
|
+
}, aria, {
|
|
2863
|
+
class: "vv-select__input",
|
|
2864
|
+
role: "combobox",
|
|
2865
|
+
"aria-expanded": unref(expanded),
|
|
2866
|
+
"aria-labelledby": unref(hasLabelId),
|
|
2867
|
+
"aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
|
|
2868
|
+
"aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0,
|
|
2869
|
+
tabindex: unref(hasTabindex),
|
|
2870
|
+
onClickPassive: onClickInput
|
|
2871
|
+
}), [
|
|
2872
|
+
createCommentVNode(" @slot Slot for value customization "),
|
|
2873
|
+
renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
|
|
2874
|
+
unref(hasValue) ? (openBlock(), createElementBlock(
|
|
2875
|
+
Fragment,
|
|
2876
|
+
{ key: 0 },
|
|
2877
|
+
[
|
|
2878
|
+
!_ctx.badges ? (openBlock(), createElementBlock(
|
|
2879
|
+
"div",
|
|
2880
|
+
_hoisted_7,
|
|
2881
|
+
toDisplayString(unref(hasValue)),
|
|
2882
|
+
1
|
|
2883
|
+
/* TEXT */
|
|
2884
|
+
)) : (openBlock(true), createElementBlock(
|
|
2885
|
+
Fragment,
|
|
2886
|
+
{ key: 1 },
|
|
2887
|
+
renderList(unref(selectedOptions), (option, index) => {
|
|
2888
|
+
return openBlock(), createBlock(_sfc_main$3, {
|
|
2889
|
+
key: index,
|
|
2890
|
+
modifiers: _ctx.badgeModifiers,
|
|
2891
|
+
class: "vv-select__badge"
|
|
2892
|
+
}, {
|
|
2893
|
+
default: withCtx(() => [
|
|
2894
|
+
createTextVNode(
|
|
2895
|
+
toDisplayString(unref(getOptionLabel)(option)) + " ",
|
|
2896
|
+
1
|
|
2897
|
+
/* TEXT */
|
|
2898
|
+
),
|
|
2899
|
+
_ctx.unselectable && !unref(readonly) && !unref(disabled) ? (openBlock(), createElementBlock("button", {
|
|
2900
|
+
key: 0,
|
|
2901
|
+
"aria-label": unref(propsDefaults).deselectActionLabel,
|
|
2902
|
+
type: "button",
|
|
2903
|
+
onClick: withModifiers(($event) => onInput(option), ["stop"])
|
|
2904
|
+
}, [
|
|
2905
|
+
createVNode(_sfc_main$9, { name: "close" })
|
|
2906
|
+
], 8, _hoisted_8)) : createCommentVNode("v-if", true)
|
|
2907
|
+
]),
|
|
2908
|
+
_: 2
|
|
2909
|
+
/* DYNAMIC */
|
|
2910
|
+
}, 1032, ["modifiers"]);
|
|
2911
|
+
}),
|
|
2912
|
+
128
|
|
2913
|
+
/* KEYED_FRAGMENT */
|
|
2914
|
+
))
|
|
2915
|
+
],
|
|
2916
|
+
64
|
|
2917
|
+
/* STABLE_FRAGMENT */
|
|
2918
|
+
)) : (openBlock(), createElementBlock(
|
|
2919
|
+
Fragment,
|
|
2920
|
+
{ key: 1 },
|
|
2921
|
+
[
|
|
2922
|
+
createTextVNode(
|
|
2923
|
+
toDisplayString(_ctx.placeholder),
|
|
2924
|
+
1
|
|
2925
|
+
/* TEXT */
|
|
2926
|
+
)
|
|
2927
|
+
],
|
|
2928
|
+
64
|
|
2929
|
+
/* STABLE_FRAGMENT */
|
|
2930
|
+
))
|
|
2861
2931
|
])
|
|
2862
|
-
]),
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2932
|
+
], 16, _hoisted_6),
|
|
2933
|
+
unref(hasIconAfter) ? (openBlock(), createBlock(
|
|
2934
|
+
_sfc_main$9,
|
|
2935
|
+
mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
|
|
2936
|
+
null,
|
|
2937
|
+
16
|
|
2938
|
+
/* FULL_PROPS */
|
|
2939
|
+
)) : createCommentVNode("v-if", true)
|
|
2940
|
+
]),
|
|
2941
|
+
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
2942
|
+
createCommentVNode(" @slot Slot after input "),
|
|
2943
|
+
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
2944
|
+
])) : createCommentVNode("v-if", true)
|
|
2945
|
+
]),
|
|
2946
|
+
items: withCtx(() => {
|
|
2869
2947
|
var _a;
|
|
2870
2948
|
return [
|
|
2871
|
-
((_a = unref(
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2949
|
+
!unref(disabled) && ((_a = unref(filteredOptions)) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(
|
|
2950
|
+
Fragment,
|
|
2951
|
+
{ key: 0 },
|
|
2952
|
+
renderList(unref(filteredOptions), (option, index) => {
|
|
2953
|
+
return openBlock(), createElementBlock(
|
|
2954
|
+
Fragment,
|
|
2955
|
+
{ key: index },
|
|
2956
|
+
[
|
|
2957
|
+
isGroup(option) ? (openBlock(), createElementBlock(
|
|
2958
|
+
Fragment,
|
|
2959
|
+
{ key: 0 },
|
|
2960
|
+
[
|
|
2961
|
+
createVNode(_sfc_main$5, {
|
|
2962
|
+
label: unref(getOptionLabel)(option)
|
|
2963
|
+
}, null, 8, ["label"]),
|
|
2964
|
+
(openBlock(true), createElementBlock(
|
|
2965
|
+
Fragment,
|
|
2966
|
+
null,
|
|
2967
|
+
renderList(unref(getOptionGrouped)(
|
|
2968
|
+
option
|
|
2969
|
+
), (item, i) => {
|
|
2970
|
+
return openBlock(), createBlock(_sfc_main$6, mergeProps({
|
|
2971
|
+
selected: isOptionSelected(item),
|
|
2972
|
+
disabled: unref(isOptionDisabled)(item),
|
|
2973
|
+
unselectable: _ctx.unselectable,
|
|
2974
|
+
deselectHintLabel: unref(propsDefaults).deselectHintLabel,
|
|
2975
|
+
selectHintLabel: unref(propsDefaults).selectHintLabel,
|
|
2976
|
+
selectedHintLabel: unref(propsDefaults).selectedHintLabel
|
|
2977
|
+
}, {
|
|
2978
|
+
key: i,
|
|
2979
|
+
class: "vv-dropdown-option",
|
|
2980
|
+
onClickPassive: ($event) => onInput(item)
|
|
2981
|
+
}), {
|
|
2982
|
+
default: withCtx(() => [
|
|
2983
|
+
createCommentVNode(" @slot Slot for option customization "),
|
|
2984
|
+
renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
|
|
2985
|
+
option,
|
|
2986
|
+
selectedOptions: unref(selectedOptions),
|
|
2987
|
+
selected: isOptionSelected(item),
|
|
2988
|
+
disabled: unref(isOptionDisabled)(item)
|
|
2989
|
+
})), () => [
|
|
2990
|
+
createTextVNode(
|
|
2991
|
+
toDisplayString(unref(getOptionLabel)(item)),
|
|
2992
|
+
1
|
|
2993
|
+
/* TEXT */
|
|
2994
|
+
)
|
|
2995
|
+
])
|
|
2996
|
+
]),
|
|
2997
|
+
_: 2
|
|
2998
|
+
/* DYNAMIC */
|
|
2999
|
+
}, 1040, ["onClickPassive"]);
|
|
3000
|
+
}),
|
|
3001
|
+
128
|
|
3002
|
+
/* KEYED_FRAGMENT */
|
|
3003
|
+
))
|
|
3004
|
+
],
|
|
3005
|
+
64
|
|
3006
|
+
/* STABLE_FRAGMENT */
|
|
3007
|
+
)) : (openBlock(), createBlock(_sfc_main$6, mergeProps({ key: 1 }, {
|
|
3008
|
+
selected: isOptionSelected(option),
|
|
3009
|
+
disabled: unref(isOptionDisabled)(option),
|
|
3010
|
+
unselectable: _ctx.unselectable,
|
|
3011
|
+
deselectHintLabel: unref(propsDefaults).deselectHintLabel,
|
|
3012
|
+
selectHintLabel: unref(propsDefaults).selectHintLabel,
|
|
3013
|
+
selectedHintLabel: unref(propsDefaults).selectedHintLabel
|
|
3014
|
+
}, {
|
|
3015
|
+
class: "vv-dropdown-option",
|
|
3016
|
+
onClickPassive: ($event) => onInput(option)
|
|
3017
|
+
}), {
|
|
3018
|
+
default: withCtx(() => [
|
|
3019
|
+
createCommentVNode(" @slot Slot for option customization "),
|
|
3020
|
+
renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
|
|
3021
|
+
option,
|
|
3022
|
+
selectedOptions: unref(selectedOptions),
|
|
3023
|
+
selected: isOptionSelected(option),
|
|
3024
|
+
disabled: unref(isOptionDisabled)(option)
|
|
3025
|
+
})), () => [
|
|
3026
|
+
createTextVNode(
|
|
3027
|
+
toDisplayString(unref(getOptionLabel)(option)),
|
|
3028
|
+
1
|
|
3029
|
+
/* TEXT */
|
|
3030
|
+
)
|
|
3031
|
+
])
|
|
3032
|
+
]),
|
|
3033
|
+
_: 2
|
|
3034
|
+
/* DYNAMIC */
|
|
3035
|
+
}, 1040, ["onClickPassive"]))
|
|
3036
|
+
],
|
|
3037
|
+
64
|
|
3038
|
+
/* STABLE_FRAGMENT */
|
|
3039
|
+
);
|
|
3040
|
+
}),
|
|
3041
|
+
128
|
|
3042
|
+
/* KEYED_FRAGMENT */
|
|
3043
|
+
)) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$6, {
|
|
3044
|
+
key: 1,
|
|
3045
|
+
modifiers: "inert"
|
|
3046
|
+
}, {
|
|
3047
|
+
default: withCtx(() => [
|
|
3048
|
+
createCommentVNode(" @slot Slot for no options available "),
|
|
3049
|
+
renderSlot(_ctx.$slots, "no-options", {}, () => [
|
|
3050
|
+
createTextVNode(
|
|
3051
|
+
toDisplayString(unref(propsDefaults).noOptionsLabel),
|
|
3052
|
+
1
|
|
3053
|
+
/* TEXT */
|
|
3054
|
+
)
|
|
3055
|
+
])
|
|
3056
|
+
]),
|
|
3057
|
+
_: 3
|
|
3058
|
+
/* FORWARDED */
|
|
3059
|
+
})) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$6, {
|
|
3060
|
+
key: 2,
|
|
3061
|
+
modifiers: "inert"
|
|
3062
|
+
}, {
|
|
3063
|
+
default: withCtx(() => [
|
|
3064
|
+
createCommentVNode(" @slot Slot for no results available "),
|
|
3065
|
+
renderSlot(_ctx.$slots, "no-results", {}, () => [
|
|
3066
|
+
createTextVNode(
|
|
3067
|
+
toDisplayString(unref(propsDefaults).noResultsLabel),
|
|
3068
|
+
1
|
|
3069
|
+
/* TEXT */
|
|
3070
|
+
)
|
|
3071
|
+
])
|
|
3072
|
+
]),
|
|
3073
|
+
_: 3
|
|
3074
|
+
/* FORWARDED */
|
|
3075
|
+
})) : createCommentVNode("v-if", true)
|
|
2877
3076
|
];
|
|
2878
|
-
})
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
"aria-controls": unref(hasDropdownId),
|
|
2894
|
-
autocomplete: "off",
|
|
2895
|
-
spellcheck: "false",
|
|
2896
|
-
type: "search",
|
|
2897
|
-
class: "vv-dropdown__search",
|
|
2898
|
-
placeholder: unref(propsDefaults).searchPlaceholder
|
|
2899
|
-
}, null, 8, _hoisted_3)), [
|
|
2900
|
-
[vModelText, unref(searchText)]
|
|
2901
|
-
]) : createCommentVNode("", true)
|
|
3077
|
+
}),
|
|
3078
|
+
after: withCtx(() => [
|
|
3079
|
+
createCommentVNode(" @slot Slot after dropdown items "),
|
|
3080
|
+
renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
|
|
3081
|
+
var _a;
|
|
3082
|
+
return [
|
|
3083
|
+
createCommentVNode(" Close button if dropdown custom position is enabled and floating-ui disabled "),
|
|
3084
|
+
((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$1, {
|
|
3085
|
+
key: 0,
|
|
3086
|
+
label: unref(propsDefaults).closeLabel,
|
|
3087
|
+
modifiers: "secondary",
|
|
3088
|
+
onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
|
|
3089
|
+
}, null, 8, ["label"])) : createCommentVNode("v-if", true)
|
|
3090
|
+
];
|
|
3091
|
+
})
|
|
2902
3092
|
]),
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
3093
|
+
_: 2
|
|
3094
|
+
/* DYNAMIC */
|
|
3095
|
+
}, [
|
|
3096
|
+
unref(propsDefaults).searchable || _ctx.$slots["dropdown::before"] ? {
|
|
3097
|
+
name: "before",
|
|
3098
|
+
fn: withCtx(() => [
|
|
3099
|
+
createCommentVNode(" @slot Slot before dropdown items "),
|
|
3100
|
+
renderSlot(_ctx.$slots, "dropdown::before"),
|
|
3101
|
+
unref(propsDefaults).searchable && !unref(disabled) ? withDirectives((openBlock(), createElementBlock("input", {
|
|
3102
|
+
key: 0,
|
|
3103
|
+
id: unref(hasSearchId),
|
|
3104
|
+
ref_key: "inputSearchEl",
|
|
3105
|
+
ref: inputSearchEl,
|
|
3106
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchText) ? searchText.value = $event : null),
|
|
3107
|
+
"aria-autocomplete": "list",
|
|
3108
|
+
"aria-controls": unref(hasDropdownId),
|
|
3109
|
+
autocomplete: "off",
|
|
3110
|
+
spellcheck: "false",
|
|
3111
|
+
type: "search",
|
|
3112
|
+
class: "vv-dropdown__search",
|
|
3113
|
+
placeholder: unref(propsDefaults).searchPlaceholder
|
|
3114
|
+
}, null, 8, _hoisted_3)), [
|
|
3115
|
+
[vModelText, unref(searchText)]
|
|
3116
|
+
]) : createCommentVNode("v-if", true)
|
|
3117
|
+
]),
|
|
3118
|
+
key: "0"
|
|
3119
|
+
} : void 0
|
|
3120
|
+
]), 1040, ["modelValue", "role"])
|
|
3121
|
+
],
|
|
3122
|
+
512
|
|
3123
|
+
/* NEED_PATCH */
|
|
3124
|
+
),
|
|
2907
3125
|
createVNode(unref(HintSlot), {
|
|
2908
3126
|
id: unref(hasHintId),
|
|
2909
3127
|
class: "vv-select__hint"
|
|
2910
|
-
}, createSlots({
|
|
3128
|
+
}, createSlots({
|
|
3129
|
+
_: 2
|
|
3130
|
+
/* DYNAMIC */
|
|
3131
|
+
}, [
|
|
2911
3132
|
_ctx.$slots.hint ? {
|
|
2912
3133
|
name: "hint",
|
|
2913
3134
|
fn: withCtx(() => [
|
|
@@ -2937,9 +3158,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2937
3158
|
key: "3"
|
|
2938
3159
|
} : void 0
|
|
2939
3160
|
]), 1032, ["id"])
|
|
2940
|
-
], 10, _hoisted_1)) : (openBlock(), createBlock(
|
|
2941
|
-
|
|
2942
|
-
|
|
3161
|
+
], 10, _hoisted_1)) : (openBlock(), createBlock(
|
|
3162
|
+
_sfc_main$4,
|
|
3163
|
+
mergeProps({ key: 1 }, unref(selectProps), {
|
|
3164
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
|
|
3165
|
+
}),
|
|
3166
|
+
null,
|
|
3167
|
+
16
|
|
3168
|
+
/* FULL_PROPS */
|
|
3169
|
+
));
|
|
2943
3170
|
};
|
|
2944
3171
|
}
|
|
2945
3172
|
});
|