@volverjs/ui-vue 0.0.10-beta.47 → 0.0.10-beta.49
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/README.md +2 -2
- package/auto-imports.d.ts +19 -11
- package/bin/icons.js +1 -0
- package/dist/components/VvAccordion/VvAccordion.es.js +4 -5
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +8 -11
- package/dist/components/VvAccordion/index.d.ts +2 -2
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +45 -46
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +11 -13
- package/dist/components/VvAccordionGroup/index.d.ts +2 -2
- package/dist/components/VvAction/VvAction.vue.d.ts +8 -10
- package/dist/components/VvAction/index.d.ts +1 -1
- package/dist/components/VvAlert/VvAlert.es.js +158 -161
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +20 -22
- package/dist/components/VvAlert/index.d.ts +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +271 -274
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +9 -11
- package/dist/components/VvAlertGroup/index.d.ts +2 -2
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +6 -6
- package/dist/components/VvAvatar/index.d.ts +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +21 -22
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +6 -6
- package/dist/components/VvAvatarGroup/index.d.ts +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +6 -6
- package/dist/components/VvBadge/index.d.ts +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +23 -23
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +19 -19
- package/dist/components/VvBreadcrumb/index.d.ts +1 -1
- package/dist/components/VvButton/VvButton.es.js +313 -314
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +14 -16
- package/dist/components/VvButton/index.d.ts +9 -9
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +2 -2
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +6 -8
- package/dist/components/VvButtonGroup/index.d.ts +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +6 -6
- package/dist/components/VvCard/index.d.ts +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +186 -187
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +11 -13
- package/dist/components/VvCheckbox/index.d.ts +7 -7
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -191
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +11 -13
- package/dist/components/VvCheckboxGroup/index.d.ts +2 -2
- package/dist/components/VvCombobox/VvCombobox.es.js +1864 -1865
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +72 -291
- package/dist/components/VvCombobox/index.d.ts +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +7 -9
- package/dist/components/VvDialog/index.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +9 -10
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +51 -51
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +22 -16
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +4 -4
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +4 -4
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +6 -6
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +2 -2
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +2 -2
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +2 -2
- package/dist/components/VvIcon/VvIcon.vue.d.ts +2 -23
- package/dist/components/VvInputFile/VvInputFile.es.js +651 -652
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +19 -19
- package/dist/components/VvInputFile/index.d.ts +4 -4
- package/dist/components/VvInputText/VvInputClearAction.d.ts +10 -6
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +11 -7
- package/dist/components/VvInputText/VvInputStepAction.d.ts +10 -6
- package/dist/components/VvInputText/VvInputText.es.js +715 -716
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +30 -32
- package/dist/components/VvInputText/index.d.ts +1 -1
- package/dist/components/VvNav/VvNav.es.js +5 -5
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +8 -10
- 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 +2 -2
- package/dist/components/VvProgress/VvProgress.vue.d.ts +6 -6
- package/dist/components/VvProgress/index.d.ts +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +186 -187
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +10 -12
- package/dist/components/VvRadio/index.d.ts +5 -5
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -191
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +11 -13
- package/dist/components/VvRadioGroup/index.d.ts +2 -2
- package/dist/components/VvSelect/VvSelect.es.js +337 -338
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +20 -131
- package/dist/components/VvSelect/index.d.ts +7 -7
- package/dist/components/VvTab/VvTab.es.js +18 -18
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +6 -8
- package/dist/components/VvTab/index.d.ts +1 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +292 -293
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +14 -16
- package/dist/components/VvTextarea/index.d.ts +3 -3
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +8 -8
- package/dist/components/common/HintSlot.d.ts +6 -6
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.es.js +2760 -2763
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlert.d.ts +4 -4
- package/dist/composables/alert/{useProvideAlert.d.ts → useAlertProvide.d.ts} +1 -1
- package/dist/composables/dropdown/useDropdownContextmenu.d.ts +18 -0
- package/dist/composables/dropdown/{useProvideDropdown.d.ts → useDropdownProvide.d.ts} +6 -6
- package/dist/composables/dropdown/useDropdownVirtualElement.d.ts +17 -0
- package/dist/composables/group/{useInjectedGroupState.d.ts → useGroupStateInject.d.ts} +1 -1
- package/dist/composables/group/{useProvideGroupState.d.ts → useGroupStateProvide.d.ts} +2 -2
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/index.es.js +87 -3
- package/dist/composables/index.umd.js +1 -1
- package/dist/composables/useComponentFocus.d.ts +1 -1
- package/dist/composables/useOptions.d.ts +1 -1
- package/dist/composables/usePersistence.d.ts +1 -1
- package/dist/composables/useUniqueId.d.ts +1 -1
- package/dist/constants.d.ts +3 -3
- package/dist/directives/index.d.ts +2 -2
- package/dist/directives/index.es.js +145 -39
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-contextmenu.es.js +137 -31
- package/dist/directives/v-contextmenu.umd.js +1 -1
- package/dist/icons.d.ts +17 -17
- package/dist/icons.es.js +424 -424
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +4 -4
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +178 -474
- package/dist/stories/Alert/Alert.settings.d.ts +1 -1
- package/dist/stories/Alert/AlertModifiers.stories.d.ts +1 -1
- package/dist/stories/Alert/AlertSlots.stories.d.ts +1 -1
- package/dist/stories/AlertGroup/AlertGroupPosition.stories.d.ts +1 -1
- package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +1 -1
- package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
- package/dist/stories/Button/Button.settings.d.ts +1 -1
- package/dist/stories/Combobox/Combobox.settings.d.ts +1 -1
- package/dist/stories/Nav/Nav.settings.d.ts +1 -1
- package/dist/stories/Tab/Tab.settings.d.ts +1 -1
- package/dist/types/floating-ui.d.ts +1 -1
- package/dist/types/group.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/utils/DomUtilities.d.ts +1 -0
- package/package.json +43 -43
- package/src/Volver.ts +3 -3
- 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 +5 -5
- package/src/components/VvAccordion/index.ts +2 -2
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +5 -5
- package/src/components/VvAction/VvAction.vue +1 -1
- package/src/components/VvAlert/VvAlert.vue +1 -1
- package/src/components/VvAlert/index.ts +1 -1
- package/src/components/VvAlertGroup/VvAlertGroup.vue +1 -1
- package/src/components/VvAlertGroup/index.ts +3 -3
- package/src/components/VvAvatarGroup/VvAvatarGroup.vue +1 -1
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +2 -2
- package/src/components/VvBreadcrumb/index.ts +1 -1
- package/src/components/VvButton/VvButton.vue +3 -3
- package/src/components/VvButton/index.ts +4 -4
- package/src/components/VvButtonGroup/VvButtonGroup.vue +3 -3
- package/src/components/VvCheckbox/VvCheckbox.vue +2 -2
- package/src/components/VvCheckbox/index.ts +2 -2
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +2 -2
- package/src/components/VvCombobox/VvCombobox.vue +9 -9
- package/src/components/VvCombobox/index.ts +15 -15
- package/src/components/VvDropdown/VvDropdown.vue +19 -19
- package/src/components/VvDropdown/VvDropdownAction.vue +1 -1
- package/src/components/VvDropdown/VvDropdownItem.vue +1 -1
- package/src/components/VvDropdown/VvDropdownOption.vue +1 -1
- package/src/components/VvDropdown/index.ts +2 -2
- package/src/components/VvIcon/VvIcon.vue +2 -2
- package/src/components/VvInputFile/VvInputFile.vue +7 -7
- package/src/components/VvInputFile/index.ts +7 -7
- package/src/components/VvInputText/VvInputPasswordAction.ts +1 -1
- package/src/components/VvInputText/VvInputText.vue +19 -19
- package/src/components/VvInputText/VvInputTextActions.ts +4 -4
- package/src/components/VvInputText/index.ts +2 -2
- package/src/components/VvNav/VvNav.vue +1 -1
- package/src/components/VvRadio/VvRadio.vue +1 -1
- package/src/components/VvRadio/index.ts +2 -2
- package/src/components/VvRadioGroup/VvRadioGroup.vue +2 -2
- package/src/components/VvSelect/VvSelect.vue +6 -6
- package/src/components/VvSelect/index.ts +12 -12
- package/src/components/VvTab/VvTab.vue +2 -2
- package/src/components/VvTab/index.ts +1 -1
- package/src/components/VvTextarea/VvTextarea.vue +1 -1
- package/src/components/common/HintSlot.ts +14 -14
- package/src/components/index.ts +1 -1
- package/src/composables/alert/useAlert.ts +2 -2
- package/src/composables/alert/{useProvideAlert.ts → useAlertProvide.ts} +2 -2
- package/src/composables/dropdown/useDropdownContextmenu.ts +22 -0
- package/src/composables/dropdown/{useProvideDropdown.ts → useDropdownProvide.ts} +9 -9
- package/src/composables/dropdown/useDropdownVirtualElement.ts +53 -0
- package/src/composables/group/{useInjectedGroupState.ts → useGroupStateInject.ts} +2 -2
- package/src/composables/group/{useProvideGroupState.ts → useGroupStateProvide.ts} +2 -2
- package/src/composables/index.ts +2 -0
- package/src/composables/useBlurhash.ts +2 -2
- package/src/composables/useOptions.ts +1 -1
- package/src/composables/usePersistence.ts +1 -1
- package/src/composables/useTextCount.ts +2 -2
- package/src/composables/useUniqueId.ts +2 -3
- package/src/constants.ts +5 -5
- package/src/directives/index.ts +2 -2
- package/src/directives/v-contextmenu.ts +21 -29
- package/src/directives/v-tooltip.ts +2 -2
- package/src/icons.ts +2 -2
- package/src/index.ts +1 -1
- package/src/props/index.ts +7 -7
- package/src/resolvers/unplugin.ts +5 -5
- package/src/stories/Accordion/Accordion.stories.ts +2 -2
- package/src/stories/Accordion/Accordion.test.ts +1 -1
- package/src/stories/Accordion/AccordionSlots.stories.ts +2 -2
- package/src/stories/AccordionGroup/AccordionGroup.stories.ts +2 -2
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +1 -1
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +3 -3
- package/src/stories/Alert/Alert.settings.ts +1 -1
- package/src/stories/Alert/Alert.stories.ts +2 -2
- package/src/stories/Alert/Alert.test.ts +1 -1
- package/src/stories/Alert/AlertModifiers.stories.ts +2 -2
- package/src/stories/Alert/AlertSlots.stories.ts +2 -2
- package/src/stories/AlertGroup/AlertGroup.stories.ts +2 -2
- package/src/stories/AlertGroup/AlertGroup.test.ts +3 -3
- package/src/stories/AlertGroup/AlertGroupPosition.stories.ts +2 -2
- package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +2 -2
- package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
- package/src/stories/Avatar/Avatar.stories.ts +2 -2
- package/src/stories/Avatar/Avatar.test.ts +1 -1
- package/src/stories/Avatar/AvatarBadge.stories.ts +1 -1
- package/src/stories/Avatar/AvatarModifiers.stories.ts +2 -2
- package/src/stories/Avatar/AvatarSlots.stories.ts +2 -2
- package/src/stories/AvatarGroup/AvatarGroup.stories.ts +2 -2
- package/src/stories/AvatarGroup/AvatarGroup.test.ts +1 -1
- package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +2 -2
- package/src/stories/AvatarGroup/AvatarGroupSlotDefault.stories.ts +3 -3
- package/src/stories/Badge/Badge.stories.ts +2 -2
- package/src/stories/Badge/Badge.test.ts +1 -1
- package/src/stories/Badge/BadgeSlots.stories.ts +2 -2
- package/src/stories/Blurhash/BlurhashComposable.stories.ts +37 -117
- package/src/stories/Breadcrumb/Breadcrumb.stories.ts +2 -2
- package/src/stories/Breadcrumb/BreadcrumbSlots.stories.ts +5 -5
- package/src/stories/Button/Button.settings.ts +3 -3
- package/src/stories/Button/Button.stories.ts +2 -2
- package/src/stories/Button/Button.test.ts +1 -1
- package/src/stories/Button/ButtonIcon.stories.ts +2 -2
- package/src/stories/Button/ButtonLink.stories.ts +2 -2
- package/src/stories/Button/ButtonLoading.stories.ts +2 -2
- package/src/stories/Button/ButtonModifiers.stories.ts +2 -2
- package/src/stories/Button/ButtonSlots.stories.ts +3 -3
- package/src/stories/Button/ButtonState.stories.ts +2 -2
- package/src/stories/Button/ButtonToggle.stories.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroup.settings.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroup.stories.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroup.test.ts +1 -1
- package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroupSlots.stories.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroupToggle.stories.ts +2 -2
- package/src/stories/Card/Card.stories.ts +2 -2
- package/src/stories/Card/Card.test.ts +1 -1
- package/src/stories/Card/CardSlots.stories.ts +2 -2
- package/src/stories/Checkbox/Checkbox.stories.ts +2 -2
- package/src/stories/Checkbox/Checkbox.test.ts +1 -1
- package/src/stories/Checkbox/CheckboxBinary.stories.ts +2 -2
- package/src/stories/Checkbox/CheckboxSlots.stories.ts +2 -2
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.ts +2 -2
- package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +2 -2
- package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.ts +2 -2
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.ts +3 -3
- package/src/stories/Combobox/Combobox.settings.ts +9 -9
- package/src/stories/Combobox/Combobox.stories.ts +2 -2
- package/src/stories/Combobox/Combobox.test.ts +2 -2
- package/src/stories/Combobox/ComboboxIconPosition.stories.ts +2 -2
- package/src/stories/Combobox/ComboboxMultiple.stories.ts +2 -2
- package/src/stories/Combobox/ComboboxOptions.stories.ts +2 -2
- package/src/stories/Combobox/ComboboxSlots.stories.ts +3 -3
- package/src/stories/Dialog/Dialog.stories.ts +2 -2
- package/src/stories/Dialog/Dialog.test.ts +1 -1
- package/src/stories/Dialog/DialogModifiers.stories.ts +2 -2
- package/src/stories/Dialog/DialogSlots.stories.ts +2 -2
- package/src/stories/Dropdown/Dropdown.settings.ts +1 -1
- package/src/stories/Dropdown/Dropdown.stories.ts +4 -4
- package/src/stories/Dropdown/Dropdown.test.ts +1 -1
- package/src/stories/Dropdown/DropdownContextmenuDirective.stories.ts +3 -4
- package/src/stories/Dropdown/DropdownMultilevel.stories.ts +4 -4
- package/src/stories/Dropdown/DropdownSlots.stories.ts +4 -4
- package/src/stories/Icon/Icon.settings.ts +1 -1
- package/src/stories/Icon/Icon.stories.ts +2 -2
- package/src/stories/Icon/IconsCollection.stories.ts +3 -3
- package/src/stories/InputFile/InputFile.settings.ts +1 -1
- package/src/stories/InputFile/InputFile.stories.ts +1 -1
- package/src/stories/InputFile/InputFileDropArea.stories.ts +2 -2
- package/src/stories/InputFile/InputFileIconPosition.stories.ts +2 -2
- package/src/stories/InputFile/InputFileSlots.stories.ts +2 -2
- package/src/stories/InputText/InputText.settings.ts +2 -2
- package/src/stories/InputText/InputText.stories.ts +2 -2
- package/src/stories/InputText/InputText.test.ts +2 -2
- package/src/stories/InputText/InputTextIconPosition.stories.ts +2 -2
- package/src/stories/InputText/InputTextLength.stories.ts +2 -2
- package/src/stories/InputText/InputTextMask.stories.ts +2 -2
- package/src/stories/InputText/InputTextMinMax.stories.ts +2 -2
- package/src/stories/InputText/InputTextSlots.stories.ts +2 -2
- package/src/stories/InputText/InputTextType.stories.ts +2 -2
- package/src/stories/Nav/Nav.settings.ts +1 -1
- package/src/stories/Nav/Nav.stories.ts +2 -2
- package/src/stories/Nav/Nav.test.ts +1 -1
- package/src/stories/Nav/NavModifiers.stories.ts +2 -2
- package/src/stories/Progress/Progress.stories.ts +2 -2
- package/src/stories/Progress/Progress.test.ts +2 -2
- package/src/stories/Radio/Radio.stories.ts +2 -2
- package/src/stories/Radio/Radio.test.ts +1 -1
- package/src/stories/Radio/RadioSlots.stories.ts +2 -2
- package/src/stories/RadioGroup/RadioGroup.stories.ts +2 -2
- package/src/stories/RadioGroup/RadioGroup.test.ts +2 -2
- package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +2 -2
- package/src/stories/RadioGroup/RadioGroupSlots.stories.ts +3 -3
- package/src/stories/Select/Select.settings.ts +10 -10
- package/src/stories/Select/Select.stories.ts +2 -2
- package/src/stories/Select/Select.test.ts +1 -1
- package/src/stories/Select/SelectIconPosition.stories.ts +2 -2
- package/src/stories/Select/SelectOptions.stories.ts +2 -2
- package/src/stories/Select/SelectSlots.stories.ts +2 -2
- package/src/stories/Tab/Tab.settings.ts +1 -1
- package/src/stories/Tab/Tab.stories.ts +1 -1
- package/src/stories/Tab/Tab.test.ts +1 -1
- package/src/stories/Textarea/Textarea.settings.ts +1 -1
- package/src/stories/Textarea/Textarea.stories.ts +2 -2
- package/src/stories/Textarea/Textarea.test.ts +1 -1
- package/src/stories/Textarea/TextareaLength.stories.ts +2 -2
- package/src/stories/Textarea/TextareaSlots.stories.ts +2 -2
- package/src/stories/Textarea/TextareatIconPosition.stories.ts +2 -2
- package/src/stories/Tooltip/Tooltip.stories.ts +3 -3
- package/src/stories/Tooltip/Tooltip.test.ts +1 -1
- package/src/stories/Tooltip/TooltipDirective.stories.ts +3 -3
- package/src/test/expect.ts +3 -3
- package/src/test/types.d.ts +2 -2
- package/src/types/floating-ui.ts +1 -1
- package/src/types/group.ts +1 -1
- package/src/types/index.ts +2 -2
- package/src/utils/DomUtilities.ts +15 -0
- package/src/utils/ObjectUtilities.ts +4 -4
- package/src/workers/blurhash.ts +1 -1
- package/dist/composables/alert/{useInjectAlert.d.ts → useAlerInject.d.ts} +0 -0
- package/dist/composables/dropdown/{useInjectDropdown.d.ts → useDropdownInject.d.ts} +0 -0
- package/src/assets/icons/normal/{dulicate.svg → duplicate.svg} +0 -0
- package/src/composables/alert/{useInjectAlert.ts → useAlerInject.ts} +0 -0
- package/src/composables/dropdown/{useInjectDropdown.ts → useDropdownInject.ts} +1 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { unref, computed, isRef, defineComponent, h,
|
|
1
|
+
import { unref, computed, isRef, defineComponent, h, useId, provide, Fragment, ref, toRefs, useAttrs, useTemplateRef, onMounted, watch, nextTick, openBlock, createElementBlock, createVNode, withCtx, renderSlot, normalizeProps, guardReactiveProps, Transition, mergeProps, toHandlers, withDirectives, createElementVNode, normalizeStyle, normalizeClass, createCommentVNode, vShow, inject, createBlock, createTextVNode, toDisplayString, mergeDefaults, useSlots, withModifiers, createSlots, renderList } from "vue";
|
|
2
2
|
import { useIMask } from "vue-imask";
|
|
3
|
-
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
4
3
|
import { autoPlacement, flip, shift, size, offset, arrow, useFloating, autoUpdate } from "@floating-ui/vue";
|
|
5
|
-
import { uid } from "uid";
|
|
6
4
|
import { useMutationObserver, useVModel, onClickOutside, useFocusWithin, useElementHover, onKeyStroke, useFocus, useStorage, useElementVisibility } from "@vueuse/core";
|
|
7
5
|
import mitt from "mitt";
|
|
6
|
+
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
8
7
|
function isEmpty(value) {
|
|
9
8
|
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));
|
|
10
9
|
}
|
|
@@ -129,22 +128,6 @@ function HintSlotFactory(propsOrRef, slots) {
|
|
|
129
128
|
HintSlot
|
|
130
129
|
};
|
|
131
130
|
}
|
|
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 */
|
|
147
|
-
};
|
|
148
131
|
var StorageType = /* @__PURE__ */ ((StorageType2) => {
|
|
149
132
|
StorageType2["local"] = "local";
|
|
150
133
|
StorageType2["session"] = "session";
|
|
@@ -217,381 +200,47 @@ const INJECTION_KEY_DROPDOWN_ITEM = Symbol.for(
|
|
|
217
200
|
const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for(
|
|
218
201
|
"dropdownAction"
|
|
219
202
|
);
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
};
|
|
228
|
-
const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
|
|
229
|
-
if (modifiersArray) {
|
|
230
|
-
if (Array.isArray(modifiersArray)) {
|
|
231
|
-
modifiersArray.forEach((modifier) => {
|
|
232
|
-
if (modifier) {
|
|
233
|
-
toReturn[`${prefix}--${modifier}`] = true;
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
if (others) {
|
|
239
|
-
Object.keys(others.value).forEach((key) => {
|
|
240
|
-
toReturn[`${prefix}--${key}`] = unref(others.value[key]);
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
return toReturn;
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
const __default__$4 = {
|
|
247
|
-
name: "VvIcon"
|
|
248
|
-
};
|
|
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),
|
|
269
|
-
setup(__props) {
|
|
270
|
-
const props = __props;
|
|
271
|
-
const hasRotate = computed(() => {
|
|
272
|
-
if (typeof props.rotate === "string") {
|
|
273
|
-
return Number.parseFloat(props.rotate);
|
|
274
|
-
}
|
|
275
|
-
return props.rotate;
|
|
276
|
-
});
|
|
277
|
-
const show = ref(true);
|
|
278
|
-
const volver = useVolver();
|
|
279
|
-
const { modifiers } = toRefs(props);
|
|
280
|
-
const bemCssClasses = useModifiers("vv-icon", modifiers);
|
|
281
|
-
const provider = computed(() => {
|
|
282
|
-
return props.provider || (volver == null ? void 0 : volver.iconsProvider);
|
|
283
|
-
});
|
|
284
|
-
const icon = computed(() => {
|
|
285
|
-
const name = props.name ?? "";
|
|
286
|
-
const iconName = `@${provider.value}:${props.prefix}:${name}`;
|
|
287
|
-
if (iconExists(iconName)) {
|
|
288
|
-
return iconName;
|
|
289
|
-
}
|
|
290
|
-
const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
|
|
291
|
-
(iconsCollection2) => {
|
|
292
|
-
const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
|
|
293
|
-
return iconExists(icon2);
|
|
294
|
-
}
|
|
295
|
-
);
|
|
296
|
-
if (iconsCollection) {
|
|
297
|
-
return `@${provider.value}:${iconsCollection.prefix}:${name}`;
|
|
298
|
-
}
|
|
299
|
-
return name;
|
|
300
|
-
});
|
|
301
|
-
function getSvgContent(svg) {
|
|
302
|
-
let dom;
|
|
303
|
-
if (typeof window === "undefined") {
|
|
304
|
-
const { JSDOM } = require("jsdom");
|
|
305
|
-
dom = new JSDOM().window;
|
|
306
|
-
}
|
|
307
|
-
const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
|
|
308
|
-
const svgDomString = domParser.parseFromString(svg, "text/html");
|
|
309
|
-
const svgEl = svgDomString.querySelector("svg");
|
|
310
|
-
return svgEl;
|
|
311
|
-
}
|
|
312
|
-
function addIconFromSvg(svg) {
|
|
313
|
-
const svgContentEl = getSvgContent(svg);
|
|
314
|
-
const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
|
|
315
|
-
if (svgContentEl && svgContent) {
|
|
316
|
-
addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
|
|
317
|
-
body: svgContent,
|
|
318
|
-
// Set height and width from svg content
|
|
319
|
-
height: svgContentEl.viewBox.baseVal.height,
|
|
320
|
-
width: svgContentEl.viewBox.baseVal.width
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
if (volver) {
|
|
325
|
-
if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
|
|
326
|
-
show.value = false;
|
|
327
|
-
volver.fetchIcon(props.src).then((svg) => {
|
|
328
|
-
if (svg) {
|
|
329
|
-
addIconFromSvg(svg);
|
|
330
|
-
show.value = true;
|
|
331
|
-
}
|
|
332
|
-
}).catch((e) => {
|
|
333
|
-
throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
if (props.svg) {
|
|
338
|
-
addIconFromSvg(props.svg);
|
|
339
|
-
}
|
|
340
|
-
return (_ctx, _cache) => {
|
|
341
|
-
return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
|
|
342
|
-
key: 0,
|
|
343
|
-
class: unref(bemCssClasses)
|
|
344
|
-
}, {
|
|
345
|
-
inline: _ctx.inline,
|
|
346
|
-
width: _ctx.width,
|
|
347
|
-
height: _ctx.height,
|
|
348
|
-
horizontalFlip: _ctx.horizontalFlip,
|
|
349
|
-
verticalFlip: _ctx.verticalFlip,
|
|
350
|
-
flip: _ctx.flip,
|
|
351
|
-
rotate: unref(hasRotate),
|
|
352
|
-
color: _ctx.color,
|
|
353
|
-
onLoad: _ctx.onLoad,
|
|
354
|
-
icon: unref(icon)
|
|
355
|
-
}), null, 16, ["class"])) : createCommentVNode("v-if", true);
|
|
356
|
-
};
|
|
357
|
-
}
|
|
358
|
-
});
|
|
359
|
-
function useComponentIcon(icon, iconPosition) {
|
|
360
|
-
const hasIcon = computed(() => {
|
|
361
|
-
if (typeof (icon == null ? void 0 : icon.value) === "string") {
|
|
362
|
-
return { name: icon == null ? void 0 : icon.value };
|
|
363
|
-
}
|
|
364
|
-
return icon == null ? void 0 : icon.value;
|
|
365
|
-
});
|
|
366
|
-
const hasIconBefore = computed(
|
|
367
|
-
() => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
|
|
368
|
-
);
|
|
369
|
-
const hasIconAfter = computed(
|
|
370
|
-
() => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
|
|
371
|
-
);
|
|
372
|
-
const hasIconLeft = computed(
|
|
373
|
-
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
|
|
374
|
-
);
|
|
375
|
-
const hasIconRight = computed(
|
|
376
|
-
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
|
|
377
|
-
);
|
|
378
|
-
const hasIconTop = computed(
|
|
379
|
-
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
|
|
380
|
-
);
|
|
381
|
-
const hasIconBottom = computed(
|
|
382
|
-
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
|
|
383
|
-
);
|
|
384
|
-
return {
|
|
385
|
-
hasIcon,
|
|
386
|
-
hasIconLeft,
|
|
387
|
-
hasIconRight,
|
|
388
|
-
hasIconTop,
|
|
389
|
-
hasIconBottom,
|
|
390
|
-
hasIconBefore,
|
|
391
|
-
hasIconAfter
|
|
392
|
-
};
|
|
393
|
-
}
|
|
394
|
-
const VvInputPasswordAction = defineComponent({
|
|
395
|
-
components: {
|
|
396
|
-
VvIcon: _sfc_main$4
|
|
203
|
+
const LinkProps = {
|
|
204
|
+
/**
|
|
205
|
+
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
206
|
+
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
207
|
+
*/
|
|
208
|
+
to: {
|
|
209
|
+
type: [String, Object]
|
|
397
210
|
},
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
emit("toggle-password", active.value);
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
return {
|
|
435
|
-
active,
|
|
436
|
-
activeIcon,
|
|
437
|
-
hasIcon,
|
|
438
|
-
onClick
|
|
439
|
-
};
|
|
440
|
-
},
|
|
441
|
-
render() {
|
|
442
|
-
const icon = this.hasIcon ? h(_sfc_main$4, {
|
|
443
|
-
...this.hasIcon,
|
|
444
|
-
class: "vv-input-text__icon"
|
|
445
|
-
}) : void 0;
|
|
446
|
-
return h(
|
|
447
|
-
"button",
|
|
448
|
-
{
|
|
449
|
-
disabled: this.disabled,
|
|
450
|
-
class: "vv-input-text__action",
|
|
451
|
-
ariaLabel: this.active ? this.labelHide : this.labelShow,
|
|
452
|
-
type: "button",
|
|
453
|
-
onClick: this.onClick
|
|
454
|
-
},
|
|
455
|
-
icon
|
|
456
|
-
);
|
|
457
|
-
}
|
|
458
|
-
});
|
|
459
|
-
const VvInputStepAction = defineComponent({
|
|
460
|
-
components: {
|
|
461
|
-
VvIcon: _sfc_main$4
|
|
462
|
-
},
|
|
463
|
-
props: {
|
|
464
|
-
disabled: {
|
|
465
|
-
type: Boolean,
|
|
466
|
-
default: false
|
|
467
|
-
},
|
|
468
|
-
label: {
|
|
469
|
-
type: String
|
|
470
|
-
},
|
|
471
|
-
mode: {
|
|
472
|
-
type: String,
|
|
473
|
-
validator: (v) => ["up", "down"].includes(v),
|
|
474
|
-
default: "up"
|
|
475
|
-
}
|
|
476
|
-
},
|
|
477
|
-
emits: ["step-up", "step-down"],
|
|
478
|
-
setup(props, { emit }) {
|
|
479
|
-
const isUp = computed(() => props.mode === "up");
|
|
480
|
-
const onClick = (e) => {
|
|
481
|
-
e == null ? void 0 : e.stopPropagation();
|
|
482
|
-
if (!props.disabled) {
|
|
483
|
-
emit(isUp.value ? "step-up" : "step-down");
|
|
484
|
-
}
|
|
485
|
-
};
|
|
486
|
-
return {
|
|
487
|
-
isUp,
|
|
488
|
-
onClick
|
|
489
|
-
};
|
|
490
|
-
},
|
|
491
|
-
render() {
|
|
492
|
-
return h("button", {
|
|
493
|
-
class: [
|
|
494
|
-
"vv-input-text__action vv-input-text__action-chevron",
|
|
495
|
-
this.isUp && "vv-input-text__action-chevron-up"
|
|
496
|
-
],
|
|
497
|
-
disabled: this.disabled,
|
|
498
|
-
ariaLabel: this.label,
|
|
499
|
-
type: "button",
|
|
500
|
-
onClick: this.onClick
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
});
|
|
504
|
-
const VvInputClearAction = defineComponent({
|
|
505
|
-
components: {
|
|
506
|
-
VvIcon: _sfc_main$4
|
|
507
|
-
},
|
|
508
|
-
props: {
|
|
509
|
-
disabled: {
|
|
510
|
-
type: Boolean,
|
|
511
|
-
default: false
|
|
512
|
-
},
|
|
513
|
-
label: {
|
|
514
|
-
type: String,
|
|
515
|
-
default: "Clear"
|
|
516
|
-
},
|
|
517
|
-
icon: {
|
|
518
|
-
type: [String, Object],
|
|
519
|
-
default: "close"
|
|
520
|
-
}
|
|
521
|
-
},
|
|
522
|
-
emits: ["clear"],
|
|
523
|
-
setup(props, { emit }) {
|
|
524
|
-
const { hasIcon } = useComponentIcon(computed(() => props.icon));
|
|
525
|
-
function onClick(e) {
|
|
526
|
-
e == null ? void 0 : e.stopPropagation();
|
|
527
|
-
if (!props.disabled) {
|
|
528
|
-
emit("clear");
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
return {
|
|
532
|
-
hasIcon,
|
|
533
|
-
onClick
|
|
534
|
-
};
|
|
535
|
-
},
|
|
536
|
-
render() {
|
|
537
|
-
const icon = this.hasIcon ? h(_sfc_main$4, {
|
|
538
|
-
...this.hasIcon,
|
|
539
|
-
class: "vv-input-text__icon"
|
|
540
|
-
}) : void 0;
|
|
541
|
-
return h(
|
|
542
|
-
"button",
|
|
543
|
-
{
|
|
544
|
-
disabled: this.disabled,
|
|
545
|
-
class: "vv-input-text__action",
|
|
546
|
-
ariaLabel: this.label,
|
|
547
|
-
type: "button",
|
|
548
|
-
onClick: this.onClick
|
|
549
|
-
},
|
|
550
|
-
icon
|
|
551
|
-
);
|
|
552
|
-
}
|
|
553
|
-
});
|
|
554
|
-
const LinkProps = {
|
|
555
|
-
/**
|
|
556
|
-
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
557
|
-
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
558
|
-
*/
|
|
559
|
-
to: {
|
|
560
|
-
type: [String, Object]
|
|
561
|
-
},
|
|
562
|
-
/**
|
|
563
|
-
* Anchor href
|
|
564
|
-
*/
|
|
565
|
-
href: String,
|
|
566
|
-
/**
|
|
567
|
-
* Anchor target
|
|
568
|
-
*/
|
|
569
|
-
target: String,
|
|
570
|
-
/**
|
|
571
|
-
* Anchor rel
|
|
572
|
-
*/
|
|
573
|
-
rel: {
|
|
574
|
-
type: String,
|
|
575
|
-
default: "noopener noreferrer"
|
|
576
|
-
}
|
|
577
|
-
};
|
|
578
|
-
const ValidProps = {
|
|
579
|
-
/**
|
|
580
|
-
* Valid status
|
|
581
|
-
*/
|
|
582
|
-
valid: { type: Boolean, default: false },
|
|
583
|
-
/**
|
|
584
|
-
* Valid label
|
|
585
|
-
*/
|
|
586
|
-
validLabel: { type: [String, Array], default: void 0 }
|
|
587
|
-
};
|
|
588
|
-
const InvalidProps = {
|
|
589
|
-
/**
|
|
590
|
-
* Invalid status
|
|
591
|
-
*/
|
|
592
|
-
invalid: {
|
|
593
|
-
type: Boolean,
|
|
594
|
-
default: false
|
|
211
|
+
/**
|
|
212
|
+
* Anchor href
|
|
213
|
+
*/
|
|
214
|
+
href: String,
|
|
215
|
+
/**
|
|
216
|
+
* Anchor target
|
|
217
|
+
*/
|
|
218
|
+
target: String,
|
|
219
|
+
/**
|
|
220
|
+
* Anchor rel
|
|
221
|
+
*/
|
|
222
|
+
rel: {
|
|
223
|
+
type: String,
|
|
224
|
+
default: "noopener noreferrer"
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
const ValidProps = {
|
|
228
|
+
/**
|
|
229
|
+
* Valid status
|
|
230
|
+
*/
|
|
231
|
+
valid: { type: Boolean, default: false },
|
|
232
|
+
/**
|
|
233
|
+
* Valid label
|
|
234
|
+
*/
|
|
235
|
+
validLabel: { type: [String, Array], default: void 0 }
|
|
236
|
+
};
|
|
237
|
+
const InvalidProps = {
|
|
238
|
+
/**
|
|
239
|
+
* Invalid status
|
|
240
|
+
*/
|
|
241
|
+
invalid: {
|
|
242
|
+
type: Boolean,
|
|
243
|
+
default: false
|
|
595
244
|
},
|
|
596
245
|
/**
|
|
597
246
|
* Invalid label
|
|
@@ -965,306 +614,26 @@ const StorageProps = {
|
|
|
965
614
|
},
|
|
966
615
|
storageKey: String
|
|
967
616
|
};
|
|
968
|
-
const
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
EMAIL: "email",
|
|
973
|
-
TEL: "tel",
|
|
974
|
-
URL: "url",
|
|
975
|
-
COLOR: "color",
|
|
976
|
-
SEARCH: "search",
|
|
977
|
-
DATE: "date",
|
|
978
|
-
TIME: "time",
|
|
979
|
-
DATETIME_LOCAL: "datetime-local",
|
|
980
|
-
MONTH: "month",
|
|
981
|
-
WEEK: "week"
|
|
982
|
-
};
|
|
983
|
-
const VvInputTextEvents = [
|
|
984
|
-
"update:modelValue",
|
|
985
|
-
"update:masked",
|
|
986
|
-
"accept",
|
|
987
|
-
"accept:typed",
|
|
988
|
-
"accept:masked",
|
|
989
|
-
"accept:unmasked",
|
|
990
|
-
"complete",
|
|
991
|
-
"complete:typed",
|
|
992
|
-
"complete:masked",
|
|
993
|
-
"complete:unmasked",
|
|
994
|
-
"focus",
|
|
995
|
-
"blur",
|
|
996
|
-
"keyup",
|
|
997
|
-
"keydown",
|
|
998
|
-
"keypress"
|
|
999
|
-
];
|
|
1000
|
-
const VvInputTextProps = {
|
|
1001
|
-
...InputTextareaProps,
|
|
1002
|
-
...StorageProps,
|
|
1003
|
-
/**
|
|
1004
|
-
* Input value
|
|
1005
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
|
|
1006
|
-
*/
|
|
1007
|
-
modelValue: [String, Number],
|
|
617
|
+
const VvDropdownProps = {
|
|
618
|
+
...IdProps,
|
|
619
|
+
...DropdownProps,
|
|
620
|
+
...ModifiersProps,
|
|
1008
621
|
/**
|
|
1009
|
-
*
|
|
1010
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#type
|
|
622
|
+
* Show / hide dropdown programmatically
|
|
1011
623
|
*/
|
|
1012
|
-
|
|
1013
|
-
type:
|
|
1014
|
-
default:
|
|
1015
|
-
validator: (value) => Object.values(INPUT_TYPES).includes(value)
|
|
624
|
+
modelValue: {
|
|
625
|
+
type: Boolean,
|
|
626
|
+
default: void 0
|
|
1016
627
|
},
|
|
1017
628
|
/**
|
|
1018
|
-
*
|
|
1019
|
-
* Available for input types: date, month, week, time, datetime-local, number, range.
|
|
1020
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#min
|
|
1021
|
-
*/
|
|
1022
|
-
min: [Number, Date, String],
|
|
1023
|
-
/**
|
|
1024
|
-
* Maximum value
|
|
1025
|
-
* Available for input types: date, month, week, time, datetime-local, number, range.
|
|
1026
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#max
|
|
1027
|
-
*/
|
|
1028
|
-
max: [Number, Date, String],
|
|
1029
|
-
/**
|
|
1030
|
-
* Incremental values that are valid
|
|
1031
|
-
* Available for input types: date, month, week, time, datetime-local and number
|
|
1032
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step
|
|
1033
|
-
*/
|
|
1034
|
-
step: { type: [String, Number], default: 1 },
|
|
1035
|
-
/**
|
|
1036
|
-
* Pattern the value must match to be valid
|
|
1037
|
-
* Available for input types: text, search, url, tel, email and password
|
|
1038
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#pattern
|
|
629
|
+
* Dropdown trigger element
|
|
1039
630
|
*/
|
|
1040
|
-
|
|
631
|
+
reference: {
|
|
632
|
+
type: Object,
|
|
633
|
+
default: null
|
|
634
|
+
},
|
|
1041
635
|
/**
|
|
1042
|
-
*
|
|
1043
|
-
* Available for input type email
|
|
1044
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#multiple
|
|
1045
|
-
*/
|
|
1046
|
-
multiple: Boolean,
|
|
1047
|
-
/**
|
|
1048
|
-
* VvIcon name for show password button
|
|
1049
|
-
* @see VVIcon
|
|
1050
|
-
*/
|
|
1051
|
-
iconShowPassword: {
|
|
1052
|
-
type: [String, Object],
|
|
1053
|
-
default: ACTION_ICONS.showPassword
|
|
1054
|
-
},
|
|
1055
|
-
/**
|
|
1056
|
-
* VvIcon name for hide password button
|
|
1057
|
-
* @see VVIcon
|
|
1058
|
-
*/
|
|
1059
|
-
iconHidePassword: {
|
|
1060
|
-
type: [String, Object],
|
|
1061
|
-
default: ACTION_ICONS.hidePassword
|
|
1062
|
-
},
|
|
1063
|
-
/**
|
|
1064
|
-
* VvIcon name for clear button
|
|
1065
|
-
* @see VVIcon
|
|
1066
|
-
*/
|
|
1067
|
-
iconClear: {
|
|
1068
|
-
type: [String, Object],
|
|
1069
|
-
default: ACTION_ICONS.clear
|
|
1070
|
-
},
|
|
1071
|
-
/**
|
|
1072
|
-
* VvIcon name for remove suggestion button
|
|
1073
|
-
* @see VVIcon
|
|
1074
|
-
*/
|
|
1075
|
-
iconRemoveSuggestion: {
|
|
1076
|
-
type: [String, Object],
|
|
1077
|
-
default: ACTION_ICONS.remove
|
|
1078
|
-
},
|
|
1079
|
-
/**
|
|
1080
|
-
* Label for step up button
|
|
1081
|
-
*/
|
|
1082
|
-
labelStepUp: {
|
|
1083
|
-
type: String,
|
|
1084
|
-
default: "Increase value"
|
|
1085
|
-
},
|
|
1086
|
-
/**
|
|
1087
|
-
* Label for step down button
|
|
1088
|
-
*/
|
|
1089
|
-
labelStepDown: {
|
|
1090
|
-
type: String,
|
|
1091
|
-
default: "Decrease value"
|
|
1092
|
-
},
|
|
1093
|
-
/**
|
|
1094
|
-
* Label for show password button
|
|
1095
|
-
*/
|
|
1096
|
-
labelShowPassword: {
|
|
1097
|
-
type: String,
|
|
1098
|
-
default: "Show password"
|
|
1099
|
-
},
|
|
1100
|
-
/**
|
|
1101
|
-
* Label for hide password button
|
|
1102
|
-
*/
|
|
1103
|
-
labelHidePassword: {
|
|
1104
|
-
type: String,
|
|
1105
|
-
default: "Hide password"
|
|
1106
|
-
},
|
|
1107
|
-
/**
|
|
1108
|
-
* Label for clear button
|
|
1109
|
-
*/
|
|
1110
|
-
labelClear: {
|
|
1111
|
-
type: String,
|
|
1112
|
-
default: "Clear"
|
|
1113
|
-
},
|
|
1114
|
-
/**
|
|
1115
|
-
* Label for remove suggestion button
|
|
1116
|
-
*/
|
|
1117
|
-
labelRemoveSuggestion: {
|
|
1118
|
-
type: String,
|
|
1119
|
-
default: "Remove suggestion"
|
|
1120
|
-
},
|
|
1121
|
-
/**
|
|
1122
|
-
* iMask options
|
|
1123
|
-
* @see https://imask.js.org/guide.html
|
|
1124
|
-
*/
|
|
1125
|
-
iMask: {
|
|
1126
|
-
type: Object,
|
|
1127
|
-
default: void 0
|
|
1128
|
-
},
|
|
1129
|
-
/**
|
|
1130
|
-
* Masked value
|
|
1131
|
-
*/
|
|
1132
|
-
masked: {
|
|
1133
|
-
type: String,
|
|
1134
|
-
default: void 0
|
|
1135
|
-
},
|
|
1136
|
-
/**
|
|
1137
|
-
* Adjust input width to content
|
|
1138
|
-
*/
|
|
1139
|
-
autoWidth: {
|
|
1140
|
-
type: Boolean,
|
|
1141
|
-
default: false
|
|
1142
|
-
},
|
|
1143
|
-
/**
|
|
1144
|
-
* Hide type number, password and search actions
|
|
1145
|
-
*/
|
|
1146
|
-
hideActions: {
|
|
1147
|
-
type: Boolean,
|
|
1148
|
-
default: false
|
|
1149
|
-
},
|
|
1150
|
-
/**
|
|
1151
|
-
* Add unit label to input
|
|
1152
|
-
*/
|
|
1153
|
-
unit: {
|
|
1154
|
-
type: String
|
|
1155
|
-
},
|
|
1156
|
-
/**
|
|
1157
|
-
* Select input text on focus
|
|
1158
|
-
*/
|
|
1159
|
-
selectOnFocus: {
|
|
1160
|
-
type: Boolean,
|
|
1161
|
-
default: false
|
|
1162
|
-
},
|
|
1163
|
-
/**
|
|
1164
|
-
* Maximum number of suggestions
|
|
1165
|
-
*/
|
|
1166
|
-
maxSuggestions: {
|
|
1167
|
-
type: Number,
|
|
1168
|
-
default: 5
|
|
1169
|
-
}
|
|
1170
|
-
};
|
|
1171
|
-
function VvInputTextActionsFactory(type, parentProps) {
|
|
1172
|
-
return {
|
|
1173
|
-
name: "VvInputTextActions",
|
|
1174
|
-
components: {
|
|
1175
|
-
VvIcon: _sfc_main$4,
|
|
1176
|
-
VvInputPasswordAction,
|
|
1177
|
-
VvInputStepAction,
|
|
1178
|
-
VvInputClearAction
|
|
1179
|
-
},
|
|
1180
|
-
setup() {
|
|
1181
|
-
const isDisabled = computed(() => {
|
|
1182
|
-
return parentProps.disabled || parentProps.readonly;
|
|
1183
|
-
});
|
|
1184
|
-
return {
|
|
1185
|
-
isDisabled,
|
|
1186
|
-
labelStepUp: parentProps.labelStepUp,
|
|
1187
|
-
labelStepDown: parentProps.labelStepDown,
|
|
1188
|
-
labelShowPassword: parentProps.labelShowPassword,
|
|
1189
|
-
labelHidePassword: parentProps.labelHidePassword,
|
|
1190
|
-
labelClear: parentProps.labelClear,
|
|
1191
|
-
iconShowPassword: parentProps.iconShowPassword,
|
|
1192
|
-
iconHidePassword: parentProps.iconHidePassword
|
|
1193
|
-
};
|
|
1194
|
-
},
|
|
1195
|
-
render() {
|
|
1196
|
-
let actions = null;
|
|
1197
|
-
switch (type) {
|
|
1198
|
-
case INPUT_TYPES.SEARCH: {
|
|
1199
|
-
const { onClear } = this.$attrs;
|
|
1200
|
-
actions = [
|
|
1201
|
-
h(VvInputClearAction, {
|
|
1202
|
-
disabled: this.isDisabled,
|
|
1203
|
-
label: this.labelShowPassword,
|
|
1204
|
-
onClear
|
|
1205
|
-
})
|
|
1206
|
-
];
|
|
1207
|
-
break;
|
|
1208
|
-
}
|
|
1209
|
-
case INPUT_TYPES.PASSWORD: {
|
|
1210
|
-
const { onTogglePassword } = this.$attrs;
|
|
1211
|
-
actions = [
|
|
1212
|
-
h(VvInputPasswordAction, {
|
|
1213
|
-
disabled: this.isDisabled,
|
|
1214
|
-
onTogglePassword,
|
|
1215
|
-
labelShow: this.labelShowPassword,
|
|
1216
|
-
labelHide: this.labelHidePassword,
|
|
1217
|
-
iconShow: this.iconShowPassword,
|
|
1218
|
-
iconHide: this.iconHidePassword
|
|
1219
|
-
})
|
|
1220
|
-
];
|
|
1221
|
-
break;
|
|
1222
|
-
}
|
|
1223
|
-
case INPUT_TYPES.NUMBER: {
|
|
1224
|
-
const { onStepUp, onStepDown } = this.$attrs;
|
|
1225
|
-
actions = [
|
|
1226
|
-
h(VvInputStepAction, {
|
|
1227
|
-
mode: "up",
|
|
1228
|
-
disabled: this.isDisabled || parentProps.max !== void 0 && parentProps.modelValue === parentProps.max,
|
|
1229
|
-
label: this.labelStepUp,
|
|
1230
|
-
onStepUp,
|
|
1231
|
-
onStepDown
|
|
1232
|
-
}),
|
|
1233
|
-
h(VvInputStepAction, {
|
|
1234
|
-
mode: "down",
|
|
1235
|
-
disabled: this.isDisabled || parentProps.min !== void 0 && parentProps.modelValue === parentProps.min,
|
|
1236
|
-
label: this.labelStepDown,
|
|
1237
|
-
onStepUp,
|
|
1238
|
-
onStepDown
|
|
1239
|
-
})
|
|
1240
|
-
];
|
|
1241
|
-
break;
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
return Array.isArray(actions) ? h("div", { class: "vv-input-text__actions-group" }, actions) : actions;
|
|
1245
|
-
}
|
|
1246
|
-
};
|
|
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
|
|
636
|
+
* Dropdown role
|
|
1268
637
|
*/
|
|
1269
638
|
role: {
|
|
1270
639
|
type: String,
|
|
@@ -1298,9 +667,9 @@ const VvDropdownOptionProps = {
|
|
|
1298
667
|
}
|
|
1299
668
|
};
|
|
1300
669
|
function useUniqueId(id) {
|
|
1301
|
-
return computed(() => String((id == null ? void 0 : id.value) ||
|
|
670
|
+
return computed(() => String((id == null ? void 0 : id.value) || useId()));
|
|
1302
671
|
}
|
|
1303
|
-
function
|
|
672
|
+
function useDropdownProvideTrigger({
|
|
1304
673
|
reference,
|
|
1305
674
|
id,
|
|
1306
675
|
expanded,
|
|
@@ -1328,7 +697,7 @@ function useProvideDropdownTrigger({
|
|
|
1328
697
|
component
|
|
1329
698
|
};
|
|
1330
699
|
}
|
|
1331
|
-
function
|
|
700
|
+
function useDropdownProvideItem({
|
|
1332
701
|
role,
|
|
1333
702
|
...others
|
|
1334
703
|
}) {
|
|
@@ -1341,7 +710,7 @@ function useProvideDropdownItem({
|
|
|
1341
710
|
});
|
|
1342
711
|
return { itemRole };
|
|
1343
712
|
}
|
|
1344
|
-
function
|
|
713
|
+
function useDropdownProvideAction({
|
|
1345
714
|
expanded
|
|
1346
715
|
}) {
|
|
1347
716
|
provide(INJECTION_KEY_DROPDOWN_ACTION, {
|
|
@@ -1349,13 +718,36 @@ function useProvideDropdownAction({
|
|
|
1349
718
|
expanded
|
|
1350
719
|
});
|
|
1351
720
|
}
|
|
721
|
+
function useModifiers(prefix, modifiers, others) {
|
|
722
|
+
return computed(() => {
|
|
723
|
+
const toReturn = {
|
|
724
|
+
[prefix]: true
|
|
725
|
+
};
|
|
726
|
+
const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
|
|
727
|
+
if (modifiersArray) {
|
|
728
|
+
if (Array.isArray(modifiersArray)) {
|
|
729
|
+
modifiersArray.forEach((modifier) => {
|
|
730
|
+
if (modifier) {
|
|
731
|
+
toReturn[`${prefix}--${modifier}`] = true;
|
|
732
|
+
}
|
|
733
|
+
});
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
if (others) {
|
|
737
|
+
Object.keys(others.value).forEach((key) => {
|
|
738
|
+
toReturn[`${prefix}--${key}`] = unref(others.value[key]);
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
return toReturn;
|
|
742
|
+
});
|
|
743
|
+
}
|
|
1352
744
|
const _hoisted_1$2 = ["id", "tabindex", "role", "aria-labelledby"];
|
|
1353
|
-
const __default__$
|
|
745
|
+
const __default__$4 = {
|
|
1354
746
|
name: "VvDropdown",
|
|
1355
747
|
inheritAttrs: false
|
|
1356
748
|
};
|
|
1357
|
-
const _sfc_main$
|
|
1358
|
-
...__default__$
|
|
749
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
750
|
+
...__default__$4,
|
|
1359
751
|
props: VvDropdownProps,
|
|
1360
752
|
emits: [
|
|
1361
753
|
"update:modelValue",
|
|
@@ -1382,10 +774,10 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1382
774
|
const attrs = useAttrs();
|
|
1383
775
|
const maxWidth = ref("auto");
|
|
1384
776
|
const maxHeight = ref("auto");
|
|
1385
|
-
const localReferenceEl = ref(
|
|
777
|
+
const localReferenceEl = ref();
|
|
1386
778
|
const floatingEl = ref();
|
|
1387
|
-
const arrowEl =
|
|
1388
|
-
const listEl =
|
|
779
|
+
const arrowEl = useTemplateRef("arrowEl");
|
|
780
|
+
const listEl = useTemplateRef("listEl");
|
|
1389
781
|
const referenceEl = computed({
|
|
1390
782
|
get: () => props.reference ?? localReferenceEl.value,
|
|
1391
783
|
set: (newValue) => {
|
|
@@ -1582,7 +974,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1582
974
|
"aria-haspopup": true,
|
|
1583
975
|
"aria-expanded": expanded.value
|
|
1584
976
|
}));
|
|
1585
|
-
const { component: VvDropdownTriggerProvider, bus } =
|
|
977
|
+
const { component: VvDropdownTriggerProvider, bus } = useDropdownProvideTrigger({
|
|
1586
978
|
reference: referenceEl,
|
|
1587
979
|
id: hasId,
|
|
1588
980
|
expanded,
|
|
@@ -1659,7 +1051,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1659
1051
|
});
|
|
1660
1052
|
}
|
|
1661
1053
|
const hovered = useElementHover(floatingEl);
|
|
1662
|
-
const { itemRole } =
|
|
1054
|
+
const { itemRole } = useDropdownProvideItem({
|
|
1663
1055
|
role,
|
|
1664
1056
|
expanded,
|
|
1665
1057
|
focused,
|
|
@@ -1788,17 +1180,17 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1788
1180
|
function useInjectedDropdownItem() {
|
|
1789
1181
|
return inject(INJECTION_KEY_DROPDOWN_ITEM, {});
|
|
1790
1182
|
}
|
|
1791
|
-
const __default__$
|
|
1183
|
+
const __default__$3 = {
|
|
1792
1184
|
name: "VvDropdownItem"
|
|
1793
1185
|
};
|
|
1794
|
-
const _sfc_main$
|
|
1795
|
-
...__default__$
|
|
1796
|
-
props: VvDropdownItemProps,
|
|
1186
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
1187
|
+
...__default__$3,
|
|
1188
|
+
props: VvDropdownItemProps,
|
|
1797
1189
|
setup(__props) {
|
|
1798
1190
|
const props = __props;
|
|
1799
1191
|
const { role, expanded } = useInjectedDropdownItem();
|
|
1800
1192
|
const element = ref(null);
|
|
1801
|
-
|
|
1193
|
+
useDropdownProvideAction({ expanded });
|
|
1802
1194
|
const hovered = useElementHover(element);
|
|
1803
1195
|
const { focused } = useFocus(element);
|
|
1804
1196
|
const { focused: focusedWithin } = useFocusWithin(element);
|
|
@@ -1825,11 +1217,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1825
1217
|
}
|
|
1826
1218
|
});
|
|
1827
1219
|
const _hoisted_1$1 = ["title"];
|
|
1828
|
-
const __default__$
|
|
1220
|
+
const __default__$2 = {
|
|
1829
1221
|
name: "VvDropdownOption"
|
|
1830
1222
|
};
|
|
1831
|
-
const _sfc_main$
|
|
1832
|
-
...__default__$
|
|
1223
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1224
|
+
...__default__$2,
|
|
1833
1225
|
props: VvDropdownOptionProps,
|
|
1834
1226
|
setup(__props) {
|
|
1835
1227
|
const props = __props;
|
|
@@ -1853,7 +1245,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1853
1245
|
return "";
|
|
1854
1246
|
});
|
|
1855
1247
|
return (_ctx, _cache) => {
|
|
1856
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1248
|
+
return openBlock(), createBlock(_sfc_main$3, {
|
|
1857
1249
|
class: normalizeClass(unref(bemCssClasses)),
|
|
1858
1250
|
tabindex: _ctx.disabled ? -1 : 0,
|
|
1859
1251
|
"aria-selected": _ctx.selected,
|
|
@@ -1881,6 +1273,613 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1881
1273
|
};
|
|
1882
1274
|
}
|
|
1883
1275
|
});
|
|
1276
|
+
const ACTION_ICONS = {
|
|
1277
|
+
showPassword: "eye-on",
|
|
1278
|
+
hidePassword: "eye-off",
|
|
1279
|
+
showDatePicker: "calendar",
|
|
1280
|
+
showTimePicker: "time",
|
|
1281
|
+
showColorPicker: "color",
|
|
1282
|
+
clear: "close",
|
|
1283
|
+
add: "add",
|
|
1284
|
+
remove: "trash",
|
|
1285
|
+
edit: "edit",
|
|
1286
|
+
download: "download"
|
|
1287
|
+
};
|
|
1288
|
+
const VvIconPropsDefaults = {
|
|
1289
|
+
prefix: "normal"
|
|
1290
|
+
/* normal */
|
|
1291
|
+
};
|
|
1292
|
+
function useVolver() {
|
|
1293
|
+
return inject(INJECTION_KEY_VOLVER);
|
|
1294
|
+
}
|
|
1295
|
+
const __default__$1 = {
|
|
1296
|
+
name: "VvIcon"
|
|
1297
|
+
};
|
|
1298
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1299
|
+
...__default__$1,
|
|
1300
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
1301
|
+
name: {},
|
|
1302
|
+
color: {},
|
|
1303
|
+
width: {},
|
|
1304
|
+
height: {},
|
|
1305
|
+
provider: {},
|
|
1306
|
+
prefix: {},
|
|
1307
|
+
src: {},
|
|
1308
|
+
horizontalFlip: { type: Boolean },
|
|
1309
|
+
verticalFlip: { type: Boolean },
|
|
1310
|
+
flip: {},
|
|
1311
|
+
mode: {},
|
|
1312
|
+
inline: { type: Boolean },
|
|
1313
|
+
rotate: {},
|
|
1314
|
+
onLoad: { type: Function },
|
|
1315
|
+
svg: {},
|
|
1316
|
+
modifiers: {}
|
|
1317
|
+
}, VvIconPropsDefaults),
|
|
1318
|
+
setup(__props) {
|
|
1319
|
+
const props = __props;
|
|
1320
|
+
const hasRotate = computed(() => {
|
|
1321
|
+
if (typeof props.rotate === "string") {
|
|
1322
|
+
return Number.parseFloat(props.rotate);
|
|
1323
|
+
}
|
|
1324
|
+
return props.rotate;
|
|
1325
|
+
});
|
|
1326
|
+
const show = ref(true);
|
|
1327
|
+
const volver = useVolver();
|
|
1328
|
+
const { modifiers } = toRefs(props);
|
|
1329
|
+
const bemCssClasses = useModifiers("vv-icon", modifiers);
|
|
1330
|
+
const provider = computed(() => {
|
|
1331
|
+
return props.provider || (volver == null ? void 0 : volver.iconsProvider);
|
|
1332
|
+
});
|
|
1333
|
+
const icon = computed(() => {
|
|
1334
|
+
const name = props.name ?? "";
|
|
1335
|
+
const iconName = `@${provider.value}:${props.prefix}:${name}`;
|
|
1336
|
+
if (iconExists(iconName)) {
|
|
1337
|
+
return iconName;
|
|
1338
|
+
}
|
|
1339
|
+
const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
|
|
1340
|
+
(iconsCollection2) => {
|
|
1341
|
+
const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
|
|
1342
|
+
return iconExists(icon2);
|
|
1343
|
+
}
|
|
1344
|
+
);
|
|
1345
|
+
if (iconsCollection) {
|
|
1346
|
+
return `@${provider.value}:${iconsCollection.prefix}:${name}`;
|
|
1347
|
+
}
|
|
1348
|
+
return name;
|
|
1349
|
+
});
|
|
1350
|
+
function getSvgContent(svg) {
|
|
1351
|
+
let dom;
|
|
1352
|
+
if (typeof window === "undefined") {
|
|
1353
|
+
const { JSDOM } = require("jsdom");
|
|
1354
|
+
dom = new JSDOM().window;
|
|
1355
|
+
}
|
|
1356
|
+
const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
|
|
1357
|
+
const svgDomString = domParser.parseFromString(svg, "text/html");
|
|
1358
|
+
const svgEl = svgDomString.querySelector("svg");
|
|
1359
|
+
return svgEl;
|
|
1360
|
+
}
|
|
1361
|
+
function addIconFromSvg(svg) {
|
|
1362
|
+
const svgContentEl = getSvgContent(svg);
|
|
1363
|
+
const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
|
|
1364
|
+
if (svgContentEl && svgContent) {
|
|
1365
|
+
addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
|
|
1366
|
+
body: svgContent,
|
|
1367
|
+
// Set height and width from svg content
|
|
1368
|
+
height: svgContentEl.viewBox.baseVal.height,
|
|
1369
|
+
width: svgContentEl.viewBox.baseVal.width
|
|
1370
|
+
});
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
if (volver) {
|
|
1374
|
+
if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
|
|
1375
|
+
show.value = false;
|
|
1376
|
+
volver.fetchIcon(props.src).then((svg) => {
|
|
1377
|
+
if (svg) {
|
|
1378
|
+
addIconFromSvg(svg);
|
|
1379
|
+
show.value = true;
|
|
1380
|
+
}
|
|
1381
|
+
}).catch((e) => {
|
|
1382
|
+
throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
if (props.svg) {
|
|
1387
|
+
addIconFromSvg(props.svg);
|
|
1388
|
+
}
|
|
1389
|
+
return (_ctx, _cache) => {
|
|
1390
|
+
return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
|
|
1391
|
+
key: 0,
|
|
1392
|
+
class: unref(bemCssClasses)
|
|
1393
|
+
}, {
|
|
1394
|
+
inline: _ctx.inline,
|
|
1395
|
+
width: _ctx.width,
|
|
1396
|
+
height: _ctx.height,
|
|
1397
|
+
horizontalFlip: _ctx.horizontalFlip,
|
|
1398
|
+
verticalFlip: _ctx.verticalFlip,
|
|
1399
|
+
flip: _ctx.flip,
|
|
1400
|
+
rotate: unref(hasRotate),
|
|
1401
|
+
color: _ctx.color,
|
|
1402
|
+
onLoad: _ctx.onLoad,
|
|
1403
|
+
icon: unref(icon)
|
|
1404
|
+
}), null, 16, ["class"])) : createCommentVNode("v-if", true);
|
|
1405
|
+
};
|
|
1406
|
+
}
|
|
1407
|
+
});
|
|
1408
|
+
const INPUT_TYPES = {
|
|
1409
|
+
TEXT: "text",
|
|
1410
|
+
PASSWORD: "password",
|
|
1411
|
+
NUMBER: "number",
|
|
1412
|
+
EMAIL: "email",
|
|
1413
|
+
TEL: "tel",
|
|
1414
|
+
URL: "url",
|
|
1415
|
+
COLOR: "color",
|
|
1416
|
+
SEARCH: "search",
|
|
1417
|
+
DATE: "date",
|
|
1418
|
+
TIME: "time",
|
|
1419
|
+
DATETIME_LOCAL: "datetime-local",
|
|
1420
|
+
MONTH: "month",
|
|
1421
|
+
WEEK: "week"
|
|
1422
|
+
};
|
|
1423
|
+
const VvInputTextEvents = [
|
|
1424
|
+
"update:modelValue",
|
|
1425
|
+
"update:masked",
|
|
1426
|
+
"accept",
|
|
1427
|
+
"accept:typed",
|
|
1428
|
+
"accept:masked",
|
|
1429
|
+
"accept:unmasked",
|
|
1430
|
+
"complete",
|
|
1431
|
+
"complete:typed",
|
|
1432
|
+
"complete:masked",
|
|
1433
|
+
"complete:unmasked",
|
|
1434
|
+
"focus",
|
|
1435
|
+
"blur",
|
|
1436
|
+
"keyup",
|
|
1437
|
+
"keydown",
|
|
1438
|
+
"keypress"
|
|
1439
|
+
];
|
|
1440
|
+
const VvInputTextProps = {
|
|
1441
|
+
...InputTextareaProps,
|
|
1442
|
+
...StorageProps,
|
|
1443
|
+
/**
|
|
1444
|
+
* Input value
|
|
1445
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
|
|
1446
|
+
*/
|
|
1447
|
+
modelValue: [String, Number],
|
|
1448
|
+
/**
|
|
1449
|
+
* Type of form control
|
|
1450
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#type
|
|
1451
|
+
*/
|
|
1452
|
+
type: {
|
|
1453
|
+
type: String,
|
|
1454
|
+
default: INPUT_TYPES.TEXT,
|
|
1455
|
+
validator: (value) => Object.values(INPUT_TYPES).includes(value)
|
|
1456
|
+
},
|
|
1457
|
+
/**
|
|
1458
|
+
* Minimum value
|
|
1459
|
+
* Available for input types: date, month, week, time, datetime-local, number, range.
|
|
1460
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#min
|
|
1461
|
+
*/
|
|
1462
|
+
min: [Number, Date, String],
|
|
1463
|
+
/**
|
|
1464
|
+
* Maximum value
|
|
1465
|
+
* Available for input types: date, month, week, time, datetime-local, number, range.
|
|
1466
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#max
|
|
1467
|
+
*/
|
|
1468
|
+
max: [Number, Date, String],
|
|
1469
|
+
/**
|
|
1470
|
+
* Incremental values that are valid
|
|
1471
|
+
* Available for input types: date, month, week, time, datetime-local and number
|
|
1472
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step
|
|
1473
|
+
*/
|
|
1474
|
+
step: { type: [String, Number], default: 1 },
|
|
1475
|
+
/**
|
|
1476
|
+
* Pattern the value must match to be valid
|
|
1477
|
+
* Available for input types: text, search, url, tel, email and password
|
|
1478
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#pattern
|
|
1479
|
+
*/
|
|
1480
|
+
pattern: String,
|
|
1481
|
+
/**
|
|
1482
|
+
* Whether to allow multiple values
|
|
1483
|
+
* Available for input type email
|
|
1484
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#multiple
|
|
1485
|
+
*/
|
|
1486
|
+
multiple: Boolean,
|
|
1487
|
+
/**
|
|
1488
|
+
* VvIcon name for show password button
|
|
1489
|
+
* @see VVIcon
|
|
1490
|
+
*/
|
|
1491
|
+
iconShowPassword: {
|
|
1492
|
+
type: [String, Object],
|
|
1493
|
+
default: ACTION_ICONS.showPassword
|
|
1494
|
+
},
|
|
1495
|
+
/**
|
|
1496
|
+
* VvIcon name for hide password button
|
|
1497
|
+
* @see VVIcon
|
|
1498
|
+
*/
|
|
1499
|
+
iconHidePassword: {
|
|
1500
|
+
type: [String, Object],
|
|
1501
|
+
default: ACTION_ICONS.hidePassword
|
|
1502
|
+
},
|
|
1503
|
+
/**
|
|
1504
|
+
* VvIcon name for clear button
|
|
1505
|
+
* @see VVIcon
|
|
1506
|
+
*/
|
|
1507
|
+
iconClear: {
|
|
1508
|
+
type: [String, Object],
|
|
1509
|
+
default: ACTION_ICONS.clear
|
|
1510
|
+
},
|
|
1511
|
+
/**
|
|
1512
|
+
* VvIcon name for remove suggestion button
|
|
1513
|
+
* @see VVIcon
|
|
1514
|
+
*/
|
|
1515
|
+
iconRemoveSuggestion: {
|
|
1516
|
+
type: [String, Object],
|
|
1517
|
+
default: ACTION_ICONS.remove
|
|
1518
|
+
},
|
|
1519
|
+
/**
|
|
1520
|
+
* Label for step up button
|
|
1521
|
+
*/
|
|
1522
|
+
labelStepUp: {
|
|
1523
|
+
type: String,
|
|
1524
|
+
default: "Increase value"
|
|
1525
|
+
},
|
|
1526
|
+
/**
|
|
1527
|
+
* Label for step down button
|
|
1528
|
+
*/
|
|
1529
|
+
labelStepDown: {
|
|
1530
|
+
type: String,
|
|
1531
|
+
default: "Decrease value"
|
|
1532
|
+
},
|
|
1533
|
+
/**
|
|
1534
|
+
* Label for show password button
|
|
1535
|
+
*/
|
|
1536
|
+
labelShowPassword: {
|
|
1537
|
+
type: String,
|
|
1538
|
+
default: "Show password"
|
|
1539
|
+
},
|
|
1540
|
+
/**
|
|
1541
|
+
* Label for hide password button
|
|
1542
|
+
*/
|
|
1543
|
+
labelHidePassword: {
|
|
1544
|
+
type: String,
|
|
1545
|
+
default: "Hide password"
|
|
1546
|
+
},
|
|
1547
|
+
/**
|
|
1548
|
+
* Label for clear button
|
|
1549
|
+
*/
|
|
1550
|
+
labelClear: {
|
|
1551
|
+
type: String,
|
|
1552
|
+
default: "Clear"
|
|
1553
|
+
},
|
|
1554
|
+
/**
|
|
1555
|
+
* Label for remove suggestion button
|
|
1556
|
+
*/
|
|
1557
|
+
labelRemoveSuggestion: {
|
|
1558
|
+
type: String,
|
|
1559
|
+
default: "Remove suggestion"
|
|
1560
|
+
},
|
|
1561
|
+
/**
|
|
1562
|
+
* iMask options
|
|
1563
|
+
* @see https://imask.js.org/guide.html
|
|
1564
|
+
*/
|
|
1565
|
+
iMask: {
|
|
1566
|
+
type: Object,
|
|
1567
|
+
default: void 0
|
|
1568
|
+
},
|
|
1569
|
+
/**
|
|
1570
|
+
* Masked value
|
|
1571
|
+
*/
|
|
1572
|
+
masked: {
|
|
1573
|
+
type: String,
|
|
1574
|
+
default: void 0
|
|
1575
|
+
},
|
|
1576
|
+
/**
|
|
1577
|
+
* Adjust input width to content
|
|
1578
|
+
*/
|
|
1579
|
+
autoWidth: {
|
|
1580
|
+
type: Boolean,
|
|
1581
|
+
default: false
|
|
1582
|
+
},
|
|
1583
|
+
/**
|
|
1584
|
+
* Hide type number, password and search actions
|
|
1585
|
+
*/
|
|
1586
|
+
hideActions: {
|
|
1587
|
+
type: Boolean,
|
|
1588
|
+
default: false
|
|
1589
|
+
},
|
|
1590
|
+
/**
|
|
1591
|
+
* Add unit label to input
|
|
1592
|
+
*/
|
|
1593
|
+
unit: {
|
|
1594
|
+
type: String
|
|
1595
|
+
},
|
|
1596
|
+
/**
|
|
1597
|
+
* Select input text on focus
|
|
1598
|
+
*/
|
|
1599
|
+
selectOnFocus: {
|
|
1600
|
+
type: Boolean,
|
|
1601
|
+
default: false
|
|
1602
|
+
},
|
|
1603
|
+
/**
|
|
1604
|
+
* Maximum number of suggestions
|
|
1605
|
+
*/
|
|
1606
|
+
maxSuggestions: {
|
|
1607
|
+
type: Number,
|
|
1608
|
+
default: 5
|
|
1609
|
+
}
|
|
1610
|
+
};
|
|
1611
|
+
function useComponentIcon(icon, iconPosition) {
|
|
1612
|
+
const hasIcon = computed(() => {
|
|
1613
|
+
if (typeof (icon == null ? void 0 : icon.value) === "string") {
|
|
1614
|
+
return { name: icon == null ? void 0 : icon.value };
|
|
1615
|
+
}
|
|
1616
|
+
return icon == null ? void 0 : icon.value;
|
|
1617
|
+
});
|
|
1618
|
+
const hasIconBefore = computed(
|
|
1619
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
|
|
1620
|
+
);
|
|
1621
|
+
const hasIconAfter = computed(
|
|
1622
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
|
|
1623
|
+
);
|
|
1624
|
+
const hasIconLeft = computed(
|
|
1625
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
|
|
1626
|
+
);
|
|
1627
|
+
const hasIconRight = computed(
|
|
1628
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
|
|
1629
|
+
);
|
|
1630
|
+
const hasIconTop = computed(
|
|
1631
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
|
|
1632
|
+
);
|
|
1633
|
+
const hasIconBottom = computed(
|
|
1634
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
|
|
1635
|
+
);
|
|
1636
|
+
return {
|
|
1637
|
+
hasIcon,
|
|
1638
|
+
hasIconLeft,
|
|
1639
|
+
hasIconRight,
|
|
1640
|
+
hasIconTop,
|
|
1641
|
+
hasIconBottom,
|
|
1642
|
+
hasIconBefore,
|
|
1643
|
+
hasIconAfter
|
|
1644
|
+
};
|
|
1645
|
+
}
|
|
1646
|
+
const VvInputClearAction = defineComponent({
|
|
1647
|
+
components: {
|
|
1648
|
+
VvIcon: _sfc_main$1
|
|
1649
|
+
},
|
|
1650
|
+
props: {
|
|
1651
|
+
disabled: {
|
|
1652
|
+
type: Boolean,
|
|
1653
|
+
default: false
|
|
1654
|
+
},
|
|
1655
|
+
label: {
|
|
1656
|
+
type: String,
|
|
1657
|
+
default: "Clear"
|
|
1658
|
+
},
|
|
1659
|
+
icon: {
|
|
1660
|
+
type: [String, Object],
|
|
1661
|
+
default: "close"
|
|
1662
|
+
}
|
|
1663
|
+
},
|
|
1664
|
+
emits: ["clear"],
|
|
1665
|
+
setup(props, { emit }) {
|
|
1666
|
+
const { hasIcon } = useComponentIcon(computed(() => props.icon));
|
|
1667
|
+
function onClick(e) {
|
|
1668
|
+
e == null ? void 0 : e.stopPropagation();
|
|
1669
|
+
if (!props.disabled) {
|
|
1670
|
+
emit("clear");
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
return {
|
|
1674
|
+
hasIcon,
|
|
1675
|
+
onClick
|
|
1676
|
+
};
|
|
1677
|
+
},
|
|
1678
|
+
render() {
|
|
1679
|
+
const icon = this.hasIcon ? h(_sfc_main$1, {
|
|
1680
|
+
...this.hasIcon,
|
|
1681
|
+
class: "vv-input-text__icon"
|
|
1682
|
+
}) : void 0;
|
|
1683
|
+
return h(
|
|
1684
|
+
"button",
|
|
1685
|
+
{
|
|
1686
|
+
disabled: this.disabled,
|
|
1687
|
+
class: "vv-input-text__action",
|
|
1688
|
+
ariaLabel: this.label,
|
|
1689
|
+
type: "button",
|
|
1690
|
+
onClick: this.onClick
|
|
1691
|
+
},
|
|
1692
|
+
icon
|
|
1693
|
+
);
|
|
1694
|
+
}
|
|
1695
|
+
});
|
|
1696
|
+
const VvInputPasswordAction = defineComponent({
|
|
1697
|
+
components: {
|
|
1698
|
+
VvIcon: _sfc_main$1
|
|
1699
|
+
},
|
|
1700
|
+
props: {
|
|
1701
|
+
disabled: {
|
|
1702
|
+
type: Boolean,
|
|
1703
|
+
default: false
|
|
1704
|
+
},
|
|
1705
|
+
labelShow: {
|
|
1706
|
+
type: String,
|
|
1707
|
+
default: "Show password"
|
|
1708
|
+
},
|
|
1709
|
+
labelHide: {
|
|
1710
|
+
type: String,
|
|
1711
|
+
default: "Hide password"
|
|
1712
|
+
},
|
|
1713
|
+
iconShow: {
|
|
1714
|
+
type: [String, Object],
|
|
1715
|
+
default: ACTION_ICONS.showPassword
|
|
1716
|
+
},
|
|
1717
|
+
iconHide: {
|
|
1718
|
+
type: [String, Object],
|
|
1719
|
+
default: ACTION_ICONS.hidePassword
|
|
1720
|
+
}
|
|
1721
|
+
},
|
|
1722
|
+
emits: ["toggle-password"],
|
|
1723
|
+
setup(props, { emit }) {
|
|
1724
|
+
const active = ref(false);
|
|
1725
|
+
const activeIcon = computed(
|
|
1726
|
+
() => active.value ? props.iconHide : props.iconShow
|
|
1727
|
+
);
|
|
1728
|
+
const { hasIcon } = useComponentIcon(activeIcon);
|
|
1729
|
+
function onClick(e) {
|
|
1730
|
+
e == null ? void 0 : e.stopPropagation();
|
|
1731
|
+
if (!props.disabled) {
|
|
1732
|
+
active.value = !active.value;
|
|
1733
|
+
emit("toggle-password", active.value);
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
return {
|
|
1737
|
+
active,
|
|
1738
|
+
activeIcon,
|
|
1739
|
+
hasIcon,
|
|
1740
|
+
onClick
|
|
1741
|
+
};
|
|
1742
|
+
},
|
|
1743
|
+
render() {
|
|
1744
|
+
const icon = this.hasIcon ? h(_sfc_main$1, {
|
|
1745
|
+
...this.hasIcon,
|
|
1746
|
+
class: "vv-input-text__icon"
|
|
1747
|
+
}) : void 0;
|
|
1748
|
+
return h(
|
|
1749
|
+
"button",
|
|
1750
|
+
{
|
|
1751
|
+
disabled: this.disabled,
|
|
1752
|
+
class: "vv-input-text__action",
|
|
1753
|
+
ariaLabel: this.active ? this.labelHide : this.labelShow,
|
|
1754
|
+
type: "button",
|
|
1755
|
+
onClick: this.onClick
|
|
1756
|
+
},
|
|
1757
|
+
icon
|
|
1758
|
+
);
|
|
1759
|
+
}
|
|
1760
|
+
});
|
|
1761
|
+
const VvInputStepAction = defineComponent({
|
|
1762
|
+
components: {
|
|
1763
|
+
VvIcon: _sfc_main$1
|
|
1764
|
+
},
|
|
1765
|
+
props: {
|
|
1766
|
+
disabled: {
|
|
1767
|
+
type: Boolean,
|
|
1768
|
+
default: false
|
|
1769
|
+
},
|
|
1770
|
+
label: {
|
|
1771
|
+
type: String
|
|
1772
|
+
},
|
|
1773
|
+
mode: {
|
|
1774
|
+
type: String,
|
|
1775
|
+
validator: (v) => ["up", "down"].includes(v),
|
|
1776
|
+
default: "up"
|
|
1777
|
+
}
|
|
1778
|
+
},
|
|
1779
|
+
emits: ["step-up", "step-down"],
|
|
1780
|
+
setup(props, { emit }) {
|
|
1781
|
+
const isUp = computed(() => props.mode === "up");
|
|
1782
|
+
const onClick = (e) => {
|
|
1783
|
+
e == null ? void 0 : e.stopPropagation();
|
|
1784
|
+
if (!props.disabled) {
|
|
1785
|
+
emit(isUp.value ? "step-up" : "step-down");
|
|
1786
|
+
}
|
|
1787
|
+
};
|
|
1788
|
+
return {
|
|
1789
|
+
isUp,
|
|
1790
|
+
onClick
|
|
1791
|
+
};
|
|
1792
|
+
},
|
|
1793
|
+
render() {
|
|
1794
|
+
return h("button", {
|
|
1795
|
+
class: [
|
|
1796
|
+
"vv-input-text__action vv-input-text__action-chevron",
|
|
1797
|
+
this.isUp && "vv-input-text__action-chevron-up"
|
|
1798
|
+
],
|
|
1799
|
+
disabled: this.disabled,
|
|
1800
|
+
ariaLabel: this.label,
|
|
1801
|
+
type: "button",
|
|
1802
|
+
onClick: this.onClick
|
|
1803
|
+
});
|
|
1804
|
+
}
|
|
1805
|
+
});
|
|
1806
|
+
function VvInputTextActionsFactory(type, parentProps) {
|
|
1807
|
+
return {
|
|
1808
|
+
name: "VvInputTextActions",
|
|
1809
|
+
components: {
|
|
1810
|
+
VvIcon: _sfc_main$1,
|
|
1811
|
+
VvInputPasswordAction,
|
|
1812
|
+
VvInputStepAction,
|
|
1813
|
+
VvInputClearAction
|
|
1814
|
+
},
|
|
1815
|
+
setup() {
|
|
1816
|
+
const isDisabled = computed(() => {
|
|
1817
|
+
return parentProps.disabled || parentProps.readonly;
|
|
1818
|
+
});
|
|
1819
|
+
return {
|
|
1820
|
+
isDisabled,
|
|
1821
|
+
labelStepUp: parentProps.labelStepUp,
|
|
1822
|
+
labelStepDown: parentProps.labelStepDown,
|
|
1823
|
+
labelShowPassword: parentProps.labelShowPassword,
|
|
1824
|
+
labelHidePassword: parentProps.labelHidePassword,
|
|
1825
|
+
labelClear: parentProps.labelClear,
|
|
1826
|
+
iconShowPassword: parentProps.iconShowPassword,
|
|
1827
|
+
iconHidePassword: parentProps.iconHidePassword
|
|
1828
|
+
};
|
|
1829
|
+
},
|
|
1830
|
+
render() {
|
|
1831
|
+
let actions = null;
|
|
1832
|
+
switch (type) {
|
|
1833
|
+
case INPUT_TYPES.SEARCH: {
|
|
1834
|
+
const { onClear } = this.$attrs;
|
|
1835
|
+
actions = [
|
|
1836
|
+
h(VvInputClearAction, {
|
|
1837
|
+
disabled: this.isDisabled,
|
|
1838
|
+
label: this.labelShowPassword,
|
|
1839
|
+
onClear
|
|
1840
|
+
})
|
|
1841
|
+
];
|
|
1842
|
+
break;
|
|
1843
|
+
}
|
|
1844
|
+
case INPUT_TYPES.PASSWORD: {
|
|
1845
|
+
const { onTogglePassword } = this.$attrs;
|
|
1846
|
+
actions = [
|
|
1847
|
+
h(VvInputPasswordAction, {
|
|
1848
|
+
disabled: this.isDisabled,
|
|
1849
|
+
onTogglePassword,
|
|
1850
|
+
labelShow: this.labelShowPassword,
|
|
1851
|
+
labelHide: this.labelHidePassword,
|
|
1852
|
+
iconShow: this.iconShowPassword,
|
|
1853
|
+
iconHide: this.iconHidePassword
|
|
1854
|
+
})
|
|
1855
|
+
];
|
|
1856
|
+
break;
|
|
1857
|
+
}
|
|
1858
|
+
case INPUT_TYPES.NUMBER: {
|
|
1859
|
+
const { onStepUp, onStepDown } = this.$attrs;
|
|
1860
|
+
actions = [
|
|
1861
|
+
h(VvInputStepAction, {
|
|
1862
|
+
mode: "up",
|
|
1863
|
+
disabled: this.isDisabled || parentProps.max !== void 0 && parentProps.modelValue === parentProps.max,
|
|
1864
|
+
label: this.labelStepUp,
|
|
1865
|
+
onStepUp,
|
|
1866
|
+
onStepDown
|
|
1867
|
+
}),
|
|
1868
|
+
h(VvInputStepAction, {
|
|
1869
|
+
mode: "down",
|
|
1870
|
+
disabled: this.isDisabled || parentProps.min !== void 0 && parentProps.modelValue === parentProps.min,
|
|
1871
|
+
label: this.labelStepDown,
|
|
1872
|
+
onStepUp,
|
|
1873
|
+
onStepDown
|
|
1874
|
+
})
|
|
1875
|
+
];
|
|
1876
|
+
break;
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
return Array.isArray(actions) ? h("div", { class: "vv-input-text__actions-group" }, actions) : actions;
|
|
1880
|
+
}
|
|
1881
|
+
};
|
|
1882
|
+
}
|
|
1884
1883
|
function useDefaults(componentName, propsDefinition, props) {
|
|
1885
1884
|
const volver = useVolver();
|
|
1886
1885
|
const volverComponentDefaults = computed(() => {
|
|
@@ -2254,9 +2253,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2254
2253
|
}
|
|
2255
2254
|
);
|
|
2256
2255
|
const inputEl = el;
|
|
2257
|
-
const innerEl =
|
|
2258
|
-
const wrapperEl =
|
|
2259
|
-
const dropdownEl =
|
|
2256
|
+
const innerEl = useTemplateRef("innerEl");
|
|
2257
|
+
const wrapperEl = useTemplateRef("wrapperEl");
|
|
2258
|
+
const dropdownEl = useTemplateRef("dropdownEl");
|
|
2260
2259
|
__expose({ $inner: innerEl });
|
|
2261
2260
|
const { focused } = useComponentFocus(inputEl, emit);
|
|
2262
2261
|
const isFocused = computed(
|
|
@@ -2542,7 +2541,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2542
2541
|
},
|
|
2543
2542
|
[
|
|
2544
2543
|
unref(hasIconBefore) ? (openBlock(), createBlock(
|
|
2545
|
-
_sfc_main$
|
|
2544
|
+
_sfc_main$1,
|
|
2546
2545
|
mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-input-text__icon" }),
|
|
2547
2546
|
null,
|
|
2548
2547
|
16
|
|
@@ -2572,7 +2571,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2572
2571
|
/* NEED_PATCH */
|
|
2573
2572
|
),
|
|
2574
2573
|
unref(iconAfter) ? (openBlock(), createBlock(
|
|
2575
|
-
_sfc_main$
|
|
2574
|
+
_sfc_main$1,
|
|
2576
2575
|
mergeProps({ key: 1 }, unref(iconAfter), { class: "vv-input-text__icon vv-input-text__icon-after" }),
|
|
2577
2576
|
null,
|
|
2578
2577
|
16
|
|
@@ -2640,7 +2639,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2640
2639
|
key: "3"
|
|
2641
2640
|
} : void 0
|
|
2642
2641
|
]), 1032, ["id"]),
|
|
2643
|
-
unref(hasSuggestions) ? (openBlock(), createBlock(_sfc_main$
|
|
2642
|
+
unref(hasSuggestions) ? (openBlock(), createBlock(_sfc_main$4, {
|
|
2644
2643
|
key: 1,
|
|
2645
2644
|
ref_key: "dropdownEl",
|
|
2646
2645
|
ref: dropdownEl,
|
|
@@ -2653,7 +2652,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2653
2652
|
Fragment,
|
|
2654
2653
|
null,
|
|
2655
2654
|
renderList(unref(filteredSuggestions), (value) => {
|
|
2656
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2655
|
+
return openBlock(), createBlock(_sfc_main$2, {
|
|
2657
2656
|
key: value,
|
|
2658
2657
|
onClick: withModifiers(($event) => onSuggestionSelect(value), ["stop"])
|
|
2659
2658
|
}, {
|
|
@@ -2676,7 +2675,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2676
2675
|
onClick: withModifiers(($event) => onSuggestionRemove(value), ["stop"])
|
|
2677
2676
|
}, [
|
|
2678
2677
|
createVNode(
|
|
2679
|
-
_sfc_main$
|
|
2678
|
+
_sfc_main$1,
|
|
2680
2679
|
mergeProps({ ref_for: true }, unref(hasIconRemoveSuggestion)),
|
|
2681
2680
|
null,
|
|
2682
2681
|
16
|