@volverjs/ui-vue 0.0.10-beta.3 → 0.0.10-beta.31
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 +106 -10
- package/auto-imports.d.ts +7 -2
- package/bin/icons.cjs +1 -1
- package/bin/icons.js +22 -15
- package/dist/Volver.d.ts +1 -1
- package/dist/components/VvAccordion/VvAccordion.es.js +192 -103
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +160 -8
- package/dist/components/VvAccordion/index.d.ts +8 -9
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +451 -172
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +58 -13
- package/dist/components/VvAccordionGroup/index.d.ts +14 -6
- package/dist/components/VvAction/VvAction.es.js +78 -27
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +57 -22
- package/dist/components/VvAction/index.d.ts +25 -9
- package/dist/components/VvAlert/VvAlert.es.js +204 -171
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +24 -14
- package/dist/components/VvAlert/index.d.ts +17 -9
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +250 -188
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +16 -9
- package/dist/components/VvAlertGroup/index.d.ts +6 -14
- package/dist/components/VvAvatar/VvAvatar.es.js +61 -21
- 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 +118 -48
- 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 +78 -28
- 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 +276 -60
- 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 +291 -252
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +94 -40
- package/dist/components/VvButton/index.d.ts +51 -29
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +81 -40
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +24 -11
- package/dist/components/VvButtonGroup/index.d.ts +8 -2
- package/dist/components/VvCard/VvCard.es.js +86 -36
- 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 +177 -120
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +105 -33
- package/dist/components/VvCheckbox/index.d.ts +47 -14
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -107
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +101 -30
- package/dist/components/VvCheckboxGroup/index.d.ts +45 -12
- package/dist/components/VvCombobox/VvCombobox.es.js +806 -581
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +171 -104
- package/dist/components/VvCombobox/index.d.ts +62 -26
- package/dist/components/VvDialog/VvDialog.es.js +140 -153
- 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 +138 -71
- 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 +66 -25
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +13 -1
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +12 -4
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +35 -7
- package/dist/components/VvDropdown/index.d.ts +52 -10
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +152 -39
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +335 -8
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +63 -20
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +188 -80
- 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 +1777 -0
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +359 -0
- package/dist/components/VvInputFile/index.d.ts +200 -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 +2 -2
- package/dist/components/VvInputText/VvInputText.es.js +1237 -324
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +207 -57
- package/dist/components/VvInputText/index.d.ts +99 -29
- package/dist/components/VvNav/VvNav.es.js +135 -56
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +32 -9
- package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +1 -1
- package/dist/components/VvNav/index.d.ts +5 -2
- package/dist/components/VvNavItem/VvNavItem.es.js +91 -33
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.es.js +72 -26
- 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 +160 -103
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +103 -31
- package/dist/components/VvRadio/index.d.ts +50 -17
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -107
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +101 -30
- package/dist/components/VvRadioGroup/index.d.ts +45 -12
- package/dist/components/VvSelect/VvSelect.es.js +251 -238
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +117 -44
- package/dist/components/VvSelect/index.d.ts +48 -14
- package/dist/components/VvTab/VvTab.es.js +191 -75
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +31 -7
- package/dist/components/VvTab/index.d.ts +4 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +232 -224
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +156 -49
- package/dist/components/VvTextarea/index.d.ts +68 -19
- package/dist/components/VvTooltip/VvTooltip.es.js +79 -29
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +13 -6
- package/dist/components/VvTooltip/index.d.ts +5 -2
- package/dist/components/common/HintSlot.d.ts +1 -1
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.es.js +3534 -1650
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlert.d.ts +99 -4
- package/dist/composables/alert/useInjectAlert.d.ts +1 -6
- package/dist/composables/dropdown/useInjectDropdown.d.ts +3 -23
- package/dist/composables/dropdown/useProvideDropdown.d.ts +3 -4
- package/dist/composables/group/useInjectedGroupState.d.ts +4 -5
- package/dist/composables/group/useProvideGroupState.d.ts +3 -3
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/index.es.js +92 -3
- 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/usePersistence.d.ts +2 -0
- package/dist/composables/useVolver.d.ts +1 -1
- package/dist/constants.d.ts +34 -32
- package/dist/directives/index.d.ts +3 -5
- package/dist/directives/index.es.js +99 -43
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +97 -38
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.es.js +267 -267
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.es.js +90 -16
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +272 -81
- package/dist/resolvers/unplugin.d.ts +6 -1
- package/dist/resolvers/unplugin.es.js +87 -10
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +143 -89
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +1075 -492
- package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
- package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
- package/dist/stories/Button/Button.settings.d.ts +0 -1
- 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 +2 -15
- package/dist/test/expect.d.ts +1 -1
- package/dist/types/alert.d.ts +9 -7
- package/dist/types/blurhash.d.ts +12 -0
- package/dist/types/generic.d.ts +1 -2
- package/dist/types/group.d.ts +37 -15
- package/dist/types/index.d.ts +7 -0
- package/dist/types/input-file.d.ts +16 -0
- package/dist/types/nav.d.ts +2 -2
- package/dist/utils/ObjectUtilities.d.ts +0 -1
- package/dist/workers/blurhash.d.ts +1 -0
- package/package.json +78 -78
- 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 +121 -58
- package/src/components/VvAccordion/index.ts +8 -23
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +164 -47
- package/src/components/VvAccordionGroup/index.ts +6 -6
- package/src/components/VvAction/VvAction.vue +17 -5
- package/src/components/VvAlert/index.ts +14 -9
- package/src/components/VvAlertGroup/index.ts +3 -15
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
- package/src/components/VvBreadcrumb/index.ts +2 -8
- package/src/components/VvButton/VvButton.vue +17 -7
- package/src/components/VvButton/index.ts +9 -16
- package/src/components/VvButtonGroup/VvButtonGroup.vue +1 -2
- package/src/components/VvCheckbox/index.ts +2 -2
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +1 -2
- package/src/components/VvCombobox/VvCombobox.vue +15 -12
- package/src/components/VvCombobox/index.ts +4 -0
- package/src/components/VvDropdown/VvDropdown.vue +11 -2
- package/src/components/VvDropdown/VvDropdownItem.vue +4 -1
- package/src/components/VvDropdown/VvDropdownOption.vue +4 -21
- package/src/components/VvDropdown/index.ts +35 -1
- package/src/components/VvIcon/VvIcon.vue +2 -2
- package/src/components/VvIcon/index.ts +35 -48
- package/src/components/VvInputFile/VvInputFile.vue +395 -0
- package/src/components/VvInputFile/index.ts +135 -0
- package/src/components/VvInputText/VvInputClearAction.ts +10 -6
- package/src/components/VvInputText/VvInputPasswordAction.ts +13 -9
- package/src/components/VvInputText/VvInputText.vue +141 -33
- package/src/components/VvInputText/index.ts +31 -16
- package/src/components/VvNav/VvNav.vue +4 -2
- package/src/components/VvRadio/index.ts +5 -5
- package/src/components/VvRadioGroup/VvRadioGroup.vue +1 -2
- package/src/components/VvSelect/VvSelect.vue +5 -8
- package/src/components/VvTab/VvTab.vue +5 -1
- package/src/components/VvTextarea/VvTextarea.vue +6 -9
- package/src/components/index.ts +10 -0
- package/src/composables/alert/useAlert.ts +12 -9
- package/src/composables/dropdown/useProvideDropdown.ts +4 -4
- package/src/composables/group/useInjectedGroupState.ts +20 -16
- package/src/composables/group/useProvideGroupState.ts +10 -15
- package/src/composables/index.ts +1 -0
- package/src/composables/useBlurhash.ts +76 -0
- package/src/composables/useComponentIcon.ts +15 -14
- package/src/composables/usePersistence.ts +76 -0
- package/src/composables/useUniqueId.ts +2 -2
- package/src/constants.ts +47 -32
- 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 +108 -31
- package/src/resolvers/unplugin.ts +24 -14
- package/src/stories/Accordion/Accordion.test.ts +1 -1
- package/src/stories/AccordionGroup/AccordionGroup.settings.ts +2 -2
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +17 -11
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +1 -1
- package/src/stories/Alert/Alert.test.ts +1 -1
- package/src/stories/AlertGroup/AlertGroup.test.ts +1 -1
- package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
- package/src/stories/Avatar/Avatar.test.ts +1 -1
- package/src/stories/AvatarGroup/AvatarGroup.test.ts +1 -1
- package/src/stories/Badge/Badge.test.ts +1 -1
- package/src/stories/Blurhash/BlurhashComposable.stories.ts +195 -0
- package/src/stories/Button/Button.settings.ts +1 -4
- package/src/stories/Button/Button.test.ts +1 -1
- package/src/stories/ButtonGroup/ButtonGroup.test.ts +1 -1
- package/src/stories/Card/Card.test.ts +1 -1
- package/src/stories/Checkbox/Checkbox.test.ts +1 -1
- package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +1 -1
- package/src/stories/Combobox/Combobox.settings.ts +8 -0
- package/src/stories/Combobox/Combobox.test.ts +1 -1
- package/src/stories/Dialog/Dialog.test.ts +2 -2
- package/src/stories/Dropdown/Dropdown.test.ts +1 -1
- 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/InputText/InputText.test.ts +1 -1
- package/src/stories/Nav/Nav.test.ts +1 -1
- package/src/stories/Progress/Progress.test.ts +1 -1
- package/src/stories/Radio/Radio.test.ts +1 -1
- package/src/stories/RadioGroup/RadioGroup.test.ts +1 -1
- package/src/stories/Select/Select.test.ts +1 -1
- package/src/stories/Tab/Tab.settings.ts +2 -2
- package/src/stories/Tab/Tab.test.ts +1 -1
- package/src/stories/Textarea/Textarea.test.ts +1 -1
- package/src/stories/Tooltip/Tooltip.test.ts +1 -1
- package/src/stories/argTypes.ts +1 -1
- package/src/test/expect.ts +2 -4
- package/src/types/alert.ts +11 -7
- package/src/types/blurhash.ts +21 -0
- package/src/types/generic.ts +3 -3
- package/src/types/group.ts +22 -14
- package/src/types/index.ts +7 -0
- package/src/types/input-file.ts +18 -0
- package/src/types/nav.ts +2 -3
- package/src/utils/ObjectUtilities.ts +0 -11
- package/src/workers/blurhash.ts +9 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { unref, computed, isRef, defineComponent, h, inject, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode,
|
|
1
|
+
import { unref, computed, isRef, defineComponent, h, inject, mergeDefaults, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, provide, Fragment, useAttrs, onMounted, watch, nextTick, createElementBlock, createVNode, withCtx, renderSlot, normalizeProps, guardReactiveProps, Transition, toHandlers, withDirectives, createElementVNode, normalizeStyle, normalizeClass, vShow, createTextVNode, toDisplayString, useSlots, withModifiers, createSlots, renderList } from "vue";
|
|
2
2
|
import { useIMask } from "vue-imask";
|
|
3
3
|
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { autoPlacement, flip, shift, size, offset, arrow, useFloating, autoUpdate } from "@floating-ui/vue";
|
|
5
|
+
import { uid } from "uid";
|
|
6
|
+
import { useMutationObserver, useVModel, onClickOutside, useFocusWithin, useElementHover, onKeyStroke, useFocus, useStorage, useElementVisibility } from "@vueuse/core";
|
|
7
|
+
import mitt from "mitt";
|
|
6
8
|
function isEmpty(value) {
|
|
7
9
|
return ((value2) => value2 === null || value2 === void 0 || value2 === "" || Array.isArray(value2) && value2.length === 0 || !(value2 instanceof Date) && typeof value2 === "object" && Object.keys(value2).length === 0)(unref(value));
|
|
8
10
|
}
|
|
@@ -127,100 +129,27 @@ function HintSlotFactory(propsOrRef, slots) {
|
|
|
127
129
|
HintSlot
|
|
128
130
|
};
|
|
129
131
|
}
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
type: [String, Number]
|
|
146
|
-
},
|
|
147
|
-
/**
|
|
148
|
-
* Icon name
|
|
149
|
-
* Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
|
|
150
|
-
* https://docs.iconify.design/api/providers.html#provider-in-icon-name
|
|
151
|
-
*/
|
|
152
|
-
name: {
|
|
153
|
-
type: String,
|
|
154
|
-
required: true
|
|
155
|
-
},
|
|
156
|
-
/**
|
|
157
|
-
* By default 'vv'
|
|
158
|
-
* If custom collection is not added with "addCollection" DS class method, this prop could not be used
|
|
159
|
-
* Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
|
|
160
|
-
*/
|
|
161
|
-
provider: {
|
|
162
|
-
type: String
|
|
163
|
-
},
|
|
164
|
-
/**
|
|
165
|
-
* The name of icon set.
|
|
166
|
-
* Icon default options prefix: simple | normal | detailed
|
|
167
|
-
*/
|
|
168
|
-
prefix: {
|
|
169
|
-
type: String,
|
|
170
|
-
default: "normal"
|
|
171
|
-
},
|
|
172
|
-
/**
|
|
173
|
-
* Url remote SVG icon
|
|
174
|
-
*/
|
|
175
|
-
src: String,
|
|
176
|
-
/**
|
|
177
|
-
* Horizontal flip
|
|
178
|
-
*/
|
|
179
|
-
horizontalFlip: Boolean,
|
|
180
|
-
/**
|
|
181
|
-
* Vertical flip
|
|
182
|
-
*/
|
|
183
|
-
verticalFlip: Boolean,
|
|
184
|
-
/**
|
|
185
|
-
* String alternative to "horizontalFlip" and "verticalFlip".
|
|
186
|
-
* Example: https://docs.iconify.design/icon-components/vue/transform.html
|
|
187
|
-
*/
|
|
188
|
-
flip: String,
|
|
189
|
-
/**
|
|
190
|
-
* Icon render mode
|
|
191
|
-
* 'style' = 'bg' or 'mask', depending on icon content
|
|
192
|
-
* 'bg' = span with style using `background`
|
|
193
|
-
* 'mask' = span with style using `mask`
|
|
194
|
-
* 'svg' = svg
|
|
195
|
-
* Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
|
|
196
|
-
*/
|
|
197
|
-
mode: String,
|
|
198
|
-
/**
|
|
199
|
-
* Toggles inline or block mode
|
|
200
|
-
* Example https://docs.iconify.design/icon-components/vue/inline.html
|
|
201
|
-
*/
|
|
202
|
-
inline: Boolean,
|
|
203
|
-
/**
|
|
204
|
-
* rotates icon
|
|
205
|
-
* Example https://docs.iconify.design/icon-components/vue/transform.html
|
|
206
|
-
*/
|
|
207
|
-
rotate: [Number, String],
|
|
208
|
-
/**
|
|
209
|
-
* A callback that is called when icon data has been loaded
|
|
210
|
-
*/
|
|
211
|
-
onLoad: Function,
|
|
212
|
-
/**
|
|
213
|
-
* SVG icon string
|
|
214
|
-
*/
|
|
215
|
-
svg: String,
|
|
216
|
-
/**
|
|
217
|
-
* Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
|
|
218
|
-
* @values string | string[]
|
|
219
|
-
*/
|
|
220
|
-
modifiers: {
|
|
221
|
-
type: [String, Array]
|
|
222
|
-
}
|
|
132
|
+
const ACTION_ICONS = {
|
|
133
|
+
showPassword: "eye-on",
|
|
134
|
+
hidePassword: "eye-off",
|
|
135
|
+
showDatePicker: "calendar",
|
|
136
|
+
showTimePicker: "time",
|
|
137
|
+
showColorPicker: "color",
|
|
138
|
+
clear: "close",
|
|
139
|
+
add: "add",
|
|
140
|
+
remove: "trash",
|
|
141
|
+
edit: "edit",
|
|
142
|
+
download: "download"
|
|
143
|
+
};
|
|
144
|
+
const VvIconPropsDefaults = {
|
|
145
|
+
prefix: "normal"
|
|
146
|
+
/* normal */
|
|
223
147
|
};
|
|
148
|
+
var StorageType = /* @__PURE__ */ ((StorageType2) => {
|
|
149
|
+
StorageType2["local"] = "local";
|
|
150
|
+
StorageType2["session"] = "session";
|
|
151
|
+
return StorageType2;
|
|
152
|
+
})(StorageType || {});
|
|
224
153
|
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
225
154
|
Strategy2["absolute"] = "absolute";
|
|
226
155
|
Strategy2["fixed"] = "fixed";
|
|
@@ -255,14 +184,39 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
|
255
184
|
ButtonType2["reset"] = "reset";
|
|
256
185
|
return ButtonType2;
|
|
257
186
|
})(ButtonType || {});
|
|
258
|
-
var
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
return
|
|
264
|
-
})(
|
|
187
|
+
var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
|
|
188
|
+
ActionTag2["nuxtLink"] = "nuxt-link";
|
|
189
|
+
ActionTag2["routerLink"] = "router-link";
|
|
190
|
+
ActionTag2["a"] = "a";
|
|
191
|
+
ActionTag2["button"] = "button";
|
|
192
|
+
return ActionTag2;
|
|
193
|
+
})(ActionTag || {});
|
|
194
|
+
var ActionRoles = /* @__PURE__ */ ((ActionRoles2) => {
|
|
195
|
+
ActionRoles2["button"] = "button";
|
|
196
|
+
ActionRoles2["link"] = "link";
|
|
197
|
+
ActionRoles2["menuitem"] = "menuitem";
|
|
198
|
+
return ActionRoles2;
|
|
199
|
+
})(ActionRoles || {});
|
|
200
|
+
var DropdownRole = /* @__PURE__ */ ((DropdownRole2) => {
|
|
201
|
+
DropdownRole2["listbox"] = "listbox";
|
|
202
|
+
DropdownRole2["menu"] = "menu";
|
|
203
|
+
return DropdownRole2;
|
|
204
|
+
})(DropdownRole || {});
|
|
205
|
+
var DropdownItemRole = /* @__PURE__ */ ((DropdownItemRole2) => {
|
|
206
|
+
DropdownItemRole2["option"] = "option";
|
|
207
|
+
DropdownItemRole2["presentation"] = "presentation";
|
|
208
|
+
return DropdownItemRole2;
|
|
209
|
+
})(DropdownItemRole || {});
|
|
265
210
|
const INJECTION_KEY_VOLVER = Symbol.for("volver");
|
|
211
|
+
const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for(
|
|
212
|
+
"dropdownTrigger"
|
|
213
|
+
);
|
|
214
|
+
const INJECTION_KEY_DROPDOWN_ITEM = Symbol.for(
|
|
215
|
+
"dropdownItem"
|
|
216
|
+
);
|
|
217
|
+
const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for(
|
|
218
|
+
"dropdownAction"
|
|
219
|
+
);
|
|
266
220
|
function useVolver() {
|
|
267
221
|
return inject(INJECTION_KEY_VOLVER);
|
|
268
222
|
}
|
|
@@ -289,12 +243,29 @@ function useModifiers(prefix, modifiers, others) {
|
|
|
289
243
|
return toReturn;
|
|
290
244
|
});
|
|
291
245
|
}
|
|
292
|
-
const __default__$
|
|
246
|
+
const __default__$4 = {
|
|
293
247
|
name: "VvIcon"
|
|
294
248
|
};
|
|
295
|
-
const _sfc_main$
|
|
296
|
-
...__default__$
|
|
297
|
-
props:
|
|
249
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
250
|
+
...__default__$4,
|
|
251
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
252
|
+
name: {},
|
|
253
|
+
color: {},
|
|
254
|
+
width: {},
|
|
255
|
+
height: {},
|
|
256
|
+
provider: {},
|
|
257
|
+
prefix: {},
|
|
258
|
+
src: {},
|
|
259
|
+
horizontalFlip: { type: Boolean },
|
|
260
|
+
verticalFlip: { type: Boolean },
|
|
261
|
+
flip: {},
|
|
262
|
+
mode: {},
|
|
263
|
+
inline: { type: Boolean },
|
|
264
|
+
rotate: {},
|
|
265
|
+
onLoad: { type: Function },
|
|
266
|
+
svg: {},
|
|
267
|
+
modifiers: {}
|
|
268
|
+
}, VvIconPropsDefaults),
|
|
298
269
|
setup(__props) {
|
|
299
270
|
const props = __props;
|
|
300
271
|
const hasRotate = computed(() => {
|
|
@@ -381,7 +352,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
381
352
|
color: _ctx.color,
|
|
382
353
|
onLoad: _ctx.onLoad,
|
|
383
354
|
icon: unref(icon)
|
|
384
|
-
}), null, 16, ["class"])) : createCommentVNode("", true);
|
|
355
|
+
}), null, 16, ["class"])) : createCommentVNode("v-if", true);
|
|
385
356
|
};
|
|
386
357
|
}
|
|
387
358
|
});
|
|
@@ -400,10 +371,7 @@ const LinkProps = {
|
|
|
400
371
|
/**
|
|
401
372
|
* Anchor target
|
|
402
373
|
*/
|
|
403
|
-
target:
|
|
404
|
-
type: String,
|
|
405
|
-
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
406
|
-
},
|
|
374
|
+
target: String,
|
|
407
375
|
/**
|
|
408
376
|
* Anchor rel
|
|
409
377
|
*/
|
|
@@ -416,27 +384,33 @@ const ValidProps = {
|
|
|
416
384
|
/**
|
|
417
385
|
* Valid status
|
|
418
386
|
*/
|
|
419
|
-
valid: Boolean,
|
|
387
|
+
valid: { type: Boolean, default: false },
|
|
420
388
|
/**
|
|
421
389
|
* Valid label
|
|
422
390
|
*/
|
|
423
|
-
validLabel: [String, Array]
|
|
391
|
+
validLabel: { type: [String, Array], default: void 0 }
|
|
424
392
|
};
|
|
425
393
|
const InvalidProps = {
|
|
426
394
|
/**
|
|
427
395
|
* Invalid status
|
|
428
396
|
*/
|
|
429
|
-
invalid:
|
|
397
|
+
invalid: {
|
|
398
|
+
type: Boolean,
|
|
399
|
+
default: false
|
|
400
|
+
},
|
|
430
401
|
/**
|
|
431
402
|
* Invalid label
|
|
432
403
|
*/
|
|
433
|
-
invalidLabel: [String, Array]
|
|
404
|
+
invalidLabel: { type: [String, Array], default: void 0 }
|
|
434
405
|
};
|
|
435
406
|
const LoadingProps = {
|
|
436
407
|
/**
|
|
437
408
|
* Loading status
|
|
438
409
|
*/
|
|
439
|
-
loading:
|
|
410
|
+
loading: {
|
|
411
|
+
type: Boolean,
|
|
412
|
+
default: false
|
|
413
|
+
},
|
|
440
414
|
/**
|
|
441
415
|
* Loading label
|
|
442
416
|
*/
|
|
@@ -449,43 +423,73 @@ const DisabledProps = {
|
|
|
449
423
|
/**
|
|
450
424
|
* Whether the form control is disabled
|
|
451
425
|
*/
|
|
452
|
-
disabled:
|
|
426
|
+
disabled: {
|
|
427
|
+
type: Boolean,
|
|
428
|
+
default: false
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
const SelectedProps = {
|
|
432
|
+
/**
|
|
433
|
+
* Whether the item is selected
|
|
434
|
+
*/
|
|
435
|
+
selected: {
|
|
436
|
+
type: Boolean,
|
|
437
|
+
default: false
|
|
438
|
+
}
|
|
453
439
|
};
|
|
454
440
|
const ActiveProps = {
|
|
455
441
|
/**
|
|
456
442
|
* Whether the item is active
|
|
457
443
|
*/
|
|
458
|
-
active:
|
|
444
|
+
active: {
|
|
445
|
+
type: Boolean,
|
|
446
|
+
default: false
|
|
447
|
+
}
|
|
459
448
|
};
|
|
460
449
|
const CurrentProps = {
|
|
461
450
|
/**
|
|
462
451
|
* Whether the item is current
|
|
463
452
|
*/
|
|
464
|
-
current:
|
|
453
|
+
current: {
|
|
454
|
+
type: Boolean,
|
|
455
|
+
default: false
|
|
456
|
+
}
|
|
465
457
|
};
|
|
466
458
|
const PressedProps = {
|
|
467
459
|
/**
|
|
468
460
|
* Whether the item is pressed
|
|
469
461
|
*/
|
|
470
|
-
pressed:
|
|
462
|
+
pressed: {
|
|
463
|
+
type: Boolean,
|
|
464
|
+
default: false
|
|
465
|
+
}
|
|
471
466
|
};
|
|
472
467
|
const LabelProps = {
|
|
473
468
|
/**
|
|
474
469
|
* The item label
|
|
475
470
|
*/
|
|
476
|
-
label:
|
|
471
|
+
label: {
|
|
472
|
+
type: [String, Number],
|
|
473
|
+
default: void 0
|
|
474
|
+
}
|
|
477
475
|
};
|
|
478
476
|
const ReadonlyProps = {
|
|
479
477
|
/**
|
|
480
478
|
* The value is not editable
|
|
481
479
|
*/
|
|
482
|
-
readonly:
|
|
480
|
+
readonly: {
|
|
481
|
+
type: Boolean,
|
|
482
|
+
default: false
|
|
483
|
+
}
|
|
483
484
|
};
|
|
484
485
|
const ModifiersProps = {
|
|
485
486
|
/**
|
|
486
487
|
* Component BEM modifiers
|
|
487
488
|
*/
|
|
488
|
-
modifiers:
|
|
489
|
+
modifiers: {
|
|
490
|
+
type: [String, Array],
|
|
491
|
+
default: void 0
|
|
492
|
+
}
|
|
489
493
|
};
|
|
490
494
|
const HintProps = {
|
|
491
495
|
hintLabel: { type: String, default: "" }
|
|
@@ -504,14 +508,20 @@ const DebounceProps = {
|
|
|
504
508
|
/**
|
|
505
509
|
* Milliseconds to wait before emitting the input event
|
|
506
510
|
*/
|
|
507
|
-
debounce:
|
|
511
|
+
debounce: {
|
|
512
|
+
type: [Number, String],
|
|
513
|
+
default: void 0
|
|
514
|
+
}
|
|
508
515
|
};
|
|
509
516
|
const IconProps = {
|
|
510
517
|
/**
|
|
511
518
|
* VvIcon name or props
|
|
512
519
|
* @see VVIcon
|
|
513
520
|
*/
|
|
514
|
-
icon: {
|
|
521
|
+
icon: {
|
|
522
|
+
type: [String, Object],
|
|
523
|
+
default: void 0
|
|
524
|
+
},
|
|
515
525
|
/**
|
|
516
526
|
* VvIcon position
|
|
517
527
|
*/
|
|
@@ -532,7 +542,16 @@ const FloatingLabelProps = {
|
|
|
532
542
|
/**
|
|
533
543
|
* If true the label will be floating
|
|
534
544
|
*/
|
|
535
|
-
floating:
|
|
545
|
+
floating: {
|
|
546
|
+
type: Boolean,
|
|
547
|
+
default: false
|
|
548
|
+
}
|
|
549
|
+
};
|
|
550
|
+
const UnselectableProps = {
|
|
551
|
+
/**
|
|
552
|
+
* If true the input will be unselectable
|
|
553
|
+
*/
|
|
554
|
+
unselectable: { type: Boolean, default: true }
|
|
536
555
|
};
|
|
537
556
|
const IdProps = {
|
|
538
557
|
/**
|
|
@@ -541,7 +560,7 @@ const IdProps = {
|
|
|
541
560
|
*/
|
|
542
561
|
id: [String, Number]
|
|
543
562
|
};
|
|
544
|
-
|
|
563
|
+
const DropdownProps = {
|
|
545
564
|
/**
|
|
546
565
|
* Dropdown placement
|
|
547
566
|
*/
|
|
@@ -562,7 +581,8 @@ const IdProps = {
|
|
|
562
581
|
* Dropdown show / hide transition name
|
|
563
582
|
*/
|
|
564
583
|
transitionName: {
|
|
565
|
-
type: String
|
|
584
|
+
type: String,
|
|
585
|
+
default: void 0
|
|
566
586
|
},
|
|
567
587
|
/**
|
|
568
588
|
* Offset of the dropdown from the trigger
|
|
@@ -630,9 +650,10 @@ const IdProps = {
|
|
|
630
650
|
* Set dropdown width to the same as the trigger
|
|
631
651
|
*/
|
|
632
652
|
triggerWidth: {
|
|
633
|
-
type: Boolean
|
|
653
|
+
type: Boolean,
|
|
654
|
+
default: false
|
|
634
655
|
}
|
|
635
|
-
}
|
|
656
|
+
};
|
|
636
657
|
const IdNameProps = {
|
|
637
658
|
...IdProps,
|
|
638
659
|
/**
|
|
@@ -647,7 +668,10 @@ const AutofocusProps = {
|
|
|
647
668
|
* Global attribute autofocus
|
|
648
669
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
|
|
649
670
|
*/
|
|
650
|
-
autofocus:
|
|
671
|
+
autofocus: {
|
|
672
|
+
type: Boolean,
|
|
673
|
+
default: false
|
|
674
|
+
}
|
|
651
675
|
};
|
|
652
676
|
const AutocompleteProps = {
|
|
653
677
|
/**
|
|
@@ -679,28 +703,34 @@ const InputTextareaProps = {
|
|
|
679
703
|
* Available for input types: text, search, url, tel, email, password
|
|
680
704
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength
|
|
681
705
|
*/
|
|
682
|
-
minlength: [String, Number],
|
|
706
|
+
minlength: { type: [String, Number], default: void 0 },
|
|
683
707
|
/**
|
|
684
708
|
* Input / Textarea maxlength
|
|
685
709
|
* Maximum length (number of characters) of value
|
|
686
710
|
* Available for input types: text, search, url, tel, email, password
|
|
687
711
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength
|
|
688
712
|
*/
|
|
689
|
-
maxlength: [String, Number],
|
|
713
|
+
maxlength: { type: [String, Number], default: void 0 },
|
|
690
714
|
/**
|
|
691
715
|
* Input / Textarea placeholder
|
|
692
716
|
* Text that appears in the form control when it has no value set
|
|
693
717
|
* Available for input types: text, search, url, tel, email, password, number
|
|
694
718
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder
|
|
695
719
|
*/
|
|
696
|
-
placeholder:
|
|
720
|
+
placeholder: {
|
|
721
|
+
type: String,
|
|
722
|
+
default: void 0
|
|
723
|
+
},
|
|
697
724
|
/**
|
|
698
725
|
* Input / Textarea required
|
|
699
726
|
* A value is required or must be check for the form to be submittable
|
|
700
727
|
* Available for all input types except color
|
|
701
728
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#required
|
|
702
729
|
*/
|
|
703
|
-
required:
|
|
730
|
+
required: {
|
|
731
|
+
type: Boolean,
|
|
732
|
+
default: false
|
|
733
|
+
}
|
|
704
734
|
};
|
|
705
735
|
({
|
|
706
736
|
...DisabledProps,
|
|
@@ -723,8 +753,23 @@ const InputTextareaProps = {
|
|
|
723
753
|
ariaLabel: {
|
|
724
754
|
type: String,
|
|
725
755
|
default: void 0
|
|
756
|
+
},
|
|
757
|
+
/**
|
|
758
|
+
* Default tag for the action
|
|
759
|
+
*/
|
|
760
|
+
defaultTag: {
|
|
761
|
+
type: String,
|
|
762
|
+
default: ActionTag.button
|
|
726
763
|
}
|
|
727
764
|
});
|
|
765
|
+
const StorageProps = {
|
|
766
|
+
storageType: {
|
|
767
|
+
type: String,
|
|
768
|
+
default: StorageType.local,
|
|
769
|
+
validator: (value) => Object.values(StorageType).includes(value)
|
|
770
|
+
},
|
|
771
|
+
storageKey: String
|
|
772
|
+
};
|
|
728
773
|
const INPUT_TYPES = {
|
|
729
774
|
TEXT: "text",
|
|
730
775
|
PASSWORD: "password",
|
|
@@ -740,14 +785,6 @@ const INPUT_TYPES = {
|
|
|
740
785
|
MONTH: "month",
|
|
741
786
|
WEEK: "week"
|
|
742
787
|
};
|
|
743
|
-
const TYPES_ICON = {
|
|
744
|
-
PASSWORD_SHOW: "eye-on",
|
|
745
|
-
PASSWORD_HIDE: "eye-off",
|
|
746
|
-
DATE: "calendar",
|
|
747
|
-
TIME: "time",
|
|
748
|
-
COLOR: "color",
|
|
749
|
-
SEARCH: "close"
|
|
750
|
-
};
|
|
751
788
|
const VvInputTextEvents = [
|
|
752
789
|
"update:modelValue",
|
|
753
790
|
"update:masked",
|
|
@@ -767,6 +804,7 @@ const VvInputTextEvents = [
|
|
|
767
804
|
];
|
|
768
805
|
const VvInputTextProps = {
|
|
769
806
|
...InputTextareaProps,
|
|
807
|
+
...StorageProps,
|
|
770
808
|
/**
|
|
771
809
|
* Input value
|
|
772
810
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
|
|
@@ -816,24 +854,32 @@ const VvInputTextProps = {
|
|
|
816
854
|
* @see VVIcon
|
|
817
855
|
*/
|
|
818
856
|
iconShowPassword: {
|
|
819
|
-
type: String,
|
|
820
|
-
default:
|
|
857
|
+
type: [String, Object],
|
|
858
|
+
default: ACTION_ICONS.showPassword
|
|
821
859
|
},
|
|
822
860
|
/**
|
|
823
861
|
* VvIcon name for hide password button
|
|
824
862
|
* @see VVIcon
|
|
825
863
|
*/
|
|
826
864
|
iconHidePassword: {
|
|
827
|
-
type: String,
|
|
828
|
-
default:
|
|
865
|
+
type: [String, Object],
|
|
866
|
+
default: ACTION_ICONS.hidePassword
|
|
829
867
|
},
|
|
830
868
|
/**
|
|
831
869
|
* VvIcon name for clear button
|
|
832
870
|
* @see VVIcon
|
|
833
871
|
*/
|
|
834
872
|
iconClear: {
|
|
835
|
-
type: String,
|
|
836
|
-
default:
|
|
873
|
+
type: [String, Object],
|
|
874
|
+
default: ACTION_ICONS.clear
|
|
875
|
+
},
|
|
876
|
+
/**
|
|
877
|
+
* VvIcon name for remove suggestion button
|
|
878
|
+
* @see VVIcon
|
|
879
|
+
*/
|
|
880
|
+
iconRemoveSuggestion: {
|
|
881
|
+
type: [String, Object],
|
|
882
|
+
default: ACTION_ICONS.remove
|
|
837
883
|
},
|
|
838
884
|
/**
|
|
839
885
|
* Label for step up button
|
|
@@ -870,6 +916,13 @@ const VvInputTextProps = {
|
|
|
870
916
|
type: String,
|
|
871
917
|
default: "Clear"
|
|
872
918
|
},
|
|
919
|
+
/**
|
|
920
|
+
* Label for remove suggestion button
|
|
921
|
+
*/
|
|
922
|
+
labelRemoveSuggestion: {
|
|
923
|
+
type: String,
|
|
924
|
+
default: "Remove suggestion"
|
|
925
|
+
},
|
|
873
926
|
/**
|
|
874
927
|
* iMask options
|
|
875
928
|
* @see https://imask.js.org/guide.html
|
|
@@ -911,11 +964,53 @@ const VvInputTextProps = {
|
|
|
911
964
|
selectOnFocus: {
|
|
912
965
|
type: Boolean,
|
|
913
966
|
default: false
|
|
967
|
+
},
|
|
968
|
+
/**
|
|
969
|
+
* Maximum number of suggestions
|
|
970
|
+
*/
|
|
971
|
+
maxSuggestions: {
|
|
972
|
+
type: Number,
|
|
973
|
+
default: 5
|
|
914
974
|
}
|
|
915
975
|
};
|
|
976
|
+
function useComponentIcon(icon, iconPosition) {
|
|
977
|
+
const hasIcon = computed(() => {
|
|
978
|
+
if (typeof (icon == null ? void 0 : icon.value) === "string") {
|
|
979
|
+
return { name: icon == null ? void 0 : icon.value };
|
|
980
|
+
}
|
|
981
|
+
return icon == null ? void 0 : icon.value;
|
|
982
|
+
});
|
|
983
|
+
const hasIconBefore = computed(
|
|
984
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
|
|
985
|
+
);
|
|
986
|
+
const hasIconAfter = computed(
|
|
987
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
|
|
988
|
+
);
|
|
989
|
+
const hasIconLeft = computed(
|
|
990
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
|
|
991
|
+
);
|
|
992
|
+
const hasIconRight = computed(
|
|
993
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
|
|
994
|
+
);
|
|
995
|
+
const hasIconTop = computed(
|
|
996
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
|
|
997
|
+
);
|
|
998
|
+
const hasIconBottom = computed(
|
|
999
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
|
|
1000
|
+
);
|
|
1001
|
+
return {
|
|
1002
|
+
hasIcon,
|
|
1003
|
+
hasIconLeft,
|
|
1004
|
+
hasIconRight,
|
|
1005
|
+
hasIconTop,
|
|
1006
|
+
hasIconBottom,
|
|
1007
|
+
hasIconBefore,
|
|
1008
|
+
hasIconAfter
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
916
1011
|
const VvInputPasswordAction = defineComponent({
|
|
917
1012
|
components: {
|
|
918
|
-
VvIcon: _sfc_main$
|
|
1013
|
+
VvIcon: _sfc_main$4
|
|
919
1014
|
},
|
|
920
1015
|
props: {
|
|
921
1016
|
disabled: {
|
|
@@ -931,12 +1026,12 @@ const VvInputPasswordAction = defineComponent({
|
|
|
931
1026
|
default: "Hide password"
|
|
932
1027
|
},
|
|
933
1028
|
iconShow: {
|
|
934
|
-
type: String,
|
|
935
|
-
default:
|
|
1029
|
+
type: [String, Object],
|
|
1030
|
+
default: ACTION_ICONS.showPassword
|
|
936
1031
|
},
|
|
937
1032
|
iconHide: {
|
|
938
|
-
type: String,
|
|
939
|
-
default:
|
|
1033
|
+
type: [String, Object],
|
|
1034
|
+
default: ACTION_ICONS.hidePassword
|
|
940
1035
|
}
|
|
941
1036
|
},
|
|
942
1037
|
emits: ["toggle-password"],
|
|
@@ -945,6 +1040,7 @@ const VvInputPasswordAction = defineComponent({
|
|
|
945
1040
|
const activeIcon = computed(
|
|
946
1041
|
() => active.value ? props.iconHide : props.iconShow
|
|
947
1042
|
);
|
|
1043
|
+
const { hasIcon } = useComponentIcon(activeIcon);
|
|
948
1044
|
function onClick(e) {
|
|
949
1045
|
e == null ? void 0 : e.stopPropagation();
|
|
950
1046
|
if (!props.disabled) {
|
|
@@ -955,14 +1051,15 @@ const VvInputPasswordAction = defineComponent({
|
|
|
955
1051
|
return {
|
|
956
1052
|
active,
|
|
957
1053
|
activeIcon,
|
|
1054
|
+
hasIcon,
|
|
958
1055
|
onClick
|
|
959
1056
|
};
|
|
960
1057
|
},
|
|
961
1058
|
render() {
|
|
962
|
-
const icon = h(_sfc_main$
|
|
963
|
-
|
|
1059
|
+
const icon = this.hasIcon ? h(_sfc_main$4, {
|
|
1060
|
+
...this.hasIcon,
|
|
964
1061
|
class: "vv-input-text__icon"
|
|
965
|
-
});
|
|
1062
|
+
}) : void 0;
|
|
966
1063
|
return h(
|
|
967
1064
|
"button",
|
|
968
1065
|
{
|
|
@@ -978,7 +1075,7 @@ const VvInputPasswordAction = defineComponent({
|
|
|
978
1075
|
});
|
|
979
1076
|
const VvInputStepAction = defineComponent({
|
|
980
1077
|
components: {
|
|
981
|
-
VvIcon: _sfc_main$
|
|
1078
|
+
VvIcon: _sfc_main$4
|
|
982
1079
|
},
|
|
983
1080
|
props: {
|
|
984
1081
|
disabled: {
|
|
@@ -1023,7 +1120,7 @@ const VvInputStepAction = defineComponent({
|
|
|
1023
1120
|
});
|
|
1024
1121
|
const VvInputClearAction = defineComponent({
|
|
1025
1122
|
components: {
|
|
1026
|
-
VvIcon: _sfc_main$
|
|
1123
|
+
VvIcon: _sfc_main$4
|
|
1027
1124
|
},
|
|
1028
1125
|
props: {
|
|
1029
1126
|
disabled: {
|
|
@@ -1035,12 +1132,13 @@ const VvInputClearAction = defineComponent({
|
|
|
1035
1132
|
default: "Clear"
|
|
1036
1133
|
},
|
|
1037
1134
|
icon: {
|
|
1038
|
-
type: String,
|
|
1135
|
+
type: [String, Object],
|
|
1039
1136
|
default: "close"
|
|
1040
1137
|
}
|
|
1041
1138
|
},
|
|
1042
1139
|
emits: ["clear"],
|
|
1043
1140
|
setup(props, { emit }) {
|
|
1141
|
+
const { hasIcon } = useComponentIcon(computed(() => props.icon));
|
|
1044
1142
|
function onClick(e) {
|
|
1045
1143
|
e == null ? void 0 : e.stopPropagation();
|
|
1046
1144
|
if (!props.disabled) {
|
|
@@ -1048,14 +1146,15 @@ const VvInputClearAction = defineComponent({
|
|
|
1048
1146
|
}
|
|
1049
1147
|
}
|
|
1050
1148
|
return {
|
|
1149
|
+
hasIcon,
|
|
1051
1150
|
onClick
|
|
1052
1151
|
};
|
|
1053
1152
|
},
|
|
1054
1153
|
render() {
|
|
1055
|
-
const icon = h(_sfc_main$
|
|
1056
|
-
|
|
1154
|
+
const icon = this.hasIcon ? h(_sfc_main$4, {
|
|
1155
|
+
...this.hasIcon,
|
|
1057
1156
|
class: "vv-input-text__icon"
|
|
1058
|
-
});
|
|
1157
|
+
}) : void 0;
|
|
1059
1158
|
return h(
|
|
1060
1159
|
"button",
|
|
1061
1160
|
{
|
|
@@ -1073,7 +1172,7 @@ function VvInputTextActionsFactory(type, parentProps) {
|
|
|
1073
1172
|
return {
|
|
1074
1173
|
name: "VvInputTextActions",
|
|
1075
1174
|
components: {
|
|
1076
|
-
VvIcon: _sfc_main$
|
|
1175
|
+
VvIcon: _sfc_main$4,
|
|
1077
1176
|
VvInputPasswordAction,
|
|
1078
1177
|
VvInputStepAction,
|
|
1079
1178
|
VvInputClearAction
|
|
@@ -1146,6 +1245,638 @@ function VvInputTextActionsFactory(type, parentProps) {
|
|
|
1146
1245
|
}
|
|
1147
1246
|
};
|
|
1148
1247
|
}
|
|
1248
|
+
const VvDropdownProps = {
|
|
1249
|
+
...IdProps,
|
|
1250
|
+
...DropdownProps,
|
|
1251
|
+
...ModifiersProps,
|
|
1252
|
+
/**
|
|
1253
|
+
* Show / hide dropdown programmatically
|
|
1254
|
+
*/
|
|
1255
|
+
modelValue: {
|
|
1256
|
+
type: Boolean,
|
|
1257
|
+
default: void 0
|
|
1258
|
+
},
|
|
1259
|
+
/**
|
|
1260
|
+
* Dropdown trigger element
|
|
1261
|
+
*/
|
|
1262
|
+
reference: {
|
|
1263
|
+
type: Object,
|
|
1264
|
+
default: null
|
|
1265
|
+
},
|
|
1266
|
+
/**
|
|
1267
|
+
* Dropdown role
|
|
1268
|
+
*/
|
|
1269
|
+
role: {
|
|
1270
|
+
type: String,
|
|
1271
|
+
default: DropdownRole.menu,
|
|
1272
|
+
validator: (value) => Object.values(DropdownRole).includes(value)
|
|
1273
|
+
}
|
|
1274
|
+
};
|
|
1275
|
+
const VvDropdownItemProps = {
|
|
1276
|
+
focusOnHover: {
|
|
1277
|
+
type: Boolean,
|
|
1278
|
+
default: false
|
|
1279
|
+
}
|
|
1280
|
+
};
|
|
1281
|
+
const VvDropdownOptionProps = {
|
|
1282
|
+
...DisabledProps,
|
|
1283
|
+
...SelectedProps,
|
|
1284
|
+
...UnselectableProps,
|
|
1285
|
+
...ModifiersProps,
|
|
1286
|
+
deselectHintLabel: {
|
|
1287
|
+
type: String
|
|
1288
|
+
},
|
|
1289
|
+
selectHintLabel: {
|
|
1290
|
+
type: String
|
|
1291
|
+
},
|
|
1292
|
+
selectedHintLabel: {
|
|
1293
|
+
type: String
|
|
1294
|
+
},
|
|
1295
|
+
focusOnHover: {
|
|
1296
|
+
type: Boolean,
|
|
1297
|
+
default: false
|
|
1298
|
+
}
|
|
1299
|
+
};
|
|
1300
|
+
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
|
|
1301
|
+
function useProvideDropdownTrigger({
|
|
1302
|
+
reference,
|
|
1303
|
+
id,
|
|
1304
|
+
expanded,
|
|
1305
|
+
aria
|
|
1306
|
+
}) {
|
|
1307
|
+
const bus = mitt();
|
|
1308
|
+
const component = defineComponent({
|
|
1309
|
+
name: "VvDropdownTriggerProvider",
|
|
1310
|
+
setup() {
|
|
1311
|
+
provide(INJECTION_KEY_DROPDOWN_TRIGGER, {
|
|
1312
|
+
reference,
|
|
1313
|
+
id,
|
|
1314
|
+
expanded,
|
|
1315
|
+
aria,
|
|
1316
|
+
bus
|
|
1317
|
+
});
|
|
1318
|
+
},
|
|
1319
|
+
render() {
|
|
1320
|
+
var _a, _b;
|
|
1321
|
+
return h(Fragment, {}, (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a));
|
|
1322
|
+
}
|
|
1323
|
+
});
|
|
1324
|
+
return {
|
|
1325
|
+
bus,
|
|
1326
|
+
component
|
|
1327
|
+
};
|
|
1328
|
+
}
|
|
1329
|
+
function useProvideDropdownItem({
|
|
1330
|
+
role,
|
|
1331
|
+
...others
|
|
1332
|
+
}) {
|
|
1333
|
+
const itemRole = computed(
|
|
1334
|
+
() => role.value === DropdownRole.listbox ? DropdownItemRole.option : DropdownItemRole.presentation
|
|
1335
|
+
);
|
|
1336
|
+
provide(INJECTION_KEY_DROPDOWN_ITEM, {
|
|
1337
|
+
role: itemRole,
|
|
1338
|
+
...others
|
|
1339
|
+
});
|
|
1340
|
+
return { itemRole };
|
|
1341
|
+
}
|
|
1342
|
+
function useProvideDropdownAction({
|
|
1343
|
+
expanded
|
|
1344
|
+
}) {
|
|
1345
|
+
provide(INJECTION_KEY_DROPDOWN_ACTION, {
|
|
1346
|
+
role: ref(ActionRoles.menuitem),
|
|
1347
|
+
expanded
|
|
1348
|
+
});
|
|
1349
|
+
}
|
|
1350
|
+
const _hoisted_1$2 = ["id", "tabindex", "role", "aria-labelledby"];
|
|
1351
|
+
const __default__$3 = {
|
|
1352
|
+
name: "VvDropdown",
|
|
1353
|
+
inheritAttrs: false
|
|
1354
|
+
};
|
|
1355
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
1356
|
+
...__default__$3,
|
|
1357
|
+
props: VvDropdownProps,
|
|
1358
|
+
emits: [
|
|
1359
|
+
"update:modelValue",
|
|
1360
|
+
"beforeExpand",
|
|
1361
|
+
"beforeCollapse",
|
|
1362
|
+
"afterExpand",
|
|
1363
|
+
"afterCollapse",
|
|
1364
|
+
"before-enter",
|
|
1365
|
+
"after-leave",
|
|
1366
|
+
"enter",
|
|
1367
|
+
"after-enter",
|
|
1368
|
+
"enter-cancelled",
|
|
1369
|
+
"before-leave",
|
|
1370
|
+
"leave",
|
|
1371
|
+
"leave-cancelled"
|
|
1372
|
+
],
|
|
1373
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1374
|
+
const props = __props;
|
|
1375
|
+
const emit = __emit;
|
|
1376
|
+
const { id } = toRefs(props);
|
|
1377
|
+
const hasId = useUniqueId(id);
|
|
1378
|
+
const attrs = useAttrs();
|
|
1379
|
+
const maxWidth = ref("auto");
|
|
1380
|
+
const maxHeight = ref("auto");
|
|
1381
|
+
const localReferenceEl = ref(null);
|
|
1382
|
+
const floatingEl = ref();
|
|
1383
|
+
const arrowEl = ref(null);
|
|
1384
|
+
const listEl = ref(null);
|
|
1385
|
+
const referenceEl = computed({
|
|
1386
|
+
get: () => props.reference ?? localReferenceEl.value,
|
|
1387
|
+
set: (newValue) => {
|
|
1388
|
+
localReferenceEl.value = newValue;
|
|
1389
|
+
}
|
|
1390
|
+
});
|
|
1391
|
+
const hasCustomPosition = ref(false);
|
|
1392
|
+
onMounted(() => {
|
|
1393
|
+
useMutationObserver(
|
|
1394
|
+
floatingEl.value,
|
|
1395
|
+
() => {
|
|
1396
|
+
var _a;
|
|
1397
|
+
hasCustomPosition.value = ((_a = window.getComputedStyle(floatingEl.value).getPropertyValue("--dropdown-custom-position")) == null ? void 0 : _a.trim()) === "true";
|
|
1398
|
+
},
|
|
1399
|
+
{
|
|
1400
|
+
attributeFilter: ["style"],
|
|
1401
|
+
window
|
|
1402
|
+
}
|
|
1403
|
+
);
|
|
1404
|
+
});
|
|
1405
|
+
const middleware = computed(() => {
|
|
1406
|
+
const toReturn = [];
|
|
1407
|
+
if (props.autoPlacement) {
|
|
1408
|
+
if (typeof props.autoPlacement === "boolean") {
|
|
1409
|
+
toReturn.push(autoPlacement());
|
|
1410
|
+
} else {
|
|
1411
|
+
toReturn.push(
|
|
1412
|
+
autoPlacement(props.autoPlacement)
|
|
1413
|
+
);
|
|
1414
|
+
}
|
|
1415
|
+
} else if (props.flip) {
|
|
1416
|
+
if (typeof props.flip === "boolean") {
|
|
1417
|
+
toReturn.push(flip({ fallbackStrategy: "initialPlacement" }));
|
|
1418
|
+
} else {
|
|
1419
|
+
toReturn.push(flip(props.flip));
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
if (props.shift) {
|
|
1423
|
+
if (typeof props.shift === "boolean") {
|
|
1424
|
+
toReturn.push(shift());
|
|
1425
|
+
} else {
|
|
1426
|
+
toReturn.push(shift(props.shift));
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
if (props.size) {
|
|
1430
|
+
const apply = ({
|
|
1431
|
+
availableWidth,
|
|
1432
|
+
availableHeight
|
|
1433
|
+
}) => {
|
|
1434
|
+
maxWidth.value = `${availableWidth}px`;
|
|
1435
|
+
maxHeight.value = `${availableHeight}px`;
|
|
1436
|
+
};
|
|
1437
|
+
if (typeof props.size === "boolean") {
|
|
1438
|
+
toReturn.push(
|
|
1439
|
+
size({
|
|
1440
|
+
apply
|
|
1441
|
+
})
|
|
1442
|
+
);
|
|
1443
|
+
} else {
|
|
1444
|
+
toReturn.push(
|
|
1445
|
+
size({
|
|
1446
|
+
...props.size,
|
|
1447
|
+
apply
|
|
1448
|
+
})
|
|
1449
|
+
);
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
if (props.offset) {
|
|
1453
|
+
toReturn.push(offset(Number(props.offset)));
|
|
1454
|
+
if (["string", "number"].includes(typeof props.offset)) {
|
|
1455
|
+
toReturn.push(offset(Number(props.offset)));
|
|
1456
|
+
} else {
|
|
1457
|
+
toReturn.push(offset(props.offset));
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
if (props.arrow) {
|
|
1461
|
+
toReturn.push(
|
|
1462
|
+
arrow({
|
|
1463
|
+
element: arrowEl
|
|
1464
|
+
})
|
|
1465
|
+
);
|
|
1466
|
+
}
|
|
1467
|
+
return toReturn;
|
|
1468
|
+
});
|
|
1469
|
+
const { x, y, middlewareData, placement, strategy } = useFloating(
|
|
1470
|
+
referenceEl,
|
|
1471
|
+
floatingEl,
|
|
1472
|
+
{
|
|
1473
|
+
whileElementsMounted: (...args) => {
|
|
1474
|
+
return autoUpdate(...args, {
|
|
1475
|
+
animationFrame: props.strategy === Strategy.fixed
|
|
1476
|
+
});
|
|
1477
|
+
},
|
|
1478
|
+
placement: computed(() => props.placement),
|
|
1479
|
+
strategy: computed(() => props.strategy),
|
|
1480
|
+
middleware
|
|
1481
|
+
}
|
|
1482
|
+
);
|
|
1483
|
+
const dropdownPlacement = computed(() => {
|
|
1484
|
+
var _a;
|
|
1485
|
+
if (hasCustomPosition.value) {
|
|
1486
|
+
return void 0;
|
|
1487
|
+
}
|
|
1488
|
+
const width = props.triggerWidth && referenceEl.value ? `${(_a = referenceEl.value) == null ? void 0 : _a.offsetWidth}px` : void 0;
|
|
1489
|
+
return {
|
|
1490
|
+
position: strategy.value,
|
|
1491
|
+
top: `${y.value ?? 0}px`,
|
|
1492
|
+
left: `${x.value ?? 0}px`,
|
|
1493
|
+
maxWidth: width ? void 0 : maxWidth.value,
|
|
1494
|
+
maxHeight: maxHeight.value,
|
|
1495
|
+
width
|
|
1496
|
+
};
|
|
1497
|
+
});
|
|
1498
|
+
const side = computed(
|
|
1499
|
+
() => placement.value.split("-")[0]
|
|
1500
|
+
);
|
|
1501
|
+
const arrowPlacement = computed(() => {
|
|
1502
|
+
var _a, _b, _c, _d, _e;
|
|
1503
|
+
if (hasCustomPosition.value) {
|
|
1504
|
+
return void 0;
|
|
1505
|
+
}
|
|
1506
|
+
const staticSide = {
|
|
1507
|
+
[Side.top]: Side.bottom,
|
|
1508
|
+
[Side.right]: Side.left,
|
|
1509
|
+
[Side.bottom]: Side.top,
|
|
1510
|
+
[Side.left]: Side.right
|
|
1511
|
+
}[side.value];
|
|
1512
|
+
return {
|
|
1513
|
+
left: ((_a = middlewareData.value.arrow) == null ? void 0 : _a.x) !== void 0 ? `${(_b = middlewareData.value.arrow) == null ? void 0 : _b.x}px` : void 0,
|
|
1514
|
+
top: ((_c = middlewareData.value.arrow) == null ? void 0 : _c.y) !== void 0 ? `${(_d = middlewareData.value.arrow) == null ? void 0 : _d.y}px` : void 0,
|
|
1515
|
+
[staticSide]: `${-(((_e = arrowEl.value) == null ? void 0 : _e.offsetWidth) ?? 0) / 2}px`
|
|
1516
|
+
};
|
|
1517
|
+
});
|
|
1518
|
+
const modelValue = useVModel(props, "modelValue", emit);
|
|
1519
|
+
const localModelValue = ref(false);
|
|
1520
|
+
const expanded = computed({
|
|
1521
|
+
get: () => modelValue.value ?? localModelValue.value,
|
|
1522
|
+
set: (newValue) => {
|
|
1523
|
+
if (modelValue.value === void 0) {
|
|
1524
|
+
localModelValue.value = newValue;
|
|
1525
|
+
return;
|
|
1526
|
+
}
|
|
1527
|
+
modelValue.value = newValue;
|
|
1528
|
+
}
|
|
1529
|
+
});
|
|
1530
|
+
const show = () => {
|
|
1531
|
+
expanded.value = true;
|
|
1532
|
+
};
|
|
1533
|
+
const hide = () => {
|
|
1534
|
+
expanded.value = false;
|
|
1535
|
+
};
|
|
1536
|
+
const toggle = () => {
|
|
1537
|
+
expanded.value = !expanded.value;
|
|
1538
|
+
};
|
|
1539
|
+
const init = (el) => {
|
|
1540
|
+
referenceEl.value = el;
|
|
1541
|
+
};
|
|
1542
|
+
__expose({
|
|
1543
|
+
toggle,
|
|
1544
|
+
show,
|
|
1545
|
+
hide,
|
|
1546
|
+
init,
|
|
1547
|
+
customPosition: hasCustomPosition
|
|
1548
|
+
});
|
|
1549
|
+
watch(expanded, (newValue) => {
|
|
1550
|
+
if (newValue && props.autofocusFirst) {
|
|
1551
|
+
nextTick(() => {
|
|
1552
|
+
const focusableElements = getKeyboardFocusableElements(
|
|
1553
|
+
floatingEl.value
|
|
1554
|
+
);
|
|
1555
|
+
if (focusableElements.length > 0) {
|
|
1556
|
+
focusableElements[0].focus({
|
|
1557
|
+
preventScroll: true
|
|
1558
|
+
});
|
|
1559
|
+
}
|
|
1560
|
+
});
|
|
1561
|
+
}
|
|
1562
|
+
});
|
|
1563
|
+
onClickOutside(
|
|
1564
|
+
floatingEl,
|
|
1565
|
+
() => {
|
|
1566
|
+
if (!props.keepOpen && expanded.value) {
|
|
1567
|
+
expanded.value = false;
|
|
1568
|
+
}
|
|
1569
|
+
},
|
|
1570
|
+
{ ignore: [referenceEl] }
|
|
1571
|
+
);
|
|
1572
|
+
const hasAriaLabelledby = computed(() => {
|
|
1573
|
+
var _a, _b;
|
|
1574
|
+
return ((_b = (_a = referenceEl.value) == null ? void 0 : _a.getAttribute) == null ? void 0 : _b.call(_a, "id")) ?? void 0;
|
|
1575
|
+
});
|
|
1576
|
+
const referenceAria = computed(() => ({
|
|
1577
|
+
"aria-controls": hasId.value,
|
|
1578
|
+
"aria-haspopup": true,
|
|
1579
|
+
"aria-expanded": expanded.value
|
|
1580
|
+
}));
|
|
1581
|
+
const { component: VvDropdownTriggerProvider, bus } = useProvideDropdownTrigger({
|
|
1582
|
+
reference: referenceEl,
|
|
1583
|
+
id: hasId,
|
|
1584
|
+
expanded,
|
|
1585
|
+
aria: referenceAria
|
|
1586
|
+
});
|
|
1587
|
+
bus.on("click", toggle);
|
|
1588
|
+
const { role, modifiers } = toRefs(props);
|
|
1589
|
+
const bemCssClasses = useModifiers(
|
|
1590
|
+
"vv-dropdown",
|
|
1591
|
+
modifiers,
|
|
1592
|
+
computed(() => ({
|
|
1593
|
+
arrow: props.arrow
|
|
1594
|
+
}))
|
|
1595
|
+
);
|
|
1596
|
+
const { focused } = useFocusWithin(floatingEl);
|
|
1597
|
+
function getKeyboardFocusableElements(element) {
|
|
1598
|
+
if (!element) {
|
|
1599
|
+
return [];
|
|
1600
|
+
}
|
|
1601
|
+
return [
|
|
1602
|
+
...element.querySelectorAll(
|
|
1603
|
+
'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'
|
|
1604
|
+
)
|
|
1605
|
+
].filter(
|
|
1606
|
+
(el) => !el.hasAttribute("disabled") && !el.getAttribute("aria-hidden")
|
|
1607
|
+
);
|
|
1608
|
+
}
|
|
1609
|
+
const focusNext = () => {
|
|
1610
|
+
nextTick(() => {
|
|
1611
|
+
if (focused.value) {
|
|
1612
|
+
const focusableElements = getKeyboardFocusableElements(
|
|
1613
|
+
floatingEl.value
|
|
1614
|
+
);
|
|
1615
|
+
if (focusableElements.length === 0 || !document.activeElement) {
|
|
1616
|
+
return;
|
|
1617
|
+
}
|
|
1618
|
+
const activeElementIndex = focusableElements.indexOf(
|
|
1619
|
+
document.activeElement
|
|
1620
|
+
);
|
|
1621
|
+
if (activeElementIndex < focusableElements.length - 1) {
|
|
1622
|
+
focusableElements[activeElementIndex + 1].focus({
|
|
1623
|
+
preventScroll: true
|
|
1624
|
+
});
|
|
1625
|
+
} else {
|
|
1626
|
+
focusableElements[0].focus({
|
|
1627
|
+
preventScroll: true
|
|
1628
|
+
});
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
});
|
|
1632
|
+
};
|
|
1633
|
+
const focusPrev = () => {
|
|
1634
|
+
nextTick(() => {
|
|
1635
|
+
if (focused.value) {
|
|
1636
|
+
const focusableElements = getKeyboardFocusableElements(
|
|
1637
|
+
floatingEl.value
|
|
1638
|
+
);
|
|
1639
|
+
if (focusableElements.length === 0 || !document.activeElement) {
|
|
1640
|
+
return;
|
|
1641
|
+
}
|
|
1642
|
+
const activeElementIndex = focusableElements.indexOf(
|
|
1643
|
+
document.activeElement
|
|
1644
|
+
);
|
|
1645
|
+
if (activeElementIndex > 0) {
|
|
1646
|
+
focusableElements[activeElementIndex - 1].focus({
|
|
1647
|
+
preventScroll: true
|
|
1648
|
+
});
|
|
1649
|
+
} else {
|
|
1650
|
+
focusableElements[focusableElements.length - 1].focus({
|
|
1651
|
+
preventScroll: true
|
|
1652
|
+
});
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
});
|
|
1656
|
+
};
|
|
1657
|
+
const hovered = useElementHover(floatingEl);
|
|
1658
|
+
const { itemRole } = useProvideDropdownItem({
|
|
1659
|
+
role,
|
|
1660
|
+
expanded,
|
|
1661
|
+
focused,
|
|
1662
|
+
hovered
|
|
1663
|
+
});
|
|
1664
|
+
onKeyStroke("Escape", (e) => {
|
|
1665
|
+
if (expanded.value) {
|
|
1666
|
+
e.preventDefault();
|
|
1667
|
+
hide();
|
|
1668
|
+
}
|
|
1669
|
+
});
|
|
1670
|
+
onKeyStroke("ArrowDown", (e) => {
|
|
1671
|
+
if (expanded.value && focused.value) {
|
|
1672
|
+
e.preventDefault();
|
|
1673
|
+
focusNext();
|
|
1674
|
+
}
|
|
1675
|
+
});
|
|
1676
|
+
onKeyStroke("ArrowUp", (e) => {
|
|
1677
|
+
if (expanded.value && focused.value) {
|
|
1678
|
+
e.preventDefault();
|
|
1679
|
+
focusPrev();
|
|
1680
|
+
}
|
|
1681
|
+
});
|
|
1682
|
+
onKeyStroke([" ", "Enter"], (e) => {
|
|
1683
|
+
const htmlEl = e.target;
|
|
1684
|
+
if (expanded.value && focused.value && htmlEl) {
|
|
1685
|
+
htmlEl == null ? void 0 : htmlEl.click();
|
|
1686
|
+
}
|
|
1687
|
+
});
|
|
1688
|
+
const dropdownTransitionHandlers = {
|
|
1689
|
+
"before-enter": () => {
|
|
1690
|
+
emit(expanded.value ? "beforeExpand" : "beforeCollapse");
|
|
1691
|
+
emit("before-enter");
|
|
1692
|
+
},
|
|
1693
|
+
"after-leave": () => {
|
|
1694
|
+
emit(expanded.value ? "afterExpand" : "afterCollapse");
|
|
1695
|
+
emit("after-leave");
|
|
1696
|
+
},
|
|
1697
|
+
enter: () => {
|
|
1698
|
+
emit("enter");
|
|
1699
|
+
},
|
|
1700
|
+
"after-enter": () => {
|
|
1701
|
+
emit("after-enter");
|
|
1702
|
+
},
|
|
1703
|
+
"enter-cancelled": () => {
|
|
1704
|
+
emit("enter-cancelled");
|
|
1705
|
+
},
|
|
1706
|
+
"before-leave": () => {
|
|
1707
|
+
emit("before-leave");
|
|
1708
|
+
},
|
|
1709
|
+
leave: () => {
|
|
1710
|
+
emit("leave");
|
|
1711
|
+
},
|
|
1712
|
+
"leave-cancelled": () => {
|
|
1713
|
+
emit("leave-cancelled");
|
|
1714
|
+
}
|
|
1715
|
+
};
|
|
1716
|
+
return (_ctx, _cache) => {
|
|
1717
|
+
return openBlock(), createElementBlock(
|
|
1718
|
+
Fragment,
|
|
1719
|
+
null,
|
|
1720
|
+
[
|
|
1721
|
+
createVNode(unref(VvDropdownTriggerProvider), null, {
|
|
1722
|
+
default: withCtx(() => [
|
|
1723
|
+
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ init, show, hide, toggle, expanded: unref(expanded), aria: unref(referenceAria) })))
|
|
1724
|
+
]),
|
|
1725
|
+
_: 3
|
|
1726
|
+
/* FORWARDED */
|
|
1727
|
+
}),
|
|
1728
|
+
createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers(dropdownTransitionHandlers), { persisted: "" }), {
|
|
1729
|
+
default: withCtx(() => [
|
|
1730
|
+
withDirectives(createElementVNode(
|
|
1731
|
+
"div",
|
|
1732
|
+
{
|
|
1733
|
+
ref_key: "floatingEl",
|
|
1734
|
+
ref: floatingEl,
|
|
1735
|
+
style: normalizeStyle(unref(dropdownPlacement)),
|
|
1736
|
+
class: normalizeClass(unref(bemCssClasses))
|
|
1737
|
+
},
|
|
1738
|
+
[
|
|
1739
|
+
props.arrow ? (openBlock(), createElementBlock(
|
|
1740
|
+
"div",
|
|
1741
|
+
{
|
|
1742
|
+
key: 0,
|
|
1743
|
+
ref_key: "arrowEl",
|
|
1744
|
+
ref: arrowEl,
|
|
1745
|
+
style: normalizeStyle(unref(arrowPlacement)),
|
|
1746
|
+
class: "vv-dropdown__arrow"
|
|
1747
|
+
},
|
|
1748
|
+
null,
|
|
1749
|
+
4
|
|
1750
|
+
/* STYLE */
|
|
1751
|
+
)) : createCommentVNode("v-if", true),
|
|
1752
|
+
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
|
|
1753
|
+
createElementVNode("div", mergeProps(unref(attrs), {
|
|
1754
|
+
id: unref(hasId),
|
|
1755
|
+
ref_key: "listEl",
|
|
1756
|
+
ref: listEl,
|
|
1757
|
+
tabindex: !unref(expanded) ? -1 : void 0,
|
|
1758
|
+
role: unref(role),
|
|
1759
|
+
"aria-labelledby": unref(hasAriaLabelledby),
|
|
1760
|
+
class: "vv-dropdown__list"
|
|
1761
|
+
}), [
|
|
1762
|
+
renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
|
|
1763
|
+
role: unref(itemRole)
|
|
1764
|
+
})))
|
|
1765
|
+
], 16, _hoisted_1$2),
|
|
1766
|
+
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
|
|
1767
|
+
],
|
|
1768
|
+
6
|
|
1769
|
+
/* CLASS, STYLE */
|
|
1770
|
+
), [
|
|
1771
|
+
[vShow, unref(expanded)]
|
|
1772
|
+
])
|
|
1773
|
+
]),
|
|
1774
|
+
_: 3
|
|
1775
|
+
/* FORWARDED */
|
|
1776
|
+
}, 16, ["name"])
|
|
1777
|
+
],
|
|
1778
|
+
64
|
|
1779
|
+
/* STABLE_FRAGMENT */
|
|
1780
|
+
);
|
|
1781
|
+
};
|
|
1782
|
+
}
|
|
1783
|
+
});
|
|
1784
|
+
function useInjectedDropdownItem() {
|
|
1785
|
+
return inject(INJECTION_KEY_DROPDOWN_ITEM, {});
|
|
1786
|
+
}
|
|
1787
|
+
const __default__$2 = {
|
|
1788
|
+
name: "VvDropdownItem"
|
|
1789
|
+
};
|
|
1790
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1791
|
+
...__default__$2,
|
|
1792
|
+
props: VvDropdownItemProps,
|
|
1793
|
+
setup(__props) {
|
|
1794
|
+
const props = __props;
|
|
1795
|
+
const { role, expanded } = useInjectedDropdownItem();
|
|
1796
|
+
const element = ref(null);
|
|
1797
|
+
useProvideDropdownAction({ expanded });
|
|
1798
|
+
const hovered = useElementHover(element);
|
|
1799
|
+
const { focused } = useFocus(element);
|
|
1800
|
+
const { focused: focusedWithin } = useFocusWithin(element);
|
|
1801
|
+
watch(hovered, (newValue) => {
|
|
1802
|
+
if (newValue && props.focusOnHover) {
|
|
1803
|
+
focused.value = true;
|
|
1804
|
+
}
|
|
1805
|
+
});
|
|
1806
|
+
return (_ctx, _cache) => {
|
|
1807
|
+
return openBlock(), createElementBlock(
|
|
1808
|
+
"div",
|
|
1809
|
+
mergeProps({ role: unref(role) }, {
|
|
1810
|
+
ref_key: "element",
|
|
1811
|
+
ref: element,
|
|
1812
|
+
class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
|
|
1813
|
+
}),
|
|
1814
|
+
[
|
|
1815
|
+
renderSlot(_ctx.$slots, "default")
|
|
1816
|
+
],
|
|
1817
|
+
16
|
|
1818
|
+
/* FULL_PROPS */
|
|
1819
|
+
);
|
|
1820
|
+
};
|
|
1821
|
+
}
|
|
1822
|
+
});
|
|
1823
|
+
const _hoisted_1$1 = ["title"];
|
|
1824
|
+
const __default__$1 = {
|
|
1825
|
+
name: "VvDropdownOption"
|
|
1826
|
+
};
|
|
1827
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1828
|
+
...__default__$1,
|
|
1829
|
+
props: VvDropdownOptionProps,
|
|
1830
|
+
setup(__props) {
|
|
1831
|
+
const props = __props;
|
|
1832
|
+
const { modifiers } = toRefs(props);
|
|
1833
|
+
const bemCssClasses = useModifiers(
|
|
1834
|
+
"vv-dropdown-option",
|
|
1835
|
+
modifiers,
|
|
1836
|
+
computed(() => ({
|
|
1837
|
+
disabled: props.disabled,
|
|
1838
|
+
selected: props.selected,
|
|
1839
|
+
unselectable: props.unselectable && props.selected
|
|
1840
|
+
}))
|
|
1841
|
+
);
|
|
1842
|
+
const hintLabel = computed(() => {
|
|
1843
|
+
if (props.selected) {
|
|
1844
|
+
return props.unselectable ? props.deselectHintLabel : props.selectedHintLabel;
|
|
1845
|
+
}
|
|
1846
|
+
if (!props.disabled) {
|
|
1847
|
+
return props.selectHintLabel;
|
|
1848
|
+
}
|
|
1849
|
+
return "";
|
|
1850
|
+
});
|
|
1851
|
+
return (_ctx, _cache) => {
|
|
1852
|
+
return openBlock(), createBlock(_sfc_main$2, {
|
|
1853
|
+
class: normalizeClass(unref(bemCssClasses)),
|
|
1854
|
+
tabindex: _ctx.disabled ? -1 : 0,
|
|
1855
|
+
"aria-selected": _ctx.selected,
|
|
1856
|
+
"aria-disabled": _ctx.disabled,
|
|
1857
|
+
"focus-on-hover": _ctx.focusOnHover
|
|
1858
|
+
}, {
|
|
1859
|
+
default: withCtx(() => [
|
|
1860
|
+
renderSlot(_ctx.$slots, "default"),
|
|
1861
|
+
createElementVNode("span", {
|
|
1862
|
+
class: "vv-dropdown-option__hint",
|
|
1863
|
+
title: unref(hintLabel)
|
|
1864
|
+
}, [
|
|
1865
|
+
renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps({ disabled: _ctx.disabled, selected: _ctx.selected, unselectable: _ctx.unselectable })), () => [
|
|
1866
|
+
createTextVNode(
|
|
1867
|
+
toDisplayString(unref(hintLabel)),
|
|
1868
|
+
1
|
|
1869
|
+
/* TEXT */
|
|
1870
|
+
)
|
|
1871
|
+
])
|
|
1872
|
+
], 8, _hoisted_1$1)
|
|
1873
|
+
]),
|
|
1874
|
+
_: 3
|
|
1875
|
+
/* FORWARDED */
|
|
1876
|
+
}, 8, ["class", "tabindex", "aria-selected", "aria-disabled", "focus-on-hover"]);
|
|
1877
|
+
};
|
|
1878
|
+
}
|
|
1879
|
+
});
|
|
1149
1880
|
function useDefaults(componentName, propsDefinition, props) {
|
|
1150
1881
|
const volver = useVolver();
|
|
1151
1882
|
const volverComponentDefaults = computed(() => {
|
|
@@ -1199,7 +1930,6 @@ function useDefaults(componentName, propsDefinition, props) {
|
|
|
1199
1930
|
}, {});
|
|
1200
1931
|
});
|
|
1201
1932
|
}
|
|
1202
|
-
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || nanoid()));
|
|
1203
1933
|
function useDebouncedInput(modelValue, emit, ms = 0, {
|
|
1204
1934
|
getter = (value) => value,
|
|
1205
1935
|
setter = (value) => value
|
|
@@ -1229,41 +1959,6 @@ function useComponentFocus(inputTemplateRef, emit) {
|
|
|
1229
1959
|
focused
|
|
1230
1960
|
};
|
|
1231
1961
|
}
|
|
1232
|
-
function useComponentIcon(icon, iconPosition) {
|
|
1233
|
-
const hasIconBefore = computed(
|
|
1234
|
-
() => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.before)
|
|
1235
|
-
);
|
|
1236
|
-
const hasIconAfter = computed(
|
|
1237
|
-
() => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.after)
|
|
1238
|
-
);
|
|
1239
|
-
const hasIconLeft = computed(
|
|
1240
|
-
() => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.left)
|
|
1241
|
-
);
|
|
1242
|
-
const hasIconRight = computed(
|
|
1243
|
-
() => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.right)
|
|
1244
|
-
);
|
|
1245
|
-
const hasIconTop = computed(
|
|
1246
|
-
() => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.top)
|
|
1247
|
-
);
|
|
1248
|
-
const hasIconBottom = computed(
|
|
1249
|
-
() => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.bottom)
|
|
1250
|
-
);
|
|
1251
|
-
const hasIcon = computed(() => {
|
|
1252
|
-
if (typeof (icon == null ? void 0 : icon.value) === "string") {
|
|
1253
|
-
return { name: icon == null ? void 0 : icon.value };
|
|
1254
|
-
}
|
|
1255
|
-
return icon == null ? void 0 : icon.value;
|
|
1256
|
-
});
|
|
1257
|
-
return {
|
|
1258
|
-
hasIcon,
|
|
1259
|
-
hasIconLeft,
|
|
1260
|
-
hasIconRight,
|
|
1261
|
-
hasIconTop,
|
|
1262
|
-
hasIconBottom,
|
|
1263
|
-
hasIconBefore,
|
|
1264
|
-
hasIconAfter
|
|
1265
|
-
};
|
|
1266
|
-
}
|
|
1267
1962
|
function useTextCount(text, options) {
|
|
1268
1963
|
const length = computed(() => {
|
|
1269
1964
|
return (unref(text) ?? "").length;
|
|
@@ -1298,26 +1993,86 @@ function useTextCount(text, options) {
|
|
|
1298
1993
|
formatted
|
|
1299
1994
|
};
|
|
1300
1995
|
}
|
|
1996
|
+
const usePersistence = (storageKey, storageType = StorageType.local, defaultValue) => {
|
|
1997
|
+
const localValue = ref();
|
|
1998
|
+
if (defaultValue) {
|
|
1999
|
+
localValue.value = defaultValue;
|
|
2000
|
+
}
|
|
2001
|
+
let storageValue;
|
|
2002
|
+
if (storageKey) {
|
|
2003
|
+
watch(
|
|
2004
|
+
storageKey,
|
|
2005
|
+
(newKey, oldKey) => {
|
|
2006
|
+
const storage = unref(storageType) === StorageType.session ? sessionStorage : localStorage;
|
|
2007
|
+
if (oldKey && oldKey !== newKey) {
|
|
2008
|
+
storage.removeItem(oldKey);
|
|
2009
|
+
}
|
|
2010
|
+
if (newKey) {
|
|
2011
|
+
storageValue = useStorage(
|
|
2012
|
+
newKey,
|
|
2013
|
+
(storageValue == null ? void 0 : storageValue.value) ?? localValue.value,
|
|
2014
|
+
storage
|
|
2015
|
+
);
|
|
2016
|
+
return;
|
|
2017
|
+
}
|
|
2018
|
+
storageValue = void 0;
|
|
2019
|
+
},
|
|
2020
|
+
{
|
|
2021
|
+
immediate: true
|
|
2022
|
+
}
|
|
2023
|
+
);
|
|
2024
|
+
}
|
|
2025
|
+
if (isRef(storageType)) {
|
|
2026
|
+
watch(storageType, (newType, oldType) => {
|
|
2027
|
+
if (storageKey == null ? void 0 : storageKey.value) {
|
|
2028
|
+
if (newType) {
|
|
2029
|
+
const storage = newType === StorageType.session ? sessionStorage : localStorage;
|
|
2030
|
+
storageValue = useStorage(
|
|
2031
|
+
storageKey.value,
|
|
2032
|
+
(storageValue == null ? void 0 : storageValue.value) ?? localValue.value,
|
|
2033
|
+
storage
|
|
2034
|
+
);
|
|
2035
|
+
}
|
|
2036
|
+
if (oldType && oldType !== newType) {
|
|
2037
|
+
const oldStorage = oldType === StorageType.session ? sessionStorage : localStorage;
|
|
2038
|
+
oldStorage.removeItem(storageKey.value);
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
});
|
|
2042
|
+
}
|
|
2043
|
+
return computed({
|
|
2044
|
+
get: () => {
|
|
2045
|
+
return (storageValue == null ? void 0 : storageValue.value) ?? localValue.value;
|
|
2046
|
+
},
|
|
2047
|
+
set: (value) => {
|
|
2048
|
+
if (storageValue) {
|
|
2049
|
+
storageValue.value = value;
|
|
2050
|
+
return;
|
|
2051
|
+
}
|
|
2052
|
+
localValue.value = value;
|
|
2053
|
+
}
|
|
2054
|
+
});
|
|
2055
|
+
};
|
|
1301
2056
|
const _hoisted_1 = ["for"];
|
|
1302
|
-
const _hoisted_2 = {
|
|
1303
|
-
const _hoisted_3 = {
|
|
2057
|
+
const _hoisted_2 = {
|
|
1304
2058
|
key: 0,
|
|
1305
2059
|
class: "vv-input-text__input-before"
|
|
1306
2060
|
};
|
|
1307
|
-
const
|
|
1308
|
-
const
|
|
1309
|
-
const _hoisted_6 = {
|
|
2061
|
+
const _hoisted_3 = ["id"];
|
|
2062
|
+
const _hoisted_4 = {
|
|
1310
2063
|
key: 1,
|
|
1311
2064
|
class: "vv-input-text__unit"
|
|
1312
2065
|
};
|
|
1313
|
-
const
|
|
2066
|
+
const _hoisted_5 = {
|
|
1314
2067
|
key: 5,
|
|
1315
2068
|
class: "vv-input-text__input-after"
|
|
1316
2069
|
};
|
|
1317
|
-
const
|
|
2070
|
+
const _hoisted_6 = {
|
|
1318
2071
|
key: 6,
|
|
1319
2072
|
class: "vv-input-text__limit"
|
|
1320
2073
|
};
|
|
2074
|
+
const _hoisted_7 = { class: "flex-1" };
|
|
2075
|
+
const _hoisted_8 = ["title", "onClick"];
|
|
1321
2076
|
const __default__ = {
|
|
1322
2077
|
name: "VvInputText"
|
|
1323
2078
|
};
|
|
@@ -1325,8 +2080,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1325
2080
|
...__default__,
|
|
1326
2081
|
props: VvInputTextProps,
|
|
1327
2082
|
emits: VvInputTextEvents,
|
|
1328
|
-
setup(__props, { expose: __expose, emit }) {
|
|
2083
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1329
2084
|
const props = __props;
|
|
2085
|
+
const emit = __emit;
|
|
1330
2086
|
const slots = useSlots();
|
|
1331
2087
|
const propsDefaults = useDefaults(
|
|
1332
2088
|
"VvInputText",
|
|
@@ -1337,6 +2093,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1337
2093
|
id,
|
|
1338
2094
|
icon,
|
|
1339
2095
|
iconPosition,
|
|
2096
|
+
iconRemoveSuggestion,
|
|
1340
2097
|
label,
|
|
1341
2098
|
modelValue,
|
|
1342
2099
|
count,
|
|
@@ -1348,13 +2105,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1348
2105
|
minlength,
|
|
1349
2106
|
type,
|
|
1350
2107
|
iMask,
|
|
1351
|
-
step
|
|
2108
|
+
step,
|
|
2109
|
+
storageKey,
|
|
2110
|
+
storageType
|
|
1352
2111
|
} = toRefs(props);
|
|
1353
2112
|
const hasId = useUniqueId(id);
|
|
1354
2113
|
const hasHintId = computed(() => `${hasId.value}-hint`);
|
|
1355
2114
|
const inputTextPlaceholder = computed(
|
|
1356
2115
|
() => props.floating && isEmpty(props.placeholder) ? " " : props.placeholder
|
|
1357
2116
|
);
|
|
2117
|
+
const localModelValue = useDebouncedInput(
|
|
2118
|
+
modelValue,
|
|
2119
|
+
emit,
|
|
2120
|
+
(debounce == null ? void 0 : debounce.value) ?? 0
|
|
2121
|
+
);
|
|
1358
2122
|
const maskReady = ref(false);
|
|
1359
2123
|
const { el, mask, typed, masked, unmasked } = useIMask(
|
|
1360
2124
|
computed(
|
|
@@ -1429,18 +2193,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1429
2193
|
}
|
|
1430
2194
|
}
|
|
1431
2195
|
);
|
|
2196
|
+
const updateMaskValue = (newValue) => {
|
|
2197
|
+
var _a;
|
|
2198
|
+
if (iMask) {
|
|
2199
|
+
if (newValue === void 0) {
|
|
2200
|
+
typed.value = "";
|
|
2201
|
+
unmasked.value = "";
|
|
2202
|
+
return;
|
|
2203
|
+
}
|
|
2204
|
+
if (((_a = iMask.value) == null ? void 0 : _a.mask) === Date) {
|
|
2205
|
+
typed.value = new Date(newValue);
|
|
2206
|
+
return;
|
|
2207
|
+
}
|
|
2208
|
+
typed.value = newValue;
|
|
2209
|
+
unmasked.value = `${typed.value}`;
|
|
2210
|
+
}
|
|
2211
|
+
};
|
|
1432
2212
|
onMounted(() => {
|
|
1433
2213
|
if (mask.value) {
|
|
1434
2214
|
maskReady.value = true;
|
|
1435
|
-
|
|
2215
|
+
updateMaskValue(props.modelValue);
|
|
1436
2216
|
}
|
|
1437
2217
|
});
|
|
1438
2218
|
watch(
|
|
1439
2219
|
() => props.modelValue,
|
|
1440
2220
|
(newValue) => {
|
|
1441
|
-
var _a;
|
|
1442
2221
|
if (mask.value) {
|
|
1443
|
-
|
|
2222
|
+
updateMaskValue(newValue);
|
|
1444
2223
|
}
|
|
1445
2224
|
}
|
|
1446
2225
|
);
|
|
@@ -1452,20 +2231,35 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1452
2231
|
);
|
|
1453
2232
|
const inputEl = el;
|
|
1454
2233
|
const innerEl = ref();
|
|
2234
|
+
const wrapperEl = ref();
|
|
2235
|
+
const dropdownEl = ref();
|
|
1455
2236
|
__expose({ $inner: innerEl });
|
|
1456
|
-
const localModelValue = useDebouncedInput(
|
|
1457
|
-
modelValue,
|
|
1458
|
-
emit,
|
|
1459
|
-
(debounce == null ? void 0 : debounce.value) ?? 0
|
|
1460
|
-
);
|
|
1461
2237
|
const { focused } = useComponentFocus(inputEl, emit);
|
|
1462
2238
|
const isFocused = computed(
|
|
1463
2239
|
() => focused.value && !props.disabled && !props.readonly
|
|
1464
2240
|
);
|
|
1465
2241
|
watch(isFocused, (newValue) => {
|
|
2242
|
+
var _a;
|
|
1466
2243
|
if (newValue && propsDefaults.value.selectOnFocus && inputEl.value) {
|
|
1467
2244
|
inputEl.value.select();
|
|
1468
2245
|
}
|
|
2246
|
+
if (newValue) {
|
|
2247
|
+
(_a = dropdownEl.value) == null ? void 0 : _a.show();
|
|
2248
|
+
return;
|
|
2249
|
+
}
|
|
2250
|
+
setTimeout(() => {
|
|
2251
|
+
if (isDirty.value && suggestions.value) {
|
|
2252
|
+
const suggestionsLimit = props.maxSuggestions - 1;
|
|
2253
|
+
if (suggestions.value.size > suggestionsLimit && !suggestions.value.has(localModelValue.value)) {
|
|
2254
|
+
suggestions.value = new Set(
|
|
2255
|
+
[...suggestions.value].slice(
|
|
2256
|
+
suggestions.value.size - suggestionsLimit
|
|
2257
|
+
)
|
|
2258
|
+
);
|
|
2259
|
+
}
|
|
2260
|
+
suggestions.value.add(localModelValue.value);
|
|
2261
|
+
}
|
|
2262
|
+
}, 300);
|
|
1469
2263
|
});
|
|
1470
2264
|
const isVisible = useElementVisibility(inputEl);
|
|
1471
2265
|
watch(isVisible, (newValue) => {
|
|
@@ -1489,7 +2283,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1489
2283
|
return;
|
|
1490
2284
|
}
|
|
1491
2285
|
inputEl.value.stepUp();
|
|
1492
|
-
localModelValue.value = unref(inputEl).value;
|
|
2286
|
+
localModelValue.value = Number(unref(inputEl).value);
|
|
1493
2287
|
}
|
|
1494
2288
|
};
|
|
1495
2289
|
const onStepDown = () => {
|
|
@@ -1499,32 +2293,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1499
2293
|
return;
|
|
1500
2294
|
}
|
|
1501
2295
|
inputEl.value.stepDown();
|
|
1502
|
-
localModelValue.value = unref(inputEl).value;
|
|
2296
|
+
localModelValue.value = Number(unref(inputEl).value);
|
|
1503
2297
|
}
|
|
1504
2298
|
};
|
|
1505
2299
|
const isSearch = computed(() => props.type === INPUT_TYPES.SEARCH);
|
|
1506
2300
|
const onClear = () => {
|
|
1507
2301
|
localModelValue.value = "";
|
|
1508
2302
|
};
|
|
1509
|
-
const {
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
2303
|
+
const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
|
|
2304
|
+
const iconAfter = computed(() => {
|
|
2305
|
+
if (hasIconAfter.value !== void 0) {
|
|
2306
|
+
return hasIconAfter.value;
|
|
2307
|
+
}
|
|
1514
2308
|
switch (props.type) {
|
|
1515
2309
|
case INPUT_TYPES.COLOR:
|
|
1516
|
-
return { name:
|
|
2310
|
+
return { name: ACTION_ICONS.showColorPicker };
|
|
1517
2311
|
case INPUT_TYPES.DATE:
|
|
1518
2312
|
case INPUT_TYPES.DATETIME_LOCAL:
|
|
1519
2313
|
case INPUT_TYPES.WEEK:
|
|
1520
2314
|
case INPUT_TYPES.MONTH:
|
|
1521
|
-
return { name:
|
|
2315
|
+
return { name: ACTION_ICONS.showDatePicker };
|
|
1522
2316
|
case INPUT_TYPES.TIME:
|
|
1523
|
-
return { name:
|
|
1524
|
-
default:
|
|
1525
|
-
return "";
|
|
2317
|
+
return { name: ACTION_ICONS.showTimePicker };
|
|
1526
2318
|
}
|
|
2319
|
+
return void 0;
|
|
1527
2320
|
});
|
|
2321
|
+
const { hasIcon: hasIconRemoveSuggestion } = useComponentIcon(iconRemoveSuggestion);
|
|
1528
2322
|
const { formatted: countFormatted } = useTextCount(localModelValue, {
|
|
1529
2323
|
mode: count.value,
|
|
1530
2324
|
upperLimit: Number(maxlength == null ? void 0 : maxlength.value),
|
|
@@ -1544,6 +2338,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1544
2338
|
}
|
|
1545
2339
|
return void 0;
|
|
1546
2340
|
});
|
|
2341
|
+
const suggestions = usePersistence(
|
|
2342
|
+
storageKey,
|
|
2343
|
+
storageType,
|
|
2344
|
+
/* @__PURE__ */ new Set()
|
|
2345
|
+
);
|
|
2346
|
+
const filteredSuggestions = computed(() => {
|
|
2347
|
+
if (!suggestions.value) {
|
|
2348
|
+
return [];
|
|
2349
|
+
}
|
|
2350
|
+
return [...suggestions.value].filter(
|
|
2351
|
+
(suggestion) => isEmpty(localModelValue.value) || `${suggestion}`.toLowerCase().includes(`${localModelValue.value}`.toLowerCase()) && suggestion !== localModelValue.value
|
|
2352
|
+
).reverse();
|
|
2353
|
+
});
|
|
2354
|
+
const hasSuggestions = computed(
|
|
2355
|
+
() => (storageKey == null ? void 0 : storageKey.value) && suggestions.value && suggestions.value.size > 0
|
|
2356
|
+
);
|
|
2357
|
+
const onSuggestionSelect = (suggestion) => {
|
|
2358
|
+
var _a;
|
|
2359
|
+
localModelValue.value = suggestion;
|
|
2360
|
+
(_a = dropdownEl.value) == null ? void 0 : _a.hide();
|
|
2361
|
+
};
|
|
2362
|
+
const onSuggestionRemove = (suggestion) => {
|
|
2363
|
+
var _a;
|
|
2364
|
+
(_a = suggestions.value) == null ? void 0 : _a.delete(suggestion);
|
|
2365
|
+
};
|
|
1547
2366
|
const { modifiers } = toRefs(props);
|
|
1548
2367
|
const bemCssClasses = useModifiers(
|
|
1549
2368
|
"vv-input-text",
|
|
@@ -1554,8 +2373,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1554
2373
|
loading: loading.value,
|
|
1555
2374
|
disabled: props.disabled,
|
|
1556
2375
|
readonly: props.readonly,
|
|
1557
|
-
"icon-before": hasIconBefore.value,
|
|
1558
|
-
"icon-after":
|
|
2376
|
+
"icon-before": !!hasIconBefore.value,
|
|
2377
|
+
"icon-after": !!iconAfter.value,
|
|
1559
2378
|
floating: props.floating && !isEmpty(props.label),
|
|
1560
2379
|
dirty: isDirty.value,
|
|
1561
2380
|
focus: isFocused.value,
|
|
@@ -1663,101 +2482,195 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1663
2482
|
emit("keydown", event);
|
|
1664
2483
|
};
|
|
1665
2484
|
return (_ctx, _cache) => {
|
|
1666
|
-
return openBlock(), createElementBlock(
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
2485
|
+
return openBlock(), createElementBlock(
|
|
2486
|
+
"div",
|
|
2487
|
+
{
|
|
2488
|
+
class: normalizeClass(unref(bemCssClasses))
|
|
2489
|
+
},
|
|
2490
|
+
[
|
|
2491
|
+
unref(label) ? (openBlock(), createElementBlock("label", {
|
|
2492
|
+
key: 0,
|
|
2493
|
+
for: unref(hasId),
|
|
2494
|
+
class: "vv-input-text__label"
|
|
2495
|
+
}, toDisplayString(unref(label)), 9, _hoisted_1)) : createCommentVNode("v-if", true),
|
|
2496
|
+
createElementVNode(
|
|
2497
|
+
"div",
|
|
2498
|
+
{
|
|
2499
|
+
ref_key: "wrapperEl",
|
|
2500
|
+
ref: wrapperEl,
|
|
2501
|
+
class: "vv-input-text__wrapper"
|
|
2502
|
+
},
|
|
2503
|
+
[
|
|
2504
|
+
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
2505
|
+
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
2506
|
+
])) : createCommentVNode("v-if", true),
|
|
2507
|
+
createElementVNode(
|
|
2508
|
+
"div",
|
|
2509
|
+
{
|
|
2510
|
+
ref_key: "innerEl",
|
|
2511
|
+
ref: innerEl,
|
|
2512
|
+
class: "vv-input-text__inner",
|
|
2513
|
+
onClick: withModifiers(onClickInner, ["stop"])
|
|
2514
|
+
},
|
|
2515
|
+
[
|
|
2516
|
+
unref(hasIconBefore) ? (openBlock(), createBlock(
|
|
2517
|
+
_sfc_main$4,
|
|
2518
|
+
mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-input-text__icon" }),
|
|
2519
|
+
null,
|
|
2520
|
+
16
|
|
2521
|
+
/* FULL_PROPS */
|
|
2522
|
+
)) : createCommentVNode("v-if", true),
|
|
2523
|
+
createElementVNode("input", mergeProps({
|
|
2524
|
+
id: unref(hasId),
|
|
2525
|
+
ref_key: "inputEl",
|
|
2526
|
+
ref: inputEl
|
|
2527
|
+
}, unref(hasAttrs), {
|
|
2528
|
+
style: unref(hasStyle),
|
|
2529
|
+
onKeyup: _cache[0] || (_cache[0] = ($event) => emit("keyup", $event)),
|
|
2530
|
+
onKeydown: onKeyDown,
|
|
2531
|
+
onKeypress: _cache[1] || (_cache[1] = ($event) => emit("keypress", $event))
|
|
2532
|
+
}), null, 16, _hoisted_3),
|
|
2533
|
+
(_ctx.unit || _ctx.$slots.unit) && unref(isDirty) ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
2534
|
+
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
|
|
2535
|
+
createTextVNode(
|
|
2536
|
+
toDisplayString(_ctx.unit),
|
|
2537
|
+
1
|
|
2538
|
+
/* TEXT */
|
|
2539
|
+
)
|
|
2540
|
+
])
|
|
2541
|
+
])) : createCommentVNode("v-if", true)
|
|
2542
|
+
],
|
|
2543
|
+
512
|
|
2544
|
+
/* NEED_PATCH */
|
|
2545
|
+
),
|
|
2546
|
+
unref(iconAfter) ? (openBlock(), createBlock(
|
|
2547
|
+
_sfc_main$4,
|
|
2548
|
+
mergeProps({ key: 1 }, unref(iconAfter), { class: "vv-input-text__icon vv-input-text__icon-after" }),
|
|
2549
|
+
null,
|
|
2550
|
+
16
|
|
2551
|
+
/* FULL_PROPS */
|
|
2552
|
+
)) : unref(isPassword) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(PasswordInputActions), {
|
|
2553
|
+
key: 2,
|
|
2554
|
+
onTogglePassword
|
|
2555
|
+
})) : unref(isNumber) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(NumberInputActions), {
|
|
2556
|
+
key: 3,
|
|
2557
|
+
onStepUp,
|
|
2558
|
+
onStepDown
|
|
2559
|
+
})) : unref(isSearch) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(SearchInputActions), {
|
|
2560
|
+
key: 4,
|
|
2561
|
+
onClear
|
|
2562
|
+
})) : createCommentVNode("v-if", true),
|
|
2563
|
+
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
2564
|
+
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
2565
|
+
])) : createCommentVNode("v-if", true),
|
|
2566
|
+
unref(count) ? (openBlock(), createElementBlock("span", _hoisted_6, [
|
|
2567
|
+
renderSlot(_ctx.$slots, "count", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
|
|
2568
|
+
createTextVNode(
|
|
2569
|
+
toDisplayString(unref(countFormatted)),
|
|
2570
|
+
1
|
|
2571
|
+
/* TEXT */
|
|
2572
|
+
)
|
|
2573
|
+
])
|
|
2574
|
+
])) : createCommentVNode("v-if", true)
|
|
2575
|
+
],
|
|
2576
|
+
512
|
|
2577
|
+
/* NEED_PATCH */
|
|
2578
|
+
),
|
|
2579
|
+
createVNode(unref(HintSlot), {
|
|
2580
|
+
id: unref(hasHintId),
|
|
2581
|
+
class: "vv-input-text__hint"
|
|
2582
|
+
}, createSlots({
|
|
2583
|
+
_: 2
|
|
2584
|
+
/* DYNAMIC */
|
|
1683
2585
|
}, [
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
}
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
2586
|
+
_ctx.$slots.hint ? {
|
|
2587
|
+
name: "hint",
|
|
2588
|
+
fn: withCtx(() => [
|
|
2589
|
+
renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
2590
|
+
]),
|
|
2591
|
+
key: "0"
|
|
2592
|
+
} : void 0,
|
|
2593
|
+
_ctx.$slots.loading ? {
|
|
2594
|
+
name: "loading",
|
|
2595
|
+
fn: withCtx(() => [
|
|
2596
|
+
renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
2597
|
+
]),
|
|
2598
|
+
key: "1"
|
|
2599
|
+
} : void 0,
|
|
2600
|
+
_ctx.$slots.valid ? {
|
|
2601
|
+
name: "valid",
|
|
2602
|
+
fn: withCtx(() => [
|
|
2603
|
+
renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
2604
|
+
]),
|
|
2605
|
+
key: "2"
|
|
2606
|
+
} : void 0,
|
|
2607
|
+
_ctx.$slots.invalid ? {
|
|
2608
|
+
name: "invalid",
|
|
2609
|
+
fn: withCtx(() => [
|
|
2610
|
+
renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
2611
|
+
]),
|
|
2612
|
+
key: "3"
|
|
2613
|
+
} : void 0
|
|
2614
|
+
]), 1032, ["id"]),
|
|
2615
|
+
unref(hasSuggestions) ? (openBlock(), createBlock(_sfc_main$3, {
|
|
1705
2616
|
key: 1,
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
2617
|
+
ref_key: "dropdownEl",
|
|
2618
|
+
ref: dropdownEl,
|
|
2619
|
+
reference: unref(wrapperEl),
|
|
2620
|
+
"autofocus-first": false,
|
|
2621
|
+
"trigger-width": true
|
|
2622
|
+
}, {
|
|
2623
|
+
items: withCtx(() => [
|
|
2624
|
+
(openBlock(true), createElementBlock(
|
|
2625
|
+
Fragment,
|
|
2626
|
+
null,
|
|
2627
|
+
renderList(unref(filteredSuggestions), (value) => {
|
|
2628
|
+
return openBlock(), createBlock(_sfc_main$1, {
|
|
2629
|
+
key: value,
|
|
2630
|
+
onClick: withModifiers(($event) => onSuggestionSelect(value), ["stop"])
|
|
2631
|
+
}, {
|
|
2632
|
+
default: withCtx(() => [
|
|
2633
|
+
createElementVNode("div", _hoisted_7, [
|
|
2634
|
+
renderSlot(_ctx.$slots, "suggestion", normalizeProps(guardReactiveProps({ value })), () => [
|
|
2635
|
+
createTextVNode(
|
|
2636
|
+
toDisplayString(value),
|
|
2637
|
+
1
|
|
2638
|
+
/* TEXT */
|
|
2639
|
+
)
|
|
2640
|
+
])
|
|
2641
|
+
]),
|
|
2642
|
+
unref(suggestions) && unref(hasIconRemoveSuggestion) ? (openBlock(), createElementBlock("button", {
|
|
2643
|
+
key: 0,
|
|
2644
|
+
type: "button",
|
|
2645
|
+
tabindex: "-1",
|
|
2646
|
+
class: "cursor-pointer",
|
|
2647
|
+
title: _ctx.labelRemoveSuggestion,
|
|
2648
|
+
onClick: withModifiers(($event) => onSuggestionRemove(value), ["stop"])
|
|
2649
|
+
}, [
|
|
2650
|
+
createVNode(
|
|
2651
|
+
_sfc_main$4,
|
|
2652
|
+
normalizeProps(guardReactiveProps(unref(hasIconRemoveSuggestion))),
|
|
2653
|
+
null,
|
|
2654
|
+
16
|
|
2655
|
+
/* FULL_PROPS */
|
|
2656
|
+
)
|
|
2657
|
+
], 8, _hoisted_8)) : createCommentVNode("v-if", true)
|
|
2658
|
+
]),
|
|
2659
|
+
_: 2
|
|
2660
|
+
/* DYNAMIC */
|
|
2661
|
+
}, 1032, ["onClick"]);
|
|
2662
|
+
}),
|
|
2663
|
+
128
|
|
2664
|
+
/* KEYED_FRAGMENT */
|
|
2665
|
+
))
|
|
1742
2666
|
]),
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
key: "2"
|
|
1751
|
-
} : void 0,
|
|
1752
|
-
_ctx.$slots.invalid ? {
|
|
1753
|
-
name: "invalid",
|
|
1754
|
-
fn: withCtx(() => [
|
|
1755
|
-
renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
1756
|
-
]),
|
|
1757
|
-
key: "3"
|
|
1758
|
-
} : void 0
|
|
1759
|
-
]), 1032, ["id"])
|
|
1760
|
-
], 2);
|
|
2667
|
+
_: 3
|
|
2668
|
+
/* FORWARDED */
|
|
2669
|
+
}, 8, ["reference"])) : createCommentVNode("v-if", true)
|
|
2670
|
+
],
|
|
2671
|
+
2
|
|
2672
|
+
/* CLASS */
|
|
2673
|
+
);
|
|
1761
2674
|
};
|
|
1762
2675
|
}
|
|
1763
2676
|
});
|