@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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { computed as r, createBlock as _, createCommentVNode as b, createElementBlock as g, createElementVNode as W, createTextVNode as
|
|
1
|
+
import { computed as r, createBlock as _, createCommentVNode as b, createElementBlock as g, createElementVNode as W, createTextVNode as I, defineComponent as R, guardReactiveProps as j, inject as D, mergeDefaults as Q, mergeProps as M, normalizeProps as E, onBeforeUnmount as X, openBlock as p, ref as q, renderSlot as y, toDisplayString as P, toRefs as Z, unref as u, useId as x, watch as ee, withModifiers as te } from "vue";
|
|
2
2
|
import { Icon as oe, addIcon as ae, iconLoaded as w } from "@iconify/vue";
|
|
3
|
-
var
|
|
3
|
+
var T = /* @__PURE__ */ (function(e) {
|
|
4
4
|
return e.local = "local", e.session = "session", e;
|
|
5
5
|
})({}), re = /* @__PURE__ */ (function(e) {
|
|
6
6
|
return e.absolute = "absolute", e.fixed = "fixed", e;
|
|
@@ -10,7 +10,7 @@ var F = /* @__PURE__ */ (function(e) {
|
|
|
10
10
|
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;
|
|
11
11
|
})({}), $ = /* @__PURE__ */ (function(e) {
|
|
12
12
|
return e.before = "before", e.after = "after", e;
|
|
13
|
-
})({}),
|
|
13
|
+
})({}), F = /* @__PURE__ */ (function(e) {
|
|
14
14
|
return e.button = "button", e.submit = "submit", e.reset = "reset", e;
|
|
15
15
|
})({}), ne = /* @__PURE__ */ (function(e) {
|
|
16
16
|
return e.nuxtLink = "nuxt-link", e.routerLink = "router-link", e.a = "a", e.button = "button", e;
|
|
@@ -90,7 +90,7 @@ var F = /* @__PURE__ */ (function(e) {
|
|
|
90
90
|
}, ye = { pressed: {
|
|
91
91
|
type: Boolean,
|
|
92
92
|
default: !1
|
|
93
|
-
} },
|
|
93
|
+
} }, B = { label: {
|
|
94
94
|
type: [String, Number],
|
|
95
95
|
default: void 0
|
|
96
96
|
} }, L = { readonly: {
|
|
@@ -230,7 +230,7 @@ var F = /* @__PURE__ */ (function(e) {
|
|
|
230
230
|
...me,
|
|
231
231
|
...z,
|
|
232
232
|
...he,
|
|
233
|
-
...
|
|
233
|
+
...B,
|
|
234
234
|
minlength: {
|
|
235
235
|
type: [String, Number],
|
|
236
236
|
default: void 0
|
|
@@ -253,7 +253,7 @@ var F = /* @__PURE__ */ (function(e) {
|
|
|
253
253
|
...C,
|
|
254
254
|
...L,
|
|
255
255
|
...V,
|
|
256
|
-
...
|
|
256
|
+
...B,
|
|
257
257
|
...k,
|
|
258
258
|
value: {
|
|
259
259
|
type: [
|
|
@@ -280,7 +280,7 @@ var F = /* @__PURE__ */ (function(e) {
|
|
|
280
280
|
...C,
|
|
281
281
|
...L,
|
|
282
282
|
...V,
|
|
283
|
-
...
|
|
283
|
+
...B,
|
|
284
284
|
...k,
|
|
285
285
|
...K,
|
|
286
286
|
modelValue: {
|
|
@@ -303,15 +303,15 @@ var F = /* @__PURE__ */ (function(e) {
|
|
|
303
303
|
}
|
|
304
304
|
}, He = {
|
|
305
305
|
...C,
|
|
306
|
-
...
|
|
306
|
+
...B,
|
|
307
307
|
...ye,
|
|
308
308
|
...ce,
|
|
309
309
|
...pe,
|
|
310
310
|
...ve,
|
|
311
311
|
type: {
|
|
312
312
|
type: String,
|
|
313
|
-
default:
|
|
314
|
-
validator: (e) => Object.values(
|
|
313
|
+
default: F.button,
|
|
314
|
+
validator: (e) => Object.values(F).includes(e)
|
|
315
315
|
},
|
|
316
316
|
ariaLabel: {
|
|
317
317
|
type: String,
|
|
@@ -324,18 +324,18 @@ var F = /* @__PURE__ */ (function(e) {
|
|
|
324
324
|
}, Je = {
|
|
325
325
|
storageType: {
|
|
326
326
|
type: String,
|
|
327
|
-
default:
|
|
328
|
-
validator: (e) => Object.values(
|
|
327
|
+
default: T.local,
|
|
328
|
+
validator: (e) => Object.values(T).includes(e)
|
|
329
329
|
},
|
|
330
330
|
storageKey: String
|
|
331
331
|
};
|
|
332
332
|
function Ce() {
|
|
333
333
|
return D(ue, {});
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function Be(e) {
|
|
336
336
|
return r(() => String(e?.value || x()));
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function Ie(e, o) {
|
|
339
339
|
const l = r(() => typeof e?.value == "string" ? { name: e?.value } : e?.value), n = r(() => o?.value === $.before ? l.value : void 0), s = r(() => o?.value === $.after ? l.value : void 0);
|
|
340
340
|
return {
|
|
341
341
|
hasIcon: l,
|
|
@@ -357,7 +357,7 @@ function J(e, o, l) {
|
|
|
357
357
|
}), n;
|
|
358
358
|
});
|
|
359
359
|
}
|
|
360
|
-
var
|
|
360
|
+
var Pe = {
|
|
361
361
|
...U,
|
|
362
362
|
...z,
|
|
363
363
|
modifiers: {
|
|
@@ -394,14 +394,14 @@ var Ie = {
|
|
|
394
394
|
}
|
|
395
395
|
}, we = ["close"];
|
|
396
396
|
function Oe(e, o) {
|
|
397
|
-
const { bus: l } = Ce(), n =
|
|
397
|
+
const { bus: l } = Ce(), n = Be(r(() => e.id)), s = r(() => `${n.value}-title`);
|
|
398
398
|
let a;
|
|
399
|
-
const
|
|
399
|
+
const d = () => {
|
|
400
400
|
a && clearTimeout(a), o("close", n.value), l?.emit("close", n.value);
|
|
401
401
|
};
|
|
402
402
|
ee(() => e.autoClose, (c) => {
|
|
403
403
|
if (c > 0) {
|
|
404
|
-
a = setTimeout(
|
|
404
|
+
a = setTimeout(d, c);
|
|
405
405
|
return;
|
|
406
406
|
}
|
|
407
407
|
a && clearTimeout(a);
|
|
@@ -411,21 +411,21 @@ function Oe(e, o) {
|
|
|
411
411
|
const t = q(!1), v = () => {
|
|
412
412
|
t.value = !0, a && clearTimeout(a);
|
|
413
413
|
}, h = () => {
|
|
414
|
-
t.value = !1, e.autoClose > 0 && (a = setTimeout(
|
|
415
|
-
}, { hasIcon: S } =
|
|
414
|
+
t.value = !1, e.autoClose > 0 && (a = setTimeout(d, e.autoClose));
|
|
415
|
+
}, { hasIcon: S } = Ie(r(() => e.icon)), i = J("vv-alert", r(() => e.modifiers), r(() => ({
|
|
416
416
|
dismissable: e.autoClose > 0 || e.dismissable,
|
|
417
417
|
"auto-close": e.autoClose > 0,
|
|
418
418
|
hover: t.value
|
|
419
|
-
}))),
|
|
419
|
+
}))), f = r(() => ({ "--alert-duration": `${e.autoClose}ms` }));
|
|
420
420
|
return {
|
|
421
|
-
close:
|
|
421
|
+
close: d,
|
|
422
422
|
hasIcon: S,
|
|
423
423
|
hasTitleId: s,
|
|
424
424
|
hasProps: r(() => ({
|
|
425
425
|
onMouseover: v,
|
|
426
426
|
onMouseleave: h,
|
|
427
427
|
class: i.value,
|
|
428
|
-
style:
|
|
428
|
+
style: f.value,
|
|
429
429
|
role: e.role,
|
|
430
430
|
"aria-labelledby": s.value
|
|
431
431
|
}))
|
|
@@ -455,31 +455,30 @@ var ke = { name: "VvIcon" }, Le = /* @__PURE__ */ R({
|
|
|
455
455
|
modifiers: {}
|
|
456
456
|
}, fe),
|
|
457
457
|
setup(e) {
|
|
458
|
-
const o = e, l = r(() => typeof o.rotate == "string" ? Number.parseFloat(o.rotate) : o.rotate), n = q(!0), s = Ne(), { modifiers: a } = Z(o),
|
|
459
|
-
const i = o.name ?? "",
|
|
460
|
-
if (w(
|
|
458
|
+
const o = e, l = r(() => typeof o.rotate == "string" ? Number.parseFloat(o.rotate) : o.rotate), n = q(!0), s = Ne(), { modifiers: a } = Z(o), d = J("vv-icon", a), t = r(() => o.provider || s?.iconsProvider), v = r(() => {
|
|
459
|
+
const i = o.name ?? "", f = `@${t.value}:${o.prefix}:${i}`;
|
|
460
|
+
if (w(f)) return f;
|
|
461
461
|
const c = s?.iconsCollections.find((Y) => w(`@${t.value}:${Y.prefix}:${i}`));
|
|
462
462
|
return c ? `@${t.value}:${c.prefix}:${i}` : i;
|
|
463
463
|
});
|
|
464
464
|
function h(i) {
|
|
465
|
-
|
|
466
|
-
return d ? d.parseFromString(i, "text/html").querySelector("svg") : null;
|
|
465
|
+
return globalThis.window === void 0 ? null : new globalThis.DOMParser().parseFromString(i, "text/html").querySelector("svg");
|
|
467
466
|
}
|
|
468
467
|
function S(i) {
|
|
469
|
-
const
|
|
470
|
-
|
|
468
|
+
const f = h(i), c = f?.innerHTML.trim() || "";
|
|
469
|
+
f && c && ae(`@${t.value}:${o.prefix}:${o.name}`, {
|
|
471
470
|
body: c,
|
|
472
|
-
height:
|
|
473
|
-
width:
|
|
471
|
+
height: f.viewBox.baseVal.height,
|
|
472
|
+
width: f.viewBox.baseVal.width
|
|
474
473
|
});
|
|
475
474
|
}
|
|
476
475
|
return s && o.src && !w(`@${t.value}:${o.prefix}:${o.name}`) && (n.value = !1, s.fetchIcon(o.src).then((i) => {
|
|
477
476
|
i && S(i), n.value = !0;
|
|
478
477
|
}).catch((i) => {
|
|
479
478
|
throw n.value = !0, new Error(`Error during fetch icon: ${i?.message}`);
|
|
480
|
-
})), o.svg && S(o.svg), (i,
|
|
479
|
+
})), o.svg && S(o.svg), (i, f) => u(n) ? (p(), _(u(oe), M({
|
|
481
480
|
key: 0,
|
|
482
|
-
class: u(
|
|
481
|
+
class: u(d)
|
|
483
482
|
}, {
|
|
484
483
|
inline: e.inline,
|
|
485
484
|
width: e.width,
|
|
@@ -495,19 +494,19 @@ var ke = { name: "VvIcon" }, Le = /* @__PURE__ */ R({
|
|
|
495
494
|
}), Ve = Le, Ae = {
|
|
496
495
|
key: 0,
|
|
497
496
|
class: "vv-alert__header"
|
|
498
|
-
}, je = ["id"], Ee = ["aria-label"],
|
|
497
|
+
}, je = ["id"], Ee = ["aria-label"], Te = {
|
|
499
498
|
key: 1,
|
|
500
499
|
class: "vv-alert__content"
|
|
501
|
-
},
|
|
500
|
+
}, Fe = {
|
|
502
501
|
key: 2,
|
|
503
502
|
class: "vv-alert__footer"
|
|
504
503
|
}, _e = { name: "VvAlert" }, Re = /* @__PURE__ */ R({
|
|
505
504
|
..._e,
|
|
506
|
-
props:
|
|
505
|
+
props: Pe,
|
|
507
506
|
emits: we,
|
|
508
507
|
setup(e, { expose: o, emit: l }) {
|
|
509
|
-
const { hasProps: n, hasTitleId: s, hasIcon: a, close:
|
|
510
|
-
return o({ close:
|
|
508
|
+
const { hasProps: n, hasTitleId: s, hasIcon: a, close: d } = Oe(e, l);
|
|
509
|
+
return o({ close: d }), (t, v) => (p(), g("div", E(j(u(n))), [
|
|
511
510
|
t.$slots.header || t.$slots.title || t.$slots.close || t.$slots["title::before"] || t.$slots["title::after"] || t.title || u(a) || t.dismissable || t.autoClose ? (p(), g("div", Ae, [
|
|
512
511
|
u(a) ? (p(), _(Ve, M({ key: 0 }, u(a), { class: "vv-alert__icon" }), null, 16)) : b("v-if", !0),
|
|
513
512
|
y(t.$slots, "header", {}, () => [
|
|
@@ -516,19 +515,19 @@ var ke = { name: "VvIcon" }, Le = /* @__PURE__ */ R({
|
|
|
516
515
|
key: 0,
|
|
517
516
|
id: u(s),
|
|
518
517
|
class: "vv-alert__title"
|
|
519
|
-
}, [y(t.$slots, "title", {}, () => [
|
|
518
|
+
}, [y(t.$slots, "title", {}, () => [I(P(t.title), 1)])], 8, je)) : b("v-if", !0),
|
|
520
519
|
y(t.$slots, "title::after")
|
|
521
520
|
]),
|
|
522
|
-
y(t.$slots, "close", E(j({ close: u(
|
|
521
|
+
y(t.$slots, "close", E(j({ close: u(d) })), () => [t.dismissable || t.autoClose ? (p(), g("button", {
|
|
523
522
|
key: 0,
|
|
524
523
|
class: "vv-alert__close",
|
|
525
524
|
type: "button",
|
|
526
525
|
"aria-label": t.closeLabel,
|
|
527
|
-
onClick: v[0] || (v[0] = te((...h) => u(
|
|
526
|
+
onClick: v[0] || (v[0] = te((...h) => u(d) && u(d)(...h), ["stop"]))
|
|
528
527
|
}, [...v[1] || (v[1] = [W("div", { class: "vv-alert__close-mask" }, null, -1)])], 8, Ee)) : b("v-if", !0)])
|
|
529
528
|
])) : b("v-if", !0),
|
|
530
|
-
t.$slots.default || t.content ? (p(), g("div",
|
|
531
|
-
t.$slots.footer || t.footer ? (p(), g("div",
|
|
529
|
+
t.$slots.default || t.content ? (p(), g("div", Te, [y(t.$slots, "default", {}, () => [I(P(t.content), 1)])])) : b("v-if", !0),
|
|
530
|
+
t.$slots.footer || t.footer ? (p(), g("div", Fe, [y(t.$slots, "footer", {}, () => [I(P(t.footer), 1)])])) : b("v-if", !0)
|
|
532
531
|
], 16));
|
|
533
532
|
}
|
|
534
533
|
}), Ye = Re;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,f){typeof exports=="object"&&typeof module<"u"?module.exports=f(require("vue"),require("@iconify/vue")):typeof define=="function"&&define.amd?define(["vue","@iconify/vue"],f):(e=typeof globalThis<"u"?globalThis:e||self,e.VvAlert=f(e.Vue,e.IconifyVue))})(this,function(e,f){var I=(function(t){return t.local="local",t.session="session",t})({}),j=(function(t){return t.absolute="absolute",t.fixed="fixed",t})({}),m=(function(t){return t.left="left",t.right="right",t.top="top",t.bottom="bottom",t})({}),T=(function(t){return t.topStart="top-start",t.topEnd="top-end",t.bottomStart="bottom-start",t.bottomEnd="bottom-end",t.leftStart="left-start",t.leftEnd="left-end",t.rightStart="right-start",t.rightEnd="right-end",t})({}),y=(function(t){return t.before="before",t.after="after",t})({}),N=(function(t){return t.button="button",t.submit="submit",t.reset="reset",t})({}),F=(function(t){return t.nuxtLink="nuxt-link",t.routerLink="router-link",t.a="a",t.button="button",t})({}),R=(function(t){return t.alert="alert",t.alertdialog="alertdialog",t})({}),D=Symbol.for("volver"),q=Symbol.for("alertGroup"),M={showPassword:"eye-on",hidePassword:"eye-off",showDatePicker:"calendar",showTimePicker:"time",showColorPicker:"color",clear:"close",add:"add",remove:"trash",edit:"edit",download:"download"},z={prefix:"normal"},K={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},S={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}},C={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},g={disabled:{type:Boolean,default:!1}},V={required:{type:Boolean,default:!1}},_={active:{type:Boolean,default:!1}},G={current:{type:Boolean,default:!1}},ge={showClearAction:{type:Boolean,default:!1},iconClear:{type:[String,Object],default:M.clear},labelClear:{type:String,default:"Clear"}},U={pressed:{type:Boolean,default:!1}},b={label:{type:[String,Number],default:void 0}},P={readonly:{type:Boolean,default:!1}},$={modifiers:{type:[String,Array],default:void 0}},k={hintLabel:{type:String,default:""}},H={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},J={count:{type:[Boolean,String],default:!1,validator:t=>[!0,!1,"limit","countdown"].includes(t)}},Y={debounce:{type:[Number,String],default:void 0}},w={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:y.before,validation:t=>Object.values(y).includes(t)}},L={tabindex:{type:[String,Number],default:0}},W={floating:{type:Boolean,default:!1}},O={id:[String,Number]},be={placement:{type:String,default:m.bottom,validator:t=>Object.values(m).includes(t)||Object.values(T).includes(t)},strategy:{type:String,default:void 0,validator:t=>Object.values(j).includes(t)},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}},E={...O,name:{type:String,required:!0}},Q={autofocus:{type:Boolean,default:!1}},X={autocomplete:{type:String,default:"off"}},he={...E,...Q,...X,...L,...g,...P,...S,...B,...k,...C,...$,...J,...Y,...w,...W,...b,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},...V},Se={...E,...L,...S,...B,...k,...g,...P,...$,...b,...C,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}},Be={...S,...B,...H,...k,...g,...P,...$,...b,...C,...V,modelValue:{type:[String,Array,Boolean,Number,Symbol],default:void 0},name:{type:String,required:!0},vertical:{type:Boolean,default:!1}},Ce={...g,...b,...U,..._,...G,...K,type:{type:String,default:N.button,validator:t=>Object.values(N).includes(t)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:F.button}},Pe={storageType:{type:String,default:I.local,validator:t=>Object.values(I).includes(t)},storageKey:String};function Z(){return(0,e.inject)(q,{})}function x(t){return(0,e.computed)(()=>String(t?.value||(0,e.useId)()))}function ee(t,r){const l=(0,e.computed)(()=>typeof t?.value=="string"?{name:t?.value}:t?.value),n=(0,e.computed)(()=>r?.value===y.before?l.value:void 0),s=(0,e.computed)(()=>r?.value===y.after?l.value:void 0);return{hasIcon:l,hasIconLeft:(0,e.computed)(()=>r?.value===m.left?l.value:void 0),hasIconRight:(0,e.computed)(()=>r?.value===m.right?l.value:void 0),hasIconTop:(0,e.computed)(()=>r?.value===m.top?l.value:void 0),hasIconBottom:(0,e.computed)(()=>r?.value===m.bottom?l.value:void 0),hasIconBefore:n,hasIconAfter:s}}function A(t,r,l){return(0,e.computed)(()=>{const n={[t]:!0},s=typeof r?.value=="string"?r.value.split(" "):r?.value;return s&&Array.isArray(s)&&s.forEach(a=>{a&&(n[`${t}--${a}`]=!0)}),l&&Object.keys(l.value).forEach(a=>{n[`${t}--${a}`]=(0,e.unref)(l.value[a])}),n})}var te={...O,...w,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:R.alert}},oe=["close"];function re(t,r){const{bus:l}=Z(),n=x((0,e.computed)(()=>t.id)),s=(0,e.computed)(()=>`${n.value}-title`);let a;const u=()=>{a&&clearTimeout(a),r("close",n.value),l?.emit("close",n.value)};(0,e.watch)(()=>t.autoClose,p=>{if(p>0){a=setTimeout(u,p);return}a&&clearTimeout(a)},{immediate:!0}),(0,e.onBeforeUnmount)(()=>{a&&clearTimeout(a)});const o=(0,e.ref)(!1),c=()=>{o.value=!0,a&&clearTimeout(a)},v=()=>{o.value=!1,t.autoClose>0&&(a=setTimeout(u,t.autoClose))},{hasIcon:h}=ee((0,e.computed)(()=>t.icon)),i=A("vv-alert",(0,e.computed)(()=>t.modifiers),(0,e.computed)(()=>({dismissable:t.autoClose>0||t.dismissable,"auto-close":t.autoClose>0,hover:o.value}))),d=(0,e.computed)(()=>({"--alert-duration":`${t.autoClose}ms`}));return{close:u,hasIcon:h,hasTitleId:s,hasProps:(0,e.computed)(()=>({onMouseover:c,onMouseleave:v,class:i.value,style:d.value,role:t.role,"aria-labelledby":s.value}))}}function ae(){return(0,e.inject)(D,void 0)}var le={name:"VvIcon"},ne=(0,e.defineComponent)({...le,props:(0,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:{}},z),setup(t){const r=t,l=(0,e.computed)(()=>typeof r.rotate=="string"?Number.parseFloat(r.rotate):r.rotate),n=(0,e.ref)(!0),s=ae(),{modifiers:a}=(0,e.toRefs)(r),u=A("vv-icon",a),o=(0,e.computed)(()=>r.provider||s?.iconsProvider),c=(0,e.computed)(()=>{const i=r.name??"",d=`@${o.value}:${r.prefix}:${i}`;if((0,f.iconLoaded)(d))return d;const p=s?.iconsCollections.find(ye=>(0,f.iconLoaded)(`@${o.value}:${ye.prefix}:${i}`));return p?`@${o.value}:${p.prefix}:${i}`:i});function v(i){const d=typeof window<"u"?new window.DOMParser:null;return d?d.parseFromString(i,"text/html").querySelector("svg"):null}function h(i){const d=v(i),p=d?.innerHTML.trim()||"";d&&p&&(0,f.addIcon)(`@${o.value}:${r.prefix}:${r.name}`,{body:p,height:d.viewBox.baseVal.height,width:d.viewBox.baseVal.width})}return s&&r.src&&!(0,f.iconLoaded)(`@${o.value}:${r.prefix}:${r.name}`)&&(n.value=!1,s.fetchIcon(r.src).then(i=>{i&&h(i),n.value=!0}).catch(i=>{throw n.value=!0,new Error(`Error during fetch icon: ${i?.message}`)})),r.svg&&h(r.svg),(i,d)=>(0,e.unref)(n)?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(f.Icon),(0,e.mergeProps)({key:0,class:(0,e.unref)(u)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:(0,e.unref)(l),color:t.color,icon:(0,e.unref)(c)},{onLoad:t.onLoad}),null,16,["class","onLoad"])):(0,e.createCommentVNode)("v-if",!0)}}),ie=ne,se={key:0,class:"vv-alert__header"},de=["id"],ue=["aria-label"],fe={key:1,class:"vv-alert__content"},ce={key:2,class:"vv-alert__footer"},pe={name:"VvAlert"},me=(0,e.defineComponent)({...pe,props:te,emits:oe,setup(t,{expose:r,emit:l}){const{hasProps:n,hasTitleId:s,hasIcon:a,close:u}=re(t,l);return r({close:u}),(o,c)=>((0,e.openBlock)(),(0,e.createElementBlock)("div",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(n))),[o.$slots.header||o.$slots.title||o.$slots.close||o.$slots["title::before"]||o.$slots["title::after"]||o.title||(0,e.unref)(a)||o.dismissable||o.autoClose?((0,e.openBlock)(),(0,e.createElementBlock)("div",se,[(0,e.unref)(a)?((0,e.openBlock)(),(0,e.createBlock)(ie,(0,e.mergeProps)({key:0},(0,e.unref)(a),{class:"vv-alert__icon"}),null,16)):(0,e.createCommentVNode)("v-if",!0),(0,e.renderSlot)(o.$slots,"header",{},()=>[(0,e.renderSlot)(o.$slots,"title::before"),o.$slots.title||o.title?((0,e.openBlock)(),(0,e.createElementBlock)("strong",{key:0,id:(0,e.unref)(s),class:"vv-alert__title"},[(0,e.renderSlot)(o.$slots,"title",{},()=>[(0,e.createTextVNode)((0,e.toDisplayString)(o.title),1)])],8,de)):(0,e.createCommentVNode)("v-if",!0),(0,e.renderSlot)(o.$slots,"title::after")]),(0,e.renderSlot)(o.$slots,"close",(0,e.normalizeProps)((0,e.guardReactiveProps)({close:(0,e.unref)(u)})),()=>[o.dismissable||o.autoClose?((0,e.openBlock)(),(0,e.createElementBlock)("button",{key:0,class:"vv-alert__close",type:"button","aria-label":o.closeLabel,onClick:c[0]||(c[0]=(0,e.withModifiers)((...v)=>(0,e.unref)(u)&&(0,e.unref)(u)(...v),["stop"]))},[...c[1]||(c[1]=[(0,e.createElementVNode)("div",{class:"vv-alert__close-mask"},null,-1)])],8,ue)):(0,e.createCommentVNode)("v-if",!0)])])):(0,e.createCommentVNode)("v-if",!0),o.$slots.default||o.content?((0,e.openBlock)(),(0,e.createElementBlock)("div",fe,[(0,e.renderSlot)(o.$slots,"default",{},()=>[(0,e.createTextVNode)((0,e.toDisplayString)(o.content),1)])])):(0,e.createCommentVNode)("v-if",!0),o.$slots.footer||o.footer?((0,e.openBlock)(),(0,e.createElementBlock)("div",ce,[(0,e.renderSlot)(o.$slots,"footer",{},()=>[(0,e.createTextVNode)((0,e.toDisplayString)(o.footer),1)])])):(0,e.createCommentVNode)("v-if",!0)],16))}}),ve=me;return ve});
|
|
1
|
+
(function(e,f){typeof exports=="object"&&typeof module<"u"?module.exports=f(require("vue"),require("@iconify/vue")):typeof define=="function"&&define.amd?define(["vue","@iconify/vue"],f):(e=typeof globalThis<"u"?globalThis:e||self,e.VvAlert=f(e.Vue,e.IconifyVue))})(this,function(e,f){var I=(function(t){return t.local="local",t.session="session",t})({}),j=(function(t){return t.absolute="absolute",t.fixed="fixed",t})({}),v=(function(t){return t.left="left",t.right="right",t.top="top",t.bottom="bottom",t})({}),T=(function(t){return t.topStart="top-start",t.topEnd="top-end",t.bottomStart="bottom-start",t.bottomEnd="bottom-end",t.leftStart="left-start",t.leftEnd="left-end",t.rightStart="right-start",t.rightEnd="right-end",t})({}),y=(function(t){return t.before="before",t.after="after",t})({}),N=(function(t){return t.button="button",t.submit="submit",t.reset="reset",t})({}),F=(function(t){return t.nuxtLink="nuxt-link",t.routerLink="router-link",t.a="a",t.button="button",t})({}),R=(function(t){return t.alert="alert",t.alertdialog="alertdialog",t})({}),D=Symbol.for("volver"),q=Symbol.for("alertGroup"),M={showPassword:"eye-on",hidePassword:"eye-off",showDatePicker:"calendar",showTimePicker:"time",showColorPicker:"color",clear:"close",add:"add",remove:"trash",edit:"edit",download:"download"},z={prefix:"normal"},K={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},S={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}},C={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},g={disabled:{type:Boolean,default:!1}},V={required:{type:Boolean,default:!1}},_={active:{type:Boolean,default:!1}},G={current:{type:Boolean,default:!1}},ge={showClearAction:{type:Boolean,default:!1},iconClear:{type:[String,Object],default:M.clear},labelClear:{type:String,default:"Clear"}},U={pressed:{type:Boolean,default:!1}},b={label:{type:[String,Number],default:void 0}},P={readonly:{type:Boolean,default:!1}},$={modifiers:{type:[String,Array],default:void 0}},k={hintLabel:{type:String,default:""}},H={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},J={count:{type:[Boolean,String],default:!1,validator:t=>[!0,!1,"limit","countdown"].includes(t)}},Y={debounce:{type:[Number,String],default:void 0}},w={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:y.before,validation:t=>Object.values(y).includes(t)}},L={tabindex:{type:[String,Number],default:0}},W={floating:{type:Boolean,default:!1}},O={id:[String,Number]},be={placement:{type:String,default:v.bottom,validator:t=>Object.values(v).includes(t)||Object.values(T).includes(t)},strategy:{type:String,default:void 0,validator:t=>Object.values(j).includes(t)},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}},E={...O,name:{type:String,required:!0}},Q={autofocus:{type:Boolean,default:!1}},X={autocomplete:{type:String,default:"off"}},he={...E,...Q,...X,...L,...g,...P,...S,...B,...k,...C,...$,...J,...Y,...w,...W,...b,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},...V},Se={...E,...L,...S,...B,...k,...g,...P,...$,...b,...C,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}},Be={...S,...B,...H,...k,...g,...P,...$,...b,...C,...V,modelValue:{type:[String,Array,Boolean,Number,Symbol],default:void 0},name:{type:String,required:!0},vertical:{type:Boolean,default:!1}},Ce={...g,...b,...U,..._,...G,...K,type:{type:String,default:N.button,validator:t=>Object.values(N).includes(t)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:F.button}},Pe={storageType:{type:String,default:I.local,validator:t=>Object.values(I).includes(t)},storageKey:String};function Z(){return(0,e.inject)(q,{})}function x(t){return(0,e.computed)(()=>String(t?.value||(0,e.useId)()))}function ee(t,r){const l=(0,e.computed)(()=>typeof t?.value=="string"?{name:t?.value}:t?.value),n=(0,e.computed)(()=>r?.value===y.before?l.value:void 0),s=(0,e.computed)(()=>r?.value===y.after?l.value:void 0);return{hasIcon:l,hasIconLeft:(0,e.computed)(()=>r?.value===v.left?l.value:void 0),hasIconRight:(0,e.computed)(()=>r?.value===v.right?l.value:void 0),hasIconTop:(0,e.computed)(()=>r?.value===v.top?l.value:void 0),hasIconBottom:(0,e.computed)(()=>r?.value===v.bottom?l.value:void 0),hasIconBefore:n,hasIconAfter:s}}function A(t,r,l){return(0,e.computed)(()=>{const n={[t]:!0},s=typeof r?.value=="string"?r.value.split(" "):r?.value;return s&&Array.isArray(s)&&s.forEach(a=>{a&&(n[`${t}--${a}`]=!0)}),l&&Object.keys(l.value).forEach(a=>{n[`${t}--${a}`]=(0,e.unref)(l.value[a])}),n})}var te={...O,...w,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:R.alert}},oe=["close"];function re(t,r){const{bus:l}=Z(),n=x((0,e.computed)(()=>t.id)),s=(0,e.computed)(()=>`${n.value}-title`);let a;const d=()=>{a&&clearTimeout(a),r("close",n.value),l?.emit("close",n.value)};(0,e.watch)(()=>t.autoClose,p=>{if(p>0){a=setTimeout(d,p);return}a&&clearTimeout(a)},{immediate:!0}),(0,e.onBeforeUnmount)(()=>{a&&clearTimeout(a)});const o=(0,e.ref)(!1),c=()=>{o.value=!0,a&&clearTimeout(a)},m=()=>{o.value=!1,t.autoClose>0&&(a=setTimeout(d,t.autoClose))},{hasIcon:h}=ee((0,e.computed)(()=>t.icon)),i=A("vv-alert",(0,e.computed)(()=>t.modifiers),(0,e.computed)(()=>({dismissable:t.autoClose>0||t.dismissable,"auto-close":t.autoClose>0,hover:o.value}))),u=(0,e.computed)(()=>({"--alert-duration":`${t.autoClose}ms`}));return{close:d,hasIcon:h,hasTitleId:s,hasProps:(0,e.computed)(()=>({onMouseover:c,onMouseleave:m,class:i.value,style:u.value,role:t.role,"aria-labelledby":s.value}))}}function ae(){return(0,e.inject)(D,void 0)}var le={name:"VvIcon"},ne=(0,e.defineComponent)({...le,props:(0,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:{}},z),setup(t){const r=t,l=(0,e.computed)(()=>typeof r.rotate=="string"?Number.parseFloat(r.rotate):r.rotate),n=(0,e.ref)(!0),s=ae(),{modifiers:a}=(0,e.toRefs)(r),d=A("vv-icon",a),o=(0,e.computed)(()=>r.provider||s?.iconsProvider),c=(0,e.computed)(()=>{const i=r.name??"",u=`@${o.value}:${r.prefix}:${i}`;if((0,f.iconLoaded)(u))return u;const p=s?.iconsCollections.find(ye=>(0,f.iconLoaded)(`@${o.value}:${ye.prefix}:${i}`));return p?`@${o.value}:${p.prefix}:${i}`:i});function m(i){return globalThis.window===void 0?null:new globalThis.DOMParser().parseFromString(i,"text/html").querySelector("svg")}function h(i){const u=m(i),p=u?.innerHTML.trim()||"";u&&p&&(0,f.addIcon)(`@${o.value}:${r.prefix}:${r.name}`,{body:p,height:u.viewBox.baseVal.height,width:u.viewBox.baseVal.width})}return s&&r.src&&!(0,f.iconLoaded)(`@${o.value}:${r.prefix}:${r.name}`)&&(n.value=!1,s.fetchIcon(r.src).then(i=>{i&&h(i),n.value=!0}).catch(i=>{throw n.value=!0,new Error(`Error during fetch icon: ${i?.message}`)})),r.svg&&h(r.svg),(i,u)=>(0,e.unref)(n)?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(f.Icon),(0,e.mergeProps)({key:0,class:(0,e.unref)(d)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:(0,e.unref)(l),color:t.color,icon:(0,e.unref)(c)},{onLoad:t.onLoad}),null,16,["class","onLoad"])):(0,e.createCommentVNode)("v-if",!0)}}),ie=ne,se={key:0,class:"vv-alert__header"},de=["id"],ue=["aria-label"],fe={key:1,class:"vv-alert__content"},ce={key:2,class:"vv-alert__footer"},pe={name:"VvAlert"},ve=(0,e.defineComponent)({...pe,props:te,emits:oe,setup(t,{expose:r,emit:l}){const{hasProps:n,hasTitleId:s,hasIcon:a,close:d}=re(t,l);return r({close:d}),(o,c)=>((0,e.openBlock)(),(0,e.createElementBlock)("div",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(n))),[o.$slots.header||o.$slots.title||o.$slots.close||o.$slots["title::before"]||o.$slots["title::after"]||o.title||(0,e.unref)(a)||o.dismissable||o.autoClose?((0,e.openBlock)(),(0,e.createElementBlock)("div",se,[(0,e.unref)(a)?((0,e.openBlock)(),(0,e.createBlock)(ie,(0,e.mergeProps)({key:0},(0,e.unref)(a),{class:"vv-alert__icon"}),null,16)):(0,e.createCommentVNode)("v-if",!0),(0,e.renderSlot)(o.$slots,"header",{},()=>[(0,e.renderSlot)(o.$slots,"title::before"),o.$slots.title||o.title?((0,e.openBlock)(),(0,e.createElementBlock)("strong",{key:0,id:(0,e.unref)(s),class:"vv-alert__title"},[(0,e.renderSlot)(o.$slots,"title",{},()=>[(0,e.createTextVNode)((0,e.toDisplayString)(o.title),1)])],8,de)):(0,e.createCommentVNode)("v-if",!0),(0,e.renderSlot)(o.$slots,"title::after")]),(0,e.renderSlot)(o.$slots,"close",(0,e.normalizeProps)((0,e.guardReactiveProps)({close:(0,e.unref)(d)})),()=>[o.dismissable||o.autoClose?((0,e.openBlock)(),(0,e.createElementBlock)("button",{key:0,class:"vv-alert__close",type:"button","aria-label":o.closeLabel,onClick:c[0]||(c[0]=(0,e.withModifiers)((...m)=>(0,e.unref)(d)&&(0,e.unref)(d)(...m),["stop"]))},[...c[1]||(c[1]=[(0,e.createElementVNode)("div",{class:"vv-alert__close-mask"},null,-1)])],8,ue)):(0,e.createCommentVNode)("v-if",!0)])])):(0,e.createCommentVNode)("v-if",!0),o.$slots.default||o.content?((0,e.openBlock)(),(0,e.createElementBlock)("div",fe,[(0,e.renderSlot)(o.$slots,"default",{},()=>[(0,e.createTextVNode)((0,e.toDisplayString)(o.content),1)])])):(0,e.createCommentVNode)("v-if",!0),o.$slots.footer||o.footer?((0,e.openBlock)(),(0,e.createElementBlock)("div",ce,[(0,e.renderSlot)(o.$slots,"footer",{},()=>[(0,e.createTextVNode)((0,e.toDisplayString)(o.footer),1)])])):(0,e.createCommentVNode)("v-if",!0)],16))}}),me=ve;return me});
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
4
|
+
modifiers: {
|
|
5
|
+
type: PropType<import("../..").AlertModifier | import("../..").AlertModifier[]>;
|
|
6
|
+
default: undefined;
|
|
7
|
+
};
|
|
8
|
+
dismissable: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
autoClose: {
|
|
13
|
+
type: NumberConstructor;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
16
|
+
closeLabel: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
title: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: undefined;
|
|
23
|
+
};
|
|
24
|
+
content: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: undefined;
|
|
27
|
+
};
|
|
28
|
+
footer: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: undefined;
|
|
31
|
+
};
|
|
32
|
+
role: {
|
|
33
|
+
type: PropType<`${import("../../constants").AlertRole}`>;
|
|
34
|
+
default: import("../../constants").AlertRole;
|
|
35
|
+
};
|
|
36
|
+
icon: {
|
|
37
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
38
|
+
default: undefined;
|
|
39
|
+
};
|
|
40
|
+
iconPosition: {
|
|
41
|
+
type: PropType<`${import("../../constants").Position}`>;
|
|
42
|
+
default: import("../../constants").Position;
|
|
43
|
+
validation: (value: import("../../constants").Position) => boolean;
|
|
44
|
+
};
|
|
45
|
+
id: (NumberConstructor | StringConstructor)[];
|
|
46
|
+
}>, {
|
|
47
|
+
/** Close the alert */
|
|
48
|
+
close: () => void;
|
|
49
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
50
|
+
modifiers: {
|
|
51
|
+
type: PropType<import("../..").AlertModifier | import("../..").AlertModifier[]>;
|
|
52
|
+
default: undefined;
|
|
53
|
+
};
|
|
54
|
+
dismissable: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
autoClose: {
|
|
59
|
+
type: NumberConstructor;
|
|
60
|
+
default: number;
|
|
61
|
+
};
|
|
62
|
+
closeLabel: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
title: {
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
default: undefined;
|
|
69
|
+
};
|
|
70
|
+
content: {
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
default: undefined;
|
|
73
|
+
};
|
|
74
|
+
footer: {
|
|
75
|
+
type: StringConstructor;
|
|
76
|
+
default: undefined;
|
|
77
|
+
};
|
|
78
|
+
role: {
|
|
79
|
+
type: PropType<`${import("../../constants").AlertRole}`>;
|
|
80
|
+
default: import("../../constants").AlertRole;
|
|
81
|
+
};
|
|
82
|
+
icon: {
|
|
83
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
84
|
+
default: undefined;
|
|
85
|
+
};
|
|
86
|
+
iconPosition: {
|
|
87
|
+
type: PropType<`${import("../../constants").Position}`>;
|
|
88
|
+
default: import("../../constants").Position;
|
|
89
|
+
validation: (value: import("../../constants").Position) => boolean;
|
|
90
|
+
};
|
|
91
|
+
id: (NumberConstructor | StringConstructor)[];
|
|
92
|
+
}>> & Readonly<{}>, {
|
|
93
|
+
title: string;
|
|
94
|
+
icon: string | import("../VvIcon").VvIconProps;
|
|
95
|
+
content: string;
|
|
96
|
+
footer: string;
|
|
97
|
+
modifiers: import("../..").AlertModifier | import("../..").AlertModifier[];
|
|
98
|
+
dismissable: boolean;
|
|
99
|
+
autoClose: number;
|
|
100
|
+
closeLabel: string;
|
|
101
|
+
role: "alert" | "alertdialog";
|
|
102
|
+
iconPosition: "before" | "after";
|
|
103
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
104
|
+
header?: (props: {}) => any;
|
|
105
|
+
} & {
|
|
106
|
+
'title::before'?: (props: {}) => any;
|
|
107
|
+
} & {
|
|
108
|
+
title?: (props: {}) => any;
|
|
109
|
+
} & {
|
|
110
|
+
'title::after'?: (props: {}) => any;
|
|
111
|
+
} & {
|
|
112
|
+
close?: (props: {
|
|
113
|
+
close: () => void;
|
|
114
|
+
}) => any;
|
|
115
|
+
} & {
|
|
116
|
+
default?: (props: {}) => any;
|
|
117
|
+
} & {
|
|
118
|
+
footer?: (props: {}) => any;
|
|
119
|
+
}>;
|
|
120
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
121
|
+
new (): {
|
|
122
|
+
$slots: S;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import type { AlertModifier } from '@/types';
|
|
3
|
+
import { AlertRole } from '@/constants';
|
|
4
|
+
export declare const VvAlertProps: {
|
|
5
|
+
/**
|
|
6
|
+
* Component BEM modifiers
|
|
7
|
+
*/
|
|
8
|
+
modifiers: {
|
|
9
|
+
type: PropType<AlertModifier | AlertModifier[]>;
|
|
10
|
+
default: undefined;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The alert is dismissable
|
|
14
|
+
* @default false
|
|
15
|
+
* @type boolean
|
|
16
|
+
*/
|
|
17
|
+
dismissable: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The alert auto close after the specified time in milliseconds
|
|
23
|
+
* @default 0
|
|
24
|
+
* @type number
|
|
25
|
+
*/
|
|
26
|
+
autoClose: {
|
|
27
|
+
type: NumberConstructor;
|
|
28
|
+
default: number;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The alert close label
|
|
32
|
+
* @default 'Close'
|
|
33
|
+
* @type string
|
|
34
|
+
*/
|
|
35
|
+
closeLabel: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* The alert title
|
|
41
|
+
* @default ''
|
|
42
|
+
* @type string
|
|
43
|
+
*/
|
|
44
|
+
title: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: undefined;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* The alert content
|
|
50
|
+
* @default ''
|
|
51
|
+
* @type string
|
|
52
|
+
*/
|
|
53
|
+
content: {
|
|
54
|
+
type: StringConstructor;
|
|
55
|
+
default: undefined;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The alert footer
|
|
59
|
+
* @default ''
|
|
60
|
+
* @type string
|
|
61
|
+
*/
|
|
62
|
+
footer: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
default: undefined;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* The alert role
|
|
68
|
+
* @default 'alert'
|
|
69
|
+
* @type string
|
|
70
|
+
* @values 'alert', 'alertdialog'
|
|
71
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Alert_Role
|
|
72
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Alertdialog_role
|
|
73
|
+
*/
|
|
74
|
+
role: {
|
|
75
|
+
type: PropType<`${AlertRole}`>;
|
|
76
|
+
default: AlertRole;
|
|
77
|
+
};
|
|
78
|
+
icon: {
|
|
79
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
80
|
+
default: undefined;
|
|
81
|
+
};
|
|
82
|
+
iconPosition: {
|
|
83
|
+
type: PropType<`${import("@/constants").Position}`>;
|
|
84
|
+
default: import("@/constants").Position;
|
|
85
|
+
validation: (value: import("@/constants").Position) => boolean;
|
|
86
|
+
};
|
|
87
|
+
id: (NumberConstructor | StringConstructor)[];
|
|
88
|
+
};
|
|
89
|
+
export declare const VvAlertEvents: string[];
|
|
90
|
+
export declare function useVvAlert(props: Readonly<ExtractPropTypes<typeof VvAlertProps>>, emit: (event: string, ...args: unknown[]) => void): {
|
|
91
|
+
close: () => void;
|
|
92
|
+
hasIcon: globalThis.ComputedRef<import("../VvIcon").VvIconProps | undefined>;
|
|
93
|
+
hasTitleId: globalThis.ComputedRef<string>;
|
|
94
|
+
hasProps: globalThis.ComputedRef<{
|
|
95
|
+
onMouseover: () => void;
|
|
96
|
+
onMouseleave: () => void;
|
|
97
|
+
class: Record<string, boolean>;
|
|
98
|
+
style: {
|
|
99
|
+
'--alert-duration': string;
|
|
100
|
+
};
|
|
101
|
+
role: "alert" | "alertdialog";
|
|
102
|
+
'aria-labelledby': string;
|
|
103
|
+
}>;
|
|
104
|
+
};
|