@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,12 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed, isRef, defineComponent, h, inject, unref, mergeDefaults, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, watch, useId, useSlots, useTemplateRef, createElementBlock, normalizeClass, toDisplayString, createElementVNode, renderSlot, normalizeProps, guardReactiveProps, withDirectives, Fragment, renderList, vModelSelect, createVNode, createSlots, withCtx } from "vue";
|
|
2
2
|
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
3
3
|
import { useFocus, useElementVisibility } from "@vueuse/core";
|
|
4
|
-
import { uid } from "uid";
|
|
5
4
|
import { get } from "ts-dot-prop";
|
|
6
|
-
const VvIconPropsDefaults = {
|
|
7
|
-
prefix: "normal"
|
|
8
|
-
/* normal */
|
|
9
|
-
};
|
|
10
5
|
var StorageType = /* @__PURE__ */ ((StorageType2) => {
|
|
11
6
|
StorageType2["local"] = "local";
|
|
12
7
|
StorageType2["session"] = "session";
|
|
@@ -54,336 +49,76 @@ var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
|
|
|
54
49
|
return ActionTag2;
|
|
55
50
|
})(ActionTag || {});
|
|
56
51
|
const INJECTION_KEY_VOLVER = Symbol.for("volver");
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return toReturn;
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
const __default__$1 = {
|
|
84
|
-
name: "VvIcon"
|
|
52
|
+
const LinkProps = {
|
|
53
|
+
/**
|
|
54
|
+
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
55
|
+
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
56
|
+
*/
|
|
57
|
+
to: {
|
|
58
|
+
type: [String, Object]
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* Anchor href
|
|
62
|
+
*/
|
|
63
|
+
href: String,
|
|
64
|
+
/**
|
|
65
|
+
* Anchor target
|
|
66
|
+
*/
|
|
67
|
+
target: String,
|
|
68
|
+
/**
|
|
69
|
+
* Anchor rel
|
|
70
|
+
*/
|
|
71
|
+
rel: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: "noopener noreferrer"
|
|
74
|
+
}
|
|
85
75
|
};
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const iconName = `@${provider.value}:${props.prefix}:${name}`;
|
|
124
|
-
if (iconExists(iconName)) {
|
|
125
|
-
return iconName;
|
|
126
|
-
}
|
|
127
|
-
const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
|
|
128
|
-
(iconsCollection2) => {
|
|
129
|
-
const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
|
|
130
|
-
return iconExists(icon2);
|
|
131
|
-
}
|
|
132
|
-
);
|
|
133
|
-
if (iconsCollection) {
|
|
134
|
-
return `@${provider.value}:${iconsCollection.prefix}:${name}`;
|
|
135
|
-
}
|
|
136
|
-
return name;
|
|
137
|
-
});
|
|
138
|
-
function getSvgContent(svg) {
|
|
139
|
-
let dom;
|
|
140
|
-
if (typeof window === "undefined") {
|
|
141
|
-
const { JSDOM } = require("jsdom");
|
|
142
|
-
dom = new JSDOM().window;
|
|
143
|
-
}
|
|
144
|
-
const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
|
|
145
|
-
const svgDomString = domParser.parseFromString(svg, "text/html");
|
|
146
|
-
const svgEl = svgDomString.querySelector("svg");
|
|
147
|
-
return svgEl;
|
|
148
|
-
}
|
|
149
|
-
function addIconFromSvg(svg) {
|
|
150
|
-
const svgContentEl = getSvgContent(svg);
|
|
151
|
-
const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
|
|
152
|
-
if (svgContentEl && svgContent) {
|
|
153
|
-
addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
|
|
154
|
-
body: svgContent,
|
|
155
|
-
// Set height and width from svg content
|
|
156
|
-
height: svgContentEl.viewBox.baseVal.height,
|
|
157
|
-
width: svgContentEl.viewBox.baseVal.width
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
if (volver) {
|
|
162
|
-
if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
|
|
163
|
-
show.value = false;
|
|
164
|
-
volver.fetchIcon(props.src).then((svg) => {
|
|
165
|
-
if (svg) {
|
|
166
|
-
addIconFromSvg(svg);
|
|
167
|
-
show.value = true;
|
|
168
|
-
}
|
|
169
|
-
}).catch((e) => {
|
|
170
|
-
throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
if (props.svg) {
|
|
175
|
-
addIconFromSvg(props.svg);
|
|
176
|
-
}
|
|
177
|
-
return (_ctx, _cache) => {
|
|
178
|
-
return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
|
|
179
|
-
key: 0,
|
|
180
|
-
class: unref(bemCssClasses)
|
|
181
|
-
}, {
|
|
182
|
-
inline: _ctx.inline,
|
|
183
|
-
width: _ctx.width,
|
|
184
|
-
height: _ctx.height,
|
|
185
|
-
horizontalFlip: _ctx.horizontalFlip,
|
|
186
|
-
verticalFlip: _ctx.verticalFlip,
|
|
187
|
-
flip: _ctx.flip,
|
|
188
|
-
rotate: unref(hasRotate),
|
|
189
|
-
color: _ctx.color,
|
|
190
|
-
onLoad: _ctx.onLoad,
|
|
191
|
-
icon: unref(icon)
|
|
192
|
-
}), null, 16, ["class"])) : createCommentVNode("v-if", true);
|
|
193
|
-
};
|
|
76
|
+
const ValidProps = {
|
|
77
|
+
/**
|
|
78
|
+
* Valid status
|
|
79
|
+
*/
|
|
80
|
+
valid: { type: Boolean, default: false },
|
|
81
|
+
/**
|
|
82
|
+
* Valid label
|
|
83
|
+
*/
|
|
84
|
+
validLabel: { type: [String, Array], default: void 0 }
|
|
85
|
+
};
|
|
86
|
+
const InvalidProps = {
|
|
87
|
+
/**
|
|
88
|
+
* Invalid status
|
|
89
|
+
*/
|
|
90
|
+
invalid: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: false
|
|
93
|
+
},
|
|
94
|
+
/**
|
|
95
|
+
* Invalid label
|
|
96
|
+
*/
|
|
97
|
+
invalidLabel: { type: [String, Array], default: void 0 }
|
|
98
|
+
};
|
|
99
|
+
const LoadingProps = {
|
|
100
|
+
/**
|
|
101
|
+
* Loading status
|
|
102
|
+
*/
|
|
103
|
+
loading: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: false
|
|
106
|
+
},
|
|
107
|
+
/**
|
|
108
|
+
* Loading label
|
|
109
|
+
*/
|
|
110
|
+
loadingLabel: {
|
|
111
|
+
type: String,
|
|
112
|
+
default: "Loading..."
|
|
194
113
|
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
return items;
|
|
204
|
-
}
|
|
205
|
-
function HintSlotFactory(propsOrRef, slots) {
|
|
206
|
-
const props = computed(() => {
|
|
207
|
-
if (isRef(propsOrRef)) {
|
|
208
|
-
return propsOrRef.value;
|
|
209
|
-
}
|
|
210
|
-
return propsOrRef;
|
|
211
|
-
});
|
|
212
|
-
const invalidLabel = computed(() => joinLines(props.value.invalidLabel));
|
|
213
|
-
const validLabel = computed(() => joinLines(props.value.validLabel));
|
|
214
|
-
const loadingLabel = computed(() => props.value.loadingLabel);
|
|
215
|
-
const hintLabel = computed(() => props.value.hintLabel);
|
|
216
|
-
const hasLoadingLabelOrSlot = computed(
|
|
217
|
-
() => Boolean(props.value.loading && (slots.loading || loadingLabel.value))
|
|
218
|
-
);
|
|
219
|
-
const hasInvalidLabelOrSlot = computed(
|
|
220
|
-
() => !hasLoadingLabelOrSlot.value && Boolean(
|
|
221
|
-
props.value.invalid && (slots.invalid || invalidLabel.value)
|
|
222
|
-
)
|
|
223
|
-
);
|
|
224
|
-
const hasValidLabelOrSlot = computed(
|
|
225
|
-
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.value.valid && (slots.valid || validLabel.value))
|
|
226
|
-
);
|
|
227
|
-
const hasHintLabelOrSlot = computed(
|
|
228
|
-
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
|
|
229
|
-
);
|
|
230
|
-
const isVisible = computed(
|
|
231
|
-
() => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
|
|
232
|
-
);
|
|
233
|
-
const hintSlotScope = computed(() => ({
|
|
234
|
-
modelValue: props.value.modelValue,
|
|
235
|
-
valid: props.value.valid,
|
|
236
|
-
invalid: props.value.invalid,
|
|
237
|
-
loading: props.value.loading
|
|
238
|
-
}));
|
|
239
|
-
const HintSlot = defineComponent({
|
|
240
|
-
name: "HintSlot",
|
|
241
|
-
props: {
|
|
242
|
-
tag: {
|
|
243
|
-
type: String,
|
|
244
|
-
default: "small"
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
setup() {
|
|
248
|
-
return {
|
|
249
|
-
isVisible,
|
|
250
|
-
invalidLabel,
|
|
251
|
-
validLabel,
|
|
252
|
-
loadingLabel,
|
|
253
|
-
hintLabel,
|
|
254
|
-
hasInvalidLabelOrSlot,
|
|
255
|
-
hasValidLabelOrSlot,
|
|
256
|
-
hasLoadingLabelOrSlot,
|
|
257
|
-
hasHintLabelOrSlot
|
|
258
|
-
};
|
|
259
|
-
},
|
|
260
|
-
render() {
|
|
261
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
262
|
-
if (this.isVisible) {
|
|
263
|
-
let role;
|
|
264
|
-
if (this.hasInvalidLabelOrSlot) {
|
|
265
|
-
role = "alert";
|
|
266
|
-
}
|
|
267
|
-
if (this.hasValidLabelOrSlot) {
|
|
268
|
-
role = "status";
|
|
269
|
-
}
|
|
270
|
-
if (this.hasLoadingLabelOrSlot) {
|
|
271
|
-
return h(
|
|
272
|
-
this.tag,
|
|
273
|
-
{
|
|
274
|
-
role
|
|
275
|
-
},
|
|
276
|
-
((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
|
|
277
|
-
);
|
|
278
|
-
}
|
|
279
|
-
if (this.hasInvalidLabelOrSlot) {
|
|
280
|
-
return h(
|
|
281
|
-
this.tag,
|
|
282
|
-
{
|
|
283
|
-
role
|
|
284
|
-
},
|
|
285
|
-
((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
|
|
286
|
-
);
|
|
287
|
-
}
|
|
288
|
-
if (this.hasValidLabelOrSlot) {
|
|
289
|
-
return h(
|
|
290
|
-
this.tag,
|
|
291
|
-
{
|
|
292
|
-
role
|
|
293
|
-
},
|
|
294
|
-
((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
|
|
295
|
-
);
|
|
296
|
-
}
|
|
297
|
-
return h(
|
|
298
|
-
this.tag,
|
|
299
|
-
{
|
|
300
|
-
role
|
|
301
|
-
},
|
|
302
|
-
((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
|
|
303
|
-
);
|
|
304
|
-
}
|
|
305
|
-
return null;
|
|
306
|
-
}
|
|
307
|
-
});
|
|
308
|
-
return {
|
|
309
|
-
hasInvalidLabelOrSlot,
|
|
310
|
-
hasHintLabelOrSlot,
|
|
311
|
-
hasValidLabelOrSlot,
|
|
312
|
-
hasLoadingLabelOrSlot,
|
|
313
|
-
hintSlotScope,
|
|
314
|
-
HintSlot
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
const LinkProps = {
|
|
318
|
-
/**
|
|
319
|
-
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
320
|
-
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
321
|
-
*/
|
|
322
|
-
to: {
|
|
323
|
-
type: [String, Object]
|
|
324
|
-
},
|
|
325
|
-
/**
|
|
326
|
-
* Anchor href
|
|
327
|
-
*/
|
|
328
|
-
href: String,
|
|
329
|
-
/**
|
|
330
|
-
* Anchor target
|
|
331
|
-
*/
|
|
332
|
-
target: String,
|
|
333
|
-
/**
|
|
334
|
-
* Anchor rel
|
|
335
|
-
*/
|
|
336
|
-
rel: {
|
|
337
|
-
type: String,
|
|
338
|
-
default: "noopener noreferrer"
|
|
339
|
-
}
|
|
340
|
-
};
|
|
341
|
-
const ValidProps = {
|
|
342
|
-
/**
|
|
343
|
-
* Valid status
|
|
344
|
-
*/
|
|
345
|
-
valid: { type: Boolean, default: false },
|
|
346
|
-
/**
|
|
347
|
-
* Valid label
|
|
348
|
-
*/
|
|
349
|
-
validLabel: { type: [String, Array], default: void 0 }
|
|
350
|
-
};
|
|
351
|
-
const InvalidProps = {
|
|
352
|
-
/**
|
|
353
|
-
* Invalid status
|
|
354
|
-
*/
|
|
355
|
-
invalid: {
|
|
356
|
-
type: Boolean,
|
|
357
|
-
default: false
|
|
358
|
-
},
|
|
359
|
-
/**
|
|
360
|
-
* Invalid label
|
|
361
|
-
*/
|
|
362
|
-
invalidLabel: { type: [String, Array], default: void 0 }
|
|
363
|
-
};
|
|
364
|
-
const LoadingProps = {
|
|
365
|
-
/**
|
|
366
|
-
* Loading status
|
|
367
|
-
*/
|
|
368
|
-
loading: {
|
|
369
|
-
type: Boolean,
|
|
370
|
-
default: false
|
|
371
|
-
},
|
|
372
|
-
/**
|
|
373
|
-
* Loading label
|
|
374
|
-
*/
|
|
375
|
-
loadingLabel: {
|
|
376
|
-
type: String,
|
|
377
|
-
default: "Loading..."
|
|
378
|
-
}
|
|
379
|
-
};
|
|
380
|
-
const DisabledProps = {
|
|
381
|
-
/**
|
|
382
|
-
* Whether the form control is disabled
|
|
383
|
-
*/
|
|
384
|
-
disabled: {
|
|
385
|
-
type: Boolean,
|
|
386
|
-
default: false
|
|
114
|
+
};
|
|
115
|
+
const DisabledProps = {
|
|
116
|
+
/**
|
|
117
|
+
* Whether the form control is disabled
|
|
118
|
+
*/
|
|
119
|
+
disabled: {
|
|
120
|
+
type: Boolean,
|
|
121
|
+
default: false
|
|
387
122
|
}
|
|
388
123
|
};
|
|
389
124
|
const ActiveProps = {
|
|
@@ -734,6 +469,270 @@ function useVvSelectProps() {
|
|
|
734
469
|
}
|
|
735
470
|
};
|
|
736
471
|
}
|
|
472
|
+
function isString(value) {
|
|
473
|
+
return typeof value === "string" || value instanceof String;
|
|
474
|
+
}
|
|
475
|
+
function joinLines(items) {
|
|
476
|
+
if (Array.isArray(items)) {
|
|
477
|
+
return items.filter((item) => isString(item)).join(" ");
|
|
478
|
+
}
|
|
479
|
+
return items;
|
|
480
|
+
}
|
|
481
|
+
function HintSlotFactory(propsOrRef, slots) {
|
|
482
|
+
const props = computed(() => {
|
|
483
|
+
if (isRef(propsOrRef)) {
|
|
484
|
+
return propsOrRef.value;
|
|
485
|
+
}
|
|
486
|
+
return propsOrRef;
|
|
487
|
+
});
|
|
488
|
+
const invalidLabel = computed(() => joinLines(props.value.invalidLabel));
|
|
489
|
+
const validLabel = computed(() => joinLines(props.value.validLabel));
|
|
490
|
+
const loadingLabel = computed(() => props.value.loadingLabel);
|
|
491
|
+
const hintLabel = computed(() => props.value.hintLabel);
|
|
492
|
+
const hasLoadingLabelOrSlot = computed(
|
|
493
|
+
() => Boolean(props.value.loading && (slots.loading || loadingLabel.value))
|
|
494
|
+
);
|
|
495
|
+
const hasInvalidLabelOrSlot = computed(
|
|
496
|
+
() => !hasLoadingLabelOrSlot.value && Boolean(
|
|
497
|
+
props.value.invalid && (slots.invalid || invalidLabel.value)
|
|
498
|
+
)
|
|
499
|
+
);
|
|
500
|
+
const hasValidLabelOrSlot = computed(
|
|
501
|
+
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.value.valid && (slots.valid || validLabel.value))
|
|
502
|
+
);
|
|
503
|
+
const hasHintLabelOrSlot = computed(
|
|
504
|
+
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
|
|
505
|
+
);
|
|
506
|
+
const isVisible = computed(
|
|
507
|
+
() => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
|
|
508
|
+
);
|
|
509
|
+
const hintSlotScope = computed(() => ({
|
|
510
|
+
modelValue: props.value.modelValue,
|
|
511
|
+
valid: props.value.valid,
|
|
512
|
+
invalid: props.value.invalid,
|
|
513
|
+
loading: props.value.loading
|
|
514
|
+
}));
|
|
515
|
+
const HintSlot = defineComponent({
|
|
516
|
+
name: "HintSlot",
|
|
517
|
+
props: {
|
|
518
|
+
tag: {
|
|
519
|
+
type: String,
|
|
520
|
+
default: "small"
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
setup() {
|
|
524
|
+
return {
|
|
525
|
+
isVisible,
|
|
526
|
+
invalidLabel,
|
|
527
|
+
validLabel,
|
|
528
|
+
loadingLabel,
|
|
529
|
+
hintLabel,
|
|
530
|
+
hasInvalidLabelOrSlot,
|
|
531
|
+
hasValidLabelOrSlot,
|
|
532
|
+
hasLoadingLabelOrSlot,
|
|
533
|
+
hasHintLabelOrSlot
|
|
534
|
+
};
|
|
535
|
+
},
|
|
536
|
+
render() {
|
|
537
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
538
|
+
if (this.isVisible) {
|
|
539
|
+
let role;
|
|
540
|
+
if (this.hasInvalidLabelOrSlot) {
|
|
541
|
+
role = "alert";
|
|
542
|
+
}
|
|
543
|
+
if (this.hasValidLabelOrSlot) {
|
|
544
|
+
role = "status";
|
|
545
|
+
}
|
|
546
|
+
if (this.hasLoadingLabelOrSlot) {
|
|
547
|
+
return h(
|
|
548
|
+
this.tag,
|
|
549
|
+
{
|
|
550
|
+
role
|
|
551
|
+
},
|
|
552
|
+
((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
|
|
553
|
+
);
|
|
554
|
+
}
|
|
555
|
+
if (this.hasInvalidLabelOrSlot) {
|
|
556
|
+
return h(
|
|
557
|
+
this.tag,
|
|
558
|
+
{
|
|
559
|
+
role
|
|
560
|
+
},
|
|
561
|
+
((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
|
|
562
|
+
);
|
|
563
|
+
}
|
|
564
|
+
if (this.hasValidLabelOrSlot) {
|
|
565
|
+
return h(
|
|
566
|
+
this.tag,
|
|
567
|
+
{
|
|
568
|
+
role
|
|
569
|
+
},
|
|
570
|
+
((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
|
|
571
|
+
);
|
|
572
|
+
}
|
|
573
|
+
return h(
|
|
574
|
+
this.tag,
|
|
575
|
+
{
|
|
576
|
+
role
|
|
577
|
+
},
|
|
578
|
+
((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
|
|
579
|
+
);
|
|
580
|
+
}
|
|
581
|
+
return null;
|
|
582
|
+
}
|
|
583
|
+
});
|
|
584
|
+
return {
|
|
585
|
+
hasInvalidLabelOrSlot,
|
|
586
|
+
hasHintLabelOrSlot,
|
|
587
|
+
hasValidLabelOrSlot,
|
|
588
|
+
hasLoadingLabelOrSlot,
|
|
589
|
+
hintSlotScope,
|
|
590
|
+
HintSlot
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
const VvIconPropsDefaults = {
|
|
594
|
+
prefix: "normal"
|
|
595
|
+
/* normal */
|
|
596
|
+
};
|
|
597
|
+
function useVolver() {
|
|
598
|
+
return inject(INJECTION_KEY_VOLVER);
|
|
599
|
+
}
|
|
600
|
+
function useModifiers(prefix, modifiers, others) {
|
|
601
|
+
return computed(() => {
|
|
602
|
+
const toReturn = {
|
|
603
|
+
[prefix]: true
|
|
604
|
+
};
|
|
605
|
+
const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
|
|
606
|
+
if (modifiersArray) {
|
|
607
|
+
if (Array.isArray(modifiersArray)) {
|
|
608
|
+
modifiersArray.forEach((modifier) => {
|
|
609
|
+
if (modifier) {
|
|
610
|
+
toReturn[`${prefix}--${modifier}`] = true;
|
|
611
|
+
}
|
|
612
|
+
});
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
if (others) {
|
|
616
|
+
Object.keys(others.value).forEach((key) => {
|
|
617
|
+
toReturn[`${prefix}--${key}`] = unref(others.value[key]);
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
return toReturn;
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
const __default__$1 = {
|
|
624
|
+
name: "VvIcon"
|
|
625
|
+
};
|
|
626
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
627
|
+
...__default__$1,
|
|
628
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
629
|
+
name: {},
|
|
630
|
+
color: {},
|
|
631
|
+
width: {},
|
|
632
|
+
height: {},
|
|
633
|
+
provider: {},
|
|
634
|
+
prefix: {},
|
|
635
|
+
src: {},
|
|
636
|
+
horizontalFlip: { type: Boolean },
|
|
637
|
+
verticalFlip: { type: Boolean },
|
|
638
|
+
flip: {},
|
|
639
|
+
mode: {},
|
|
640
|
+
inline: { type: Boolean },
|
|
641
|
+
rotate: {},
|
|
642
|
+
onLoad: { type: Function },
|
|
643
|
+
svg: {},
|
|
644
|
+
modifiers: {}
|
|
645
|
+
}, VvIconPropsDefaults),
|
|
646
|
+
setup(__props) {
|
|
647
|
+
const props = __props;
|
|
648
|
+
const hasRotate = computed(() => {
|
|
649
|
+
if (typeof props.rotate === "string") {
|
|
650
|
+
return Number.parseFloat(props.rotate);
|
|
651
|
+
}
|
|
652
|
+
return props.rotate;
|
|
653
|
+
});
|
|
654
|
+
const show = ref(true);
|
|
655
|
+
const volver = useVolver();
|
|
656
|
+
const { modifiers } = toRefs(props);
|
|
657
|
+
const bemCssClasses = useModifiers("vv-icon", modifiers);
|
|
658
|
+
const provider = computed(() => {
|
|
659
|
+
return props.provider || (volver == null ? void 0 : volver.iconsProvider);
|
|
660
|
+
});
|
|
661
|
+
const icon = computed(() => {
|
|
662
|
+
const name = props.name ?? "";
|
|
663
|
+
const iconName = `@${provider.value}:${props.prefix}:${name}`;
|
|
664
|
+
if (iconExists(iconName)) {
|
|
665
|
+
return iconName;
|
|
666
|
+
}
|
|
667
|
+
const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
|
|
668
|
+
(iconsCollection2) => {
|
|
669
|
+
const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
|
|
670
|
+
return iconExists(icon2);
|
|
671
|
+
}
|
|
672
|
+
);
|
|
673
|
+
if (iconsCollection) {
|
|
674
|
+
return `@${provider.value}:${iconsCollection.prefix}:${name}`;
|
|
675
|
+
}
|
|
676
|
+
return name;
|
|
677
|
+
});
|
|
678
|
+
function getSvgContent(svg) {
|
|
679
|
+
let dom;
|
|
680
|
+
if (typeof window === "undefined") {
|
|
681
|
+
const { JSDOM } = require("jsdom");
|
|
682
|
+
dom = new JSDOM().window;
|
|
683
|
+
}
|
|
684
|
+
const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
|
|
685
|
+
const svgDomString = domParser.parseFromString(svg, "text/html");
|
|
686
|
+
const svgEl = svgDomString.querySelector("svg");
|
|
687
|
+
return svgEl;
|
|
688
|
+
}
|
|
689
|
+
function addIconFromSvg(svg) {
|
|
690
|
+
const svgContentEl = getSvgContent(svg);
|
|
691
|
+
const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
|
|
692
|
+
if (svgContentEl && svgContent) {
|
|
693
|
+
addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
|
|
694
|
+
body: svgContent,
|
|
695
|
+
// Set height and width from svg content
|
|
696
|
+
height: svgContentEl.viewBox.baseVal.height,
|
|
697
|
+
width: svgContentEl.viewBox.baseVal.width
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
if (volver) {
|
|
702
|
+
if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
|
|
703
|
+
show.value = false;
|
|
704
|
+
volver.fetchIcon(props.src).then((svg) => {
|
|
705
|
+
if (svg) {
|
|
706
|
+
addIconFromSvg(svg);
|
|
707
|
+
show.value = true;
|
|
708
|
+
}
|
|
709
|
+
}).catch((e) => {
|
|
710
|
+
throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
if (props.svg) {
|
|
715
|
+
addIconFromSvg(props.svg);
|
|
716
|
+
}
|
|
717
|
+
return (_ctx, _cache) => {
|
|
718
|
+
return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
|
|
719
|
+
key: 0,
|
|
720
|
+
class: unref(bemCssClasses)
|
|
721
|
+
}, {
|
|
722
|
+
inline: _ctx.inline,
|
|
723
|
+
width: _ctx.width,
|
|
724
|
+
height: _ctx.height,
|
|
725
|
+
horizontalFlip: _ctx.horizontalFlip,
|
|
726
|
+
verticalFlip: _ctx.verticalFlip,
|
|
727
|
+
flip: _ctx.flip,
|
|
728
|
+
rotate: unref(hasRotate),
|
|
729
|
+
color: _ctx.color,
|
|
730
|
+
onLoad: _ctx.onLoad,
|
|
731
|
+
icon: unref(icon)
|
|
732
|
+
}), null, 16, ["class"])) : createCommentVNode("v-if", true);
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
});
|
|
737
736
|
function useDefaults(componentName, propsDefinition, props) {
|
|
738
737
|
const volver = useVolver();
|
|
739
738
|
const volverComponentDefaults = computed(() => {
|
|
@@ -797,7 +796,7 @@ function useComponentFocus(inputTemplateRef, emit) {
|
|
|
797
796
|
};
|
|
798
797
|
}
|
|
799
798
|
function useUniqueId(id) {
|
|
800
|
-
return computed(() => String((id == null ? void 0 : id.value) ||
|
|
799
|
+
return computed(() => String((id == null ? void 0 : id.value) || useId()));
|
|
801
800
|
}
|
|
802
801
|
function useComponentIcon(icon, iconPosition) {
|
|
803
802
|
const hasIcon = computed(() => {
|
|
@@ -915,7 +914,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
915
914
|
VvSelectProps2,
|
|
916
915
|
props
|
|
917
916
|
);
|
|
918
|
-
const selectEl =
|
|
917
|
+
const selectEl = useTemplateRef("selectEl");
|
|
919
918
|
const {
|
|
920
919
|
HintSlot,
|
|
921
920
|
hasHintLabelOrSlot,
|
|
@@ -956,8 +955,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
956
955
|
set: (newValue) => {
|
|
957
956
|
if (Array.isArray(newValue)) {
|
|
958
957
|
newValue = newValue.filter((item) => item !== void 0);
|
|
959
|
-
if (newValue.length === 0 && !props.unselectable) {
|
|
960
|
-
selectEl.value.value = props.modelValue;
|
|
958
|
+
if (newValue.length === 0 && !props.unselectable && selectEl.value) {
|
|
959
|
+
selectEl.value.value = String(props.modelValue);
|
|
961
960
|
return;
|
|
962
961
|
}
|
|
963
962
|
}
|