@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,11 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
3
|
-
import { uid } from "uid";
|
|
1
|
+
import { provide, computed, unref, inject, useId, watch, ref, defineComponent, mergeDefaults, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, createElementBlock, normalizeProps, guardReactiveProps, renderSlot, createTextVNode, toDisplayString, withModifiers, createElementVNode, createVNode, TransitionGroup, toHandlers, withCtx, Fragment, renderList } from "vue";
|
|
4
2
|
import mitt from "mitt";
|
|
5
|
-
|
|
6
|
-
prefix: "normal"
|
|
7
|
-
/* normal */
|
|
8
|
-
};
|
|
3
|
+
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
9
4
|
var StorageType = /* @__PURE__ */ ((StorageType2) => {
|
|
10
5
|
StorageType2["local"] = "local";
|
|
11
6
|
StorageType2["session"] = "session";
|
|
@@ -61,145 +56,6 @@ const INJECTION_KEY_VOLVER = Symbol.for("volver");
|
|
|
61
56
|
const INJECTION_KEY_ALERT_GROUP = Symbol.for(
|
|
62
57
|
"alertGroup"
|
|
63
58
|
);
|
|
64
|
-
function useVolver() {
|
|
65
|
-
return inject(INJECTION_KEY_VOLVER);
|
|
66
|
-
}
|
|
67
|
-
function useModifiers(prefix, modifiers, others) {
|
|
68
|
-
return computed(() => {
|
|
69
|
-
const toReturn = {
|
|
70
|
-
[prefix]: true
|
|
71
|
-
};
|
|
72
|
-
const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
|
|
73
|
-
if (modifiersArray) {
|
|
74
|
-
if (Array.isArray(modifiersArray)) {
|
|
75
|
-
modifiersArray.forEach((modifier) => {
|
|
76
|
-
if (modifier) {
|
|
77
|
-
toReturn[`${prefix}--${modifier}`] = true;
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
if (others) {
|
|
83
|
-
Object.keys(others.value).forEach((key) => {
|
|
84
|
-
toReturn[`${prefix}--${key}`] = unref(others.value[key]);
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
return toReturn;
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
const __default__$2 = {
|
|
91
|
-
name: "VvIcon"
|
|
92
|
-
};
|
|
93
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
94
|
-
...__default__$2,
|
|
95
|
-
props: /* @__PURE__ */ mergeDefaults({
|
|
96
|
-
name: {},
|
|
97
|
-
color: {},
|
|
98
|
-
width: {},
|
|
99
|
-
height: {},
|
|
100
|
-
provider: {},
|
|
101
|
-
prefix: {},
|
|
102
|
-
src: {},
|
|
103
|
-
horizontalFlip: { type: Boolean },
|
|
104
|
-
verticalFlip: { type: Boolean },
|
|
105
|
-
flip: {},
|
|
106
|
-
mode: {},
|
|
107
|
-
inline: { type: Boolean },
|
|
108
|
-
rotate: {},
|
|
109
|
-
onLoad: { type: Function },
|
|
110
|
-
svg: {},
|
|
111
|
-
modifiers: {}
|
|
112
|
-
}, VvIconPropsDefaults),
|
|
113
|
-
setup(__props) {
|
|
114
|
-
const props = __props;
|
|
115
|
-
const hasRotate = computed(() => {
|
|
116
|
-
if (typeof props.rotate === "string") {
|
|
117
|
-
return Number.parseFloat(props.rotate);
|
|
118
|
-
}
|
|
119
|
-
return props.rotate;
|
|
120
|
-
});
|
|
121
|
-
const show = ref(true);
|
|
122
|
-
const volver = useVolver();
|
|
123
|
-
const { modifiers } = toRefs(props);
|
|
124
|
-
const bemCssClasses = useModifiers("vv-icon", modifiers);
|
|
125
|
-
const provider = computed(() => {
|
|
126
|
-
return props.provider || (volver == null ? void 0 : volver.iconsProvider);
|
|
127
|
-
});
|
|
128
|
-
const icon = computed(() => {
|
|
129
|
-
const name = props.name ?? "";
|
|
130
|
-
const iconName = `@${provider.value}:${props.prefix}:${name}`;
|
|
131
|
-
if (iconExists(iconName)) {
|
|
132
|
-
return iconName;
|
|
133
|
-
}
|
|
134
|
-
const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
|
|
135
|
-
(iconsCollection2) => {
|
|
136
|
-
const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
|
|
137
|
-
return iconExists(icon2);
|
|
138
|
-
}
|
|
139
|
-
);
|
|
140
|
-
if (iconsCollection) {
|
|
141
|
-
return `@${provider.value}:${iconsCollection.prefix}:${name}`;
|
|
142
|
-
}
|
|
143
|
-
return name;
|
|
144
|
-
});
|
|
145
|
-
function getSvgContent(svg) {
|
|
146
|
-
let dom;
|
|
147
|
-
if (typeof window === "undefined") {
|
|
148
|
-
const { JSDOM } = require("jsdom");
|
|
149
|
-
dom = new JSDOM().window;
|
|
150
|
-
}
|
|
151
|
-
const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
|
|
152
|
-
const svgDomString = domParser.parseFromString(svg, "text/html");
|
|
153
|
-
const svgEl = svgDomString.querySelector("svg");
|
|
154
|
-
return svgEl;
|
|
155
|
-
}
|
|
156
|
-
function addIconFromSvg(svg) {
|
|
157
|
-
const svgContentEl = getSvgContent(svg);
|
|
158
|
-
const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
|
|
159
|
-
if (svgContentEl && svgContent) {
|
|
160
|
-
addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
|
|
161
|
-
body: svgContent,
|
|
162
|
-
// Set height and width from svg content
|
|
163
|
-
height: svgContentEl.viewBox.baseVal.height,
|
|
164
|
-
width: svgContentEl.viewBox.baseVal.width
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
if (volver) {
|
|
169
|
-
if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
|
|
170
|
-
show.value = false;
|
|
171
|
-
volver.fetchIcon(props.src).then((svg) => {
|
|
172
|
-
if (svg) {
|
|
173
|
-
addIconFromSvg(svg);
|
|
174
|
-
show.value = true;
|
|
175
|
-
}
|
|
176
|
-
}).catch((e) => {
|
|
177
|
-
throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
if (props.svg) {
|
|
182
|
-
addIconFromSvg(props.svg);
|
|
183
|
-
}
|
|
184
|
-
return (_ctx, _cache) => {
|
|
185
|
-
return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
|
|
186
|
-
key: 0,
|
|
187
|
-
class: unref(bemCssClasses)
|
|
188
|
-
}, {
|
|
189
|
-
inline: _ctx.inline,
|
|
190
|
-
width: _ctx.width,
|
|
191
|
-
height: _ctx.height,
|
|
192
|
-
horizontalFlip: _ctx.horizontalFlip,
|
|
193
|
-
verticalFlip: _ctx.verticalFlip,
|
|
194
|
-
flip: _ctx.flip,
|
|
195
|
-
rotate: unref(hasRotate),
|
|
196
|
-
color: _ctx.color,
|
|
197
|
-
onLoad: _ctx.onLoad,
|
|
198
|
-
icon: unref(icon)
|
|
199
|
-
}), null, 16, ["class"])) : createCommentVNode("v-if", true);
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
59
|
const LinkProps = {
|
|
204
60
|
/**
|
|
205
61
|
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
@@ -435,11 +291,146 @@ const IdProps = {
|
|
|
435
291
|
},
|
|
436
292
|
storageKey: String
|
|
437
293
|
});
|
|
294
|
+
function useAlertProvideGroup({
|
|
295
|
+
name
|
|
296
|
+
}) {
|
|
297
|
+
const bus = mitt();
|
|
298
|
+
provide(INJECTION_KEY_ALERT_GROUP, {
|
|
299
|
+
name,
|
|
300
|
+
bus
|
|
301
|
+
});
|
|
302
|
+
return bus;
|
|
303
|
+
}
|
|
304
|
+
function useModifiers(prefix, modifiers, others) {
|
|
305
|
+
return computed(() => {
|
|
306
|
+
const toReturn = {
|
|
307
|
+
[prefix]: true
|
|
308
|
+
};
|
|
309
|
+
const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
|
|
310
|
+
if (modifiersArray) {
|
|
311
|
+
if (Array.isArray(modifiersArray)) {
|
|
312
|
+
modifiersArray.forEach((modifier) => {
|
|
313
|
+
if (modifier) {
|
|
314
|
+
toReturn[`${prefix}--${modifier}`] = true;
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
if (others) {
|
|
320
|
+
Object.keys(others.value).forEach((key) => {
|
|
321
|
+
toReturn[`${prefix}--${key}`] = unref(others.value[key]);
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
return toReturn;
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
const VvAlertGroupProps = {
|
|
328
|
+
...ModifiersProps,
|
|
329
|
+
name: {
|
|
330
|
+
type: String,
|
|
331
|
+
required: true
|
|
332
|
+
},
|
|
333
|
+
items: {
|
|
334
|
+
type: Array,
|
|
335
|
+
default: () => []
|
|
336
|
+
},
|
|
337
|
+
stack: {
|
|
338
|
+
type: Boolean,
|
|
339
|
+
default: false
|
|
340
|
+
},
|
|
341
|
+
reverse: {
|
|
342
|
+
type: Boolean,
|
|
343
|
+
default: false
|
|
344
|
+
},
|
|
345
|
+
inline: {
|
|
346
|
+
type: String,
|
|
347
|
+
default: void 0
|
|
348
|
+
},
|
|
349
|
+
block: {
|
|
350
|
+
type: String,
|
|
351
|
+
default: void 0
|
|
352
|
+
},
|
|
353
|
+
position: {
|
|
354
|
+
type: String,
|
|
355
|
+
default: void 0
|
|
356
|
+
},
|
|
357
|
+
transition: {
|
|
358
|
+
type: String,
|
|
359
|
+
default: void 0
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
const VvAlertGroupEvents = [
|
|
363
|
+
"close",
|
|
364
|
+
"beforeEnter",
|
|
365
|
+
"afterLeave",
|
|
366
|
+
"enter",
|
|
367
|
+
"afterEnter",
|
|
368
|
+
"enterCancelled",
|
|
369
|
+
"beforeLeave",
|
|
370
|
+
"leave",
|
|
371
|
+
"leaveCancelled"
|
|
372
|
+
];
|
|
373
|
+
function useVvAlertGroup(props, emit) {
|
|
374
|
+
const bus = useAlertProvideGroup({ name: computed(() => props.name) });
|
|
375
|
+
if (props.block && !props.inline || !props.block && props.inline) {
|
|
376
|
+
console.warn(
|
|
377
|
+
`[VvAlertGroup]: block and inline props must coexist at the same time.`
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
const hasClass = computed(() => {
|
|
381
|
+
const toReturn = [
|
|
382
|
+
useModifiers(
|
|
383
|
+
"vv-alert-group",
|
|
384
|
+
computed(() => props.modifiers),
|
|
385
|
+
computed(() => ({
|
|
386
|
+
stack: props.stack,
|
|
387
|
+
reverse: props.reverse,
|
|
388
|
+
absolute: props.position === "absolute",
|
|
389
|
+
fixed: props.position === "fixed"
|
|
390
|
+
}))
|
|
391
|
+
).value
|
|
392
|
+
];
|
|
393
|
+
if (props.inline && props.block) {
|
|
394
|
+
toReturn.push(`vv-alert-group--${props.block}-${props.inline}`);
|
|
395
|
+
}
|
|
396
|
+
return toReturn;
|
|
397
|
+
});
|
|
398
|
+
const hasTransition = computed(() => {
|
|
399
|
+
if (props.transition) {
|
|
400
|
+
return props.transition;
|
|
401
|
+
}
|
|
402
|
+
if (!props.position) {
|
|
403
|
+
return "vv-alert--fade";
|
|
404
|
+
}
|
|
405
|
+
if (props.inline === "start") {
|
|
406
|
+
return "vv-alert--fade-inline-start";
|
|
407
|
+
}
|
|
408
|
+
if (props.inline === "end") {
|
|
409
|
+
return "vv-alert--fade-inline-end";
|
|
410
|
+
}
|
|
411
|
+
if (props.block === "top") {
|
|
412
|
+
return "vv-alert--fade-block-top";
|
|
413
|
+
}
|
|
414
|
+
if (props.block === "bottom") {
|
|
415
|
+
return "vv-alert--fade-block-bottom";
|
|
416
|
+
}
|
|
417
|
+
return "vv-alert--fade";
|
|
418
|
+
});
|
|
419
|
+
bus.on("close", (id) => {
|
|
420
|
+
emit("close", id);
|
|
421
|
+
});
|
|
422
|
+
return {
|
|
423
|
+
hasTransition,
|
|
424
|
+
hasProps: computed(() => ({
|
|
425
|
+
class: hasClass.value
|
|
426
|
+
}))
|
|
427
|
+
};
|
|
428
|
+
}
|
|
438
429
|
function useInjectedAlertGroup() {
|
|
439
430
|
return inject(INJECTION_KEY_ALERT_GROUP, {});
|
|
440
431
|
}
|
|
441
432
|
function useUniqueId(id) {
|
|
442
|
-
return computed(() => String((id == null ? void 0 : id.value) ||
|
|
433
|
+
return computed(() => String((id == null ? void 0 : id.value) || useId()));
|
|
443
434
|
}
|
|
444
435
|
function useComponentIcon(icon, iconPosition) {
|
|
445
436
|
const hasIcon = computed(() => {
|
|
@@ -621,27 +612,137 @@ function useVvAlert(props, emit) {
|
|
|
621
612
|
}))
|
|
622
613
|
};
|
|
623
614
|
}
|
|
615
|
+
const VvIconPropsDefaults = {
|
|
616
|
+
prefix: "normal"
|
|
617
|
+
/* normal */
|
|
618
|
+
};
|
|
619
|
+
function useVolver() {
|
|
620
|
+
return inject(INJECTION_KEY_VOLVER);
|
|
621
|
+
}
|
|
622
|
+
const __default__$2 = {
|
|
623
|
+
name: "VvIcon"
|
|
624
|
+
};
|
|
625
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
626
|
+
...__default__$2,
|
|
627
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
628
|
+
name: {},
|
|
629
|
+
color: {},
|
|
630
|
+
width: {},
|
|
631
|
+
height: {},
|
|
632
|
+
provider: {},
|
|
633
|
+
prefix: {},
|
|
634
|
+
src: {},
|
|
635
|
+
horizontalFlip: { type: Boolean },
|
|
636
|
+
verticalFlip: { type: Boolean },
|
|
637
|
+
flip: {},
|
|
638
|
+
mode: {},
|
|
639
|
+
inline: { type: Boolean },
|
|
640
|
+
rotate: {},
|
|
641
|
+
onLoad: { type: Function },
|
|
642
|
+
svg: {},
|
|
643
|
+
modifiers: {}
|
|
644
|
+
}, VvIconPropsDefaults),
|
|
645
|
+
setup(__props) {
|
|
646
|
+
const props = __props;
|
|
647
|
+
const hasRotate = computed(() => {
|
|
648
|
+
if (typeof props.rotate === "string") {
|
|
649
|
+
return Number.parseFloat(props.rotate);
|
|
650
|
+
}
|
|
651
|
+
return props.rotate;
|
|
652
|
+
});
|
|
653
|
+
const show = ref(true);
|
|
654
|
+
const volver = useVolver();
|
|
655
|
+
const { modifiers } = toRefs(props);
|
|
656
|
+
const bemCssClasses = useModifiers("vv-icon", modifiers);
|
|
657
|
+
const provider = computed(() => {
|
|
658
|
+
return props.provider || (volver == null ? void 0 : volver.iconsProvider);
|
|
659
|
+
});
|
|
660
|
+
const icon = computed(() => {
|
|
661
|
+
const name = props.name ?? "";
|
|
662
|
+
const iconName = `@${provider.value}:${props.prefix}:${name}`;
|
|
663
|
+
if (iconExists(iconName)) {
|
|
664
|
+
return iconName;
|
|
665
|
+
}
|
|
666
|
+
const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
|
|
667
|
+
(iconsCollection2) => {
|
|
668
|
+
const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
|
|
669
|
+
return iconExists(icon2);
|
|
670
|
+
}
|
|
671
|
+
);
|
|
672
|
+
if (iconsCollection) {
|
|
673
|
+
return `@${provider.value}:${iconsCollection.prefix}:${name}`;
|
|
674
|
+
}
|
|
675
|
+
return name;
|
|
676
|
+
});
|
|
677
|
+
function getSvgContent(svg) {
|
|
678
|
+
let dom;
|
|
679
|
+
if (typeof window === "undefined") {
|
|
680
|
+
const { JSDOM } = require("jsdom");
|
|
681
|
+
dom = new JSDOM().window;
|
|
682
|
+
}
|
|
683
|
+
const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
|
|
684
|
+
const svgDomString = domParser.parseFromString(svg, "text/html");
|
|
685
|
+
const svgEl = svgDomString.querySelector("svg");
|
|
686
|
+
return svgEl;
|
|
687
|
+
}
|
|
688
|
+
function addIconFromSvg(svg) {
|
|
689
|
+
const svgContentEl = getSvgContent(svg);
|
|
690
|
+
const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
|
|
691
|
+
if (svgContentEl && svgContent) {
|
|
692
|
+
addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
|
|
693
|
+
body: svgContent,
|
|
694
|
+
// Set height and width from svg content
|
|
695
|
+
height: svgContentEl.viewBox.baseVal.height,
|
|
696
|
+
width: svgContentEl.viewBox.baseVal.width
|
|
697
|
+
});
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
if (volver) {
|
|
701
|
+
if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
|
|
702
|
+
show.value = false;
|
|
703
|
+
volver.fetchIcon(props.src).then((svg) => {
|
|
704
|
+
if (svg) {
|
|
705
|
+
addIconFromSvg(svg);
|
|
706
|
+
show.value = true;
|
|
707
|
+
}
|
|
708
|
+
}).catch((e) => {
|
|
709
|
+
throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
if (props.svg) {
|
|
714
|
+
addIconFromSvg(props.svg);
|
|
715
|
+
}
|
|
716
|
+
return (_ctx, _cache) => {
|
|
717
|
+
return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
|
|
718
|
+
key: 0,
|
|
719
|
+
class: unref(bemCssClasses)
|
|
720
|
+
}, {
|
|
721
|
+
inline: _ctx.inline,
|
|
722
|
+
width: _ctx.width,
|
|
723
|
+
height: _ctx.height,
|
|
724
|
+
horizontalFlip: _ctx.horizontalFlip,
|
|
725
|
+
verticalFlip: _ctx.verticalFlip,
|
|
726
|
+
flip: _ctx.flip,
|
|
727
|
+
rotate: unref(hasRotate),
|
|
728
|
+
color: _ctx.color,
|
|
729
|
+
onLoad: _ctx.onLoad,
|
|
730
|
+
icon: unref(icon)
|
|
731
|
+
}), null, 16, ["class"])) : createCommentVNode("v-if", true);
|
|
732
|
+
};
|
|
733
|
+
}
|
|
734
|
+
});
|
|
624
735
|
const _hoisted_1 = {
|
|
625
736
|
key: 0,
|
|
626
737
|
class: "vv-alert__header"
|
|
627
738
|
};
|
|
628
739
|
const _hoisted_2 = ["id"];
|
|
629
740
|
const _hoisted_3 = ["aria-label"];
|
|
630
|
-
const _hoisted_4 =
|
|
631
|
-
"div",
|
|
632
|
-
{ class: "vv-alert__close-mask" },
|
|
633
|
-
null,
|
|
634
|
-
-1
|
|
635
|
-
/* HOISTED */
|
|
636
|
-
);
|
|
637
|
-
const _hoisted_5 = [
|
|
638
|
-
_hoisted_4
|
|
639
|
-
];
|
|
640
|
-
const _hoisted_6 = {
|
|
741
|
+
const _hoisted_4 = {
|
|
641
742
|
key: 1,
|
|
642
743
|
class: "vv-alert__content"
|
|
643
744
|
};
|
|
644
|
-
const
|
|
745
|
+
const _hoisted_5 = {
|
|
645
746
|
key: 2,
|
|
646
747
|
class: "vv-alert__footer"
|
|
647
748
|
};
|
|
@@ -698,10 +799,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
698
799
|
(...args) => unref(close) && unref(close)(...args),
|
|
699
800
|
["stop"]
|
|
700
801
|
))
|
|
701
|
-
},
|
|
802
|
+
}, _cache[1] || (_cache[1] = [
|
|
803
|
+
createElementVNode(
|
|
804
|
+
"div",
|
|
805
|
+
{ class: "vv-alert__close-mask" },
|
|
806
|
+
null,
|
|
807
|
+
-1
|
|
808
|
+
/* HOISTED */
|
|
809
|
+
)
|
|
810
|
+
]), 8, _hoisted_3)) : createCommentVNode("v-if", true)
|
|
702
811
|
])
|
|
703
812
|
])) : createCommentVNode("v-if", true),
|
|
704
|
-
_ctx.$slots.default || _ctx.content ? (openBlock(), createElementBlock("div",
|
|
813
|
+
_ctx.$slots.default || _ctx.content ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
705
814
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
706
815
|
createTextVNode(
|
|
707
816
|
toDisplayString(_ctx.content),
|
|
@@ -710,7 +819,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
710
819
|
)
|
|
711
820
|
])
|
|
712
821
|
])) : createCommentVNode("v-if", true),
|
|
713
|
-
_ctx.$slots.footer || _ctx.footer ? (openBlock(), createElementBlock("div",
|
|
822
|
+
_ctx.$slots.footer || _ctx.footer ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
714
823
|
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
715
824
|
createTextVNode(
|
|
716
825
|
toDisplayString(_ctx.footer),
|
|
@@ -726,118 +835,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
726
835
|
};
|
|
727
836
|
}
|
|
728
837
|
});
|
|
729
|
-
function useProvideAlertGroup({
|
|
730
|
-
name
|
|
731
|
-
}) {
|
|
732
|
-
const bus = mitt();
|
|
733
|
-
provide(INJECTION_KEY_ALERT_GROUP, {
|
|
734
|
-
name,
|
|
735
|
-
bus
|
|
736
|
-
});
|
|
737
|
-
return bus;
|
|
738
|
-
}
|
|
739
|
-
const VvAlertGroupProps = {
|
|
740
|
-
...ModifiersProps,
|
|
741
|
-
name: {
|
|
742
|
-
type: String,
|
|
743
|
-
required: true
|
|
744
|
-
},
|
|
745
|
-
items: {
|
|
746
|
-
type: Array,
|
|
747
|
-
default: () => []
|
|
748
|
-
},
|
|
749
|
-
stack: {
|
|
750
|
-
type: Boolean,
|
|
751
|
-
default: false
|
|
752
|
-
},
|
|
753
|
-
reverse: {
|
|
754
|
-
type: Boolean,
|
|
755
|
-
default: false
|
|
756
|
-
},
|
|
757
|
-
inline: {
|
|
758
|
-
type: String,
|
|
759
|
-
default: void 0
|
|
760
|
-
},
|
|
761
|
-
block: {
|
|
762
|
-
type: String,
|
|
763
|
-
default: void 0
|
|
764
|
-
},
|
|
765
|
-
position: {
|
|
766
|
-
type: String,
|
|
767
|
-
default: void 0
|
|
768
|
-
},
|
|
769
|
-
transition: {
|
|
770
|
-
type: String,
|
|
771
|
-
default: void 0
|
|
772
|
-
}
|
|
773
|
-
};
|
|
774
|
-
const VvAlertGroupEvents = [
|
|
775
|
-
"close",
|
|
776
|
-
"beforeEnter",
|
|
777
|
-
"afterLeave",
|
|
778
|
-
"enter",
|
|
779
|
-
"afterEnter",
|
|
780
|
-
"enterCancelled",
|
|
781
|
-
"beforeLeave",
|
|
782
|
-
"leave",
|
|
783
|
-
"leaveCancelled"
|
|
784
|
-
];
|
|
785
|
-
function useVvAlertGroup(props, emit) {
|
|
786
|
-
const bus = useProvideAlertGroup({ name: computed(() => props.name) });
|
|
787
|
-
if (props.block && !props.inline || !props.block && props.inline) {
|
|
788
|
-
console.warn(
|
|
789
|
-
`[VvAlertGroup]: block and inline props must coexist at the same time.`
|
|
790
|
-
);
|
|
791
|
-
}
|
|
792
|
-
const hasClass = computed(() => {
|
|
793
|
-
const toReturn = [
|
|
794
|
-
useModifiers(
|
|
795
|
-
"vv-alert-group",
|
|
796
|
-
computed(() => props.modifiers),
|
|
797
|
-
computed(() => ({
|
|
798
|
-
stack: props.stack,
|
|
799
|
-
reverse: props.reverse,
|
|
800
|
-
absolute: props.position === "absolute",
|
|
801
|
-
fixed: props.position === "fixed"
|
|
802
|
-
}))
|
|
803
|
-
).value
|
|
804
|
-
];
|
|
805
|
-
if (props.inline && props.block) {
|
|
806
|
-
toReturn.push(`vv-alert-group--${props.block}-${props.inline}`);
|
|
807
|
-
}
|
|
808
|
-
return toReturn;
|
|
809
|
-
});
|
|
810
|
-
const hasTransition = computed(() => {
|
|
811
|
-
if (props.transition) {
|
|
812
|
-
return props.transition;
|
|
813
|
-
}
|
|
814
|
-
if (!props.position) {
|
|
815
|
-
return "vv-alert--fade";
|
|
816
|
-
}
|
|
817
|
-
if (props.inline === "start") {
|
|
818
|
-
return "vv-alert--fade-inline-start";
|
|
819
|
-
}
|
|
820
|
-
if (props.inline === "end") {
|
|
821
|
-
return "vv-alert--fade-inline-end";
|
|
822
|
-
}
|
|
823
|
-
if (props.block === "top") {
|
|
824
|
-
return "vv-alert--fade-block-top";
|
|
825
|
-
}
|
|
826
|
-
if (props.block === "bottom") {
|
|
827
|
-
return "vv-alert--fade-block-bottom";
|
|
828
|
-
}
|
|
829
|
-
return "vv-alert--fade";
|
|
830
|
-
});
|
|
831
|
-
bus.on("close", (id) => {
|
|
832
|
-
emit("close", id);
|
|
833
|
-
});
|
|
834
|
-
return {
|
|
835
|
-
hasTransition,
|
|
836
|
-
hasProps: computed(() => ({
|
|
837
|
-
class: hasClass.value
|
|
838
|
-
}))
|
|
839
|
-
};
|
|
840
|
-
}
|
|
841
838
|
const __default__ = {
|
|
842
839
|
name: "VvAlertGroup"
|
|
843
840
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("mitt"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","mitt","@iconify/vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAlertGroup=t(e.vue,e.mitt,e.vue$1)}(this,(function(e,t,o){"use strict";var l=(e=>(e.local="local",e.session="session",e))(l||{}),n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),r=(e=>(e.before="before",e.after="after",e))(r||{}),a=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(a||{}),i=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(i||{}),s=(e=>(e.alert="alert",e.alertdialog="alertdialog",e))(s||{});const u=Symbol.for("volver"),c=Symbol.for("alertGroup"),d=(Boolean,Boolean,Boolean,Boolean,{modifiers:{type:[String,Array],default:void 0}}),v={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:r.before,validation:e=>Object.values(r).includes(e)}},f={id:[String,Number]};function p(t,o,l){return e.computed((()=>{const n={[t]:!0},r="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return r&&Array.isArray(r)&&r.forEach((e=>{e&&(n[`${t}--${e}`]=!0)})),l&&Object.keys(l.value).forEach((o=>{n[`${t}--${o}`]=e.unref(l.value[o])})),n}))}n.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,a.button,i.button,l.local;const m={...d,name:{type:String,required:!0},items:{type:Array,default:()=>[]},stack:{type:Boolean,default:!1},reverse:{type:Boolean,default:!1},inline:{type:String,default:void 0},block:{type:String,default:void 0},position:{type:String,default:void 0},transition:{type:String,default:void 0}};function b(o,l){const n=function({name:o}){const l=t();return e.provide(c,{name:o,bus:l}),l}({name:e.computed((()=>o.name))});(o.block&&!o.inline||!o.block&&o.inline)&&console.warn("[VvAlertGroup]: block and inline props must coexist at the same time.");const r=e.computed((()=>{const t=[p("vv-alert-group",e.computed((()=>o.modifiers)),e.computed((()=>({stack:o.stack,reverse:o.reverse,absolute:"absolute"===o.position,fixed:"fixed"===o.position})))).value];return o.inline&&o.block&&t.push(`vv-alert-group--${o.block}-${o.inline}`),t})),a=e.computed((()=>o.transition?o.transition:o.position?"start"===o.inline?"vv-alert--fade-inline-start":"end"===o.inline?"vv-alert--fade-inline-end":"top"===o.block?"vv-alert--fade-block-top":"bottom"===o.block?"vv-alert--fade-block-bottom":"vv-alert--fade":"vv-alert--fade"));return n.on("close",(e=>{l("close",e)})),{hasTransition:a,hasProps:e.computed((()=>({class:r.value})))}}const h={...f,...v,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:s.alert}};function g(t,o){const{bus:l}=e.inject(c,{}),a=(i=e.computed((()=>t.id)),e.computed((()=>String((null==i?void 0:i.value)||e.useId()))));var i;const s=e.computed((()=>`${a.value}-title`));let u;const d=()=>{u&&clearTimeout(u),o("close",a.value),null==l||l.emit("close",a.value)};e.watch((()=>t.autoClose),(e=>{e>0?u=setTimeout(d,e):u&&clearTimeout(u)}),{immediate:!0});const v=e.ref(!1),f=()=>{v.value=!0,u&&clearTimeout(u)},m=()=>{v.value=!1,t.autoClose>0&&(u=setTimeout(d,t.autoClose))},{hasIcon:b}=function(t,o){const l=e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),a=e.computed((()=>(null==o?void 0:o.value)===r.before?l.value:void 0)),i=e.computed((()=>(null==o?void 0:o.value)===r.after?l.value:void 0)),s=e.computed((()=>(null==o?void 0:o.value)===n.left?l.value:void 0)),u=e.computed((()=>(null==o?void 0:o.value)===n.right?l.value:void 0)),c=e.computed((()=>(null==o?void 0:o.value)===n.top?l.value:void 0)),d=e.computed((()=>(null==o?void 0:o.value)===n.bottom?l.value:void 0));return{hasIcon:l,hasIconLeft:s,hasIconRight:u,hasIconTop:c,hasIconBottom:d,hasIconBefore:a,hasIconAfter:i}}(e.computed((()=>t.icon))),h=p("vv-alert",e.computed((()=>t.modifiers)),e.computed((()=>({dismissable:t.autoClose>0||t.dismissable,"auto-close":t.autoClose>0,hover:v.value})))),g=e.computed((()=>({"--alert-duration":`${t.autoClose}ms`})));return{close:d,hasIcon:b,hasTitleId:s,hasProps:e.computed((()=>({onMouseover:f,onMouseleave:m,class:h.value,style:g.value,role:t.role,"aria-labelledby":s.value})))}}const y={prefix:"normal"};const k=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:{}},y),setup(t){const l=t,n=e.computed((()=>"string"==typeof l.rotate?Number.parseFloat(l.rotate):l.rotate)),r=e.ref(!0),a=e.inject(u),{modifiers:i}=e.toRefs(l),s=p("vv-icon",i),c=e.computed((()=>l.provider||(null==a?void 0:a.iconsProvider))),d=e.computed((()=>{const e=l.name??"",t=`@${c.value}:${l.prefix}:${e}`;if(o.iconExists(t))return t;const n=null==a?void 0:a.iconsCollections.find((t=>{const l=`@${c.value}:${t.prefix}:${e}`;return o.iconExists(l)}));return n?`@${c.value}:${n.prefix}:${e}`:e}));function v(e){const t=function(e){let t;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.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 a&&l.src&&!o.iconExists(`@${c.value}:${l.prefix}:${l.name}`)&&(r.value=!1,a.fetchIcon(l.src).then((e=>{e&&(v(e),r.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),l.svg&&v(l.svg),(t,l)=>e.unref(r)?(e.openBlock(),e.createBlock(e.unref(o.Icon),e.mergeProps({key:0,class:e.unref(s)},{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"},$=["id"],S=["aria-label"],C={key:1,class:"vv-alert__content"},x={key:2,class:"vv-alert__footer"},w=e.defineComponent({name:"VvAlert",props:h,emits:["close"],setup(t,{expose:o,emit:l}){const n=t,r=l,{hasProps:a,hasTitleId:i,hasIcon:s,close:u}=g(n,r);return o({close:u}),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.guardReactiveProps(e.unref(a))),[t.$slots.header||t.$slots.title||t.$slots.close||t.$slots["title::before"]||t.$slots["title::after"]||t.title||t.dismissable||t.autoClose?(e.openBlock(),e.createElementBlock("div",B,[e.unref(s)?(e.openBlock(),e.createBlock(k,e.mergeProps({key:0},e.unref(s),{class:"vv-alert__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"header",{},(()=>[e.renderSlot(t.$slots,"title::before"),t.$slots.title||t.title?(e.openBlock(),e.createElementBlock("strong",{key:0,id:e.unref(i),class:"vv-alert__title"},[e.renderSlot(t.$slots,"title",{},(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]))],8,$)):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"title::after")])),e.renderSlot(t.$slots,"close",e.normalizeProps(e.guardReactiveProps({close:e.unref(u)})),(()=>[t.dismissable||t.autoClose?(e.openBlock(),e.createElementBlock("button",{key:0,class:"vv-alert__close",type:"button","aria-label":t.closeLabel,onClick:o[0]||(o[0]=e.withModifiers(((...t)=>e.unref(u)&&e.unref(u)(...t)),["stop"]))},o[1]||(o[1]=[e.createElementVNode("div",{class:"vv-alert__close-mask"},null,-1)]),8,S)):e.createCommentVNode("v-if",!0)]))])):e.createCommentVNode("v-if",!0),t.$slots.default||t.content?(e.openBlock(),e.createElementBlock("div",C,[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.content),1)]))])):e.createCommentVNode("v-if",!0),t.$slots.footer||t.footer?(e.openBlock(),e.createElementBlock("div",x,[e.renderSlot(t.$slots,"footer",{},(()=>[e.createTextVNode(e.toDisplayString(t.footer),1)]))])):e.createCommentVNode("v-if",!0)],16))}});return e.defineComponent({name:"VvAlertGroup",props:m,emits:["close","beforeEnter","afterLeave","enter","afterEnter","enterCancelled","beforeLeave","leave","leaveCancelled"],setup(t,{emit:o}){const l=t,n=o,{hasProps:r,hasTransition:a}=b(l,n),i={"before-enter":()=>{n("beforeEnter")},"after-leave":()=>{n("afterLeave")},enter:()=>{n("enter")},"after-enter":()=>{n("afterEnter")},"enter-cancelled":()=>{n("enterCancelled")},"before-leave":()=>{n("beforeLeave")},leave:()=>{n("leave")},"leave-cancelled":()=>{n("leaveCancelled")}};return(t,o)=>(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.guardReactiveProps(e.unref(r))),[e.renderSlot(t.$slots,"before"),e.createVNode(e.TransitionGroup,e.mergeProps({tag:"div",role:"group",name:e.unref(a),class:"vv-alert-group__list"},e.toHandlers(i)),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(t=>(e.openBlock(),e.createBlock(w,e.mergeProps({ref_for:!0},t,{key:t.id}),null,16)))),128))]))])),_:3},16,["name"]),e.renderSlot(t.$slots,"after")],16))}})}));
|