@volverjs/ui-vue 0.0.13 → 0.0.15
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/dist/Volver.d.ts +121 -0
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +68 -0
- package/dist/components/VvAccordion/index.d.ts +47 -0
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +98 -0
- package/dist/components/VvAccordionGroup/index.d.ts +54 -0
- package/dist/components/VvAction/VvAction.es.js +26 -26
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +110 -0
- package/dist/components/VvAction/index.d.ts +2 -0
- package/dist/components/VvAlert/VvAlert.es.js +43 -44
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +124 -0
- package/dist/components/VvAlert/index.d.ts +104 -0
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +54 -55
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +97 -0
- package/dist/components/VvAlertGroup/index.d.ts +47 -0
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +24 -0
- package/dist/components/VvAvatar/index.d.ts +10 -0
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +50 -0
- package/dist/components/VvAvatarGroup/index.d.ts +28 -0
- package/dist/components/VvBadge/VvBadge.vue.d.ts +24 -0
- package/dist/components/VvBadge/index.d.ts +7 -0
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +34 -34
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +39 -0
- package/dist/components/VvBreadcrumb/index.d.ts +8 -0
- package/dist/components/VvButton/VvButton.es.js +186 -187
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +221 -0
- package/dist/components/VvButton/index.d.ts +131 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +84 -0
- package/dist/components/VvButtonGroup/index.d.ts +37 -0
- package/dist/components/VvCard/VvCard.vue.d.ts +30 -0
- package/dist/components/VvCard/index.d.ts +7 -0
- package/dist/components/VvCheckbox/VvCheckbox.es.js +215 -217
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +187 -0
- package/dist/components/VvCheckbox/index.d.ts +94 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +235 -237
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +212 -0
- package/dist/components/VvCheckboxGroup/index.d.ts +2 -0
- package/dist/components/VvCombobox/VvCombobox.es.js +810 -813
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +346 -0
- package/dist/components/VvCombobox/index.d.ts +694 -0
- package/dist/components/VvDialog/VvDialog.vue.d.ts +73 -0
- package/dist/components/VvDialog/index.d.ts +45 -0
- package/dist/components/VvDropdown/VvDropdown.es.js +4 -4
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +258 -0
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +118 -0
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +22 -0
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +22 -0
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +82 -0
- package/dist/components/VvDropdown/index.d.ts +120 -0
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +50 -50
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +30 -31
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +6 -0
- package/dist/components/VvIcon/index.d.ts +86 -0
- package/dist/components/VvInputFile/VvInputFile.es.js +415 -418
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +361 -0
- package/dist/components/VvInputFile/index.d.ts +204 -0
- package/dist/components/VvInputText/VvInputText.es.js +595 -588
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +524 -0
- package/dist/components/VvInputText/VvInputTextActions.d.ts +4 -0
- package/dist/components/VvInputText/index.d.ts +313 -0
- package/dist/components/VvNav/VvNav.es.js +63 -63
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +48 -0
- package/dist/components/VvNav/VvNavItem.vue.d.ts +14 -0
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +3 -0
- package/dist/components/VvNav/index.d.ts +11 -0
- package/dist/components/VvNavItem/VvNavItem.es.js +41 -41
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +38 -0
- package/dist/components/VvProgress/index.d.ts +33 -0
- package/dist/components/VvRadio/VvRadio.es.js +222 -224
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +179 -0
- package/dist/components/VvRadio/index.d.ts +80 -0
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +234 -236
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +212 -0
- package/dist/components/VvRadioGroup/index.d.ts +2 -0
- package/dist/components/VvSelect/VvSelect.es.js +200 -203
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +183 -0
- package/dist/components/VvSelect/index.d.ts +298 -0
- package/dist/components/VvTab/VvTab.es.js +35 -35
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +64 -0
- package/dist/components/VvTab/index.d.ts +19 -0
- package/dist/components/VvTextarea/VvTextarea.es.js +341 -344
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +384 -0
- package/dist/components/VvTextarea/index.d.ts +190 -0
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +37 -0
- package/dist/components/VvTooltip/index.d.ts +19 -0
- package/dist/components/VvVirtualScroll/VvVirtualScroll.vue.d.ts +51 -0
- package/dist/components/common/HintSlot.d.ts +57 -0
- package/dist/components/common/VvInputClearAction.d.ts +52 -0
- package/dist/components/common/VvInputPasswordAction.d.ts +71 -0
- package/dist/components/common/VvInputStepAction.d.ts +50 -0
- package/dist/components/index.d.ts +34 -0
- package/dist/components/index.es.js +1965 -1958
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlerInject.d.ts +4 -0
- package/dist/composables/alert/useAlert.d.ts +92 -0
- package/dist/composables/alert/useAlertProvide.d.ts +10 -0
- package/dist/composables/dropdown/useDropdownContextmenu.d.ts +18 -0
- package/dist/composables/dropdown/useDropdownInject.d.ts +12 -0
- package/dist/composables/dropdown/useDropdownProvide.d.ts +40 -0
- package/dist/composables/dropdown/useDropdownVirtualElement.d.ts +17 -0
- package/dist/composables/group/useGroupStateInject.d.ts +9 -0
- package/dist/composables/group/useGroupStateProvide.d.ts +6 -0
- package/dist/composables/index.d.ts +5 -0
- package/dist/composables/index.es.js +34 -34
- package/dist/composables/index.umd.js +2 -2
- package/dist/composables/useBlurhash.d.ts +7 -0
- package/dist/composables/useComponentFocus.d.ts +4 -0
- package/dist/composables/useComponentIcon.d.ts +11 -0
- package/dist/composables/useDebouncedInput.d.ts +5 -0
- package/dist/composables/useDefaults.d.ts +2 -0
- package/dist/composables/useModifiers.d.ts +2 -0
- package/dist/composables/useOptions.d.ts +8 -0
- package/dist/composables/usePersistence.d.ts +3 -0
- package/dist/composables/useTextCount.d.ts +10 -0
- package/dist/composables/useUniqueId.d.ts +2 -0
- package/dist/composables/useVirtualScroll.d.ts +35 -0
- package/dist/composables/useVolver.d.ts +4 -0
- package/dist/constants.d.ts +104 -0
- package/dist/directives/index.d.ts +3 -0
- package/dist/directives/index.es.js +22 -22
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-contextmenu.d.ts +3 -0
- package/dist/directives/v-contextmenu.es.js +13 -13
- package/dist/directives/v-contextmenu.umd.js +1 -1
- package/dist/directives/v-tooltip.d.ts +3 -0
- package/dist/icons.d.ts +1889 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.es.js +19 -19
- package/dist/index.umd.js +1 -1
- package/dist/json-render/catalog.d.ts +395 -0
- package/dist/json-render/components.d.ts +111 -0
- package/dist/json-render/definitions.d.ts +697 -0
- package/dist/json-render/index.d.ts +55 -0
- package/dist/json-render/index.es.js +1877 -1870
- package/dist/json-render/index.umd.js +1 -1
- package/dist/json-render/registry.d.ts +34 -0
- package/dist/props/index.d.ts +959 -0
- package/dist/resolvers/unplugin.d.ts +38 -0
- package/dist/resolvers/unplugin.es.js +28 -28
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/Accordion/Accordion.settings.d.ts +9 -0
- package/dist/stories/Accordion/Accordion.stories.d.ts +7 -0
- package/dist/stories/Accordion/Accordion.test.d.ts +2 -0
- package/dist/stories/Accordion/AccordionSlots.stories.d.ts +7 -0
- package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +13 -0
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +9 -0
- package/dist/stories/AccordionGroup/AccordionGroup.test.d.ts +2 -0
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +1788 -0
- package/dist/stories/Alert/Alert.settings.d.ts +4 -0
- package/dist/stories/Alert/Alert.stories.d.ts +9 -0
- package/dist/stories/Alert/Alert.test.d.ts +2 -0
- package/dist/stories/Alert/AlertModifiers.stories.d.ts +13 -0
- package/dist/stories/Alert/AlertSlots.stories.d.ts +10 -0
- package/dist/stories/AlertGroup/AlertGroup.settings.d.ts +14 -0
- package/dist/stories/AlertGroup/AlertGroup.stories.d.ts +8 -0
- package/dist/stories/AlertGroup/AlertGroup.test.d.ts +2 -0
- package/dist/stories/AlertGroup/AlertGroupPosition.stories.d.ts +14 -0
- package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +8 -0
- package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +4 -0
- package/dist/stories/Avatar/Avatar.settings.d.ts +5 -0
- package/dist/stories/Avatar/Avatar.stories.d.ts +7 -0
- package/dist/stories/Avatar/Avatar.test.d.ts +2 -0
- package/dist/stories/Avatar/AvatarBadge.stories.d.ts +6 -0
- package/dist/stories/Avatar/AvatarModifiers.stories.d.ts +13 -0
- package/dist/stories/Avatar/AvatarSlots.stories.d.ts +6 -0
- package/dist/stories/AvatarGroup/AvatarGroup.settings.d.ts +14 -0
- package/dist/stories/AvatarGroup/AvatarGroup.stories.d.ts +6 -0
- package/dist/stories/AvatarGroup/AvatarGroup.test.d.ts +2 -0
- package/dist/stories/AvatarGroup/AvatarGroupModifiers.stories.d.ts +7 -0
- package/dist/stories/AvatarGroup/AvatarGroupSlotDefault.stories.d.ts +6 -0
- package/dist/stories/Badge/Badge.settings.d.ts +5 -0
- package/dist/stories/Badge/Badge.stories.d.ts +7 -0
- package/dist/stories/Badge/Badge.test.d.ts +2 -0
- package/dist/stories/Badge/BadgeSlots.stories.d.ts +6 -0
- package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
- package/dist/stories/Breadcrumb/Breadcrumb.settings.d.ts +13 -0
- package/dist/stories/Breadcrumb/Breadcrumb.stories.d.ts +7 -0
- package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +2 -0
- package/dist/stories/Breadcrumb/BreadcrumbSlots.stories.d.ts +6 -0
- package/dist/stories/Button/Button.settings.d.ts +4 -0
- package/dist/stories/Button/Button.stories.d.ts +6 -0
- package/dist/stories/Button/Button.test.d.ts +2 -0
- package/dist/stories/Button/ButtonIcon.stories.d.ts +10 -0
- package/dist/stories/Button/ButtonLink.stories.d.ts +7 -0
- package/dist/stories/Button/ButtonLoading.stories.d.ts +8 -0
- package/dist/stories/Button/ButtonModifiers.stories.d.ts +17 -0
- package/dist/stories/Button/ButtonSlots.stories.d.ts +9 -0
- package/dist/stories/Button/ButtonState.stories.d.ts +8 -0
- package/dist/stories/Button/ButtonToggle.stories.d.ts +9 -0
- package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +5 -0
- package/dist/stories/ButtonGroup/ButtonGroup.stories.d.ts +6 -0
- package/dist/stories/ButtonGroup/ButtonGroup.test.d.ts +2 -0
- package/dist/stories/ButtonGroup/ButtonGroupModifiers.stories.d.ts +8 -0
- package/dist/stories/ButtonGroup/ButtonGroupSlots.stories.d.ts +6 -0
- package/dist/stories/ButtonGroup/ButtonGroupToggle.stories.d.ts +8 -0
- package/dist/stories/Card/Card.settings.d.ts +6 -0
- package/dist/stories/Card/Card.stories.d.ts +6 -0
- package/dist/stories/Card/Card.test.d.ts +2 -0
- package/dist/stories/Card/CardSlots.stories.d.ts +9 -0
- package/dist/stories/Checkbox/Checkbox.settings.d.ts +15 -0
- package/dist/stories/Checkbox/Checkbox.stories.d.ts +13 -0
- package/dist/stories/Checkbox/Checkbox.test.d.ts +2 -0
- package/dist/stories/Checkbox/CheckboxBinary.stories.d.ts +7 -0
- package/dist/stories/Checkbox/CheckboxSlots.stories.d.ts +7 -0
- package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +12 -0
- package/dist/stories/CheckboxGroup/CheckboxGroup.stories.d.ts +12 -0
- package/dist/stories/CheckboxGroup/CheckboxGroup.test.d.ts +2 -0
- package/dist/stories/CheckboxGroup/CheckboxGroupOptions.stories.d.ts +8 -0
- package/dist/stories/CheckboxGroup/CheckboxGroupSlots.stories.d.ts +7 -0
- package/dist/stories/Combobox/Combobox.settings.d.ts +4 -0
- package/dist/stories/Combobox/Combobox.stories.d.ts +24 -0
- package/dist/stories/Combobox/Combobox.test.d.ts +2 -0
- package/dist/stories/Combobox/ComboboxIconPosition.stories.d.ts +8 -0
- package/dist/stories/Combobox/ComboboxMultiple.stories.d.ts +9 -0
- package/dist/stories/Combobox/ComboboxOptions.stories.d.ts +11 -0
- package/dist/stories/Combobox/ComboboxSlots.stories.d.ts +10 -0
- package/dist/stories/Dialog/Dialog.settings.d.ts +10 -0
- package/dist/stories/Dialog/Dialog.stories.d.ts +7 -0
- package/dist/stories/Dialog/Dialog.test.d.ts +2 -0
- package/dist/stories/Dialog/DialogModifiers.stories.d.ts +8 -0
- package/dist/stories/Dialog/DialogSlots.stories.d.ts +8 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +5 -0
- package/dist/stories/Dropdown/Dropdown.stories.d.ts +9 -0
- package/dist/stories/Dropdown/Dropdown.test.d.ts +2 -0
- package/dist/stories/Dropdown/DropdownContextmenuDirective.stories.d.ts +6 -0
- package/dist/stories/Dropdown/DropdownMultilevel.stories.d.ts +6 -0
- package/dist/stories/Dropdown/DropdownSlots.stories.d.ts +8 -0
- package/dist/stories/Icon/Icon.settings.d.ts +7 -0
- package/dist/stories/Icon/Icon.stories.d.ts +8 -0
- package/dist/stories/Icon/IconsCollection.stories.d.ts +6 -0
- package/dist/stories/InputFile/InputFile.settings.d.ts +6 -0
- package/dist/stories/InputFile/InputFile.stories.d.ts +13 -0
- package/dist/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
- package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
- package/dist/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
- package/dist/stories/InputText/InputText.settings.d.ts +11 -0
- package/dist/stories/InputText/InputText.stories.d.ts +16 -0
- package/dist/stories/InputText/InputText.test.d.ts +5 -0
- package/dist/stories/InputText/InputTextIconPosition.stories.d.ts +8 -0
- package/dist/stories/InputText/InputTextIso.stories.d.ts +10 -0
- package/dist/stories/InputText/InputTextLength.stories.d.ts +10 -0
- package/dist/stories/InputText/InputTextMask.stories.d.ts +12 -0
- package/dist/stories/InputText/InputTextMinMax.stories.d.ts +9 -0
- package/dist/stories/InputText/InputTextSlots.stories.d.ts +8 -0
- package/dist/stories/InputText/InputTextSuggestions.stories.d.ts +8 -0
- package/dist/stories/InputText/InputTextType.stories.d.ts +18 -0
- package/dist/stories/Nav/Nav.settings.d.ts +4 -0
- package/dist/stories/Nav/Nav.stories.d.ts +6 -0
- package/dist/stories/Nav/Nav.test.d.ts +2 -0
- package/dist/stories/Nav/NavModifiers.stories.d.ts +9 -0
- package/dist/stories/Progress/Progress.settings.d.ts +7 -0
- package/dist/stories/Progress/Progress.stories.d.ts +7 -0
- package/dist/stories/Progress/Progress.test.d.ts +2 -0
- package/dist/stories/Radio/Radio.settings.d.ts +12 -0
- package/dist/stories/Radio/Radio.stories.d.ts +11 -0
- package/dist/stories/Radio/Radio.test.d.ts +2 -0
- package/dist/stories/Radio/RadioSlots.stories.d.ts +7 -0
- package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +12 -0
- package/dist/stories/RadioGroup/RadioGroup.stories.d.ts +12 -0
- package/dist/stories/RadioGroup/RadioGroup.test.d.ts +2 -0
- package/dist/stories/RadioGroup/RadioGroupOptions.stories.d.ts +8 -0
- package/dist/stories/RadioGroup/RadioGroupSlots.stories.d.ts +7 -0
- package/dist/stories/Select/Select.settings.d.ts +8 -0
- package/dist/stories/Select/Select.stories.d.ts +16 -0
- package/dist/stories/Select/Select.test.d.ts +2 -0
- package/dist/stories/Select/SelectIconPosition.stories.d.ts +8 -0
- package/dist/stories/Select/SelectOptions.stories.d.ts +9 -0
- package/dist/stories/Select/SelectSlots.stories.d.ts +8 -0
- package/dist/stories/Tab/Tab.settings.d.ts +4 -0
- package/dist/stories/Tab/Tab.stories.d.ts +6 -0
- package/dist/stories/Tab/Tab.test.d.ts +2 -0
- package/dist/stories/Textarea/Textarea.settings.d.ts +9 -0
- package/dist/stories/Textarea/Textarea.stories.d.ts +14 -0
- package/dist/stories/Textarea/Textarea.test.d.ts +2 -0
- package/dist/stories/Textarea/TextareaLength.stories.d.ts +10 -0
- package/dist/stories/Textarea/TextareaSlots.stories.d.ts +8 -0
- package/dist/stories/Textarea/TextareatIconPosition.stories.d.ts +8 -0
- package/dist/stories/Tooltip/Tooltip.settings.d.ts +5 -0
- package/dist/stories/Tooltip/Tooltip.stories.d.ts +6 -0
- package/dist/stories/Tooltip/Tooltip.test.d.ts +2 -0
- package/dist/stories/Tooltip/TooltipDirective.stories.d.ts +10 -0
- package/dist/stories/VirtualScroll/VirtualScroll.settings.d.ts +5 -0
- package/dist/stories/VirtualScroll/VirtualScroll.stories.d.ts +7 -0
- package/dist/stories/VirtualScroll/VirtualScroll.test.d.ts +2 -0
- package/dist/stories/VirtualScroll/VirtualScrollWithComposable.stories.d.ts +4 -0
- package/dist/stories/argTypes.d.ts +56 -0
- package/dist/test/expect.d.ts +18 -0
- package/dist/test/options.d.ts +1 -0
- package/dist/test/sleep.d.ts +1 -0
- package/dist/types/alert.d.ts +15 -0
- package/dist/types/blurhash.d.ts +12 -0
- package/dist/types/floating-ui.d.ts +15 -0
- package/dist/types/generic.d.ts +4 -0
- package/dist/types/group.d.ts +59 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/input-file.d.ts +9 -0
- package/dist/types/nav.d.ts +17 -0
- package/dist/utils/DateUtilities.d.ts +14 -0
- package/dist/utils/DomUtilities.d.ts +1 -0
- package/dist/utils/FileUtilities.d.ts +14 -0
- package/dist/utils/ObjectUtilities.d.ts +76 -0
- package/dist/workers/blurhash.d.ts +1 -0
- package/package.json +3 -2
- package/src/Volver.ts +8 -6
- package/src/components/VvAction/index.ts +1 -3
- package/src/components/VvButton/VvButton.vue +1 -1
- package/src/components/VvCheckboxGroup/index.ts +1 -3
- package/src/components/VvCombobox/VvCombobox.vue +3 -3
- package/src/components/VvDropdown/VvDropdown.vue +8 -8
- package/src/components/VvIcon/VvIcon.vue +3 -6
- package/src/components/VvInputFile/VvInputFile.vue +6 -6
- package/src/components/VvInputText/VvInputText.vue +95 -78
- package/src/components/VvRadioGroup/index.ts +1 -3
- package/src/composables/useBlurhash.ts +1 -1
- package/src/composables/useDebouncedInput.ts +1 -1
- package/src/composables/useDefaults.ts +55 -44
- package/src/composables/useModifiers.ts +1 -1
- package/src/index.ts +2 -2
- package/src/resolvers/unplugin.ts +6 -6
- package/src/types/alert.ts +1 -1
- package/src/types/nav.ts +1 -1
- package/src/utils/DateUtilities.ts +3 -3
- package/src/utils/DomUtilities.ts +7 -1
- package/src/utils/ObjectUtilities.ts +60 -59
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { Emitter } from 'mitt';
|
|
2
|
+
import type { InjectionKey, Ref } from 'vue';
|
|
3
|
+
import type { AccordionGroupState, AlertGroupState, AlertModifier, ButtonGroupState, InputGroupState } from './types';
|
|
4
|
+
import type { Volver } from './Volver';
|
|
5
|
+
export declare const DEFAULT_ICONIFY_PROVIDER = "vv";
|
|
6
|
+
export declare enum StorageType {
|
|
7
|
+
local = "local",
|
|
8
|
+
session = "session"
|
|
9
|
+
}
|
|
10
|
+
export declare enum Strategy {
|
|
11
|
+
absolute = "absolute",
|
|
12
|
+
fixed = "fixed"
|
|
13
|
+
}
|
|
14
|
+
export declare enum Side {
|
|
15
|
+
left = "left",
|
|
16
|
+
right = "right",
|
|
17
|
+
top = "top",
|
|
18
|
+
bottom = "bottom"
|
|
19
|
+
}
|
|
20
|
+
export declare enum Placement {
|
|
21
|
+
topStart = "top-start",
|
|
22
|
+
topEnd = "top-end",
|
|
23
|
+
bottomStart = "bottom-start",
|
|
24
|
+
bottomEnd = "bottom-end",
|
|
25
|
+
leftStart = "left-start",
|
|
26
|
+
leftEnd = "left-end",
|
|
27
|
+
rightStart = "right-start",
|
|
28
|
+
rightEnd = "right-end"
|
|
29
|
+
}
|
|
30
|
+
export declare enum Position {
|
|
31
|
+
before = "before",
|
|
32
|
+
after = "after"
|
|
33
|
+
}
|
|
34
|
+
export declare enum ButtonType {
|
|
35
|
+
button = "button",
|
|
36
|
+
submit = "submit",
|
|
37
|
+
reset = "reset"
|
|
38
|
+
}
|
|
39
|
+
export declare enum ActionTag {
|
|
40
|
+
nuxtLink = "nuxt-link",
|
|
41
|
+
routerLink = "router-link",
|
|
42
|
+
a = "a",
|
|
43
|
+
button = "button"
|
|
44
|
+
}
|
|
45
|
+
export declare enum ActionRoles {
|
|
46
|
+
button = "button",
|
|
47
|
+
link = "link",
|
|
48
|
+
menuitem = "menuitem"
|
|
49
|
+
}
|
|
50
|
+
export declare enum DropdownRole {
|
|
51
|
+
listbox = "listbox",
|
|
52
|
+
menu = "menu"
|
|
53
|
+
}
|
|
54
|
+
export declare enum DropdownItemRole {
|
|
55
|
+
option = "option",
|
|
56
|
+
presentation = "presentation"
|
|
57
|
+
}
|
|
58
|
+
export declare enum AlertRole {
|
|
59
|
+
alert = "alert",
|
|
60
|
+
alertdialog = "alertdialog"
|
|
61
|
+
}
|
|
62
|
+
export declare const INJECTION_KEY_VOLVER: InjectionKey<Volver>;
|
|
63
|
+
export declare const INJECTION_KEY_BUTTON_GROUP: InjectionKey<ButtonGroupState>;
|
|
64
|
+
export declare const INJECTION_KEY_RADIO_GROUP: InjectionKey<InputGroupState>;
|
|
65
|
+
export declare const INJECTION_KEY_CHECK_GROUP: InjectionKey<InputGroupState>;
|
|
66
|
+
export declare const INJECTION_KEY_ACCORDION_GROUP: InjectionKey<AccordionGroupState>;
|
|
67
|
+
export type DropdownTriggerState = {
|
|
68
|
+
id?: Ref<string | number>;
|
|
69
|
+
reference?: Ref<HTMLElement | null | undefined>;
|
|
70
|
+
bus?: Emitter<{
|
|
71
|
+
click: Event;
|
|
72
|
+
mouseover: Event;
|
|
73
|
+
mouseleave: Event;
|
|
74
|
+
}>;
|
|
75
|
+
expanded?: Ref<boolean>;
|
|
76
|
+
aria?: Ref<{
|
|
77
|
+
'aria-controls': string;
|
|
78
|
+
'aria-haspopup': boolean;
|
|
79
|
+
'aria-expanded': boolean;
|
|
80
|
+
}>;
|
|
81
|
+
};
|
|
82
|
+
export declare const INJECTION_KEY_DROPDOWN_TRIGGER: InjectionKey<DropdownTriggerState>;
|
|
83
|
+
export type DropdownItemState = {
|
|
84
|
+
role?: Ref<`${DropdownItemRole}`>;
|
|
85
|
+
expanded?: Ref<boolean>;
|
|
86
|
+
focused?: Ref<boolean>;
|
|
87
|
+
hovered?: Ref<boolean>;
|
|
88
|
+
};
|
|
89
|
+
export declare const INJECTION_KEY_DROPDOWN_ITEM: InjectionKey<DropdownItemState>;
|
|
90
|
+
export type DropdownActionState = {
|
|
91
|
+
role?: Ref<`${ActionRoles}`>;
|
|
92
|
+
expanded?: Ref<boolean>;
|
|
93
|
+
};
|
|
94
|
+
export declare const INJECTION_KEY_DROPDOWN_ACTION: InjectionKey<DropdownActionState>;
|
|
95
|
+
export declare const INJECTION_KEY_ALERT_GROUP: InjectionKey<AlertGroupState>;
|
|
96
|
+
export declare const DEFAULT_ALERT_AUTO_CLOSE = 10000;
|
|
97
|
+
export declare const DEFAULT_ALERT_MODIFIERS = "info";
|
|
98
|
+
export declare const DEFAULT_ALERT_DISMISSABLE = true;
|
|
99
|
+
export declare const DEFAULT_ALERT_GROUP = "default";
|
|
100
|
+
export declare const DEFAULT_ALERT_INFO_ICON = "information";
|
|
101
|
+
export declare const DEFAULT_ALERT_SUCCESS_ICON = "check-circle";
|
|
102
|
+
export declare const DEFAULT_ALERT_WARNING_ICON = "warning";
|
|
103
|
+
export declare const DEFAULT_ALERT_DANGER_ICON = "error";
|
|
104
|
+
export declare const DefaultAlertIconMap: Map<AlertModifier, string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed as y, createElementBlock as V, createTextVNode as I, defineComponent as $, getCurrentInstance as
|
|
1
|
+
import { computed as y, createElementBlock as V, createTextVNode as I, defineComponent as $, getCurrentInstance as j, h as B, normalizeClass as F, onMounted as w, onUnmounted as N, openBlock as q, ref as v, render as x, renderSlot as K, toDisplayString as M, toRefs as U, unref as g } from "vue";
|
|
2
2
|
var L = /* @__PURE__ */ (function(e) {
|
|
3
3
|
return e.local = "local", e.session = "session", e;
|
|
4
4
|
})({}), z = /* @__PURE__ */ (function(e) {
|
|
@@ -18,7 +18,7 @@ function G(e, t) {
|
|
|
18
18
|
const { x: o, y: a, getBoundingClientRect: l, onScroll: r } = H(e), i = (n) => {
|
|
19
19
|
o.value = n.clientX, a.value = n.clientY, n.preventDefault(), e.value.show();
|
|
20
20
|
}, u = y(() => g(t));
|
|
21
|
-
return u &&
|
|
21
|
+
return u && j() && (w(() => {
|
|
22
22
|
u.value?.addEventListener("contextmenu", i, !1);
|
|
23
23
|
}), N(() => {
|
|
24
24
|
u.value?.removeEventListener("contextmenu", i);
|
|
@@ -31,10 +31,10 @@ function G(e, t) {
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
function _(e) {
|
|
34
|
-
if (!e) return;
|
|
34
|
+
if (!e || typeof globalThis.getComputedStyle != "function" || typeof document > "u") return;
|
|
35
35
|
let t = e.parentElement;
|
|
36
36
|
for (; t; ) {
|
|
37
|
-
const { overflow: o } =
|
|
37
|
+
const { overflow: o } = globalThis.getComputedStyle(t);
|
|
38
38
|
if (o.split(" ").every((a) => a === "auto" || a === "scroll")) return t;
|
|
39
39
|
t = t.parentElement;
|
|
40
40
|
}
|
|
@@ -43,10 +43,10 @@ function _(e) {
|
|
|
43
43
|
function H(e) {
|
|
44
44
|
const t = v(0), o = v(0), a = v();
|
|
45
45
|
let l = 0, r = 0, i = 0, u = 0;
|
|
46
|
-
const n = (
|
|
47
|
-
const s =
|
|
46
|
+
const n = (R) => {
|
|
47
|
+
const s = R.target;
|
|
48
48
|
l = s.scrollLeft - u, r = s.scrollTop - i, o.value = o.value - r, t.value = t.value - l, u = s.scrollLeft, i = s.scrollTop;
|
|
49
|
-
},
|
|
49
|
+
}, P = () => ({
|
|
50
50
|
width: 0,
|
|
51
51
|
height: 0,
|
|
52
52
|
x: t.value,
|
|
@@ -56,14 +56,14 @@ function H(e) {
|
|
|
56
56
|
right: t.value,
|
|
57
57
|
bottom: o.value
|
|
58
58
|
});
|
|
59
|
-
return
|
|
60
|
-
e.value && (e.value.init({ getBoundingClientRect:
|
|
59
|
+
return j() && (w(() => {
|
|
60
|
+
e.value && (e.value.init({ getBoundingClientRect: P }), a.value = _(e.value.$el), a.value && a.value.addEventListener("scroll", n));
|
|
61
61
|
}), N(() => {
|
|
62
62
|
a.value && a.value.removeEventListener("scroll", n);
|
|
63
63
|
})), {
|
|
64
64
|
x: t,
|
|
65
65
|
y: o,
|
|
66
|
-
getBoundingClientRect:
|
|
66
|
+
getBoundingClientRect: P,
|
|
67
67
|
onScroll: n
|
|
68
68
|
};
|
|
69
69
|
}
|
|
@@ -164,7 +164,7 @@ var ce = {
|
|
|
164
164
|
} }, p = { modifiers: {
|
|
165
165
|
type: [String, Array],
|
|
166
166
|
default: void 0
|
|
167
|
-
} },
|
|
167
|
+
} }, h = { hintLabel: {
|
|
168
168
|
type: String,
|
|
169
169
|
default: ""
|
|
170
170
|
} }, te = {
|
|
@@ -267,7 +267,7 @@ var ce = {
|
|
|
267
267
|
type: Boolean,
|
|
268
268
|
default: !1
|
|
269
269
|
}
|
|
270
|
-
},
|
|
270
|
+
}, T = {
|
|
271
271
|
...ne,
|
|
272
272
|
name: {
|
|
273
273
|
type: String,
|
|
@@ -280,7 +280,7 @@ var ce = {
|
|
|
280
280
|
type: String,
|
|
281
281
|
default: "off"
|
|
282
282
|
} }, be = {
|
|
283
|
-
...
|
|
283
|
+
...T,
|
|
284
284
|
...ie,
|
|
285
285
|
...ue,
|
|
286
286
|
...A,
|
|
@@ -288,7 +288,7 @@ var ce = {
|
|
|
288
288
|
...C,
|
|
289
289
|
...b,
|
|
290
290
|
...m,
|
|
291
|
-
...
|
|
291
|
+
...h,
|
|
292
292
|
...S,
|
|
293
293
|
...p,
|
|
294
294
|
...oe,
|
|
@@ -310,11 +310,11 @@ var ce = {
|
|
|
310
310
|
},
|
|
311
311
|
...k
|
|
312
312
|
}, me = {
|
|
313
|
-
...
|
|
313
|
+
...T,
|
|
314
314
|
...A,
|
|
315
315
|
...b,
|
|
316
316
|
...m,
|
|
317
|
-
...
|
|
317
|
+
...h,
|
|
318
318
|
...d,
|
|
319
319
|
...C,
|
|
320
320
|
...p,
|
|
@@ -341,7 +341,7 @@ var ce = {
|
|
|
341
341
|
...b,
|
|
342
342
|
...m,
|
|
343
343
|
...te,
|
|
344
|
-
...
|
|
344
|
+
...h,
|
|
345
345
|
...d,
|
|
346
346
|
...C,
|
|
347
347
|
...p,
|
|
@@ -386,7 +386,7 @@ var ce = {
|
|
|
386
386
|
type: String,
|
|
387
387
|
default: Y.button
|
|
388
388
|
}
|
|
389
|
-
},
|
|
389
|
+
}, he = {
|
|
390
390
|
storageType: {
|
|
391
391
|
type: String,
|
|
392
392
|
default: L.local,
|
|
@@ -422,15 +422,15 @@ var fe = { name: "VvTooltip" }, pe = /* @__PURE__ */ $({
|
|
|
422
422
|
inert: ""
|
|
423
423
|
}, [K(l.$slots, "default", {}, () => [I(M(l.value), 1)])], 2));
|
|
424
424
|
}
|
|
425
|
-
}),
|
|
425
|
+
}), D = pe, Pe = {
|
|
426
426
|
beforeMount(e, t) {
|
|
427
|
-
x(B(
|
|
427
|
+
x(B(D, {
|
|
428
428
|
value: t.value,
|
|
429
429
|
position: t.arg
|
|
430
430
|
}), e);
|
|
431
431
|
},
|
|
432
432
|
updated(e, t) {
|
|
433
|
-
x(B(
|
|
433
|
+
x(B(D, {
|
|
434
434
|
value: t.value,
|
|
435
435
|
position: t.arg
|
|
436
436
|
}), e);
|
|
@@ -438,5 +438,5 @@ var fe = { name: "VvTooltip" }, pe = /* @__PURE__ */ $({
|
|
|
438
438
|
};
|
|
439
439
|
export {
|
|
440
440
|
ce as vContextmenu,
|
|
441
|
-
|
|
441
|
+
Pe as vTooltip
|
|
442
442
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(i,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(i=typeof globalThis<"u"?globalThis:i||self,t(i.directives={},i.Vue))})(this,function(i,t){Object.defineProperty(i,Symbol.toStringTag,{value:"Module"});var C=(function(e){return e.local="local",e.session="session",e})({}),
|
|
1
|
+
(function(i,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(i=typeof globalThis<"u"?globalThis:i||self,t(i.directives={},i.Vue))})(this,function(i,t){Object.defineProperty(i,Symbol.toStringTag,{value:"Module"});var C=(function(e){return e.local="local",e.session="session",e})({}),w=(function(e){return e.absolute="absolute",e.fixed="fixed",e})({}),y=(function(e){return e.left="left",e.right="right",e.top="top",e.bottom="bottom",e})({}),N=(function(e){return e.topStart="top-start",e.topEnd="top-end",e.bottomStart="bottom-start",e.bottomEnd="bottom-end",e.leftStart="left-start",e.leftEnd="left-end",e.rightStart="right-start",e.rightEnd="right-end",e})({}),P=(function(e){return e.before="before",e.after="after",e})({}),B=(function(e){return e.button="button",e.submit="submit",e.reset="reset",e})({}),T=(function(e){return e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e})({});function _(e,o){const{x:a,y:r,getBoundingClientRect:n,onScroll:l}=k(e),d=u=>{a.value=u.clientX,r.value=u.clientY,u.preventDefault(),e.value.show()},s=(0,t.computed)(()=>(0,t.unref)(o));return s&&(0,t.getCurrentInstance)()&&((0,t.onMounted)(()=>{s.value?.addEventListener("contextmenu",d,!1)}),(0,t.onUnmounted)(()=>{s.value?.removeEventListener("contextmenu",d)})),{x:a,y:r,getBoundingClientRect:n,onContextmenu:d,onScroll:l}}function x(e){if(!e||typeof globalThis.getComputedStyle!="function"||typeof document>"u")return;let o=e.parentElement;for(;o;){const{overflow:a}=globalThis.getComputedStyle(o);if(a.split(" ").every(r=>r==="auto"||r==="scroll"))return o;o=o.parentElement}return document.documentElement}function k(e){const o=(0,t.ref)(0),a=(0,t.ref)(0),r=(0,t.ref)();let n=0,l=0,d=0,s=0;const u=ee=>{const v=ee.target;n=v.scrollLeft-s,l=v.scrollTop-d,a.value=a.value-l,o.value=o.value-n,s=v.scrollLeft,d=v.scrollTop},D=()=>({width:0,height:0,x:o.value,y:a.value,top:a.value,left:o.value,right:o.value,bottom:a.value});return(0,t.getCurrentInstance)()&&((0,t.onMounted)(()=>{e.value&&(e.value.init({getBoundingClientRect:D}),r.value=x(e.value.$el),r.value&&r.value.addEventListener("scroll",u))}),(0,t.onUnmounted)(()=>{r.value&&r.value.removeEventListener("scroll",u)})),{x:o,y:a,getBoundingClientRect:D,onScroll:u}}var A={beforeUpdate(e,o){const{onContextmenu:a,onScroll:r,getBoundingClientRect:n}=_(o);o.value.init({getBoundingClientRect:n}),e.addEventListener("contextmenu",a,!1);const l=x(o.value.$el);l&&l.addEventListener("scroll",r),e.additionalData={onContextmenu:a,onScroll:r,scrollContainerEl:l}},beforeUnmount(e){e?.additionalData?.onContextmenu&&e.removeEventListener("contextmenu",e.additionalData.onContextmenu),e?.additionalData?.onScroll&&e?.additionalData?.scrollContainerEl&&e.additionalData.scrollContainerEl.removeEventListener("scroll",e.additionalData.onScroll)}},V={showPassword:"eye-on",hidePassword:"eye-off",showDatePicker:"calendar",showTimePicker:"time",showColorPicker:"color",clear:"close",add:"add",remove:"trash",edit:"edit",download:"download"},I={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},g={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},b={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},m={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},f={disabled:{type:Boolean,default:!1}},L={required:{type:Boolean,default:!1}},R={active:{type:Boolean,default:!1}},$={current:{type:Boolean,default:!1}},te={showClearAction:{type:Boolean,default:!1},iconClear:{type:[String,Object],default:V.clear},labelClear:{type:String,default:"Clear"}},M={pressed:{type:Boolean,default:!1}},p={label:{type:[String,Number],default:void 0}},S={readonly:{type:Boolean,default:!1}},c={modifiers:{type:[String,Array],default:void 0}},h={hintLabel:{type:String,default:""}},q={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},F={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},K={debounce:{type:[Number,String],default:void 0}},U={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:P.before,validation:e=>Object.values(P).includes(e)}},E={tabindex:{type:[String,Number],default:0}},z={floating:{type:Boolean,default:!1}},X={id:[String,Number]},oe={placement:{type:String,default:y.bottom,validator:e=>Object.values(y).includes(e)||Object.values(N).includes(e)},strategy:{type:String,default:void 0,validator:e=>Object.values(w).includes(e)},transitionName:{type:String,default:void 0},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean,default:!1}},O={...X,name:{type:String,required:!0}},Y={autofocus:{type:Boolean,default:!1}},G={autocomplete:{type:String,default:"off"}},ae={...O,...Y,...G,...E,...f,...S,...g,...b,...h,...m,...c,...F,...K,...U,...z,...p,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},...L},re={...O,...E,...g,...b,...h,...f,...S,...c,...p,...m,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}},le={...g,...b,...q,...h,...f,...S,...c,...p,...m,...L,modelValue:{type:[String,Array,Boolean,Number,Symbol],default:void 0},name:{type:String,required:!0},vertical:{type:Boolean,default:!1}},ne={...f,...p,...M,...R,...$,...I,type:{type:String,default:B.button,validator:e=>Object.values(B).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:T.button}},ie={storageType:{type:String,default:C.local,validator:e=>Object.values(C).includes(e)},storageKey:String},H={...c,position:{type:String,default:y.bottom},value:{type:String}};function W(e,o,a){return(0,t.computed)(()=>{const r={[e]:!0},n=typeof o?.value=="string"?o.value.split(" "):o?.value;return n&&Array.isArray(n)&&n.forEach(l=>{l&&(r[`${e}--${l}`]=!0)}),a&&Object.keys(a.value).forEach(l=>{r[`${e}--${l}`]=(0,t.unref)(a.value[l])}),r})}var J={name:"VvTooltip"},Q=(0,t.defineComponent)({...J,props:H,setup(e){const o=e,{modifiers:a}=(0,t.toRefs)(o),r=W("vv-tooltip",a,(0,t.computed)(()=>({[o.position]:!0})));return(n,l)=>((0,t.openBlock)(),(0,t.createElementBlock)("span",{class:(0,t.normalizeClass)((0,t.unref)(r)),role:"tooltip",inert:""},[(0,t.renderSlot)(n.$slots,"default",{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(n.value),1)])],2))}}),j=Q,Z={beforeMount(e,o){(0,t.render)((0,t.h)(j,{value:o.value,position:o.arg}),e)},updated(e,o){(0,t.render)((0,t.h)(j,{value:o.value,position:o.arg}),e)}};i.vContextmenu=A,i.vTooltip=Z});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
function
|
|
3
|
-
const { x: n, y: l, getBoundingClientRect: r, onScroll: o } =
|
|
1
|
+
import { computed as x, getCurrentInstance as d, onMounted as f, onUnmounted as m, ref as s, unref as E } from "vue";
|
|
2
|
+
function g(e, t) {
|
|
3
|
+
const { x: n, y: l, getBoundingClientRect: r, onScroll: o } = D(e), u = (a) => {
|
|
4
4
|
n.value = a.clientX, l.value = a.clientY, a.preventDefault(), e.value.show();
|
|
5
|
-
}, i =
|
|
5
|
+
}, i = x(() => E(t));
|
|
6
6
|
return i && d() && (f(() => {
|
|
7
7
|
i.value?.addEventListener("contextmenu", u, !1);
|
|
8
8
|
}), m(() => {
|
|
@@ -15,21 +15,21 @@ function D(e, t) {
|
|
|
15
15
|
onScroll: o
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
if (!e) return;
|
|
18
|
+
function p(e) {
|
|
19
|
+
if (!e || typeof globalThis.getComputedStyle != "function" || typeof document > "u") return;
|
|
20
20
|
let t = e.parentElement;
|
|
21
21
|
for (; t; ) {
|
|
22
|
-
const { overflow: n } =
|
|
22
|
+
const { overflow: n } = globalThis.getComputedStyle(t);
|
|
23
23
|
if (n.split(" ").every((l) => l === "auto" || l === "scroll")) return t;
|
|
24
24
|
t = t.parentElement;
|
|
25
25
|
}
|
|
26
26
|
return document.documentElement;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function D(e) {
|
|
29
29
|
const t = s(0), n = s(0), l = s();
|
|
30
30
|
let r = 0, o = 0, u = 0, i = 0;
|
|
31
|
-
const a = (
|
|
32
|
-
const c =
|
|
31
|
+
const a = (C) => {
|
|
32
|
+
const c = C.target;
|
|
33
33
|
r = c.scrollLeft - i, o = c.scrollTop - u, n.value = n.value - o, t.value = t.value - r, i = c.scrollLeft, u = c.scrollTop;
|
|
34
34
|
}, v = () => ({
|
|
35
35
|
width: 0,
|
|
@@ -42,7 +42,7 @@ function L(e) {
|
|
|
42
42
|
bottom: n.value
|
|
43
43
|
});
|
|
44
44
|
return d() && (f(() => {
|
|
45
|
-
e.value && (e.value.init({ getBoundingClientRect: v }), l.value =
|
|
45
|
+
e.value && (e.value.init({ getBoundingClientRect: v }), l.value = p(e.value.$el), l.value && l.value.addEventListener("scroll", a));
|
|
46
46
|
}), m(() => {
|
|
47
47
|
l.value && l.value.removeEventListener("scroll", a);
|
|
48
48
|
})), {
|
|
@@ -54,9 +54,9 @@ function L(e) {
|
|
|
54
54
|
}
|
|
55
55
|
var S = {
|
|
56
56
|
beforeUpdate(e, t) {
|
|
57
|
-
const { onContextmenu: n, onScroll: l, getBoundingClientRect: r } =
|
|
57
|
+
const { onContextmenu: n, onScroll: l, getBoundingClientRect: r } = g(t);
|
|
58
58
|
t.value.init({ getBoundingClientRect: r }), e.addEventListener("contextmenu", n, !1);
|
|
59
|
-
const o =
|
|
59
|
+
const o = p(t.value.$el);
|
|
60
60
|
o && o.addEventListener("scroll", l), e.additionalData = {
|
|
61
61
|
onContextmenu: n,
|
|
62
62
|
onScroll: l,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(n,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("vue")):typeof define=="function"&&define.amd?define(["vue"],s):(n=typeof globalThis<"u"?globalThis:n||self,n["v-contextmenu"]=s(n.Vue))})(this,function(n){function s(e,t){const{x:o,y:l,getBoundingClientRect:i,onScroll:a}=m(e),u=r=>{o.value=r.clientX,l.value=r.clientY,r.preventDefault(),e.value.show()},c=(0,n.computed)(()=>(0,n.unref)(t));return c&&(0,n.getCurrentInstance)()&&((0,n.onMounted)(()=>{c.value?.addEventListener("contextmenu",u,!1)}),(0,n.onUnmounted)(()=>{c.value?.removeEventListener("contextmenu",u)})),{x:o,y:l,getBoundingClientRect:i,onContextmenu:u,onScroll:a}}function f(e){if(!e)return;let t=e.parentElement;for(;t;){const{overflow:o}=
|
|
1
|
+
(function(n,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("vue")):typeof define=="function"&&define.amd?define(["vue"],s):(n=typeof globalThis<"u"?globalThis:n||self,n["v-contextmenu"]=s(n.Vue))})(this,function(n){function s(e,t){const{x:o,y:l,getBoundingClientRect:i,onScroll:a}=m(e),u=r=>{o.value=r.clientX,l.value=r.clientY,r.preventDefault(),e.value.show()},c=(0,n.computed)(()=>(0,n.unref)(t));return c&&(0,n.getCurrentInstance)()&&((0,n.onMounted)(()=>{c.value?.addEventListener("contextmenu",u,!1)}),(0,n.onUnmounted)(()=>{c.value?.removeEventListener("contextmenu",u)})),{x:o,y:l,getBoundingClientRect:i,onContextmenu:u,onScroll:a}}function f(e){if(!e||typeof globalThis.getComputedStyle!="function"||typeof document>"u")return;let t=e.parentElement;for(;t;){const{overflow:o}=globalThis.getComputedStyle(t);if(o.split(" ").every(l=>l==="auto"||l==="scroll"))return t;t=t.parentElement}return document.documentElement}function m(e){const t=(0,n.ref)(0),o=(0,n.ref)(0),l=(0,n.ref)();let i=0,a=0,u=0,c=0;const r=C=>{const d=C.target;i=d.scrollLeft-c,a=d.scrollTop-u,o.value=o.value-a,t.value=t.value-i,c=d.scrollLeft,u=d.scrollTop},v=()=>({width:0,height:0,x:t.value,y:o.value,top:o.value,left:t.value,right:t.value,bottom:o.value});return(0,n.getCurrentInstance)()&&((0,n.onMounted)(()=>{e.value&&(e.value.init({getBoundingClientRect:v}),l.value=f(e.value.$el),l.value&&l.value.addEventListener("scroll",r))}),(0,n.onUnmounted)(()=>{l.value&&l.value.removeEventListener("scroll",r)})),{x:t,y:o,getBoundingClientRect:v,onScroll:r}}var p={beforeUpdate(e,t){const{onContextmenu:o,onScroll:l,getBoundingClientRect:i}=s(t);t.value.init({getBoundingClientRect:i}),e.addEventListener("contextmenu",o,!1);const a=f(t.value.$el);a&&a.addEventListener("scroll",l),e.additionalData={onContextmenu:o,onScroll:l,scrollContainerEl:a}},beforeUnmount(e){e?.additionalData?.onContextmenu&&e.removeEventListener("contextmenu",e.additionalData.onContextmenu),e?.additionalData?.onScroll&&e?.additionalData?.scrollContainerEl&&e.additionalData.scrollContainerEl.removeEventListener("scroll",e.additionalData.onScroll)}};return p});
|