@volverjs/ui-vue 0.0.10-beta.46 → 0.0.10-beta.48
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 +661 -656
- 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 +2761 -2758
- 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 +41 -41
- 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 +17 -11
- 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,5 @@
|
|
|
1
|
-
import { inject, computed, unref, defineComponent, mergeDefaults,
|
|
1
|
+
import { inject, computed, useId, unref, watch, ref, defineComponent, mergeDefaults, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, createElementBlock, normalizeProps, guardReactiveProps, renderSlot, createTextVNode, toDisplayString, withModifiers, createElementVNode } from "vue";
|
|
2
2
|
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
3
|
-
import { uid } from "uid";
|
|
4
|
-
const VvIconPropsDefaults = {
|
|
5
|
-
prefix: "normal"
|
|
6
|
-
/* normal */
|
|
7
|
-
};
|
|
8
3
|
var StorageType = /* @__PURE__ */ ((StorageType2) => {
|
|
9
4
|
StorageType2["local"] = "local";
|
|
10
5
|
StorageType2["session"] = "session";
|
|
@@ -60,145 +55,6 @@ const INJECTION_KEY_VOLVER = Symbol.for("volver");
|
|
|
60
55
|
const INJECTION_KEY_ALERT_GROUP = Symbol.for(
|
|
61
56
|
"alertGroup"
|
|
62
57
|
);
|
|
63
|
-
function useVolver() {
|
|
64
|
-
return inject(INJECTION_KEY_VOLVER);
|
|
65
|
-
}
|
|
66
|
-
function useModifiers(prefix, modifiers, others) {
|
|
67
|
-
return computed(() => {
|
|
68
|
-
const toReturn = {
|
|
69
|
-
[prefix]: true
|
|
70
|
-
};
|
|
71
|
-
const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
|
|
72
|
-
if (modifiersArray) {
|
|
73
|
-
if (Array.isArray(modifiersArray)) {
|
|
74
|
-
modifiersArray.forEach((modifier) => {
|
|
75
|
-
if (modifier) {
|
|
76
|
-
toReturn[`${prefix}--${modifier}`] = true;
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
if (others) {
|
|
82
|
-
Object.keys(others.value).forEach((key) => {
|
|
83
|
-
toReturn[`${prefix}--${key}`] = unref(others.value[key]);
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
return toReturn;
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
const __default__$1 = {
|
|
90
|
-
name: "VvIcon"
|
|
91
|
-
};
|
|
92
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
93
|
-
...__default__$1,
|
|
94
|
-
props: /* @__PURE__ */ mergeDefaults({
|
|
95
|
-
name: {},
|
|
96
|
-
color: {},
|
|
97
|
-
width: {},
|
|
98
|
-
height: {},
|
|
99
|
-
provider: {},
|
|
100
|
-
prefix: {},
|
|
101
|
-
src: {},
|
|
102
|
-
horizontalFlip: { type: Boolean },
|
|
103
|
-
verticalFlip: { type: Boolean },
|
|
104
|
-
flip: {},
|
|
105
|
-
mode: {},
|
|
106
|
-
inline: { type: Boolean },
|
|
107
|
-
rotate: {},
|
|
108
|
-
onLoad: { type: Function },
|
|
109
|
-
svg: {},
|
|
110
|
-
modifiers: {}
|
|
111
|
-
}, VvIconPropsDefaults),
|
|
112
|
-
setup(__props) {
|
|
113
|
-
const props = __props;
|
|
114
|
-
const hasRotate = computed(() => {
|
|
115
|
-
if (typeof props.rotate === "string") {
|
|
116
|
-
return Number.parseFloat(props.rotate);
|
|
117
|
-
}
|
|
118
|
-
return props.rotate;
|
|
119
|
-
});
|
|
120
|
-
const show = ref(true);
|
|
121
|
-
const volver = useVolver();
|
|
122
|
-
const { modifiers } = toRefs(props);
|
|
123
|
-
const bemCssClasses = useModifiers("vv-icon", modifiers);
|
|
124
|
-
const provider = computed(() => {
|
|
125
|
-
return props.provider || (volver == null ? void 0 : volver.iconsProvider);
|
|
126
|
-
});
|
|
127
|
-
const icon = computed(() => {
|
|
128
|
-
const name = props.name ?? "";
|
|
129
|
-
const iconName = `@${provider.value}:${props.prefix}:${name}`;
|
|
130
|
-
if (iconExists(iconName)) {
|
|
131
|
-
return iconName;
|
|
132
|
-
}
|
|
133
|
-
const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
|
|
134
|
-
(iconsCollection2) => {
|
|
135
|
-
const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
|
|
136
|
-
return iconExists(icon2);
|
|
137
|
-
}
|
|
138
|
-
);
|
|
139
|
-
if (iconsCollection) {
|
|
140
|
-
return `@${provider.value}:${iconsCollection.prefix}:${name}`;
|
|
141
|
-
}
|
|
142
|
-
return name;
|
|
143
|
-
});
|
|
144
|
-
function getSvgContent(svg) {
|
|
145
|
-
let dom;
|
|
146
|
-
if (typeof window === "undefined") {
|
|
147
|
-
const { JSDOM } = require("jsdom");
|
|
148
|
-
dom = new JSDOM().window;
|
|
149
|
-
}
|
|
150
|
-
const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
|
|
151
|
-
const svgDomString = domParser.parseFromString(svg, "text/html");
|
|
152
|
-
const svgEl = svgDomString.querySelector("svg");
|
|
153
|
-
return svgEl;
|
|
154
|
-
}
|
|
155
|
-
function addIconFromSvg(svg) {
|
|
156
|
-
const svgContentEl = getSvgContent(svg);
|
|
157
|
-
const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
|
|
158
|
-
if (svgContentEl && svgContent) {
|
|
159
|
-
addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
|
|
160
|
-
body: svgContent,
|
|
161
|
-
// Set height and width from svg content
|
|
162
|
-
height: svgContentEl.viewBox.baseVal.height,
|
|
163
|
-
width: svgContentEl.viewBox.baseVal.width
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
if (volver) {
|
|
168
|
-
if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
|
|
169
|
-
show.value = false;
|
|
170
|
-
volver.fetchIcon(props.src).then((svg) => {
|
|
171
|
-
if (svg) {
|
|
172
|
-
addIconFromSvg(svg);
|
|
173
|
-
show.value = true;
|
|
174
|
-
}
|
|
175
|
-
}).catch((e) => {
|
|
176
|
-
throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
if (props.svg) {
|
|
181
|
-
addIconFromSvg(props.svg);
|
|
182
|
-
}
|
|
183
|
-
return (_ctx, _cache) => {
|
|
184
|
-
return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
|
|
185
|
-
key: 0,
|
|
186
|
-
class: unref(bemCssClasses)
|
|
187
|
-
}, {
|
|
188
|
-
inline: _ctx.inline,
|
|
189
|
-
width: _ctx.width,
|
|
190
|
-
height: _ctx.height,
|
|
191
|
-
horizontalFlip: _ctx.horizontalFlip,
|
|
192
|
-
verticalFlip: _ctx.verticalFlip,
|
|
193
|
-
flip: _ctx.flip,
|
|
194
|
-
rotate: unref(hasRotate),
|
|
195
|
-
color: _ctx.color,
|
|
196
|
-
onLoad: _ctx.onLoad,
|
|
197
|
-
icon: unref(icon)
|
|
198
|
-
}), null, 16, ["class"])) : createCommentVNode("v-if", true);
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
58
|
const LinkProps = {
|
|
203
59
|
/**
|
|
204
60
|
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
@@ -429,7 +285,7 @@ function useInjectedAlertGroup() {
|
|
|
429
285
|
return inject(INJECTION_KEY_ALERT_GROUP, {});
|
|
430
286
|
}
|
|
431
287
|
function useUniqueId(id) {
|
|
432
|
-
return computed(() => String((id == null ? void 0 : id.value) ||
|
|
288
|
+
return computed(() => String((id == null ? void 0 : id.value) || useId()));
|
|
433
289
|
}
|
|
434
290
|
function useComponentIcon(icon, iconPosition) {
|
|
435
291
|
const hasIcon = computed(() => {
|
|
@@ -466,6 +322,29 @@ function useComponentIcon(icon, iconPosition) {
|
|
|
466
322
|
hasIconAfter
|
|
467
323
|
};
|
|
468
324
|
}
|
|
325
|
+
function useModifiers(prefix, modifiers, others) {
|
|
326
|
+
return computed(() => {
|
|
327
|
+
const toReturn = {
|
|
328
|
+
[prefix]: true
|
|
329
|
+
};
|
|
330
|
+
const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
|
|
331
|
+
if (modifiersArray) {
|
|
332
|
+
if (Array.isArray(modifiersArray)) {
|
|
333
|
+
modifiersArray.forEach((modifier) => {
|
|
334
|
+
if (modifier) {
|
|
335
|
+
toReturn[`${prefix}--${modifier}`] = true;
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
if (others) {
|
|
341
|
+
Object.keys(others.value).forEach((key) => {
|
|
342
|
+
toReturn[`${prefix}--${key}`] = unref(others.value[key]);
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
return toReturn;
|
|
346
|
+
});
|
|
347
|
+
}
|
|
469
348
|
const VvAlertProps = {
|
|
470
349
|
...IdProps,
|
|
471
350
|
...IconProps,
|
|
@@ -611,27 +490,137 @@ function useVvAlert(props, emit) {
|
|
|
611
490
|
}))
|
|
612
491
|
};
|
|
613
492
|
}
|
|
493
|
+
const VvIconPropsDefaults = {
|
|
494
|
+
prefix: "normal"
|
|
495
|
+
/* normal */
|
|
496
|
+
};
|
|
497
|
+
function useVolver() {
|
|
498
|
+
return inject(INJECTION_KEY_VOLVER);
|
|
499
|
+
}
|
|
500
|
+
const __default__$1 = {
|
|
501
|
+
name: "VvIcon"
|
|
502
|
+
};
|
|
503
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
504
|
+
...__default__$1,
|
|
505
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
506
|
+
name: {},
|
|
507
|
+
color: {},
|
|
508
|
+
width: {},
|
|
509
|
+
height: {},
|
|
510
|
+
provider: {},
|
|
511
|
+
prefix: {},
|
|
512
|
+
src: {},
|
|
513
|
+
horizontalFlip: { type: Boolean },
|
|
514
|
+
verticalFlip: { type: Boolean },
|
|
515
|
+
flip: {},
|
|
516
|
+
mode: {},
|
|
517
|
+
inline: { type: Boolean },
|
|
518
|
+
rotate: {},
|
|
519
|
+
onLoad: { type: Function },
|
|
520
|
+
svg: {},
|
|
521
|
+
modifiers: {}
|
|
522
|
+
}, VvIconPropsDefaults),
|
|
523
|
+
setup(__props) {
|
|
524
|
+
const props = __props;
|
|
525
|
+
const hasRotate = computed(() => {
|
|
526
|
+
if (typeof props.rotate === "string") {
|
|
527
|
+
return Number.parseFloat(props.rotate);
|
|
528
|
+
}
|
|
529
|
+
return props.rotate;
|
|
530
|
+
});
|
|
531
|
+
const show = ref(true);
|
|
532
|
+
const volver = useVolver();
|
|
533
|
+
const { modifiers } = toRefs(props);
|
|
534
|
+
const bemCssClasses = useModifiers("vv-icon", modifiers);
|
|
535
|
+
const provider = computed(() => {
|
|
536
|
+
return props.provider || (volver == null ? void 0 : volver.iconsProvider);
|
|
537
|
+
});
|
|
538
|
+
const icon = computed(() => {
|
|
539
|
+
const name = props.name ?? "";
|
|
540
|
+
const iconName = `@${provider.value}:${props.prefix}:${name}`;
|
|
541
|
+
if (iconExists(iconName)) {
|
|
542
|
+
return iconName;
|
|
543
|
+
}
|
|
544
|
+
const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
|
|
545
|
+
(iconsCollection2) => {
|
|
546
|
+
const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
|
|
547
|
+
return iconExists(icon2);
|
|
548
|
+
}
|
|
549
|
+
);
|
|
550
|
+
if (iconsCollection) {
|
|
551
|
+
return `@${provider.value}:${iconsCollection.prefix}:${name}`;
|
|
552
|
+
}
|
|
553
|
+
return name;
|
|
554
|
+
});
|
|
555
|
+
function getSvgContent(svg) {
|
|
556
|
+
let dom;
|
|
557
|
+
if (typeof window === "undefined") {
|
|
558
|
+
const { JSDOM } = require("jsdom");
|
|
559
|
+
dom = new JSDOM().window;
|
|
560
|
+
}
|
|
561
|
+
const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
|
|
562
|
+
const svgDomString = domParser.parseFromString(svg, "text/html");
|
|
563
|
+
const svgEl = svgDomString.querySelector("svg");
|
|
564
|
+
return svgEl;
|
|
565
|
+
}
|
|
566
|
+
function addIconFromSvg(svg) {
|
|
567
|
+
const svgContentEl = getSvgContent(svg);
|
|
568
|
+
const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
|
|
569
|
+
if (svgContentEl && svgContent) {
|
|
570
|
+
addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
|
|
571
|
+
body: svgContent,
|
|
572
|
+
// Set height and width from svg content
|
|
573
|
+
height: svgContentEl.viewBox.baseVal.height,
|
|
574
|
+
width: svgContentEl.viewBox.baseVal.width
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
if (volver) {
|
|
579
|
+
if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
|
|
580
|
+
show.value = false;
|
|
581
|
+
volver.fetchIcon(props.src).then((svg) => {
|
|
582
|
+
if (svg) {
|
|
583
|
+
addIconFromSvg(svg);
|
|
584
|
+
show.value = true;
|
|
585
|
+
}
|
|
586
|
+
}).catch((e) => {
|
|
587
|
+
throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
if (props.svg) {
|
|
592
|
+
addIconFromSvg(props.svg);
|
|
593
|
+
}
|
|
594
|
+
return (_ctx, _cache) => {
|
|
595
|
+
return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
|
|
596
|
+
key: 0,
|
|
597
|
+
class: unref(bemCssClasses)
|
|
598
|
+
}, {
|
|
599
|
+
inline: _ctx.inline,
|
|
600
|
+
width: _ctx.width,
|
|
601
|
+
height: _ctx.height,
|
|
602
|
+
horizontalFlip: _ctx.horizontalFlip,
|
|
603
|
+
verticalFlip: _ctx.verticalFlip,
|
|
604
|
+
flip: _ctx.flip,
|
|
605
|
+
rotate: unref(hasRotate),
|
|
606
|
+
color: _ctx.color,
|
|
607
|
+
onLoad: _ctx.onLoad,
|
|
608
|
+
icon: unref(icon)
|
|
609
|
+
}), null, 16, ["class"])) : createCommentVNode("v-if", true);
|
|
610
|
+
};
|
|
611
|
+
}
|
|
612
|
+
});
|
|
614
613
|
const _hoisted_1 = {
|
|
615
614
|
key: 0,
|
|
616
615
|
class: "vv-alert__header"
|
|
617
616
|
};
|
|
618
617
|
const _hoisted_2 = ["id"];
|
|
619
618
|
const _hoisted_3 = ["aria-label"];
|
|
620
|
-
const _hoisted_4 =
|
|
621
|
-
"div",
|
|
622
|
-
{ class: "vv-alert__close-mask" },
|
|
623
|
-
null,
|
|
624
|
-
-1
|
|
625
|
-
/* HOISTED */
|
|
626
|
-
);
|
|
627
|
-
const _hoisted_5 = [
|
|
628
|
-
_hoisted_4
|
|
629
|
-
];
|
|
630
|
-
const _hoisted_6 = {
|
|
619
|
+
const _hoisted_4 = {
|
|
631
620
|
key: 1,
|
|
632
621
|
class: "vv-alert__content"
|
|
633
622
|
};
|
|
634
|
-
const
|
|
623
|
+
const _hoisted_5 = {
|
|
635
624
|
key: 2,
|
|
636
625
|
class: "vv-alert__footer"
|
|
637
626
|
};
|
|
@@ -688,10 +677,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
688
677
|
(...args) => unref(close) && unref(close)(...args),
|
|
689
678
|
["stop"]
|
|
690
679
|
))
|
|
691
|
-
},
|
|
680
|
+
}, _cache[1] || (_cache[1] = [
|
|
681
|
+
createElementVNode(
|
|
682
|
+
"div",
|
|
683
|
+
{ class: "vv-alert__close-mask" },
|
|
684
|
+
null,
|
|
685
|
+
-1
|
|
686
|
+
/* HOISTED */
|
|
687
|
+
)
|
|
688
|
+
]), 8, _hoisted_3)) : createCommentVNode("v-if", true)
|
|
692
689
|
])
|
|
693
690
|
])) : createCommentVNode("v-if", true),
|
|
694
|
-
_ctx.$slots.default || _ctx.content ? (openBlock(), createElementBlock("div",
|
|
691
|
+
_ctx.$slots.default || _ctx.content ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
695
692
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
696
693
|
createTextVNode(
|
|
697
694
|
toDisplayString(_ctx.content),
|
|
@@ -700,7 +697,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
700
697
|
)
|
|
701
698
|
])
|
|
702
699
|
])) : createCommentVNode("v-if", true),
|
|
703
|
-
_ctx.$slots.footer || _ctx.footer ? (openBlock(), createElementBlock("div",
|
|
700
|
+
_ctx.$slots.footer || _ctx.footer ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
704
701
|
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
705
702
|
createTextVNode(
|
|
706
703
|
toDisplayString(_ctx.footer),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("@iconify/vue")
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAlert=o(e.vue,e.vue$1)}(this,(function(e,o){"use strict";var t=(e=>(e.local="local",e.session="session",e))(t||{}),l=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(l||{}),n=(e=>(e.before="before",e.after="after",e))(n||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{}),i=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(i||{}),a=(e=>(e.alert="alert",e.alertdialog="alertdialog",e))(a||{});const s=Symbol.for("volver"),u=Symbol.for("alertGroup"),c=(Boolean,Boolean,Boolean,Boolean,{icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:n.before,validation:e=>Object.values(n).includes(e)}}),d={id:[String,Number]};function v(o,t,l){return e.computed((()=>{const n={[o]:!0},r="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return r&&Array.isArray(r)&&r.forEach((e=>{e&&(n[`${o}--${e}`]=!0)})),l&&Object.keys(l.value).forEach((t=>{n[`${o}--${t}`]=e.unref(l.value[t])})),n}))}l.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,r.button,i.button,t.local;const f={...d,...c,modifiers:{type:[String,Array],default:void 0},dismissable:{type:Boolean,default:!1},autoClose:{type:Number,default:0},closeLabel:{type:String,default:"Close"},title:{type:String,default:void 0},content:{type:String,default:void 0},footer:{type:String,default:void 0},role:{type:String,default:a.alert}};function p(o,t){const{bus:r}=e.inject(u,{}),i=(a=e.computed((()=>o.id)),e.computed((()=>String((null==a?void 0:a.value)||e.useId()))));var a;const s=e.computed((()=>`${i.value}-title`));let c;const d=()=>{c&&clearTimeout(c),t("close",i.value),null==r||r.emit("close",i.value)};e.watch((()=>o.autoClose),(e=>{e>0?c=setTimeout(d,e):c&&clearTimeout(c)}),{immediate:!0});const f=e.ref(!1),p=()=>{f.value=!0,c&&clearTimeout(c)},m=()=>{f.value=!1,o.autoClose>0&&(c=setTimeout(d,o.autoClose))},{hasIcon:h}=function(o,t){const r=e.computed((()=>"string"==typeof(null==o?void 0:o.value)?{name:null==o?void 0:o.value}:null==o?void 0:o.value)),i=e.computed((()=>(null==t?void 0:t.value)===n.before?r.value:void 0)),a=e.computed((()=>(null==t?void 0:t.value)===n.after?r.value:void 0)),s=e.computed((()=>(null==t?void 0:t.value)===l.left?r.value:void 0)),u=e.computed((()=>(null==t?void 0:t.value)===l.right?r.value:void 0)),c=e.computed((()=>(null==t?void 0:t.value)===l.top?r.value:void 0)),d=e.computed((()=>(null==t?void 0:t.value)===l.bottom?r.value:void 0));return{hasIcon:r,hasIconLeft:s,hasIconRight:u,hasIconTop:c,hasIconBottom:d,hasIconBefore:i,hasIconAfter:a}}(e.computed((()=>o.icon))),b=v("vv-alert",e.computed((()=>o.modifiers)),e.computed((()=>({dismissable:o.autoClose>0||o.dismissable,"auto-close":o.autoClose>0,hover:f.value})))),y=e.computed((()=>({"--alert-duration":`${o.autoClose}ms`})));return{close:d,hasIcon:h,hasTitleId:s,hasProps:e.computed((()=>({onMouseover:p,onMouseleave:m,class:b.value,style:y.value,role:o.role,"aria-labelledby":s.value})))}}const m={prefix:"normal"};const h=e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},m),setup(t){const l=t,n=e.computed((()=>"string"==typeof l.rotate?Number.parseFloat(l.rotate):l.rotate)),r=e.ref(!0),i=e.inject(s),{modifiers:a}=e.toRefs(l),u=v("vv-icon",a),c=e.computed((()=>l.provider||(null==i?void 0:i.iconsProvider))),d=e.computed((()=>{const e=l.name??"",t=`@${c.value}:${l.prefix}:${e}`;if(o.iconExists(t))return t;const n=null==i?void 0:i.iconsCollections.find((t=>{const l=`@${c.value}:${t.prefix}:${e}`;return o.iconExists(l)}));return n?`@${c.value}:${n.prefix}:${e}`:e}));function f(e){const t=function(e){let o;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");o=(new e).window}return(o?new o.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),n=(null==t?void 0:t.innerHTML.trim())||"";t&&n&&o.addIcon(`@${c.value}:${l.prefix}:${l.name}`,{body:n,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return i&&l.src&&!o.iconExists(`@${c.value}:${l.prefix}:${l.name}`)&&(r.value=!1,i.fetchIcon(l.src).then((e=>{e&&(f(e),r.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),l.svg&&f(l.svg),(t,l)=>e.unref(r)?(e.openBlock(),e.createBlock(e.unref(o.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(n),color:t.color,onLoad:t.onLoad,icon:e.unref(d)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}}),b={key:0,class:"vv-alert__header"},y=["id"],g=["aria-label"],$={key:1,class:"vv-alert__content"},B={key:2,class:"vv-alert__footer"};return e.defineComponent({name:"VvAlert",props:f,emits:["close"],setup(o,{expose:t,emit:l}){const n=o,r=l,{hasProps:i,hasTitleId:a,hasIcon:s,close:u}=p(n,r);return t({close:u}),(o,t)=>(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.guardReactiveProps(e.unref(i))),[o.$slots.header||o.$slots.title||o.$slots.close||o.$slots["title::before"]||o.$slots["title::after"]||o.title||o.dismissable||o.autoClose?(e.openBlock(),e.createElementBlock("div",b,[e.unref(s)?(e.openBlock(),e.createBlock(h,e.mergeProps({key:0},e.unref(s),{class:"vv-alert__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.renderSlot(o.$slots,"header",{},(()=>[e.renderSlot(o.$slots,"title::before"),o.$slots.title||o.title?(e.openBlock(),e.createElementBlock("strong",{key:0,id:e.unref(a),class:"vv-alert__title"},[e.renderSlot(o.$slots,"title",{},(()=>[e.createTextVNode(e.toDisplayString(o.title),1)]))],8,y)):e.createCommentVNode("v-if",!0),e.renderSlot(o.$slots,"title::after")])),e.renderSlot(o.$slots,"close",e.normalizeProps(e.guardReactiveProps({close:e.unref(u)})),(()=>[o.dismissable||o.autoClose?(e.openBlock(),e.createElementBlock("button",{key:0,class:"vv-alert__close",type:"button","aria-label":o.closeLabel,onClick:t[0]||(t[0]=e.withModifiers(((...o)=>e.unref(u)&&e.unref(u)(...o)),["stop"]))},t[1]||(t[1]=[e.createElementVNode("div",{class:"vv-alert__close-mask"},null,-1)]),8,g)):e.createCommentVNode("v-if",!0)]))])):e.createCommentVNode("v-if",!0),o.$slots.default||o.content?(e.openBlock(),e.createElementBlock("div",$,[e.renderSlot(o.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(o.content),1)]))])):e.createCommentVNode("v-if",!0),o.$slots.footer||o.footer?(e.openBlock(),e.createElementBlock("div",B,[e.renderSlot(o.$slots,"footer",{},(()=>[e.createTextVNode(e.toDisplayString(o.footer),1)]))])):e.createCommentVNode("v-if",!0)],16))}})}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
2
|
modifiers: {
|
|
3
|
-
type:
|
|
3
|
+
type: PropType<import("../..").AlertModifier | import("../..").AlertModifier[]>;
|
|
4
4
|
default: undefined;
|
|
5
5
|
};
|
|
6
6
|
dismissable: {
|
|
@@ -28,26 +28,24 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
28
28
|
default: undefined;
|
|
29
29
|
};
|
|
30
30
|
role: {
|
|
31
|
-
type:
|
|
32
|
-
default: import("../../constants
|
|
31
|
+
type: PropType<`${import("../../constants").AlertRole}`>;
|
|
32
|
+
default: import("../../constants").AlertRole;
|
|
33
33
|
};
|
|
34
34
|
icon: {
|
|
35
|
-
type:
|
|
35
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
36
36
|
default: undefined;
|
|
37
37
|
};
|
|
38
38
|
iconPosition: {
|
|
39
|
-
type:
|
|
40
|
-
default: import("../../constants
|
|
41
|
-
validation: (value: import("../../constants
|
|
39
|
+
type: PropType<`${import("../../constants").Position}`>;
|
|
40
|
+
default: import("../../constants").Position;
|
|
41
|
+
validation: (value: import("../../constants").Position) => boolean;
|
|
42
42
|
};
|
|
43
43
|
id: (StringConstructor | NumberConstructor)[];
|
|
44
|
-
}
|
|
44
|
+
}>, {
|
|
45
45
|
close: () => void;
|
|
46
|
-
},
|
|
47
|
-
[x: string]: (...args: any[]) => void;
|
|
48
|
-
}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
46
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
49
47
|
modifiers: {
|
|
50
|
-
type:
|
|
48
|
+
type: PropType<import("../..").AlertModifier | import("../..").AlertModifier[]>;
|
|
51
49
|
default: undefined;
|
|
52
50
|
};
|
|
53
51
|
dismissable: {
|
|
@@ -75,31 +73,31 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
75
73
|
default: undefined;
|
|
76
74
|
};
|
|
77
75
|
role: {
|
|
78
|
-
type:
|
|
79
|
-
default: import("../../constants
|
|
76
|
+
type: PropType<`${import("../../constants").AlertRole}`>;
|
|
77
|
+
default: import("../../constants").AlertRole;
|
|
80
78
|
};
|
|
81
79
|
icon: {
|
|
82
|
-
type:
|
|
80
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
83
81
|
default: undefined;
|
|
84
82
|
};
|
|
85
83
|
iconPosition: {
|
|
86
|
-
type:
|
|
87
|
-
default: import("../../constants
|
|
88
|
-
validation: (value: import("../../constants
|
|
84
|
+
type: PropType<`${import("../../constants").Position}`>;
|
|
85
|
+
default: import("../../constants").Position;
|
|
86
|
+
validation: (value: import("../../constants").Position) => boolean;
|
|
89
87
|
};
|
|
90
88
|
id: (StringConstructor | NumberConstructor)[];
|
|
91
|
-
}
|
|
89
|
+
}>> & Readonly<{}>, {
|
|
92
90
|
title: string;
|
|
93
91
|
content: string;
|
|
94
92
|
modifiers: string | string[];
|
|
95
93
|
footer: string;
|
|
96
94
|
role: "alert" | "alertdialog";
|
|
97
|
-
icon: string | import("../VvIcon/index.js").VvIconProps;
|
|
98
95
|
dismissable: boolean;
|
|
99
96
|
autoClose: number;
|
|
100
97
|
closeLabel: string;
|
|
98
|
+
icon: string | import("../VvIcon").VvIconProps;
|
|
101
99
|
iconPosition: "before" | "after";
|
|
102
|
-
}, {}>, {
|
|
100
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>, {
|
|
103
101
|
header?(_: {}): any;
|
|
104
102
|
"title::before"?(_: {}): any;
|
|
105
103
|
title?(_: {}): any;
|