@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 +1 @@
|
|
|
1
|
-
(function(e,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("vue"),require("@iconify/vue"),require("@vueuse/core"),require("dot-prop")):typeof define=="function"&&define.amd?define(["vue","@iconify/vue","@vueuse/core","dot-prop"],b):(e=typeof globalThis<"u"?globalThis:e||self,e.VvSelect=b(e.Vue,e.IconifyVue,e.VueuseCore,e.dotProp))})(this,function(e,b,U,A){var de={showPassword:"eye-on",hidePassword:"eye-off",showDatePicker:"calendar",showTimePicker:"time",showColorPicker:"color",clear:"close",add:"add",remove:"trash",edit:"edit",download:"download"},ue={prefix:"normal"},J=(function(t){return t.local="local",t.session="session",t})({}),ce=(function(t){return t.absolute="absolute",t.fixed="fixed",t})({}),S=(function(t){return t.left="left",t.right="right",t.top="top",t.bottom="bottom",t})({}),fe=(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})({}),L=(function(t){return t.before="before",t.after="after",t})({}),W=(function(t){return t.button="button",t.submit="submit",t.reset="reset",t})({}),pe=(function(t){return t.nuxtLink="nuxt-link",t.routerLink="router-link",t.a="a",t.button="button",t})({}),ve=Symbol.for("volver"),me={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},V={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},C={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},O={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},B={disabled:{type:Boolean,default:!1}},Y={required:{type:Boolean,default:!1}},be={active:{type:Boolean,default:!1}},ge={current:{type:Boolean,default:!1}},he={showClearAction:{type:Boolean,default:!1},iconClear:{type:[String,Object],default:de.clear},labelClear:{type:String,default:"Clear"}},ye={pressed:{type:Boolean,default:!1}},P={label:{type:[String,Number],default:void 0}},k={readonly:{type:Boolean,default:!1}},$={modifiers:{type:[String,Array],default:void 0}},I={hintLabel:{type:String,default:""}},Q={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},Se={count:{type:[Boolean,String],default:!1,validator:t=>[!0,!1,"limit","countdown"].includes(t)}},Be={debounce:{type:[Number,String],default:void 0}},X={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:L.before,validation:t=>Object.values(L).includes(t)}},E={tabindex:{type:[String,Number],default:0}},Z={floating:{type:Boolean,default:!1}},Pe={unselectable:{type:Boolean,default:!0}},Le={id:[String,Number]},st={placement:{type:String,default:S.bottom,validator:t=>Object.values(S).includes(t)||Object.values(fe).includes(t)},strategy:{type:String,default:void 0,validator:t=>Object.values(ce).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}},_={...Le,name:{type:String,required:!0}},ee={autofocus:{type:Boolean,default:!1}},te={autocomplete:{type:String,default:"off"}},dt={..._,...ee,...te,...E,...B,...k,...V,...C,...I,...O,...$,...Se,...Be,...X,...Z,...P,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},...Y},ut={..._,...E,...V,...C,...I,...B,...k,...$,...P,...O,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}},ct={...V,...C,...Q,...I,...B,...k,...$,...P,...O,...Y,modelValue:{type:[String,Array,Boolean,Number,Symbol],default:void 0},name:{type:String,required:!0},vertical:{type:Boolean,default:!1}},ft={...B,...P,...ye,...be,...ge,...me,type:{type:String,default:W.button,validator:t=>Object.values(W).includes(t)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:pe.button}},pt={storageType:{type:String,default:J.local,validator:t=>Object.values(J).includes(t)},storageKey:String},oe={..._,...ee,...te,...E,...V,...C,...I,...O,...B,...k,...$,...Q,...X,...Z,...Pe,...P,...he,multiple:Boolean,required:Boolean,size:[String,Number],modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},autoselectFirst:{type:Boolean,default:!1},placeholder:String};function ae(){return{...oe,options:{...oe.options,type:Array,default:()=>[]}}}function Ve(t){return typeof t=="string"}function le(t){return Array.isArray(t)?t.filter(l=>Ve(l)).join(" "):t}function Ce(t,l){const o=(0,e.computed)(()=>(0,e.isRef)(t)?t.value:t),i=(0,e.computed)(()=>le(o.value.invalidLabel)),s=(0,e.computed)(()=>le(o.value.validLabel)),d=(0,e.computed)(()=>o.value.loadingLabel),c=(0,e.computed)(()=>o.value.hintLabel),f=(0,e.computed)(()=>!!(o.value.loading&&(l.loading||d.value))),p=(0,e.computed)(()=>!f.value&&!!(o.value.invalid&&(l.invalid||i.value))),a=(0,e.computed)(()=>!f.value&&!p.value&&!!(o.value.valid&&(l.valid||s.value))),v=(0,e.computed)(()=>!f.value&&!p.value&&!a.value&&!!(l.hint||c.value)),n=(0,e.computed)(()=>p.value||a.value||f.value||v.value);return{hasInvalidLabelOrSlot:p,hasHintLabelOrSlot:v,hasValidLabelOrSlot:a,hasLoadingLabelOrSlot:f,hintSlotScope:(0,e.computed)(()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading})),HintSlot:(0,e.defineComponent)({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup(){return{isVisible:n,invalidLabel:i,validLabel:s,loadingLabel:d,hintLabel:c,hasInvalidLabelOrSlot:p,hasValidLabelOrSlot:a,hasLoadingLabelOrSlot:f,hasHintLabelOrSlot:v}},render(){if(this.isVisible){let u;return this.hasInvalidLabelOrSlot&&(u="alert"),this.hasValidLabelOrSlot&&(u="status"),this.hasLoadingLabelOrSlot?(0,e.h)(this.tag,{role:u},this.$slots.loading?.()??this.loadingLabel):this.hasInvalidLabelOrSlot?(0,e.h)(this.tag,{role:u},this.$slots.invalid?.()??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?(0,e.h)(this.tag,{role:u},this.$slots.valid?.()??this.validLabel):(0,e.h)(this.tag,{role:u},this.$slots.hint?.()??this.$slots.hint??this.hintLabel)}return null}})}}function re(){return(0,e.inject)(ve,void 0)}function ne(t,l,o){return(0,e.computed)(()=>{const i={[t]:!0},s=typeof l?.value=="string"?l.value.split(" "):l?.value;return s&&Array.isArray(s)&&s.forEach(d=>{d&&(i[`${t}--${d}`]=!0)}),o&&Object.keys(o.value).forEach(d=>{i[`${t}--${d}`]=(0,e.unref)(o.value[d])}),i})}var Oe={name:"VvIcon"},ke=(0,e.defineComponent)({...Oe,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:{}},ue),setup(t){const l=t,o=(0,e.computed)(()=>typeof l.rotate=="string"?Number.parseFloat(l.rotate):l.rotate),i=(0,e.ref)(!0),s=re(),{modifiers:d}=(0,e.toRefs)(l),c=ne("vv-icon",d),f=(0,e.computed)(()=>l.provider||s?.iconsProvider),p=(0,e.computed)(()=>{const n=l.name??"",u=`@${f.value}:${l.prefix}:${n}`;if((0,b.iconLoaded)(u))return u;const h=s?.iconsCollections.find(j=>(0,b.iconLoaded)(`@${f.value}:${j.prefix}:${n}`));return h?`@${f.value}:${h.prefix}:${n}`:n});function a(n){const u=typeof window<"u"?new window.DOMParser:null;return u?u.parseFromString(n,"text/html").querySelector("svg"):null}function v(n){const u=a(n),h=u?.innerHTML.trim()||"";u&&h&&(0,b.addIcon)(`@${f.value}:${l.prefix}:${l.name}`,{body:h,height:u.viewBox.baseVal.height,width:u.viewBox.baseVal.width})}return s&&l.src&&!(0,b.iconLoaded)(`@${f.value}:${l.prefix}:${l.name}`)&&(i.value=!1,s.fetchIcon(l.src).then(n=>{n&&v(n),i.value=!0}).catch(n=>{throw i.value=!0,new Error(`Error during fetch icon: ${n?.message}`)})),l.svg&&v(l.svg),(n,u)=>(0,e.unref)(i)?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(b.Icon),(0,e.mergeProps)({key:0,class:(0,e.unref)(c)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:(0,e.unref)(o),color:t.color,icon:(0,e.unref)(p)},{onLoad:t.onLoad}),null,16,["class","onLoad"])):(0,e.createCommentVNode)("v-if",!0)}}),N=ke;function ie(t,l){const o=(0,e.computed)(()=>typeof t?.value=="string"?{name:t?.value}:t?.value),i=(0,e.computed)(()=>l?.value===L.before?o.value:void 0),s=(0,e.computed)(()=>l?.value===L.after?o.value:void 0);return{hasIcon:o,hasIconLeft:(0,e.computed)(()=>l?.value===S.left?o.value:void 0),hasIconRight:(0,e.computed)(()=>l?.value===S.right?o.value:void 0),hasIconTop:(0,e.computed)(()=>l?.value===S.top?o.value:void 0),hasIconBottom:(0,e.computed)(()=>l?.value===S.bottom?o.value:void 0),hasIconBefore:i,hasIconAfter:s}}var $e=(0,e.defineComponent)({components:{VvIcon:N},props:{inputType:{type:String,default:"input-text"},disabled:{type:Boolean,default:!1},label:{type:String,default:"Clear"},icon:{type:[String,Object],default:"close"}},emits:["clear"],setup(t,{emit:l}){const{hasIcon:o}=ie((0,e.computed)(()=>t.icon));function i(s){s?.stopPropagation(),t.disabled||l("clear")}return{hasIcon:o,onClick:i}},render(){const t=this.hasIcon?(0,e.h)(N,{...this.hasIcon,class:`vv-${this.inputType}__icon`}):void 0;return(0,e.h)("button",{disabled:this.disabled,class:`vv-${this.inputType}__action`,ariaLabel:this.label,type:"button",onClick:this.onClick},t)}});function Ie(t,l,o){const i=re(),s=(0,e.computed)(()=>{if(!(!i||!i.defaults.value?.[t]))return i.defaults.value[t]});return(0,e.computed)(()=>{if(s.value===void 0)return o;const d=s.value,c=l,f=o;return Object.keys(c).reduce((p,a)=>{const v=f[a];if(p[a]=v,a in d){if(Array.isArray(c[a])){const n=c[a];n.length&&n[0]===v&&(p[a]=d[a])}if(typeof c[a]=="function"){const n=c[a];n()===v&&(p[a]=d[a])}if(typeof c[a]=="object"){let n=c[a].default;typeof n=="function"&&(n=n()),typeof n=="object"?JSON.stringify(n)===JSON.stringify(v)&&(p[a]=d[a]):n===v&&(p[a]=d[a])}}return p},{})})}function Ne(t,l){const{focused:o}=(0,U.useFocus)(t);return(0,e.watch)(o,i=>{l(i?"focus":"blur",(0,e.unref)(t))}),{focused:o}}function we(t){return(0,e.computed)(()=>String(t?.value||(0,e.useId)()))}function Ae(t){const{options:l,labelKey:o,valueKey:i,disabledKey:s}=(0,e.toRefs)(t);return{options:l,getOptionLabel:a=>typeof a=="string"?a:typeof o.value=="function"?o.value(a):String(o.value?(0,A.getProperty)(a,o.value):a),getOptionValue:a=>typeof a=="string"?a:typeof i.value=="function"?i.value(a):i.value?(0,A.getProperty)(a,i.value):a,isOptionDisabled:a=>typeof a=="string"?!1:typeof s.value=="function"?s.value(a):s.value?!!(0,A.getProperty)(a,s.value):!1,getOptionGrouped:a=>typeof a=="string"?[]:typeof a=="object"&&a&&"options"in a?a.options:[]}}var Ee=["for"],_e={class:"vv-select__wrapper"},je={key:0,class:"vv-select__input-before"},Fe={class:"vv-select__inner"},De=["id"],Re=["disabled","hidden"],ze=["disabled","value"],qe=["disabled","label"],xe=["disabled","value"],He={key:2,class:"vv-select__input-after"},Ke={name:"VvSelect"},Te=(0,e.defineComponent)({...Ke,props:ae(),emits:["update:modelValue","focus","blur","clear"],setup(t,{emit:l}){const o=t,i=l,s=(0,e.useSlots)(),d=Ie("VvSelect",ae(),o),c=(0,e.ref)(),{HintSlot:f,hasHintLabelOrSlot:p,hasInvalidLabelOrSlot:a,hintSlotScope:v}=Ce(d,s),{focused:n}=Ne(c,i);function u(r){return typeof r=="string"?!1:r.options?.length}const{id:h,modifiers:j,disabled:Ge,readonly:Ue,loading:Je,icon:We,iconPosition:Ye,invalid:Qe,valid:Xe,floating:Ze,multiple:et}=(0,e.toRefs)(o),F=we(h),D=(0,e.computed)(()=>`${F.value}-hint`),w=(0,e.computed)(()=>o.disabled||o.readonly),tt=(0,e.computed)(()=>w.value?-1:o.tabindex),m=(0,e.computed)({get:()=>o.modelValue,set:r=>{if(Array.isArray(r)&&(r=r.filter(y=>y!==void 0),r.length===0&&!o.unselectable&&c.value)){c.value.value=String(o.modelValue);return}i("update:modelValue",r)}}),R=(0,e.computed)(()=>Array.isArray(m.value)?m.value.length>0:m.value!==void 0&&m.value!==null),z=(0,e.computed)(()=>w.value?!1:o.unselectable);(0,e.watch)((0,U.useElementVisibility)(c),r=>{r&&o.autofocus&&(n.value=!0)});const{hasIconBefore:q,hasIconAfter:x}=ie(We,Ye),ot=(0,e.computed)(()=>{if(o.invalid===!0)return!0;if(o.valid===!0)return!1}),at=ne("vv-select",j,(0,e.computed)(()=>({valid:Xe.value,invalid:Qe.value,loading:Je.value,disabled:Ge.value,readonly:Ue.value,"icon-before":q.value!==void 0,"icon-after":x.value!==void 0,dirty:R.value,focus:n.value&&!w.value,floating:Ze.value,multiple:et.value}))),{getOptionLabel:H,getOptionValue:K,isOptionDisabled:T,getOptionGrouped:lt}=Ae(o);(0,e.watch)(()=>o.options,r=>{if(r?.length&&o.autoselectFirst&&!R.value){const y=K(r[0]);m.value=o.multiple?[y]:y}},{immediate:!0});function rt(){Array.isArray(m.value)?m.value=[]:m.value=void 0,i("clear")}const nt=(0,e.computed)(()=>({name:o.name,tabindex:tt.value,disabled:w.value,required:o.required,size:o.size,autocomplete:o.autocomplete,multiple:o.multiple,"aria-invalid":ot.value,"aria-describedby":p.value?D.value:void 0,"aria-errormessage":a.value?D.value:void 0})),se=(0,e.computed)(()=>({valid:o.valid,invalid:o.invalid,modelValue:o.modelValue}));return(r,y)=>((0,e.openBlock)(),(0,e.createElementBlock)("div",{class:(0,e.normalizeClass)((0,e.unref)(at))},[r.label?((0,e.openBlock)(),(0,e.createElementBlock)("label",{key:0,for:(0,e.unref)(F)},(0,e.toDisplayString)(r.label),9,Ee)):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",_e,[r.$slots.before?((0,e.openBlock)(),(0,e.createElementBlock)("div",je,[(0,e.renderSlot)(r.$slots,"before",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(se))))])):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",Fe,[(0,e.unref)(q)?((0,e.openBlock)(),(0,e.createBlock)(N,(0,e.mergeProps)({key:0},(0,e.unref)(q),{class:"vv-select__icon"}),null,16)):(0,e.createCommentVNode)("v-if",!0),(0,e.withDirectives)((0,e.createElementVNode)("select",(0,e.mergeProps)({id:(0,e.unref)(F),ref_key:"selectEl",ref:c},(0,e.unref)(nt),{"onUpdate:modelValue":y[0]||(y[0]=g=>(0,e.isRef)(m)?m.value=g:null)}),[r.placeholder?((0,e.openBlock)(),(0,e.createElementBlock)("option",{key:0,value:void 0,disabled:!(0,e.unref)(z),hidden:!(0,e.unref)(z)},(0,e.toDisplayString)(r.placeholder),9,Re)):(0,e.createCommentVNode)("v-if",!0),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.options,(g,M)=>((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[u(g)?((0,e.openBlock)(),(0,e.createElementBlock)("optgroup",{key:`group-${M}`,disabled:(0,e.unref)(T)(g),label:(0,e.unref)(H)(g)},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)((0,e.unref)(lt)(g),(G,it)=>((0,e.openBlock)(),(0,e.createElementBlock)("option",{key:`group-${M}-item-${it}`,disabled:(0,e.unref)(T)(G),value:(0,e.unref)(K)(G)},(0,e.toDisplayString)((0,e.unref)(H)(G)),9,xe))),128))],8,qe)):((0,e.openBlock)(),(0,e.createElementBlock)("option",{key:M,disabled:(0,e.unref)(T)(g),value:(0,e.unref)(K)(g)},(0,e.toDisplayString)((0,e.unref)(H)(g)),9,ze))],64))),256))],16,De),[[e.vModelSelect,(0,e.unref)(m)]]),(0,e.unref)(x)?((0,e.openBlock)(),(0,e.createBlock)(N,(0,e.mergeProps)({key:1},(0,e.unref)(x),{class:"vv-select__icon vv-select__icon-after"}),null,16)):(0,e.createCommentVNode)("v-if",!0)]),(0,e.unref)(z)&&(0,e.unref)(d).showClearAction?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)($e),{key:1,"input-type":"select",label:r.labelClear,icon:r.iconClear,disabled:!(0,e.unref)(R),onClear:rt},null,8,["label","icon","disabled"])):(0,e.createCommentVNode)("v-if",!0),r.$slots.after?((0,e.openBlock)(),(0,e.createElementBlock)("div",He,[(0,e.renderSlot)(r.$slots,"after",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(se))))])):(0,e.createCommentVNode)("v-if",!0)]),(0,e.createVNode)((0,e.unref)(f),{id:(0,e.unref)(D),class:"vv-select__hint"},(0,e.createSlots)({_:2},[r.$slots.hint?{name:"hint",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(r.$slots,"hint",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(v))))]),key:"0"}:void 0,r.$slots.loading?{name:"loading",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(r.$slots,"loading",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(v))))]),key:"1"}:void 0,r.$slots.valid?{name:"valid",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(r.$slots,"valid",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(v))))]),key:"2"}:void 0,r.$slots.invalid?{name:"invalid",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(r.$slots,"invalid",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(v))))]),key:"3"}:void 0]),1032,["id"])],2))}}),Me=Te;return Me});
|
|
1
|
+
(function(e,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("vue"),require("@iconify/vue"),require("@vueuse/core"),require("dot-prop")):typeof define=="function"&&define.amd?define(["vue","@iconify/vue","@vueuse/core","dot-prop"],b):(e=typeof globalThis<"u"?globalThis:e||self,e.VvSelect=b(e.Vue,e.IconifyVue,e.VueuseCore,e.dotProp))})(this,function(e,b,U,E){var de={showPassword:"eye-on",hidePassword:"eye-off",showDatePicker:"calendar",showTimePicker:"time",showColorPicker:"color",clear:"close",add:"add",remove:"trash",edit:"edit",download:"download"},ue={prefix:"normal"},J=(function(t){return t.local="local",t.session="session",t})({}),ce=(function(t){return t.absolute="absolute",t.fixed="fixed",t})({}),S=(function(t){return t.left="left",t.right="right",t.top="top",t.bottom="bottom",t})({}),fe=(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})({}),P=(function(t){return t.before="before",t.after="after",t})({}),W=(function(t){return t.button="button",t.submit="submit",t.reset="reset",t})({}),pe=(function(t){return t.nuxtLink="nuxt-link",t.routerLink="router-link",t.a="a",t.button="button",t})({}),ve=Symbol.for("volver"),me={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},L={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},C={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},O={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},B={disabled:{type:Boolean,default:!1}},Y={required:{type:Boolean,default:!1}},be={active:{type:Boolean,default:!1}},ye={current:{type:Boolean,default:!1}},ge={showClearAction:{type:Boolean,default:!1},iconClear:{type:[String,Object],default:de.clear},labelClear:{type:String,default:"Clear"}},he={pressed:{type:Boolean,default:!1}},k={label:{type:[String,Number],default:void 0}},V={readonly:{type:Boolean,default:!1}},$={modifiers:{type:[String,Array],default:void 0}},I={hintLabel:{type:String,default:""}},Q={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},Se={count:{type:[Boolean,String],default:!1,validator:t=>[!0,!1,"limit","countdown"].includes(t)}},Be={debounce:{type:[Number,String],default:void 0}},X={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:P.before,validation:t=>Object.values(P).includes(t)}},A={tabindex:{type:[String,Number],default:0}},Z={floating:{type:Boolean,default:!1}},ke={unselectable:{type:Boolean,default:!0}},Pe={id:[String,Number]},dt={placement:{type:String,default:S.bottom,validator:t=>Object.values(S).includes(t)||Object.values(fe).includes(t)},strategy:{type:String,default:void 0,validator:t=>Object.values(ce).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}},_={...Pe,name:{type:String,required:!0}},ee={autofocus:{type:Boolean,default:!1}},te={autocomplete:{type:String,default:"off"}},ut={..._,...ee,...te,...A,...B,...V,...L,...C,...I,...O,...$,...Se,...Be,...X,...Z,...k,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},...Y},ct={..._,...A,...L,...C,...I,...B,...V,...$,...k,...O,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}},ft={...L,...C,...Q,...I,...B,...V,...$,...k,...O,...Y,modelValue:{type:[String,Array,Boolean,Number,Symbol],default:void 0},name:{type:String,required:!0},vertical:{type:Boolean,default:!1}},pt={...B,...k,...he,...be,...ye,...me,type:{type:String,default:W.button,validator:t=>Object.values(W).includes(t)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:pe.button}},vt={storageType:{type:String,default:J.local,validator:t=>Object.values(J).includes(t)},storageKey:String},ae={..._,...ee,...te,...A,...L,...C,...I,...O,...B,...V,...$,...Q,...X,...Z,...ke,...k,...ge,multiple:Boolean,required:Boolean,size:[String,Number],modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},autoselectFirst:{type:Boolean,default:!1},placeholder:String};function le(){return{...ae,options:{...ae.options,type:Array,default:()=>[]}}}function Le(t){return typeof t=="string"}function oe(t){return Array.isArray(t)?t.filter(l=>Le(l)).join(" "):t}function Ce(t,l){const a=(0,e.computed)(()=>(0,e.isRef)(t)?t.value:t),r=(0,e.computed)(()=>oe(a.value.invalidLabel)),n=(0,e.computed)(()=>oe(a.value.validLabel)),d=(0,e.computed)(()=>a.value.loadingLabel),f=(0,e.computed)(()=>a.value.hintLabel),u=(0,e.computed)(()=>!!(a.value.loading&&(l.loading||d.value))),v=(0,e.computed)(()=>!u.value&&!!(a.value.invalid&&(l.invalid||r.value))),o=(0,e.computed)(()=>!u.value&&!v.value&&!!(a.value.valid&&(l.valid||n.value))),p=(0,e.computed)(()=>!u.value&&!v.value&&!o.value&&!!(l.hint||f.value)),s=(0,e.computed)(()=>v.value||o.value||u.value||p.value);return{hasInvalidLabelOrSlot:v,hasHintLabelOrSlot:p,hasValidLabelOrSlot:o,hasLoadingLabelOrSlot:u,hintSlotScope:(0,e.computed)(()=>({modelValue:a.value.modelValue,valid:a.value.valid,invalid:a.value.invalid,loading:a.value.loading})),HintSlot:(0,e.defineComponent)({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup(){return{isVisible:s,invalidLabel:r,validLabel:n,loadingLabel:d,hintLabel:f,hasInvalidLabelOrSlot:v,hasValidLabelOrSlot:o,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:p}},render(){if(this.isVisible){let c;return this.hasInvalidLabelOrSlot&&(c="alert"),this.hasValidLabelOrSlot&&(c="status"),this.hasLoadingLabelOrSlot?(0,e.h)(this.tag,{role:c},this.$slots.loading?.()??this.loadingLabel):this.hasInvalidLabelOrSlot?(0,e.h)(this.tag,{role:c},this.$slots.invalid?.()??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?(0,e.h)(this.tag,{role:c},this.$slots.valid?.()??this.validLabel):(0,e.h)(this.tag,{role:c},this.$slots.hint?.()??this.$slots.hint??this.hintLabel)}return null}})}}function re(){return(0,e.inject)(ve,void 0)}function ne(t,l,a){return(0,e.computed)(()=>{const r={[t]:!0},n=typeof l?.value=="string"?l.value.split(" "):l?.value;return n&&Array.isArray(n)&&n.forEach(d=>{d&&(r[`${t}--${d}`]=!0)}),a&&Object.keys(a.value).forEach(d=>{r[`${t}--${d}`]=(0,e.unref)(a.value[d])}),r})}var Oe={name:"VvIcon"},Ve=(0,e.defineComponent)({...Oe,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:{}},ue),setup(t){const l=t,a=(0,e.computed)(()=>typeof l.rotate=="string"?Number.parseFloat(l.rotate):l.rotate),r=(0,e.ref)(!0),n=re(),{modifiers:d}=(0,e.toRefs)(l),f=ne("vv-icon",d),u=(0,e.computed)(()=>l.provider||n?.iconsProvider),v=(0,e.computed)(()=>{const s=l.name??"",c=`@${u.value}:${l.prefix}:${s}`;if((0,b.iconLoaded)(c))return c;const g=n?.iconsCollections.find(j=>(0,b.iconLoaded)(`@${u.value}:${j.prefix}:${s}`));return g?`@${u.value}:${g.prefix}:${s}`:s});function o(s){return globalThis.window===void 0?null:new globalThis.DOMParser().parseFromString(s,"text/html").querySelector("svg")}function p(s){const c=o(s),g=c?.innerHTML.trim()||"";c&&g&&(0,b.addIcon)(`@${u.value}:${l.prefix}:${l.name}`,{body:g,height:c.viewBox.baseVal.height,width:c.viewBox.baseVal.width})}return n&&l.src&&!(0,b.iconLoaded)(`@${u.value}:${l.prefix}:${l.name}`)&&(r.value=!1,n.fetchIcon(l.src).then(s=>{s&&p(s),r.value=!0}).catch(s=>{throw r.value=!0,new Error(`Error during fetch icon: ${s?.message}`)})),l.svg&&p(l.svg),(s,c)=>(0,e.unref)(r)?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(b.Icon),(0,e.mergeProps)({key:0,class:(0,e.unref)(f)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:(0,e.unref)(a),color:t.color,icon:(0,e.unref)(v)},{onLoad:t.onLoad}),null,16,["class","onLoad"])):(0,e.createCommentVNode)("v-if",!0)}}),N=Ve;function ie(t,l){const a=(0,e.computed)(()=>typeof t?.value=="string"?{name:t?.value}:t?.value),r=(0,e.computed)(()=>l?.value===P.before?a.value:void 0),n=(0,e.computed)(()=>l?.value===P.after?a.value:void 0);return{hasIcon:a,hasIconLeft:(0,e.computed)(()=>l?.value===S.left?a.value:void 0),hasIconRight:(0,e.computed)(()=>l?.value===S.right?a.value:void 0),hasIconTop:(0,e.computed)(()=>l?.value===S.top?a.value:void 0),hasIconBottom:(0,e.computed)(()=>l?.value===S.bottom?a.value:void 0),hasIconBefore:r,hasIconAfter:n}}var $e=(0,e.defineComponent)({components:{VvIcon:N},props:{inputType:{type:String,default:"input-text"},disabled:{type:Boolean,default:!1},label:{type:String,default:"Clear"},icon:{type:[String,Object],default:"close"}},emits:["clear"],setup(t,{emit:l}){const{hasIcon:a}=ie((0,e.computed)(()=>t.icon));function r(n){n?.stopPropagation(),t.disabled||l("clear")}return{hasIcon:a,onClick:r}},render(){const t=this.hasIcon?(0,e.h)(N,{...this.hasIcon,class:`vv-${this.inputType}__icon`}):void 0;return(0,e.h)("button",{disabled:this.disabled,class:`vv-${this.inputType}__action`,ariaLabel:this.label,type:"button",onClick:this.onClick},t)}});function Ie(t,l,a){let r=l;if(Array.isArray(t)&&t.length){const n=t[0];n()===l&&(r=a)}if(typeof t=="function"&&t()===l&&(r=a),typeof t=="object"){let n=t.default;typeof n=="function"&&(n=n()),(typeof n=="object"?JSON.stringify(n)===JSON.stringify(l):n===l)&&(r=a)}return r}function Ne(t,l,a){const r=re(),n=(0,e.computed)(()=>{if(r?.defaults.value?.[t])return r.defaults.value[t]});return(0,e.computed)(()=>{if(n.value===void 0)return a;const d=n.value,f=l,u=a;return Object.keys(f).reduce((v,o)=>{const p=u[o];return v[o]=o in d?Ie(f[o],p,d[o]):p,v},{})})}function we(t,l){const{focused:a}=(0,U.useFocus)(t);return(0,e.watch)(a,r=>{l(r?"focus":"blur",(0,e.unref)(t))}),{focused:a}}function Ee(t){return(0,e.computed)(()=>String(t?.value||(0,e.useId)()))}function Ae(t){const{options:l,labelKey:a,valueKey:r,disabledKey:n}=(0,e.toRefs)(t);return{options:l,getOptionLabel:o=>typeof o=="string"?o:typeof a.value=="function"?a.value(o):String(a.value?(0,E.getProperty)(o,a.value):o),getOptionValue:o=>typeof o=="string"?o:typeof r.value=="function"?r.value(o):r.value?(0,E.getProperty)(o,r.value):o,isOptionDisabled:o=>typeof o=="string"?!1:typeof n.value=="function"?n.value(o):n.value?!!(0,E.getProperty)(o,n.value):!1,getOptionGrouped:o=>typeof o=="string"?[]:typeof o=="object"&&o&&"options"in o?o.options:[]}}var _e=["for"],je={class:"vv-select__wrapper"},Fe={key:0,class:"vv-select__input-before"},De={class:"vv-select__inner"},Re=["id"],ze=["disabled","hidden"],qe=["disabled","value"],Te=["disabled","label"],xe=["disabled","value"],He={key:2,class:"vv-select__input-after"},Ke={name:"VvSelect"},Me=(0,e.defineComponent)({...Ke,props:le(),emits:["update:modelValue","focus","blur","clear"],setup(t,{emit:l}){const a=t,r=l,n=(0,e.useSlots)(),d=Ne("VvSelect",le(),a),f=(0,e.ref)(),{HintSlot:u,hasHintLabelOrSlot:v,hasInvalidLabelOrSlot:o,hintSlotScope:p}=Ce(d,n),{focused:s}=we(f,r);function c(i){return typeof i=="string"?!1:i.options?.length}const{id:g,modifiers:j,disabled:Ue,readonly:Je,loading:We,icon:Ye,iconPosition:Qe,invalid:Xe,valid:Ze,floating:et,multiple:tt}=(0,e.toRefs)(a),F=Ee(g),D=(0,e.computed)(()=>`${F.value}-hint`),w=(0,e.computed)(()=>a.disabled||a.readonly),at=(0,e.computed)(()=>w.value?-1:a.tabindex),m=(0,e.computed)({get:()=>a.modelValue,set:i=>{if(Array.isArray(i)&&(i=i.filter(h=>h!==void 0),i.length===0&&!a.unselectable&&f.value)){f.value.value=String(a.modelValue);return}r("update:modelValue",i)}}),R=(0,e.computed)(()=>Array.isArray(m.value)?m.value.length>0:m.value!==void 0&&m.value!==null),z=(0,e.computed)(()=>w.value?!1:a.unselectable);(0,e.watch)((0,U.useElementVisibility)(f),i=>{i&&a.autofocus&&(s.value=!0)});const{hasIconBefore:q,hasIconAfter:T}=ie(Ye,Qe),lt=(0,e.computed)(()=>{if(a.invalid===!0)return!0;if(a.valid===!0)return!1}),ot=ne("vv-select",j,(0,e.computed)(()=>({valid:Ze.value,invalid:Xe.value,loading:We.value,disabled:Ue.value,readonly:Je.value,"icon-before":q.value!==void 0,"icon-after":T.value!==void 0,dirty:R.value,focus:s.value&&!w.value,floating:et.value,multiple:tt.value}))),{getOptionLabel:x,getOptionValue:H,isOptionDisabled:K,getOptionGrouped:rt}=Ae(a);(0,e.watch)(()=>a.options,i=>{if(i?.length&&a.autoselectFirst&&!R.value){const h=H(i[0]);m.value=a.multiple?[h]:h}},{immediate:!0});function nt(){Array.isArray(m.value)?m.value=[]:m.value=void 0,r("clear")}const it=(0,e.computed)(()=>({name:a.name,tabindex:at.value,disabled:w.value,required:a.required,size:a.size,autocomplete:a.autocomplete,multiple:a.multiple,"aria-invalid":lt.value,"aria-describedby":v.value?D.value:void 0,"aria-errormessage":o.value?D.value:void 0})),se=(0,e.computed)(()=>({valid:a.valid,invalid:a.invalid,modelValue:a.modelValue}));return(i,h)=>((0,e.openBlock)(),(0,e.createElementBlock)("div",{class:(0,e.normalizeClass)((0,e.unref)(ot))},[i.label?((0,e.openBlock)(),(0,e.createElementBlock)("label",{key:0,for:(0,e.unref)(F)},(0,e.toDisplayString)(i.label),9,_e)):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",je,[i.$slots.before?((0,e.openBlock)(),(0,e.createElementBlock)("div",Fe,[(0,e.renderSlot)(i.$slots,"before",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(se))))])):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",De,[(0,e.unref)(q)?((0,e.openBlock)(),(0,e.createBlock)(N,(0,e.mergeProps)({key:0},(0,e.unref)(q),{class:"vv-select__icon"}),null,16)):(0,e.createCommentVNode)("v-if",!0),(0,e.withDirectives)((0,e.createElementVNode)("select",(0,e.mergeProps)({id:(0,e.unref)(F),ref_key:"selectEl",ref:f},(0,e.unref)(it),{"onUpdate:modelValue":h[0]||(h[0]=y=>(0,e.isRef)(m)?m.value=y:null)}),[i.placeholder?((0,e.openBlock)(),(0,e.createElementBlock)("option",{key:0,value:void 0,disabled:!(0,e.unref)(z),hidden:!(0,e.unref)(z)},(0,e.toDisplayString)(i.placeholder),9,ze)):(0,e.createCommentVNode)("v-if",!0),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(i.options,(y,M)=>((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[c(y)?((0,e.openBlock)(),(0,e.createElementBlock)("optgroup",{key:`group-${M}`,disabled:(0,e.unref)(K)(y),label:(0,e.unref)(x)(y)},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)((0,e.unref)(rt)(y),(G,st)=>((0,e.openBlock)(),(0,e.createElementBlock)("option",{key:`group-${M}-item-${st}`,disabled:(0,e.unref)(K)(G),value:(0,e.unref)(H)(G)},(0,e.toDisplayString)((0,e.unref)(x)(G)),9,xe))),128))],8,Te)):((0,e.openBlock)(),(0,e.createElementBlock)("option",{key:M,disabled:(0,e.unref)(K)(y),value:(0,e.unref)(H)(y)},(0,e.toDisplayString)((0,e.unref)(x)(y)),9,qe))],64))),256))],16,Re),[[e.vModelSelect,(0,e.unref)(m)]]),(0,e.unref)(T)?((0,e.openBlock)(),(0,e.createBlock)(N,(0,e.mergeProps)({key:1},(0,e.unref)(T),{class:"vv-select__icon vv-select__icon-after"}),null,16)):(0,e.createCommentVNode)("v-if",!0)]),(0,e.unref)(z)&&(0,e.unref)(d).showClearAction?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)($e),{key:1,"input-type":"select",label:i.labelClear,icon:i.iconClear,disabled:!(0,e.unref)(R),onClear:nt},null,8,["label","icon","disabled"])):(0,e.createCommentVNode)("v-if",!0),i.$slots.after?((0,e.openBlock)(),(0,e.createElementBlock)("div",He,[(0,e.renderSlot)(i.$slots,"after",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(se))))])):(0,e.createCommentVNode)("v-if",!0)]),(0,e.createVNode)((0,e.unref)(u),{id:(0,e.unref)(D),class:"vv-select__hint"},(0,e.createSlots)({_:2},[i.$slots.hint?{name:"hint",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(i.$slots,"hint",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(p))))]),key:"0"}:void 0,i.$slots.loading?{name:"loading",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(i.$slots,"loading",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(p))))]),key:"1"}:void 0,i.$slots.valid?{name:"valid",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(i.$slots,"valid",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(p))))]),key:"2"}:void 0,i.$slots.invalid?{name:"invalid",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(i.$slots,"invalid",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(p))))]),key:"3"}:void 0]),1032,["id"])],2))}}),Ge=Me;return Ge});
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import type { Option } from '../../types/generic';
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
declare const __VLS_export: <T extends string | Option>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<import("vue").ExtractPublicPropTypes<{
|
|
6
|
+
options: {
|
|
7
|
+
type: globalThis.PropType<T[]>;
|
|
8
|
+
default: () => never[];
|
|
9
|
+
};
|
|
10
|
+
multiple: BooleanConstructor;
|
|
11
|
+
required: BooleanConstructor;
|
|
12
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
13
|
+
modelValue: {
|
|
14
|
+
type: (NumberConstructor | ArrayConstructor | ObjectConstructor | BooleanConstructor | StringConstructor)[];
|
|
15
|
+
default: undefined;
|
|
16
|
+
};
|
|
17
|
+
autoselectFirst: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
placeholder: StringConstructor;
|
|
22
|
+
showClearAction: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
iconClear: {
|
|
27
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
28
|
+
default: "close";
|
|
29
|
+
};
|
|
30
|
+
labelClear: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
label: {
|
|
35
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
36
|
+
default: undefined;
|
|
37
|
+
};
|
|
38
|
+
unselectable: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
floating: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
icon: {
|
|
47
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
48
|
+
default: undefined;
|
|
49
|
+
};
|
|
50
|
+
iconPosition: {
|
|
51
|
+
type: PropType<`${import("../../constants").Position}`>;
|
|
52
|
+
default: import("../../constants").Position;
|
|
53
|
+
validation: (value: import("../../constants").Position) => boolean;
|
|
54
|
+
};
|
|
55
|
+
labelKey: {
|
|
56
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
valueKey: {
|
|
60
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
disabledKey: {
|
|
64
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
67
|
+
modifiers: {
|
|
68
|
+
type: PropType<string | string[]>;
|
|
69
|
+
default: undefined;
|
|
70
|
+
};
|
|
71
|
+
readonly: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
75
|
+
disabled: {
|
|
76
|
+
type: BooleanConstructor;
|
|
77
|
+
default: boolean;
|
|
78
|
+
};
|
|
79
|
+
loading: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
loadingLabel: {
|
|
84
|
+
type: StringConstructor;
|
|
85
|
+
default: string;
|
|
86
|
+
};
|
|
87
|
+
hintLabel: {
|
|
88
|
+
type: StringConstructor;
|
|
89
|
+
default: string;
|
|
90
|
+
};
|
|
91
|
+
invalid: {
|
|
92
|
+
type: BooleanConstructor;
|
|
93
|
+
default: boolean;
|
|
94
|
+
};
|
|
95
|
+
invalidLabel: {
|
|
96
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
97
|
+
default: undefined;
|
|
98
|
+
};
|
|
99
|
+
valid: {
|
|
100
|
+
type: BooleanConstructor;
|
|
101
|
+
default: boolean;
|
|
102
|
+
};
|
|
103
|
+
validLabel: {
|
|
104
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
105
|
+
default: undefined;
|
|
106
|
+
};
|
|
107
|
+
tabindex: {
|
|
108
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
109
|
+
default: number;
|
|
110
|
+
};
|
|
111
|
+
autocomplete: {
|
|
112
|
+
type: StringConstructor;
|
|
113
|
+
default: string;
|
|
114
|
+
};
|
|
115
|
+
autofocus: {
|
|
116
|
+
type: BooleanConstructor;
|
|
117
|
+
default: boolean;
|
|
118
|
+
};
|
|
119
|
+
name: {
|
|
120
|
+
type: StringConstructor;
|
|
121
|
+
required: boolean;
|
|
122
|
+
};
|
|
123
|
+
id: (NumberConstructor | StringConstructor)[];
|
|
124
|
+
}> & {
|
|
125
|
+
onClear?: (() => any) | undefined;
|
|
126
|
+
"onUpdate:modelValue"?: ((args_0: any) => any) | undefined;
|
|
127
|
+
onBlur?: ((args_0: import("@vueuse/core").MaybeElement) => any) | undefined;
|
|
128
|
+
onFocus?: ((args_0: import("@vueuse/core").MaybeElement) => any) | undefined;
|
|
129
|
+
}> & (typeof globalThis extends {
|
|
130
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
131
|
+
} ? P : {});
|
|
132
|
+
expose: (exposed: {}) => void;
|
|
133
|
+
attrs: any;
|
|
134
|
+
slots: {
|
|
135
|
+
before?: (props: {
|
|
136
|
+
valid: boolean;
|
|
137
|
+
invalid: boolean;
|
|
138
|
+
modelValue: string | number | boolean | unknown[] | Record<string, any> | undefined;
|
|
139
|
+
}) => any;
|
|
140
|
+
} & {
|
|
141
|
+
after?: (props: {
|
|
142
|
+
valid: boolean;
|
|
143
|
+
invalid: boolean;
|
|
144
|
+
modelValue: string | number | boolean | unknown[] | Record<string, any> | undefined;
|
|
145
|
+
}) => any;
|
|
146
|
+
} & {
|
|
147
|
+
hint?: (props: {
|
|
148
|
+
modelValue: unknown;
|
|
149
|
+
valid: boolean;
|
|
150
|
+
invalid: boolean;
|
|
151
|
+
loading: boolean;
|
|
152
|
+
}) => any;
|
|
153
|
+
} & {
|
|
154
|
+
loading?: (props: {
|
|
155
|
+
modelValue: unknown;
|
|
156
|
+
valid: boolean;
|
|
157
|
+
invalid: boolean;
|
|
158
|
+
loading: boolean;
|
|
159
|
+
}) => any;
|
|
160
|
+
} & {
|
|
161
|
+
valid?: (props: {
|
|
162
|
+
modelValue: unknown;
|
|
163
|
+
valid: boolean;
|
|
164
|
+
invalid: boolean;
|
|
165
|
+
loading: boolean;
|
|
166
|
+
}) => any;
|
|
167
|
+
} & {
|
|
168
|
+
invalid?: (props: {
|
|
169
|
+
modelValue: unknown;
|
|
170
|
+
valid: boolean;
|
|
171
|
+
invalid: boolean;
|
|
172
|
+
loading: boolean;
|
|
173
|
+
}) => any;
|
|
174
|
+
};
|
|
175
|
+
emit: ((evt: "clear") => void) & ((evt: "update:modelValue", args_0: any) => void) & ((evt: "blur", args_0: import("@vueuse/core").MaybeElement) => void) & ((evt: "focus", args_0: import("@vueuse/core").MaybeElement) => void);
|
|
176
|
+
}>) => import("vue").VNode & {
|
|
177
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
178
|
+
};
|
|
179
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
180
|
+
[K in keyof T]: T[K];
|
|
181
|
+
} : {
|
|
182
|
+
[K in keyof T as K]: T[K];
|
|
183
|
+
}) & {};
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import type { MaybeElement } from '@vueuse/core';
|
|
2
|
+
import type { Option } from '../../types/generic';
|
|
3
|
+
export type VvSelectEmits = {
|
|
4
|
+
'update:modelValue': [any];
|
|
5
|
+
'focus': [MaybeElement];
|
|
6
|
+
'blur': [MaybeElement];
|
|
7
|
+
'clear': [];
|
|
8
|
+
};
|
|
9
|
+
export declare const VvSelectProps: {
|
|
10
|
+
/**
|
|
11
|
+
* This Boolean attribute indicates that multiple options can be selected in the list.
|
|
12
|
+
* If it is not specified, then only one option can be selected at a time.
|
|
13
|
+
* When multiple is specified, most browsers will show a scrolling list box instead of a single line dropdown.
|
|
14
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-multiple
|
|
15
|
+
*/
|
|
16
|
+
multiple: BooleanConstructor;
|
|
17
|
+
/**
|
|
18
|
+
* A Boolean attribute indicating that an option with a non-empty string value must be selected.
|
|
19
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-required
|
|
20
|
+
*/
|
|
21
|
+
required: BooleanConstructor;
|
|
22
|
+
/**
|
|
23
|
+
* If the control is presented as a scrolling list box (e.g. when multiple is specified),
|
|
24
|
+
* this attribute represents the number of rows in the list that should be visible at one time.
|
|
25
|
+
* Browsers are not required to present a select element as a scrolled list box. The default value is 0.
|
|
26
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-size
|
|
27
|
+
*/
|
|
28
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
29
|
+
/**
|
|
30
|
+
* modelValue can be a string, number, boolean, object or array of string, number, boolean, object
|
|
31
|
+
*/
|
|
32
|
+
modelValue: {
|
|
33
|
+
type: (NumberConstructor | ArrayConstructor | ObjectConstructor | BooleanConstructor | StringConstructor)[];
|
|
34
|
+
default: undefined;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Select first option automatically
|
|
38
|
+
*/
|
|
39
|
+
autoselectFirst: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Select placeholder
|
|
45
|
+
*/
|
|
46
|
+
placeholder: StringConstructor;
|
|
47
|
+
showClearAction: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
iconClear: {
|
|
52
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
53
|
+
default: "close";
|
|
54
|
+
};
|
|
55
|
+
labelClear: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
label: {
|
|
60
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
61
|
+
default: undefined;
|
|
62
|
+
};
|
|
63
|
+
unselectable: {
|
|
64
|
+
type: BooleanConstructor;
|
|
65
|
+
default: boolean;
|
|
66
|
+
};
|
|
67
|
+
floating: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
icon: {
|
|
72
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
73
|
+
default: undefined;
|
|
74
|
+
};
|
|
75
|
+
iconPosition: {
|
|
76
|
+
type: PropType<`${import("../../constants").Position}`>;
|
|
77
|
+
default: import("../../constants").Position;
|
|
78
|
+
validation: (value: import("../../constants").Position) => boolean;
|
|
79
|
+
};
|
|
80
|
+
options: {
|
|
81
|
+
type: PropType<(Option | string)[]>;
|
|
82
|
+
default: () => never[];
|
|
83
|
+
};
|
|
84
|
+
labelKey: {
|
|
85
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
86
|
+
default: string;
|
|
87
|
+
};
|
|
88
|
+
valueKey: {
|
|
89
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
90
|
+
default: string;
|
|
91
|
+
};
|
|
92
|
+
disabledKey: {
|
|
93
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
94
|
+
default: string;
|
|
95
|
+
};
|
|
96
|
+
modifiers: {
|
|
97
|
+
type: PropType<string | string[]>;
|
|
98
|
+
default: undefined;
|
|
99
|
+
};
|
|
100
|
+
readonly: {
|
|
101
|
+
type: BooleanConstructor;
|
|
102
|
+
default: boolean;
|
|
103
|
+
};
|
|
104
|
+
disabled: {
|
|
105
|
+
type: BooleanConstructor;
|
|
106
|
+
default: boolean;
|
|
107
|
+
};
|
|
108
|
+
loading: {
|
|
109
|
+
type: BooleanConstructor;
|
|
110
|
+
default: boolean;
|
|
111
|
+
};
|
|
112
|
+
loadingLabel: {
|
|
113
|
+
type: StringConstructor;
|
|
114
|
+
default: string;
|
|
115
|
+
};
|
|
116
|
+
hintLabel: {
|
|
117
|
+
type: StringConstructor;
|
|
118
|
+
default: string;
|
|
119
|
+
};
|
|
120
|
+
invalid: {
|
|
121
|
+
type: BooleanConstructor;
|
|
122
|
+
default: boolean;
|
|
123
|
+
};
|
|
124
|
+
invalidLabel: {
|
|
125
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
126
|
+
default: undefined;
|
|
127
|
+
};
|
|
128
|
+
valid: {
|
|
129
|
+
type: BooleanConstructor;
|
|
130
|
+
default: boolean;
|
|
131
|
+
};
|
|
132
|
+
validLabel: {
|
|
133
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
134
|
+
default: undefined;
|
|
135
|
+
};
|
|
136
|
+
tabindex: {
|
|
137
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
138
|
+
default: number;
|
|
139
|
+
};
|
|
140
|
+
autocomplete: {
|
|
141
|
+
type: StringConstructor;
|
|
142
|
+
default: string;
|
|
143
|
+
};
|
|
144
|
+
autofocus: {
|
|
145
|
+
type: BooleanConstructor;
|
|
146
|
+
default: boolean;
|
|
147
|
+
};
|
|
148
|
+
name: {
|
|
149
|
+
type: StringConstructor;
|
|
150
|
+
required: boolean;
|
|
151
|
+
};
|
|
152
|
+
id: (NumberConstructor | StringConstructor)[];
|
|
153
|
+
};
|
|
154
|
+
export declare function useVvSelectProps<T extends Option | string>(): {
|
|
155
|
+
options: {
|
|
156
|
+
type: PropType<T[]>;
|
|
157
|
+
default: () => never[];
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* This Boolean attribute indicates that multiple options can be selected in the list.
|
|
161
|
+
* If it is not specified, then only one option can be selected at a time.
|
|
162
|
+
* When multiple is specified, most browsers will show a scrolling list box instead of a single line dropdown.
|
|
163
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-multiple
|
|
164
|
+
*/
|
|
165
|
+
multiple: BooleanConstructor;
|
|
166
|
+
/**
|
|
167
|
+
* A Boolean attribute indicating that an option with a non-empty string value must be selected.
|
|
168
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-required
|
|
169
|
+
*/
|
|
170
|
+
required: BooleanConstructor;
|
|
171
|
+
/**
|
|
172
|
+
* If the control is presented as a scrolling list box (e.g. when multiple is specified),
|
|
173
|
+
* this attribute represents the number of rows in the list that should be visible at one time.
|
|
174
|
+
* Browsers are not required to present a select element as a scrolled list box. The default value is 0.
|
|
175
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-size
|
|
176
|
+
*/
|
|
177
|
+
size: (NumberConstructor | StringConstructor)[];
|
|
178
|
+
/**
|
|
179
|
+
* modelValue can be a string, number, boolean, object or array of string, number, boolean, object
|
|
180
|
+
*/
|
|
181
|
+
modelValue: {
|
|
182
|
+
type: (NumberConstructor | ArrayConstructor | ObjectConstructor | BooleanConstructor | StringConstructor)[];
|
|
183
|
+
default: undefined;
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Select first option automatically
|
|
187
|
+
*/
|
|
188
|
+
autoselectFirst: {
|
|
189
|
+
type: BooleanConstructor;
|
|
190
|
+
default: boolean;
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* Select placeholder
|
|
194
|
+
*/
|
|
195
|
+
placeholder: StringConstructor;
|
|
196
|
+
showClearAction: {
|
|
197
|
+
type: BooleanConstructor;
|
|
198
|
+
default: boolean;
|
|
199
|
+
};
|
|
200
|
+
iconClear: {
|
|
201
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
202
|
+
default: "close";
|
|
203
|
+
};
|
|
204
|
+
labelClear: {
|
|
205
|
+
type: StringConstructor;
|
|
206
|
+
default: string;
|
|
207
|
+
};
|
|
208
|
+
label: {
|
|
209
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
210
|
+
default: undefined;
|
|
211
|
+
};
|
|
212
|
+
unselectable: {
|
|
213
|
+
type: BooleanConstructor;
|
|
214
|
+
default: boolean;
|
|
215
|
+
};
|
|
216
|
+
floating: {
|
|
217
|
+
type: BooleanConstructor;
|
|
218
|
+
default: boolean;
|
|
219
|
+
};
|
|
220
|
+
icon: {
|
|
221
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
222
|
+
default: undefined;
|
|
223
|
+
};
|
|
224
|
+
iconPosition: {
|
|
225
|
+
type: PropType<`${import("../../constants").Position}`>;
|
|
226
|
+
default: import("../../constants").Position;
|
|
227
|
+
validation: (value: import("../../constants").Position) => boolean;
|
|
228
|
+
};
|
|
229
|
+
labelKey: {
|
|
230
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
231
|
+
default: string;
|
|
232
|
+
};
|
|
233
|
+
valueKey: {
|
|
234
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
235
|
+
default: string;
|
|
236
|
+
};
|
|
237
|
+
disabledKey: {
|
|
238
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
239
|
+
default: string;
|
|
240
|
+
};
|
|
241
|
+
modifiers: {
|
|
242
|
+
type: PropType<string | string[]>;
|
|
243
|
+
default: undefined;
|
|
244
|
+
};
|
|
245
|
+
readonly: {
|
|
246
|
+
type: BooleanConstructor;
|
|
247
|
+
default: boolean;
|
|
248
|
+
};
|
|
249
|
+
disabled: {
|
|
250
|
+
type: BooleanConstructor;
|
|
251
|
+
default: boolean;
|
|
252
|
+
};
|
|
253
|
+
loading: {
|
|
254
|
+
type: BooleanConstructor;
|
|
255
|
+
default: boolean;
|
|
256
|
+
};
|
|
257
|
+
loadingLabel: {
|
|
258
|
+
type: StringConstructor;
|
|
259
|
+
default: string;
|
|
260
|
+
};
|
|
261
|
+
hintLabel: {
|
|
262
|
+
type: StringConstructor;
|
|
263
|
+
default: string;
|
|
264
|
+
};
|
|
265
|
+
invalid: {
|
|
266
|
+
type: BooleanConstructor;
|
|
267
|
+
default: boolean;
|
|
268
|
+
};
|
|
269
|
+
invalidLabel: {
|
|
270
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
271
|
+
default: undefined;
|
|
272
|
+
};
|
|
273
|
+
valid: {
|
|
274
|
+
type: BooleanConstructor;
|
|
275
|
+
default: boolean;
|
|
276
|
+
};
|
|
277
|
+
validLabel: {
|
|
278
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
279
|
+
default: undefined;
|
|
280
|
+
};
|
|
281
|
+
tabindex: {
|
|
282
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
283
|
+
default: number;
|
|
284
|
+
};
|
|
285
|
+
autocomplete: {
|
|
286
|
+
type: StringConstructor;
|
|
287
|
+
default: string;
|
|
288
|
+
};
|
|
289
|
+
autofocus: {
|
|
290
|
+
type: BooleanConstructor;
|
|
291
|
+
default: boolean;
|
|
292
|
+
};
|
|
293
|
+
name: {
|
|
294
|
+
type: StringConstructor;
|
|
295
|
+
required: boolean;
|
|
296
|
+
};
|
|
297
|
+
id: (NumberConstructor | StringConstructor)[];
|
|
298
|
+
};
|