@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,92 @@
|
|
|
1
|
+
import type { Alert } from '@/types/alert';
|
|
2
|
+
type AlertInGroup = Alert & {
|
|
3
|
+
timestamp: number;
|
|
4
|
+
group: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @description Composable to access alert groups, alerts and functions to add, remove and get alerts by group.
|
|
8
|
+
* @example
|
|
9
|
+
* const { groups, alerts, addAlert, removeAlert, getAlerts } = useAlert()
|
|
10
|
+
* addAlert({
|
|
11
|
+
* title: 'Success!',
|
|
12
|
+
* modifiers: 'success',
|
|
13
|
+
* })
|
|
14
|
+
*
|
|
15
|
+
* `<vv-alert-group :items="alerts" :onClose="removeAlert" />`
|
|
16
|
+
*
|
|
17
|
+
* @returns {
|
|
18
|
+
* alerts: ComputedRef<Alert[]> reactive list of alerts default group,
|
|
19
|
+
* groups: ReactiveRef<Map<string, Map<string, Alert>>>,
|
|
20
|
+
* addAlert: Function to add alert,
|
|
21
|
+
* removeAlert: Function to remove alert,
|
|
22
|
+
* getAlerts: Function to get alerts by group
|
|
23
|
+
* } the reactive list of alerts, groups, addAlert, removeAlert and getAlerts functions
|
|
24
|
+
*/
|
|
25
|
+
export declare function useAlert(): {
|
|
26
|
+
groups: import("vue").Reactive<Map<string, Map<string, AlertInGroup>>>;
|
|
27
|
+
alerts: globalThis.ComputedRef<{
|
|
28
|
+
id: string | number;
|
|
29
|
+
title?: string | undefined;
|
|
30
|
+
icon?: string | {
|
|
31
|
+
name: string;
|
|
32
|
+
color?: string | undefined;
|
|
33
|
+
width?: string | number | undefined;
|
|
34
|
+
height?: string | number | undefined;
|
|
35
|
+
provider?: string | undefined;
|
|
36
|
+
prefix?: (import("../../components/VvIcon").IconPrefix | string) | undefined;
|
|
37
|
+
src?: string | undefined;
|
|
38
|
+
horizontalFlip?: boolean | undefined;
|
|
39
|
+
verticalFlip?: boolean | undefined;
|
|
40
|
+
flip?: string | undefined;
|
|
41
|
+
mode?: import("@iconify/vue").IconifyRenderMode | undefined;
|
|
42
|
+
inline?: boolean | undefined;
|
|
43
|
+
rotate?: number | string | undefined;
|
|
44
|
+
onLoad?: ((icon: import("@iconify/types").IconifyIcon) => void) | undefined;
|
|
45
|
+
svg?: string | undefined;
|
|
46
|
+
modifiers?: string | string[] | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
content?: string | undefined;
|
|
49
|
+
footer?: string | undefined;
|
|
50
|
+
modifiers?: (import("@/types/alert").AlertModifier | import("@/types/alert").AlertModifier[]) | undefined;
|
|
51
|
+
dismissable?: boolean | undefined;
|
|
52
|
+
autoClose?: number | undefined;
|
|
53
|
+
closeLabel?: string | undefined;
|
|
54
|
+
role?: import("@/constants").AlertRole | undefined;
|
|
55
|
+
timestamp: number;
|
|
56
|
+
group: string;
|
|
57
|
+
}[]>;
|
|
58
|
+
addAlert: ({ id, group, title, icon, content, footer, modifiers, dismissable, autoClose, timestamp, }?: Partial<AlertInGroup>) => void;
|
|
59
|
+
removeAlert: (id: string | number, group?: string) => void;
|
|
60
|
+
getAlerts: (group?: string) => globalThis.ComputedRef<{
|
|
61
|
+
id: string | number;
|
|
62
|
+
title?: string | undefined;
|
|
63
|
+
icon?: string | {
|
|
64
|
+
name: string;
|
|
65
|
+
color?: string | undefined;
|
|
66
|
+
width?: string | number | undefined;
|
|
67
|
+
height?: string | number | undefined;
|
|
68
|
+
provider?: string | undefined;
|
|
69
|
+
prefix?: (import("../../components/VvIcon").IconPrefix | string) | undefined;
|
|
70
|
+
src?: string | undefined;
|
|
71
|
+
horizontalFlip?: boolean | undefined;
|
|
72
|
+
verticalFlip?: boolean | undefined;
|
|
73
|
+
flip?: string | undefined;
|
|
74
|
+
mode?: import("@iconify/vue").IconifyRenderMode | undefined;
|
|
75
|
+
inline?: boolean | undefined;
|
|
76
|
+
rotate?: number | string | undefined;
|
|
77
|
+
onLoad?: ((icon: import("@iconify/types").IconifyIcon) => void) | undefined;
|
|
78
|
+
svg?: string | undefined;
|
|
79
|
+
modifiers?: string | string[] | undefined;
|
|
80
|
+
} | undefined;
|
|
81
|
+
content?: string | undefined;
|
|
82
|
+
footer?: string | undefined;
|
|
83
|
+
modifiers?: (import("@/types/alert").AlertModifier | import("@/types/alert").AlertModifier[]) | undefined;
|
|
84
|
+
dismissable?: boolean | undefined;
|
|
85
|
+
autoClose?: number | undefined;
|
|
86
|
+
closeLabel?: string | undefined;
|
|
87
|
+
role?: import("@/constants").AlertRole | undefined;
|
|
88
|
+
timestamp: number;
|
|
89
|
+
group: string;
|
|
90
|
+
}[]>;
|
|
91
|
+
};
|
|
92
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Share the alert group name with all its children.
|
|
4
|
+
* @param {Ref<string | undefined>} name the alert group name
|
|
5
|
+
*/
|
|
6
|
+
export declare function useAlertProvideGroup({ name, }: {
|
|
7
|
+
name: Ref<string | undefined>;
|
|
8
|
+
}): import("mitt").Emitter<{
|
|
9
|
+
close: string;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type VvDropdown from '@/components/VvDropdown/VvDropdown.vue';
|
|
3
|
+
export declare function useDropdownContextmenu(dropdownEl: Ref<typeof VvDropdown>, targetEl?: Ref<HTMLElement> | HTMLElement): {
|
|
4
|
+
x: Ref<number, number>;
|
|
5
|
+
y: Ref<number, number>;
|
|
6
|
+
getBoundingClientRect: () => {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
top: number;
|
|
12
|
+
left: number;
|
|
13
|
+
right: number;
|
|
14
|
+
bottom: number;
|
|
15
|
+
};
|
|
16
|
+
onContextmenu: (event: MouseEvent) => void;
|
|
17
|
+
onScroll: (event: HTMLElementEventMap["scroll"]) => void;
|
|
18
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Injects dropdown reference and the event bus
|
|
3
|
+
*/
|
|
4
|
+
export declare function useInjectedDropdownTrigger(): import("../../constants").DropdownTriggerState;
|
|
5
|
+
/**
|
|
6
|
+
* Injects dropdown item role
|
|
7
|
+
*/
|
|
8
|
+
export declare function useInjectedDropdownItem(): import("../../constants").DropdownItemState;
|
|
9
|
+
/**
|
|
10
|
+
* Injects dropdown action role
|
|
11
|
+
*/
|
|
12
|
+
export declare function useInjectedDropdownAction(): import("../../constants").DropdownActionState;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { DropdownItemState } from '../../constants';
|
|
3
|
+
import { DropdownItemRole, DropdownRole } from '../../constants';
|
|
4
|
+
/**
|
|
5
|
+
* Share the dropdown reference and the event bus with all its children.
|
|
6
|
+
* @param {Ref<HTMLElement | null>} reference the dropdown reference
|
|
7
|
+
*/
|
|
8
|
+
export declare function useDropdownProvideTrigger({ reference, id, expanded, aria, }: {
|
|
9
|
+
reference: Ref<HTMLElement | null | undefined>;
|
|
10
|
+
id: Ref<string | number>;
|
|
11
|
+
expanded: Ref<boolean>;
|
|
12
|
+
aria: Ref<{
|
|
13
|
+
'aria-controls': string;
|
|
14
|
+
'aria-haspopup': boolean;
|
|
15
|
+
'aria-expanded': boolean;
|
|
16
|
+
}>;
|
|
17
|
+
}): {
|
|
18
|
+
bus: import("mitt").Emitter<{
|
|
19
|
+
click: Event;
|
|
20
|
+
mouseover: Event;
|
|
21
|
+
mouseleave: Event;
|
|
22
|
+
}>;
|
|
23
|
+
component: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Share the dropdown item role with all its children.
|
|
27
|
+
* @param {Ref<string>} role the dropdown item role
|
|
28
|
+
*/
|
|
29
|
+
export declare function useDropdownProvideItem({ role, ...others }: Omit<DropdownItemState, 'role'> & {
|
|
30
|
+
role: Ref<`${DropdownRole}`>;
|
|
31
|
+
}): {
|
|
32
|
+
itemRole: globalThis.ComputedRef<DropdownItemRole>;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Share the dropdown item role with all its children.
|
|
36
|
+
* @param {Ref<string>} role the dropdown item role
|
|
37
|
+
*/
|
|
38
|
+
export declare function useDropdownProvideAction({ expanded, }: {
|
|
39
|
+
expanded?: Ref<boolean>;
|
|
40
|
+
}): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type VvDropdown from '@/components/VvDropdown/VvDropdown.vue';
|
|
3
|
+
export declare function useDropdownVirtualElement(dropdownEl: Ref<typeof VvDropdown>): {
|
|
4
|
+
x: Ref<number, number>;
|
|
5
|
+
y: Ref<number, number>;
|
|
6
|
+
getBoundingClientRect: () => {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
top: number;
|
|
12
|
+
left: number;
|
|
13
|
+
right: number;
|
|
14
|
+
bottom: number;
|
|
15
|
+
};
|
|
16
|
+
onScroll: (event: HTMLElementEventMap["scroll"]) => void;
|
|
17
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InjectionKey } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Injects a group state
|
|
4
|
+
*/
|
|
5
|
+
export declare function useGroupStateInject<GroupStateType>(groupKey: InjectionKey<GroupStateType>): {
|
|
6
|
+
group: GroupStateType | undefined;
|
|
7
|
+
isInGroup: globalThis.ComputedRef<boolean>;
|
|
8
|
+
getGroupOrLocalRef: <TProps extends object, TName extends keyof GroupStateType>(propName: TName, props: TProps, emit?: (event: string, ...args: unknown[]) => void) => GroupStateType[TName];
|
|
9
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Emitter } from 'mitt';
|
|
2
|
+
import type { InjectionKey, Ref } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* Share part of the state of the component with all its children.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useGroupStateProvide<TGroupState extends Record<string, Ref<unknown> | Emitter<any>>>(key: InjectionKey<TGroupState>, groupState: TGroupState): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { useAlert } from './alert/useAlert';
|
|
2
|
+
export { useDropdownContextmenu } from './dropdown/useDropdownContextmenu';
|
|
3
|
+
export { useDropdownVirtualElement } from './dropdown/useDropdownVirtualElement';
|
|
4
|
+
export { useBlurhash } from './useBlurhash';
|
|
5
|
+
export { useVirtualScroll } from './useVirtualScroll';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { computed as
|
|
1
|
+
import { computed as u, getCurrentInstance as _, onMounted as A, onUnmounted as T, reactive as z, ref as d, unref as c } from "vue";
|
|
2
2
|
import { wrap as P } from "comlink";
|
|
3
3
|
import D from "pica";
|
|
4
4
|
import { useVirtualizer as N } from "@tanstack/vue-virtual";
|
|
5
|
-
var j = 1e4, F = "info", g = "default",
|
|
5
|
+
var j = 1e4, F = "info", g = "default", U = "information", W = "check-circle", V = "warning", H = "error", w = /* @__PURE__ */ new Map([
|
|
6
6
|
["success", W],
|
|
7
|
-
["info",
|
|
7
|
+
["info", U],
|
|
8
8
|
["warning", V],
|
|
9
9
|
["danger", H]
|
|
10
10
|
]), m = z(/* @__PURE__ */ new Map([[g, /* @__PURE__ */ new Map()]]));
|
|
11
11
|
function Z() {
|
|
12
|
-
const n = ({ id: r = crypto.randomUUID(), group: a = g, title: s, icon: o =
|
|
12
|
+
const n = ({ id: r = crypto.randomUUID(), group: a = g, title: s, icon: o = U, content: i, footer: l, modifiers: f = F, dismissable: p = !0, autoClose: h = j, timestamp: I = Date.now() } = {}) => {
|
|
13
13
|
m.has(a) || m.set(a, /* @__PURE__ */ new Map());
|
|
14
|
-
const
|
|
14
|
+
const x = m.get(a), k = typeof f == "string" ? f.split(" ") : f;
|
|
15
15
|
if (!o) {
|
|
16
|
-
const
|
|
17
|
-
|
|
16
|
+
const M = k.find((O) => w.has(O));
|
|
17
|
+
M && (o = w.get(M));
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
x?.set(r.toString(), {
|
|
20
20
|
id: r,
|
|
21
21
|
group: a,
|
|
22
22
|
title: s,
|
|
@@ -26,11 +26,11 @@ function Z() {
|
|
|
26
26
|
modifiers: f,
|
|
27
27
|
dismissable: p,
|
|
28
28
|
autoClose: h,
|
|
29
|
-
timestamp:
|
|
29
|
+
timestamp: I
|
|
30
30
|
});
|
|
31
31
|
}, t = (r, a = g) => {
|
|
32
32
|
m.get(a)?.delete(r.toString());
|
|
33
|
-
}, e = (r = g) =>
|
|
33
|
+
}, e = (r = g) => u(() => {
|
|
34
34
|
const a = m.get(r);
|
|
35
35
|
return a && a instanceof Map ? [...a.values()].toSorted((s, o) => s.timestamp - o.timestamp) : [];
|
|
36
36
|
});
|
|
@@ -43,12 +43,12 @@ function Z() {
|
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
function nn(n, t) {
|
|
46
|
-
const { x: e, y: r, getBoundingClientRect: a, onScroll: s } =
|
|
46
|
+
const { x: e, y: r, getBoundingClientRect: a, onScroll: s } = $(n), o = (l) => {
|
|
47
47
|
e.value = l.clientX, r.value = l.clientY, l.preventDefault(), n.value.show();
|
|
48
|
-
}, i =
|
|
48
|
+
}, i = u(() => c(t));
|
|
49
49
|
return i && _() && (A(() => {
|
|
50
50
|
i.value?.addEventListener("contextmenu", o, !1);
|
|
51
|
-
}),
|
|
51
|
+
}), T(() => {
|
|
52
52
|
i.value?.removeEventListener("contextmenu", o);
|
|
53
53
|
})), {
|
|
54
54
|
x: e,
|
|
@@ -59,16 +59,16 @@ function nn(n, t) {
|
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
function B(n) {
|
|
62
|
-
if (!n) return;
|
|
62
|
+
if (!n || typeof globalThis.getComputedStyle != "function" || typeof document > "u") return;
|
|
63
63
|
let t = n.parentElement;
|
|
64
64
|
for (; t; ) {
|
|
65
|
-
const { overflow: e } =
|
|
65
|
+
const { overflow: e } = globalThis.getComputedStyle(t);
|
|
66
66
|
if (e.split(" ").every((r) => r === "auto" || r === "scroll")) return t;
|
|
67
67
|
t = t.parentElement;
|
|
68
68
|
}
|
|
69
69
|
return document.documentElement;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function $(n) {
|
|
72
72
|
const t = d(0), e = d(0), r = d();
|
|
73
73
|
let a = 0, s = 0, o = 0, i = 0;
|
|
74
74
|
const l = (p) => {
|
|
@@ -86,7 +86,7 @@ function G(n) {
|
|
|
86
86
|
});
|
|
87
87
|
return _() && (A(() => {
|
|
88
88
|
n.value && (n.value.init({ getBoundingClientRect: f }), r.value = B(n.value.$el), r.value && r.value.addEventListener("scroll", l));
|
|
89
|
-
}),
|
|
89
|
+
}), T(() => {
|
|
90
90
|
r.value && r.value.removeEventListener("scroll", l);
|
|
91
91
|
})), {
|
|
92
92
|
x: t,
|
|
@@ -95,7 +95,7 @@ function G(n) {
|
|
|
95
95
|
onScroll: l
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
var
|
|
98
|
+
var C = `(function() {
|
|
99
99
|
var v = [
|
|
100
100
|
"0",
|
|
101
101
|
"1",
|
|
@@ -514,8 +514,8 @@ var I = `(function() {
|
|
|
514
514
|
isBlurhashValid: Y
|
|
515
515
|
});
|
|
516
516
|
})();
|
|
517
|
-
`, E = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",
|
|
518
|
-
function
|
|
517
|
+
`, E = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", C], { type: "text/javascript;charset=utf-8" });
|
|
518
|
+
function G(n) {
|
|
519
519
|
let t;
|
|
520
520
|
try {
|
|
521
521
|
if (t = E && (self.URL || self.webkitURL).createObjectURL(E), !t) throw "";
|
|
@@ -524,17 +524,17 @@ function $(n) {
|
|
|
524
524
|
(self.URL || self.webkitURL).revokeObjectURL(t);
|
|
525
525
|
}), e;
|
|
526
526
|
} catch {
|
|
527
|
-
return new Worker("data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
527
|
+
return new Worker("data:text/javascript;charset=utf-8," + encodeURIComponent(C), { name: n?.name });
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
530
|
var v;
|
|
531
531
|
function y() {
|
|
532
|
-
return v || (v = P(new
|
|
532
|
+
return v || (v = P(new G())), v;
|
|
533
533
|
}
|
|
534
534
|
function b(n) {
|
|
535
535
|
return new Promise((t, e) => {
|
|
536
536
|
const r = new Image();
|
|
537
|
-
r.onload = () => t(r), r.onerror = (
|
|
537
|
+
r.onload = () => t(r), r.onerror = () => e(/* @__PURE__ */ new Error(`Failed to load image: ${n}`)), r.src = n;
|
|
538
538
|
});
|
|
539
539
|
}
|
|
540
540
|
function Y(n, t, e) {
|
|
@@ -582,17 +582,17 @@ function S(n) {
|
|
|
582
582
|
function en(n) {
|
|
583
583
|
const t = N({
|
|
584
584
|
get count() {
|
|
585
|
-
return
|
|
585
|
+
return c(n.count);
|
|
586
586
|
},
|
|
587
|
-
getScrollElement: () =>
|
|
587
|
+
getScrollElement: () => c(n.scrollEl),
|
|
588
588
|
getItemKey: n.getItemKey,
|
|
589
589
|
estimateSize: (i) => {
|
|
590
|
-
const l =
|
|
590
|
+
const l = c(n.estimateSize);
|
|
591
591
|
return typeof l == "function" ? l(i) : L(l);
|
|
592
592
|
},
|
|
593
|
-
overscan: L(
|
|
594
|
-
horizontal:
|
|
595
|
-
}), e =
|
|
593
|
+
overscan: L(c(n.overscan)),
|
|
594
|
+
horizontal: c(n.horizontal)
|
|
595
|
+
}), e = u(() => t.value.getVirtualItems()), r = u(() => e.value.length), a = u(() => e.value[0]), s = u(() => e.value[r.value - 1]), o = u(() => t.value.getTotalSize() ?? 0);
|
|
596
596
|
return {
|
|
597
597
|
virtualizer: t,
|
|
598
598
|
virtualItems: e,
|
|
@@ -600,20 +600,20 @@ function en(n) {
|
|
|
600
600
|
firstVirtualItem: a,
|
|
601
601
|
lastVirtualItem: s,
|
|
602
602
|
totalSize: o,
|
|
603
|
-
startSpacer:
|
|
603
|
+
startSpacer: u(() => {
|
|
604
604
|
const i = a.value?.start ?? 0;
|
|
605
605
|
return {
|
|
606
606
|
show: i > 0,
|
|
607
607
|
size: i,
|
|
608
|
-
style:
|
|
608
|
+
style: c(n.horizontal) ? R(i) : S(i)
|
|
609
609
|
};
|
|
610
610
|
}),
|
|
611
|
-
endSpacer:
|
|
611
|
+
endSpacer: u(() => {
|
|
612
612
|
const i = s.value?.end ?? 0, l = o.value - i;
|
|
613
613
|
return {
|
|
614
614
|
show: l > 0,
|
|
615
615
|
size: l,
|
|
616
|
-
style:
|
|
616
|
+
style: c(n.horizontal) ? R(l) : S(l)
|
|
617
617
|
};
|
|
618
618
|
})
|
|
619
619
|
};
|
|
@@ -622,6 +622,6 @@ export {
|
|
|
622
622
|
Z as useAlert,
|
|
623
623
|
tn as useBlurhash,
|
|
624
624
|
nn as useDropdownContextmenu,
|
|
625
|
-
|
|
625
|
+
$ as useDropdownVirtualElement,
|
|
626
626
|
en as useVirtualScroll
|
|
627
627
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(c,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue"),require("comlink"),require("pica"),require("@tanstack/vue-virtual")):typeof define=="function"&&define.amd?define(["exports","vue","comlink","pica","@tanstack/vue-virtual"],a):(c=typeof globalThis<"u"?globalThis:c||self,a(c.composables={},c.Vue,c.comlink,c.pica,c.TanstackVueVirtual))})(this,function(c,a,U,g,P){Object.defineProperty(c,Symbol.toStringTag,{value:"Module"});var C=Object.create,v=Object.defineProperty,I=Object.getOwnPropertyDescriptor,x=Object.getOwnPropertyNames,k=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,z=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=x(t),u=0,i=o.length,l;u<i;u++)l=o[u],!j.call(n,l)&&l!==e&&v(n,l,{get:(s=>t[s]).bind(null,l),enumerable:!(r=I(t,l))||r.enumerable});return n},D=(n,t,e)=>(e=n!=null?C(k(n)):{},z(t||!n||!n.__esModule?v(e,"default",{value:n,enumerable:!0}):e,n));g=D(g,1);var N=1e4,F="info",m="default",M="information",V="check-circle",W="warning",H="error",y=new Map([["success",V],["info",M],["warning",W],["danger",H]]),h=(0,a.reactive)(new Map([[m,new Map]]));function B(){const n=({id:r=crypto.randomUUID(),group:o=m,title:u,icon:i=M,content:l,footer:s,modifiers:f=F,dismissable:w=!0,autoClose:p=N,timestamp:Q=Date.now()}={})=>{h.has(o)||h.set(o,new Map);const Z=h.get(o),nn=typeof f=="string"?f.split(" "):f;if(!i){const A=nn.find(tn=>y.has(tn));A&&(i=y.get(A))}Z?.set(r.toString(),{id:r,group:o,title:u,icon:i,content:l,footer:s,modifiers:f,dismissable:w,autoClose:p,timestamp:Q})},t=(r,o=m)=>{h.get(o)?.delete(r.toString())},e=(r=m)=>(0,a.computed)(()=>{const o=h.get(r);return o&&o instanceof Map?[...o.values()].toSorted((u,i)=>u.timestamp-i.timestamp):[]});return{groups:h,alerts:e(),addAlert:n,removeAlert:t,getAlerts:e}}function $(n,t){const{x:e,y:r,getBoundingClientRect:o,onScroll:u}=E(n),i=s=>{e.value=s.clientX,r.value=s.clientY,s.preventDefault(),n.value.show()},l=(0,a.computed)(()=>(0,a.unref)(t));return l&&(0,a.getCurrentInstance)()&&((0,a.onMounted)(()=>{l.value?.addEventListener("contextmenu",i,!1)}),(0,a.onUnmounted)(()=>{l.value?.removeEventListener("contextmenu",i)})),{x:e,y:r,getBoundingClientRect:o,onContextmenu:i,onScroll:u}}function G(n){if(!n||typeof globalThis.getComputedStyle!="function"||typeof document>"u")return;let t=n.parentElement;for(;t;){const{overflow:e}=globalThis.getComputedStyle(t);if(e.split(" ").every(r=>r==="auto"||r==="scroll"))return t;t=t.parentElement}return document.documentElement}function E(n){const t=(0,a.ref)(0),e=(0,a.ref)(0),r=(0,a.ref)();let o=0,u=0,i=0,l=0;const s=w=>{const p=w.target;o=p.scrollLeft-l,u=p.scrollTop-i,e.value=e.value-u,t.value=t.value-o,l=p.scrollLeft,i=p.scrollTop},f=()=>({width:0,height:0,x:t.value,y:e.value,top:e.value,left:t.value,right:t.value,bottom:e.value});return(0,a.getCurrentInstance)()&&((0,a.onMounted)(()=>{n.value&&(n.value.init({getBoundingClientRect:f}),r.value=G(n.value.$el),r.value&&r.value.addEventListener("scroll",s))}),(0,a.onUnmounted)(()=>{r.value&&r.value.removeEventListener("scroll",s)})),{x:t,y:e,getBoundingClientRect:f,onScroll:s}}var b=`(function() {
|
|
2
2
|
var v = [
|
|
3
3
|
"0",
|
|
4
4
|
"1",
|
|
@@ -417,4 +417,4 @@
|
|
|
417
417
|
isBlurhashValid: Y
|
|
418
418
|
});
|
|
419
419
|
})();
|
|
420
|
-
`,_=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",b],{type:"text/javascript;charset=utf-8"});function q(n){let t;try{if(t=_&&(self.URL||self.webkitURL).createObjectURL(_),!t)throw"";const e=new Worker(t,{name:n?.name});return e.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),e}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(b),{name:n?.name})}}var d;function L(){return d||(d=(0,U.wrap)(new q)),d}function R(n){return new Promise((t,e)=>{const r=new Image;r.onload=()=>t(r),r.onerror=(
|
|
420
|
+
`,_=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",b],{type:"text/javascript;charset=utf-8"});function q(n){let t;try{if(t=_&&(self.URL||self.webkitURL).createObjectURL(_),!t)throw"";const e=new Worker(t,{name:n?.name});return e.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),e}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(b),{name:n?.name})}}var d;function L(){return d||(d=(0,U.wrap)(new q)),d}function R(n){return new Promise((t,e)=>{const r=new Image;r.onload=()=>t(r),r.onerror=()=>e(new Error(`Failed to load image: ${n}`)),r.src=n})}function Y(n,t,e){return n>t?{width:e,height:Math.round(e*(t/n))}:{width:Math.round(e*(n/t)),height:e}}async function X(n,t,e){const r=(0,g.default)(),o=document.createElement("canvas");return o.width=t,o.height=e,(await r.resize(n,o)).getContext("2d")?.getImageData(0,0,t,e).data}function K(){async function n(t){const e=URL.createObjectURL(t);try{const r=await R(e);if("width"in r&&"height"in r){const{width:o,height:u}=Y(r.width,r.height,32),i=await X(r,o,u);if(i)return L().encode(i,o,u,4,4)}}finally{URL.revokeObjectURL(e)}}return{encode:n,decode:(...t)=>L().decode(...t),loadImage:R}}function S(n){if(n!==void 0)return typeof n=="number"?n:Number.parseInt(n.replace("px",""),10)}function O(n){return{width:`${n}px`}}function T(n){return{height:`${n}px`}}function J(n){const t=(0,P.useVirtualizer)({get count(){return(0,a.unref)(n.count)},getScrollElement:()=>(0,a.unref)(n.scrollEl),getItemKey:n.getItemKey,estimateSize:l=>{const s=(0,a.unref)(n.estimateSize);return typeof s=="function"?s(l):S(s)},overscan:S((0,a.unref)(n.overscan)),horizontal:(0,a.unref)(n.horizontal)}),e=(0,a.computed)(()=>t.value.getVirtualItems()),r=(0,a.computed)(()=>e.value.length),o=(0,a.computed)(()=>e.value[0]),u=(0,a.computed)(()=>e.value[r.value-1]),i=(0,a.computed)(()=>t.value.getTotalSize()??0);return{virtualizer:t,virtualItems:e,virtualItemsLength:r,firstVirtualItem:o,lastVirtualItem:u,totalSize:i,startSpacer:(0,a.computed)(()=>{const l=o.value?.start??0;return{show:l>0,size:l,style:(0,a.unref)(n.horizontal)?O(l):T(l)}}),endSpacer:(0,a.computed)(()=>{const l=u.value?.end??0,s=i.value-l;return{show:s>0,size:s,style:(0,a.unref)(n.horizontal)?O(s):T(s)}})}}c.useAlert=B,c.useBlurhash=K,c.useDropdownContextmenu=$,c.useDropdownVirtualElement=E,c.useVirtualScroll=J});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare function loadImage(src: string): Promise<CanvasImageSource>;
|
|
2
|
+
export declare function useBlurhash(): {
|
|
3
|
+
encode: (file: File) => Promise<string | undefined>;
|
|
4
|
+
decode: (blurhash: string, width: number, height: number, punch?: number | undefined) => Promise<Uint8ClampedArray<ArrayBufferLike>>;
|
|
5
|
+
loadImage: typeof loadImage;
|
|
6
|
+
};
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { MaybeElement, MaybeElementRef } from '@vueuse/core';
|
|
2
|
+
export declare function useComponentFocus(inputTemplateRef: MaybeElementRef<MaybeElement>, emit: ((name: 'blur', ...args: any[]) => void) & ((name: 'focus', ...args: any[]) => void) & ((name: any, ...args: any[]) => void)): {
|
|
3
|
+
focused: globalThis.WritableComputedRef<boolean, boolean>;
|
|
4
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { VvIconProps } from '../components/VvIcon';
|
|
3
|
+
export declare function useComponentIcon(icon?: Ref<string | VvIconProps | undefined>, iconPosition?: Ref<string | undefined>): {
|
|
4
|
+
hasIcon: globalThis.ComputedRef<VvIconProps | undefined>;
|
|
5
|
+
hasIconLeft: globalThis.ComputedRef<VvIconProps | undefined>;
|
|
6
|
+
hasIconRight: globalThis.ComputedRef<VvIconProps | undefined>;
|
|
7
|
+
hasIconTop: globalThis.ComputedRef<VvIconProps | undefined>;
|
|
8
|
+
hasIconBottom: globalThis.ComputedRef<VvIconProps | undefined>;
|
|
9
|
+
hasIconBefore: globalThis.ComputedRef<VvIconProps | undefined>;
|
|
10
|
+
hasIconAfter: globalThis.ComputedRef<VvIconProps | undefined>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
export declare function useDebouncedInput(modelValue: Ref | undefined, emit: (event: string, value: string | number) => void, ms?: string | number, { getter, setter, }?: {
|
|
3
|
+
getter?: (value: string | number) => string | number;
|
|
4
|
+
setter?: (value: string | number) => string | number;
|
|
5
|
+
}): Ref;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Option } from '../types/generic';
|
|
2
|
+
export declare function useOptions(props: any): {
|
|
3
|
+
options: globalThis.Ref<any, any>;
|
|
4
|
+
getOptionLabel: <T extends string | Option>(option: T) => string;
|
|
5
|
+
getOptionValue: <T extends string | Option>(option: T) => any;
|
|
6
|
+
isOptionDisabled: <T extends string | Option>(option: T) => boolean;
|
|
7
|
+
getOptionGrouped: <T extends string | Option>(option: T) => T[];
|
|
8
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import { StorageType } from '@/constants';
|
|
3
|
+
export declare function usePersistence<T>(storageKey: Ref<string | undefined> | undefined, storageType?: Ref<`${StorageType}`> | `${StorageType}`, defaultValue?: T): Ref<T | undefined, T | undefined>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
export declare function useTextCount(text: Ref<string | undefined | null> | string, options?: {
|
|
3
|
+
mode?: string | boolean;
|
|
4
|
+
upperLimit?: number;
|
|
5
|
+
lowerLimit?: number;
|
|
6
|
+
}): {
|
|
7
|
+
length: globalThis.ComputedRef<number>;
|
|
8
|
+
gap: globalThis.ComputedRef<number>;
|
|
9
|
+
formatted: globalThis.ComputedRef<string | number | undefined>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
export type { ScrollToOptions } from '@tanstack/vue-virtual';
|
|
3
|
+
export declare function useVirtualScroll(settings: {
|
|
4
|
+
scrollEl: HTMLElement | null | Ref<HTMLElement | null>;
|
|
5
|
+
count: number | Ref<number>;
|
|
6
|
+
estimateSize: string | number | ((index: number) => number) | Ref<string | number | ((index: number) => number)>;
|
|
7
|
+
getItemKey?: (index: number) => number | string | bigint;
|
|
8
|
+
overscan?: string | number | Ref<string | number>;
|
|
9
|
+
horizontal?: boolean | Ref<boolean>;
|
|
10
|
+
}): {
|
|
11
|
+
virtualizer: Ref<import("@tanstack/vue-virtual").Virtualizer<HTMLElement, Element>, import("@tanstack/vue-virtual").Virtualizer<HTMLElement, Element>>;
|
|
12
|
+
virtualItems: globalThis.ComputedRef<import("@tanstack/vue-virtual").VirtualItem[]>;
|
|
13
|
+
virtualItemsLength: globalThis.ComputedRef<number>;
|
|
14
|
+
firstVirtualItem: globalThis.ComputedRef<import("@tanstack/vue-virtual").VirtualItem>;
|
|
15
|
+
lastVirtualItem: globalThis.ComputedRef<import("@tanstack/vue-virtual").VirtualItem>;
|
|
16
|
+
totalSize: globalThis.ComputedRef<number>;
|
|
17
|
+
startSpacer: globalThis.ComputedRef<{
|
|
18
|
+
show: boolean;
|
|
19
|
+
size: number;
|
|
20
|
+
style: {
|
|
21
|
+
width: string;
|
|
22
|
+
} | {
|
|
23
|
+
height: string;
|
|
24
|
+
};
|
|
25
|
+
}>;
|
|
26
|
+
endSpacer: globalThis.ComputedRef<{
|
|
27
|
+
show: boolean;
|
|
28
|
+
size: number;
|
|
29
|
+
style: {
|
|
30
|
+
width: string;
|
|
31
|
+
} | {
|
|
32
|
+
height: string;
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
35
|
+
};
|