@volverjs/ui-vue 0.0.10-beta.47 → 0.0.10-beta.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/auto-imports.d.ts +19 -11
- package/bin/icons.js +1 -0
- package/dist/components/VvAccordion/VvAccordion.es.js +4 -5
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +8 -11
- package/dist/components/VvAccordion/index.d.ts +2 -2
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +45 -46
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +11 -13
- package/dist/components/VvAccordionGroup/index.d.ts +2 -2
- package/dist/components/VvAction/VvAction.vue.d.ts +8 -10
- package/dist/components/VvAction/index.d.ts +1 -1
- package/dist/components/VvAlert/VvAlert.es.js +158 -161
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +20 -22
- package/dist/components/VvAlert/index.d.ts +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +271 -274
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +9 -11
- package/dist/components/VvAlertGroup/index.d.ts +2 -2
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +6 -6
- package/dist/components/VvAvatar/index.d.ts +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +21 -22
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +6 -6
- package/dist/components/VvAvatarGroup/index.d.ts +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +6 -6
- package/dist/components/VvBadge/index.d.ts +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +23 -23
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +19 -19
- package/dist/components/VvBreadcrumb/index.d.ts +1 -1
- package/dist/components/VvButton/VvButton.es.js +313 -314
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +14 -16
- package/dist/components/VvButton/index.d.ts +9 -9
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +2 -2
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +6 -8
- package/dist/components/VvButtonGroup/index.d.ts +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +6 -6
- package/dist/components/VvCard/index.d.ts +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +186 -187
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +11 -13
- package/dist/components/VvCheckbox/index.d.ts +7 -7
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -191
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +11 -13
- package/dist/components/VvCheckboxGroup/index.d.ts +2 -2
- package/dist/components/VvCombobox/VvCombobox.es.js +1864 -1865
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +72 -291
- package/dist/components/VvCombobox/index.d.ts +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +7 -9
- package/dist/components/VvDialog/index.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +9 -10
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +51 -51
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +22 -16
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +4 -4
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +4 -4
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +6 -6
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +2 -2
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +2 -2
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +2 -2
- package/dist/components/VvIcon/VvIcon.vue.d.ts +2 -23
- package/dist/components/VvInputFile/VvInputFile.es.js +651 -652
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +19 -19
- package/dist/components/VvInputFile/index.d.ts +4 -4
- package/dist/components/VvInputText/VvInputClearAction.d.ts +10 -6
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +11 -7
- package/dist/components/VvInputText/VvInputStepAction.d.ts +10 -6
- package/dist/components/VvInputText/VvInputText.es.js +715 -716
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +30 -32
- package/dist/components/VvInputText/index.d.ts +1 -1
- package/dist/components/VvNav/VvNav.es.js +5 -5
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +8 -10
- package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +1 -1
- package/dist/components/VvNav/index.d.ts +2 -2
- package/dist/components/VvProgress/VvProgress.vue.d.ts +6 -6
- package/dist/components/VvProgress/index.d.ts +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +186 -187
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +10 -12
- package/dist/components/VvRadio/index.d.ts +5 -5
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -191
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +11 -13
- package/dist/components/VvRadioGroup/index.d.ts +2 -2
- package/dist/components/VvSelect/VvSelect.es.js +337 -338
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +20 -131
- package/dist/components/VvSelect/index.d.ts +7 -7
- package/dist/components/VvTab/VvTab.es.js +18 -18
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +6 -8
- package/dist/components/VvTab/index.d.ts +1 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +292 -293
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +14 -16
- package/dist/components/VvTextarea/index.d.ts +3 -3
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +8 -8
- package/dist/components/common/HintSlot.d.ts +6 -6
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.es.js +2760 -2763
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlert.d.ts +4 -4
- package/dist/composables/alert/{useProvideAlert.d.ts → useAlertProvide.d.ts} +1 -1
- package/dist/composables/dropdown/useDropdownContextmenu.d.ts +18 -0
- package/dist/composables/dropdown/{useProvideDropdown.d.ts → useDropdownProvide.d.ts} +6 -6
- package/dist/composables/dropdown/useDropdownVirtualElement.d.ts +17 -0
- package/dist/composables/group/{useInjectedGroupState.d.ts → useGroupStateInject.d.ts} +1 -1
- package/dist/composables/group/{useProvideGroupState.d.ts → useGroupStateProvide.d.ts} +2 -2
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/index.es.js +87 -3
- package/dist/composables/index.umd.js +1 -1
- package/dist/composables/useComponentFocus.d.ts +1 -1
- package/dist/composables/useOptions.d.ts +1 -1
- package/dist/composables/usePersistence.d.ts +1 -1
- package/dist/composables/useUniqueId.d.ts +1 -1
- package/dist/constants.d.ts +3 -3
- package/dist/directives/index.d.ts +2 -2
- package/dist/directives/index.es.js +145 -39
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-contextmenu.es.js +137 -31
- package/dist/directives/v-contextmenu.umd.js +1 -1
- package/dist/icons.d.ts +17 -17
- package/dist/icons.es.js +424 -424
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +4 -4
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +178 -474
- package/dist/stories/Alert/Alert.settings.d.ts +1 -1
- package/dist/stories/Alert/AlertModifiers.stories.d.ts +1 -1
- package/dist/stories/Alert/AlertSlots.stories.d.ts +1 -1
- package/dist/stories/AlertGroup/AlertGroupPosition.stories.d.ts +1 -1
- package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +1 -1
- package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
- package/dist/stories/Button/Button.settings.d.ts +1 -1
- package/dist/stories/Combobox/Combobox.settings.d.ts +1 -1
- package/dist/stories/Nav/Nav.settings.d.ts +1 -1
- package/dist/stories/Tab/Tab.settings.d.ts +1 -1
- package/dist/types/floating-ui.d.ts +1 -1
- package/dist/types/group.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/utils/DomUtilities.d.ts +1 -0
- package/package.json +43 -43
- package/src/Volver.ts +3 -3
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAccordion/VvAccordion.vue +5 -5
- package/src/components/VvAccordion/index.ts +2 -2
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +5 -5
- package/src/components/VvAction/VvAction.vue +1 -1
- package/src/components/VvAlert/VvAlert.vue +1 -1
- package/src/components/VvAlert/index.ts +1 -1
- package/src/components/VvAlertGroup/VvAlertGroup.vue +1 -1
- package/src/components/VvAlertGroup/index.ts +3 -3
- package/src/components/VvAvatarGroup/VvAvatarGroup.vue +1 -1
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +2 -2
- package/src/components/VvBreadcrumb/index.ts +1 -1
- package/src/components/VvButton/VvButton.vue +3 -3
- package/src/components/VvButton/index.ts +4 -4
- package/src/components/VvButtonGroup/VvButtonGroup.vue +3 -3
- package/src/components/VvCheckbox/VvCheckbox.vue +2 -2
- package/src/components/VvCheckbox/index.ts +2 -2
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +2 -2
- package/src/components/VvCombobox/VvCombobox.vue +9 -9
- package/src/components/VvCombobox/index.ts +15 -15
- package/src/components/VvDropdown/VvDropdown.vue +19 -19
- package/src/components/VvDropdown/VvDropdownAction.vue +1 -1
- package/src/components/VvDropdown/VvDropdownItem.vue +1 -1
- package/src/components/VvDropdown/VvDropdownOption.vue +1 -1
- package/src/components/VvDropdown/index.ts +2 -2
- package/src/components/VvIcon/VvIcon.vue +2 -2
- package/src/components/VvInputFile/VvInputFile.vue +7 -7
- package/src/components/VvInputFile/index.ts +7 -7
- package/src/components/VvInputText/VvInputPasswordAction.ts +1 -1
- package/src/components/VvInputText/VvInputText.vue +19 -19
- package/src/components/VvInputText/VvInputTextActions.ts +4 -4
- package/src/components/VvInputText/index.ts +2 -2
- package/src/components/VvNav/VvNav.vue +1 -1
- package/src/components/VvRadio/VvRadio.vue +1 -1
- package/src/components/VvRadio/index.ts +2 -2
- package/src/components/VvRadioGroup/VvRadioGroup.vue +2 -2
- package/src/components/VvSelect/VvSelect.vue +6 -6
- package/src/components/VvSelect/index.ts +12 -12
- package/src/components/VvTab/VvTab.vue +2 -2
- package/src/components/VvTab/index.ts +1 -1
- package/src/components/VvTextarea/VvTextarea.vue +1 -1
- package/src/components/common/HintSlot.ts +14 -14
- package/src/components/index.ts +1 -1
- package/src/composables/alert/useAlert.ts +2 -2
- package/src/composables/alert/{useProvideAlert.ts → useAlertProvide.ts} +2 -2
- package/src/composables/dropdown/useDropdownContextmenu.ts +22 -0
- package/src/composables/dropdown/{useProvideDropdown.ts → useDropdownProvide.ts} +9 -9
- package/src/composables/dropdown/useDropdownVirtualElement.ts +53 -0
- package/src/composables/group/{useInjectedGroupState.ts → useGroupStateInject.ts} +2 -2
- package/src/composables/group/{useProvideGroupState.ts → useGroupStateProvide.ts} +2 -2
- package/src/composables/index.ts +2 -0
- package/src/composables/useBlurhash.ts +2 -2
- package/src/composables/useOptions.ts +1 -1
- package/src/composables/usePersistence.ts +1 -1
- package/src/composables/useTextCount.ts +2 -2
- package/src/composables/useUniqueId.ts +2 -3
- package/src/constants.ts +5 -5
- package/src/directives/index.ts +2 -2
- package/src/directives/v-contextmenu.ts +21 -29
- package/src/directives/v-tooltip.ts +2 -2
- package/src/icons.ts +2 -2
- package/src/index.ts +1 -1
- package/src/props/index.ts +7 -7
- package/src/resolvers/unplugin.ts +5 -5
- package/src/stories/Accordion/Accordion.stories.ts +2 -2
- package/src/stories/Accordion/Accordion.test.ts +1 -1
- package/src/stories/Accordion/AccordionSlots.stories.ts +2 -2
- package/src/stories/AccordionGroup/AccordionGroup.stories.ts +2 -2
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +1 -1
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +3 -3
- package/src/stories/Alert/Alert.settings.ts +1 -1
- package/src/stories/Alert/Alert.stories.ts +2 -2
- package/src/stories/Alert/Alert.test.ts +1 -1
- package/src/stories/Alert/AlertModifiers.stories.ts +2 -2
- package/src/stories/Alert/AlertSlots.stories.ts +2 -2
- package/src/stories/AlertGroup/AlertGroup.stories.ts +2 -2
- package/src/stories/AlertGroup/AlertGroup.test.ts +3 -3
- package/src/stories/AlertGroup/AlertGroupPosition.stories.ts +2 -2
- package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +2 -2
- package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
- package/src/stories/Avatar/Avatar.stories.ts +2 -2
- package/src/stories/Avatar/Avatar.test.ts +1 -1
- package/src/stories/Avatar/AvatarBadge.stories.ts +1 -1
- package/src/stories/Avatar/AvatarModifiers.stories.ts +2 -2
- package/src/stories/Avatar/AvatarSlots.stories.ts +2 -2
- package/src/stories/AvatarGroup/AvatarGroup.stories.ts +2 -2
- package/src/stories/AvatarGroup/AvatarGroup.test.ts +1 -1
- package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +2 -2
- package/src/stories/AvatarGroup/AvatarGroupSlotDefault.stories.ts +3 -3
- package/src/stories/Badge/Badge.stories.ts +2 -2
- package/src/stories/Badge/Badge.test.ts +1 -1
- package/src/stories/Badge/BadgeSlots.stories.ts +2 -2
- package/src/stories/Blurhash/BlurhashComposable.stories.ts +37 -117
- package/src/stories/Breadcrumb/Breadcrumb.stories.ts +2 -2
- package/src/stories/Breadcrumb/BreadcrumbSlots.stories.ts +5 -5
- package/src/stories/Button/Button.settings.ts +3 -3
- package/src/stories/Button/Button.stories.ts +2 -2
- package/src/stories/Button/Button.test.ts +1 -1
- package/src/stories/Button/ButtonIcon.stories.ts +2 -2
- package/src/stories/Button/ButtonLink.stories.ts +2 -2
- package/src/stories/Button/ButtonLoading.stories.ts +2 -2
- package/src/stories/Button/ButtonModifiers.stories.ts +2 -2
- package/src/stories/Button/ButtonSlots.stories.ts +3 -3
- package/src/stories/Button/ButtonState.stories.ts +2 -2
- package/src/stories/Button/ButtonToggle.stories.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroup.settings.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroup.stories.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroup.test.ts +1 -1
- package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroupSlots.stories.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroupToggle.stories.ts +2 -2
- package/src/stories/Card/Card.stories.ts +2 -2
- package/src/stories/Card/Card.test.ts +1 -1
- package/src/stories/Card/CardSlots.stories.ts +2 -2
- package/src/stories/Checkbox/Checkbox.stories.ts +2 -2
- package/src/stories/Checkbox/Checkbox.test.ts +1 -1
- package/src/stories/Checkbox/CheckboxBinary.stories.ts +2 -2
- package/src/stories/Checkbox/CheckboxSlots.stories.ts +2 -2
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.ts +2 -2
- package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +2 -2
- package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.ts +2 -2
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.ts +3 -3
- package/src/stories/Combobox/Combobox.settings.ts +9 -9
- package/src/stories/Combobox/Combobox.stories.ts +2 -2
- package/src/stories/Combobox/Combobox.test.ts +2 -2
- package/src/stories/Combobox/ComboboxIconPosition.stories.ts +2 -2
- package/src/stories/Combobox/ComboboxMultiple.stories.ts +2 -2
- package/src/stories/Combobox/ComboboxOptions.stories.ts +2 -2
- package/src/stories/Combobox/ComboboxSlots.stories.ts +3 -3
- package/src/stories/Dialog/Dialog.stories.ts +2 -2
- package/src/stories/Dialog/Dialog.test.ts +1 -1
- package/src/stories/Dialog/DialogModifiers.stories.ts +2 -2
- package/src/stories/Dialog/DialogSlots.stories.ts +2 -2
- package/src/stories/Dropdown/Dropdown.settings.ts +1 -1
- package/src/stories/Dropdown/Dropdown.stories.ts +4 -4
- package/src/stories/Dropdown/Dropdown.test.ts +1 -1
- package/src/stories/Dropdown/DropdownContextmenuDirective.stories.ts +3 -4
- package/src/stories/Dropdown/DropdownMultilevel.stories.ts +4 -4
- package/src/stories/Dropdown/DropdownSlots.stories.ts +4 -4
- package/src/stories/Icon/Icon.settings.ts +1 -1
- package/src/stories/Icon/Icon.stories.ts +2 -2
- package/src/stories/Icon/IconsCollection.stories.ts +3 -3
- package/src/stories/InputFile/InputFile.settings.ts +1 -1
- package/src/stories/InputFile/InputFile.stories.ts +1 -1
- package/src/stories/InputFile/InputFileDropArea.stories.ts +2 -2
- package/src/stories/InputFile/InputFileIconPosition.stories.ts +2 -2
- package/src/stories/InputFile/InputFileSlots.stories.ts +2 -2
- package/src/stories/InputText/InputText.settings.ts +2 -2
- package/src/stories/InputText/InputText.stories.ts +2 -2
- package/src/stories/InputText/InputText.test.ts +2 -2
- package/src/stories/InputText/InputTextIconPosition.stories.ts +2 -2
- package/src/stories/InputText/InputTextLength.stories.ts +2 -2
- package/src/stories/InputText/InputTextMask.stories.ts +2 -2
- package/src/stories/InputText/InputTextMinMax.stories.ts +2 -2
- package/src/stories/InputText/InputTextSlots.stories.ts +2 -2
- package/src/stories/InputText/InputTextType.stories.ts +2 -2
- package/src/stories/Nav/Nav.settings.ts +1 -1
- package/src/stories/Nav/Nav.stories.ts +2 -2
- package/src/stories/Nav/Nav.test.ts +1 -1
- package/src/stories/Nav/NavModifiers.stories.ts +2 -2
- package/src/stories/Progress/Progress.stories.ts +2 -2
- package/src/stories/Progress/Progress.test.ts +2 -2
- package/src/stories/Radio/Radio.stories.ts +2 -2
- package/src/stories/Radio/Radio.test.ts +1 -1
- package/src/stories/Radio/RadioSlots.stories.ts +2 -2
- package/src/stories/RadioGroup/RadioGroup.stories.ts +2 -2
- package/src/stories/RadioGroup/RadioGroup.test.ts +2 -2
- package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +2 -2
- package/src/stories/RadioGroup/RadioGroupSlots.stories.ts +3 -3
- package/src/stories/Select/Select.settings.ts +10 -10
- package/src/stories/Select/Select.stories.ts +2 -2
- package/src/stories/Select/Select.test.ts +1 -1
- package/src/stories/Select/SelectIconPosition.stories.ts +2 -2
- package/src/stories/Select/SelectOptions.stories.ts +2 -2
- package/src/stories/Select/SelectSlots.stories.ts +2 -2
- package/src/stories/Tab/Tab.settings.ts +1 -1
- package/src/stories/Tab/Tab.stories.ts +1 -1
- package/src/stories/Tab/Tab.test.ts +1 -1
- package/src/stories/Textarea/Textarea.settings.ts +1 -1
- package/src/stories/Textarea/Textarea.stories.ts +2 -2
- package/src/stories/Textarea/Textarea.test.ts +1 -1
- package/src/stories/Textarea/TextareaLength.stories.ts +2 -2
- package/src/stories/Textarea/TextareaSlots.stories.ts +2 -2
- package/src/stories/Textarea/TextareatIconPosition.stories.ts +2 -2
- package/src/stories/Tooltip/Tooltip.stories.ts +3 -3
- package/src/stories/Tooltip/Tooltip.test.ts +1 -1
- package/src/stories/Tooltip/TooltipDirective.stories.ts +3 -3
- package/src/test/expect.ts +3 -3
- package/src/test/types.d.ts +2 -2
- package/src/types/floating-ui.ts +1 -1
- package/src/types/group.ts +1 -1
- package/src/types/index.ts +2 -2
- package/src/utils/DomUtilities.ts +15 -0
- package/src/utils/ObjectUtilities.ts +4 -4
- package/src/workers/blurhash.ts +1 -1
- package/dist/composables/alert/{useInjectAlert.d.ts → useAlerInject.d.ts} +0 -0
- package/dist/composables/dropdown/{useInjectDropdown.d.ts → useDropdownInject.d.ts} +0 -0
- package/src/assets/icons/normal/{dulicate.svg → duplicate.svg} +0 -0
- package/src/composables/alert/{useInjectAlert.ts → useAlerInject.ts} +0 -0
- package/src/composables/dropdown/{useInjectDropdown.ts → useDropdownInject.ts} +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("@iconify/vue"),require("@vueuse/core"),require("uid"),require("ts-dot-prop")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","@vueuse/core","uid","ts-dot-prop"],l):(e="undefined"!=typeof globalThis?globalThis:e||self).VvSelect=l(e.vue,e.vue$1,e.core,e.uid,e.tsDotProp)}(this,(function(e,l,t,o,a){"use strict";const n={prefix:"normal"};var i=(e=>(e.local="local",e.session="session",e))(i||{}),r=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(r||{}),u=(e=>(e.before="before",e.after="after",e))(u||{}),d=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(d||{}),s=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(s||{});const c=Symbol.for("volver");function v(){return e.inject(c)}function p(l,t,o){return e.computed((()=>{const a={[l]:!0},n="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${l}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((t=>{a[`${l}--${t}`]=e.unref(o.value[t])})),a}))}const f=e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},n),setup(t){const o=t,a=e.computed((()=>"string"==typeof o.rotate?Number.parseFloat(o.rotate):o.rotate)),n=e.ref(!0),i=v(),{modifiers:r}=e.toRefs(o),u=p("vv-icon",r),d=e.computed((()=>o.provider||(null==i?void 0:i.iconsProvider))),s=e.computed((()=>{const e=o.name??"",t=`@${d.value}:${o.prefix}:${e}`;if(l.iconExists(t))return t;const a=null==i?void 0:i.iconsCollections.find((t=>{const o=`@${d.value}:${t.prefix}:${e}`;return l.iconExists(o)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function c(e){const t=function(e){let l;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");l=(new e).window}return(l?new l.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==t?void 0:t.innerHTML.trim())||"";t&&a&&l.addIcon(`@${d.value}:${o.prefix}:${o.name}`,{body:a,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return i&&o.src&&!l.iconExists(`@${d.value}:${o.prefix}:${o.name}`)&&(n.value=!1,i.fetchIcon(o.src).then((e=>{e&&(c(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&c(o.svg),(t,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(l.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(a),color:t.color,onLoad:t.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}});function m(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(l=e)||l instanceof String;var l})).join(" "):e}const b={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},g={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},h={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},y={disabled:{type:Boolean,default:!1}},S=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),B={readonly:{type:Boolean,default:!1}},k={modifiers:{type:[String,Array],default:void 0}},L={hintLabel:{type:String,default:""}},$={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},V={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:u.before,validation:e=>Object.values(u).includes(e)}},O={tabindex:{type:[String,Number],default:0}},w={floating:{type:Boolean,default:!1}},x={unselectable:{type:Boolean,default:!0}},E={id:[String,Number]};r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const P={...E,name:{type:String,required:!0}},N={autofocus:{type:Boolean,default:!1}},A={autocomplete:{type:String,default:"off"}};d.button,s.button,i.local;const F={...P,...N,...A,...O,...b,...g,...L,...h,...y,...B,...k,...$,...V,...w,...x,...S,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 I(){return{...F,options:{...F.options,type:Array,default:()=>[]}}}const _=["for"],C={class:"vv-select__wrapper"},z={key:0,class:"vv-select__input-before"},j={class:"vv-select__inner"},D=["id"],R=["disabled","hidden"],q=["disabled","value"],H=["disabled","label"],K=["disabled","value"],M={key:1,class:"vv-select__input-after"};return e.defineComponent({name:"VvSelect",props:I(),emits:["update:modelValue","focus","blur"],setup(l,{emit:n}){const i=l,d=n,s=e.useSlots(),c=function(l,t,o){const a=v(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[l]))return a.defaults.value[l]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,l=t,a=o;return Object.keys(l).reduce(((t,o)=>{const n=a[o];if(t[o]=n,o in e){if(Array.isArray(l[o])){const a=l[o];a.length&&a[0]===n&&(t[o]=e[o])}if("function"==typeof l[o]&&(0,l[o])()===n&&(t[o]=e[o]),"object"==typeof l[o]){let a=l[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(t[o]=e[o]):a===n&&(t[o]=e[o])}}return t}),{})}))}("VvSelect",I(),i),b=e.ref(),{HintSlot:g,hasHintLabelOrSlot:h,hasInvalidLabelOrSlot:y,hintSlotScope:S}=function(l,t){const o=e.computed((()=>e.isRef(l)?l.value:l)),a=e.computed((()=>m(o.value.invalidLabel))),n=e.computed((()=>m(o.value.validLabel))),i=e.computed((()=>o.value.loadingLabel)),r=e.computed((()=>o.value.hintLabel)),u=e.computed((()=>Boolean(o.value.loading&&(t.loading||i.value)))),d=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(t.invalid||a.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(o.value.valid&&(t.valid||n.value)))),c=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(t.hint||r.value))),v=e.computed((()=>d.value||s.value||u.value||c.value)),p=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),f=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:v,invalidLabel:a,validLabel:n,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:c}),render(){var l,t,o,a,n,i,r,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(t=(l=this.$slots).loading)?void 0:t.call(l))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(i=(n=this.$slots).valid)?void 0:i.call(n))??this.validLabel):e.h(this.tag,{role:d},(null==(u=(r=this.$slots).hint)?void 0:u.call(r))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:c,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:p,HintSlot:f}}(c,s),{focused:B}=function(l,o){const{focused:a}=t.useFocus(l);return e.watch(a,(t=>{o(t?"focus":"blur",e.unref(l))})),{focused:a}}(b,d);function k(e){var l;return"string"!=typeof e&&(null==(l=e.options)?void 0:l.length)}const{id:L,modifiers:$,disabled:V,readonly:O,loading:w,icon:x,iconPosition:E,invalid:P,valid:N,floating:A,multiple:F}=e.toRefs(i),T=function(l){return e.computed((()=>String((null==l?void 0:l.value)||o.uid())))}(L),J=e.computed((()=>`${T.value}-hint`)),G=e.computed((()=>i.disabled||i.readonly)),U=e.computed((()=>G.value?-1:i.tabindex)),Q=e.computed({get:()=>i.modelValue,set:e=>{!Array.isArray(e)||0!==(e=e.filter((e=>void 0!==e))).length||i.unselectable?d("update:modelValue",e):b.value.value=i.modelValue}}),W=e.computed((()=>Array.isArray(Q.value)?Q.value.length>0:void 0!==Q.value&&null!==Q.value)),X=t.useElementVisibility(b);e.watch(X,(e=>{e&&i.autofocus&&(B.value=!0)}));const{hasIconBefore:Y,hasIconAfter:Z}=function(l,t){const o=e.computed((()=>"string"==typeof(null==l?void 0:l.value)?{name:null==l?void 0:l.value}:null==l?void 0:l.value)),a=e.computed((()=>(null==t?void 0:t.value)===u.before?o.value:void 0)),n=e.computed((()=>(null==t?void 0:t.value)===u.after?o.value:void 0)),i=e.computed((()=>(null==t?void 0:t.value)===r.left?o.value:void 0)),d=e.computed((()=>(null==t?void 0:t.value)===r.right?o.value:void 0)),s=e.computed((()=>(null==t?void 0:t.value)===r.top?o.value:void 0)),c=e.computed((()=>(null==t?void 0:t.value)===r.bottom?o.value:void 0));return{hasIcon:o,hasIconLeft:i,hasIconRight:d,hasIconTop:s,hasIconBottom:c,hasIconBefore:a,hasIconAfter:n}}(x,E),ee=e.computed((()=>!0===i.invalid||!0!==i.valid&&void 0)),le=p("vv-select",$,e.computed((()=>({valid:N.value,invalid:P.value,loading:w.value,disabled:V.value,readonly:O.value,"icon-before":void 0!==Y.value,"icon-after":void 0!==Z.value,dirty:W.value,focus:B.value,floating:A.value,multiple:F.value})))),{getOptionLabel:te,getOptionValue:oe,isOptionDisabled:ae,getOptionGrouped:ne}=function(l){const{options:t,labelKey:o,valueKey:n,disabledKey:i}=e.toRefs(l);return{options:t,getOptionLabel:e=>"string"==typeof e?e:"function"==typeof o.value?o.value(e):String(o.value?a.get(e,o.value):e),getOptionValue:e=>"string"==typeof e?e:"function"==typeof n.value?n.value(e):n.value?a.get(e,n.value):e,isOptionDisabled:e=>"string"!=typeof e&&("function"==typeof i.value?i.value(e):!!i.value&&a.get(e,i.value)),getOptionGrouped:e=>"string"==typeof e?[]:"object"==typeof e&&e&&"options"in e?e.options:[]}}(i);e.watch((()=>i.options),(e=>{if((null==e?void 0:e.length)&&i.autoselectFirst&&!W.value){const l=oe(e[0]);Q.value=i.multiple?[l]:l}}),{immediate:!0});const ie=e.computed((()=>({name:i.name,tabindex:U.value,disabled:G.value,required:i.required,size:i.size,autocomplete:i.autocomplete,multiple:i.multiple,"aria-invalid":ee.value,"aria-describedby":h.value?J.value:void 0,"aria-errormessage":y.value?J.value:void 0}))),re=e.computed((()=>({valid:i.valid,invalid:i.invalid,modelValue:i.modelValue})));return(l,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(le))},[l.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(T)},e.toDisplayString(l.label),9,_)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",C,[l.$slots.before?(e.openBlock(),e.createElementBlock("div",z,[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(re))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",j,[e.unref(Y)?(e.openBlock(),e.createBlock(f,e.mergeProps({key:0},e.unref(Y),{class:"vv-select__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createElementVNode("select",e.mergeProps({id:e.unref(T),ref_key:"selectEl",ref:b},e.unref(ie),{"onUpdate:modelValue":t[0]||(t[0]=l=>e.isRef(Q)?Q.value=l:null)}),[l.placeholder?(e.openBlock(),e.createElementBlock("option",{key:0,value:void 0,disabled:!l.unselectable,hidden:!l.unselectable},e.toDisplayString(l.placeholder),9,R)):e.createCommentVNode("v-if",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.options,((l,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[k(l)?(e.openBlock(),e.createElementBlock("optgroup",{key:`group-${t}`,disabled:e.unref(ae)(l),label:e.unref(te)(l)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ne)(l),((l,o)=>(e.openBlock(),e.createElementBlock("option",{key:`group-${t}-item-${o}`,disabled:e.unref(ae)(l),value:e.unref(oe)(l)},e.toDisplayString(e.unref(te)(l)),9,K)))),128))],8,H)):(e.openBlock(),e.createElementBlock("option",{key:t,disabled:e.unref(ae)(l),value:e.unref(oe)(l)},e.toDisplayString(e.unref(te)(l)),9,q))],64)))),256))],16,D),[[e.vModelSelect,e.unref(Q)]]),e.unref(Z)?(e.openBlock(),e.createBlock(f,e.mergeProps({key:1},e.unref(Z),{class:"vv-select__icon vv-select__icon-after"}),null,16)):e.createCommentVNode("v-if",!0)]),l.$slots.after?(e.openBlock(),e.createElementBlock("div",M,[e.renderSlot(l.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(re))))])):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref(g),{id:e.unref(J),class:"vv-select__hint"},e.createSlots({_:2},[l.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(S))))])),key:"0"}:void 0,l.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(S))))])),key:"1"}:void 0,l.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(S))))])),key:"2"}:void 0,l.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(S))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
|
|
1
|
+
!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("@iconify/vue"),require("@vueuse/core"),require("ts-dot-prop")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","@vueuse/core","ts-dot-prop"],l):(e="undefined"!=typeof globalThis?globalThis:e||self).VvSelect=l(e.vue,e.vue$1,e.core,e.tsDotProp)}(this,(function(e,l,t,o){"use strict";var a=(e=>(e.local="local",e.session="session",e))(a||{}),n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),i=(e=>(e.before="before",e.after="after",e))(i||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{}),u=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(u||{});const d=Symbol.for("volver"),s={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},v={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},c={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},p={disabled:{type:Boolean,default:!1}},f=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),m={readonly:{type:Boolean,default:!1}},g={modifiers:{type:[String,Array],default:void 0}},b={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"}},y={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:i.before,validation:e=>Object.values(i).includes(e)}},S={tabindex:{type:[String,Number],default:0}},B={floating:{type:Boolean,default:!1}},k={unselectable:{type:Boolean,default:!0}},L={id:[String,Number]};n.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const $={...L,name:{type:String,required:!0}},V={autofocus:{type:Boolean,default:!1}},O={autocomplete:{type:String,default:"off"}};r.button,u.button,a.local;const w={...$,...V,...O,...S,...s,...v,...b,...c,...p,...m,...g,...h,...y,...B,...k,...f,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 x(){return{...w,options:{...w.options,type:Array,default:()=>[]}}}function E(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(l=e)||l instanceof String;var l})).join(" "):e}const P={prefix:"normal"};function I(){return e.inject(d)}function N(l,t,o){return e.computed((()=>{const a={[l]:!0},n="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${l}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((t=>{a[`${l}--${t}`]=e.unref(o.value[t])})),a}))}const A=e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},P),setup(t){const o=t,a=e.computed((()=>"string"==typeof o.rotate?Number.parseFloat(o.rotate):o.rotate)),n=e.ref(!0),i=I(),{modifiers:r}=e.toRefs(o),u=N("vv-icon",r),d=e.computed((()=>o.provider||(null==i?void 0:i.iconsProvider))),s=e.computed((()=>{const e=o.name??"",t=`@${d.value}:${o.prefix}:${e}`;if(l.iconExists(t))return t;const a=null==i?void 0:i.iconsCollections.find((t=>{const o=`@${d.value}:${t.prefix}:${e}`;return l.iconExists(o)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function v(e){const t=function(e){let l;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");l=(new e).window}return(l?new l.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==t?void 0:t.innerHTML.trim())||"";t&&a&&l.addIcon(`@${d.value}:${o.prefix}:${o.name}`,{body:a,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return i&&o.src&&!l.iconExists(`@${d.value}:${o.prefix}:${o.name}`)&&(n.value=!1,i.fetchIcon(o.src).then((e=>{e&&(v(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&v(o.svg),(t,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(l.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(a),color:t.color,onLoad:t.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}});const F=["for"],_={class:"vv-select__wrapper"},C={key:0,class:"vv-select__input-before"},z={class:"vv-select__inner"},R=["id"],j=["disabled","hidden"],D=["disabled","value"],q=["disabled","label"],H=["disabled","value"],K={key:1,class:"vv-select__input-after"};return e.defineComponent({name:"VvSelect",props:x(),emits:["update:modelValue","focus","blur"],setup(l,{emit:a}){const r=l,u=a,d=e.useSlots(),s=function(l,t,o){const a=I(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[l]))return a.defaults.value[l]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,l=t,a=o;return Object.keys(l).reduce(((t,o)=>{const n=a[o];if(t[o]=n,o in e){if(Array.isArray(l[o])){const a=l[o];a.length&&a[0]===n&&(t[o]=e[o])}if("function"==typeof l[o]&&(0,l[o])()===n&&(t[o]=e[o]),"object"==typeof l[o]){let a=l[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(t[o]=e[o]):a===n&&(t[o]=e[o])}}return t}),{})}))}("VvSelect",x(),r),v=e.useTemplateRef("selectEl"),{HintSlot:c,hasHintLabelOrSlot:p,hasInvalidLabelOrSlot:f,hintSlotScope:m}=function(l,t){const o=e.computed((()=>e.isRef(l)?l.value:l)),a=e.computed((()=>E(o.value.invalidLabel))),n=e.computed((()=>E(o.value.validLabel))),i=e.computed((()=>o.value.loadingLabel)),r=e.computed((()=>o.value.hintLabel)),u=e.computed((()=>Boolean(o.value.loading&&(t.loading||i.value)))),d=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(t.invalid||a.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(o.value.valid&&(t.valid||n.value)))),v=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(t.hint||r.value))),c=e.computed((()=>d.value||s.value||u.value||v.value)),p=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),f=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:c,invalidLabel:a,validLabel:n,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}),render(){var l,t,o,a,n,i,r,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(t=(l=this.$slots).loading)?void 0:t.call(l))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(i=(n=this.$slots).valid)?void 0:i.call(n))??this.validLabel):e.h(this.tag,{role:d},(null==(u=(r=this.$slots).hint)?void 0:u.call(r))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:v,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:p,HintSlot:f}}(s,d),{focused:g}=function(l,o){const{focused:a}=t.useFocus(l);return e.watch(a,(t=>{o(t?"focus":"blur",e.unref(l))})),{focused:a}}(v,u);function b(e){var l;return"string"!=typeof e&&(null==(l=e.options)?void 0:l.length)}const{id:h,modifiers:y,disabled:S,readonly:B,loading:k,icon:L,iconPosition:$,invalid:V,valid:O,floating:w,multiple:P}=e.toRefs(r),M=function(l){return e.computed((()=>String((null==l?void 0:l.value)||e.useId())))}(h),T=e.computed((()=>`${M.value}-hint`)),J=e.computed((()=>r.disabled||r.readonly)),G=e.computed((()=>J.value?-1:r.tabindex)),U=e.computed({get:()=>r.modelValue,set:e=>{Array.isArray(e)&&0===(e=e.filter((e=>void 0!==e))).length&&!r.unselectable&&v.value?v.value.value=String(r.modelValue):u("update:modelValue",e)}}),Q=e.computed((()=>Array.isArray(U.value)?U.value.length>0:void 0!==U.value&&null!==U.value)),W=t.useElementVisibility(v);e.watch(W,(e=>{e&&r.autofocus&&(g.value=!0)}));const{hasIconBefore:X,hasIconAfter:Y}=function(l,t){const o=e.computed((()=>"string"==typeof(null==l?void 0:l.value)?{name:null==l?void 0:l.value}:null==l?void 0:l.value)),a=e.computed((()=>(null==t?void 0:t.value)===i.before?o.value:void 0)),r=e.computed((()=>(null==t?void 0:t.value)===i.after?o.value:void 0)),u=e.computed((()=>(null==t?void 0:t.value)===n.left?o.value:void 0)),d=e.computed((()=>(null==t?void 0:t.value)===n.right?o.value:void 0)),s=e.computed((()=>(null==t?void 0:t.value)===n.top?o.value:void 0)),v=e.computed((()=>(null==t?void 0:t.value)===n.bottom?o.value:void 0));return{hasIcon:o,hasIconLeft:u,hasIconRight:d,hasIconTop:s,hasIconBottom:v,hasIconBefore:a,hasIconAfter:r}}(L,$),Z=e.computed((()=>!0===r.invalid||!0!==r.valid&&void 0)),ee=N("vv-select",y,e.computed((()=>({valid:O.value,invalid:V.value,loading:k.value,disabled:S.value,readonly:B.value,"icon-before":void 0!==X.value,"icon-after":void 0!==Y.value,dirty:Q.value,focus:g.value,floating:w.value,multiple:P.value})))),{getOptionLabel:le,getOptionValue:te,isOptionDisabled:oe,getOptionGrouped:ae}=function(l){const{options:t,labelKey:a,valueKey:n,disabledKey:i}=e.toRefs(l);return{options:t,getOptionLabel:e=>"string"==typeof e?e:"function"==typeof a.value?a.value(e):String(a.value?o.get(e,a.value):e),getOptionValue:e=>"string"==typeof e?e:"function"==typeof n.value?n.value(e):n.value?o.get(e,n.value):e,isOptionDisabled:e=>"string"!=typeof e&&("function"==typeof i.value?i.value(e):!!i.value&&o.get(e,i.value)),getOptionGrouped:e=>"string"==typeof e?[]:"object"==typeof e&&e&&"options"in e?e.options:[]}}(r);e.watch((()=>r.options),(e=>{if((null==e?void 0:e.length)&&r.autoselectFirst&&!Q.value){const l=te(e[0]);U.value=r.multiple?[l]:l}}),{immediate:!0});const ne=e.computed((()=>({name:r.name,tabindex:G.value,disabled:J.value,required:r.required,size:r.size,autocomplete:r.autocomplete,multiple:r.multiple,"aria-invalid":Z.value,"aria-describedby":p.value?T.value:void 0,"aria-errormessage":f.value?T.value:void 0}))),ie=e.computed((()=>({valid:r.valid,invalid:r.invalid,modelValue:r.modelValue})));return(l,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(ee))},[l.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(M)},e.toDisplayString(l.label),9,F)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",_,[l.$slots.before?(e.openBlock(),e.createElementBlock("div",C,[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(ie))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",z,[e.unref(X)?(e.openBlock(),e.createBlock(A,e.mergeProps({key:0},e.unref(X),{class:"vv-select__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createElementVNode("select",e.mergeProps({id:e.unref(M),ref_key:"selectEl",ref:v},e.unref(ne),{"onUpdate:modelValue":t[0]||(t[0]=l=>e.isRef(U)?U.value=l:null)}),[l.placeholder?(e.openBlock(),e.createElementBlock("option",{key:0,value:void 0,disabled:!l.unselectable,hidden:!l.unselectable},e.toDisplayString(l.placeholder),9,j)):e.createCommentVNode("v-if",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.options,((l,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[b(l)?(e.openBlock(),e.createElementBlock("optgroup",{key:`group-${t}`,disabled:e.unref(oe)(l),label:e.unref(le)(l)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ae)(l),((l,o)=>(e.openBlock(),e.createElementBlock("option",{key:`group-${t}-item-${o}`,disabled:e.unref(oe)(l),value:e.unref(te)(l)},e.toDisplayString(e.unref(le)(l)),9,H)))),128))],8,q)):(e.openBlock(),e.createElementBlock("option",{key:t,disabled:e.unref(oe)(l),value:e.unref(te)(l)},e.toDisplayString(e.unref(le)(l)),9,D))],64)))),256))],16,R),[[e.vModelSelect,e.unref(U)]]),e.unref(Y)?(e.openBlock(),e.createBlock(A,e.mergeProps({key:1},e.unref(Y),{class:"vv-select__icon vv-select__icon-after"}),null,16)):e.createCommentVNode("v-if",!0)]),l.$slots.after?(e.openBlock(),e.createElementBlock("div",K,[e.renderSlot(l.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(ie))))])):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref(c),{id:e.unref(T),class:"vv-select__hint"},e.createSlots({_:2},[l.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(m))))])),key:"0"}:void 0,l.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(m))))])),key:"1"}:void 0,l.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(m))))])),key:"2"}:void 0,l.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(m))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import type { Option } from '../../types/generic';
|
|
2
|
-
declare const _default: <T extends string | Option>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?:
|
|
3
|
-
props:
|
|
2
|
+
declare const _default: <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_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{
|
|
4
4
|
floating: boolean;
|
|
5
5
|
label: string | number;
|
|
6
6
|
disabled: boolean;
|
|
7
7
|
modelValue: string | number | boolean | unknown[] | Record<string, any>;
|
|
8
8
|
modifiers: string | string[];
|
|
9
|
-
|
|
10
|
-
required: boolean;
|
|
11
|
-
icon: string | import("../VvIcon/index.js").VvIconProps;
|
|
9
|
+
icon: string | import("../VvIcon").VvIconProps;
|
|
12
10
|
iconPosition: "before" | "after";
|
|
11
|
+
required: boolean;
|
|
13
12
|
loading: boolean;
|
|
14
13
|
loadingLabel: string;
|
|
15
14
|
unselectable: boolean;
|
|
16
15
|
multiple: boolean;
|
|
16
|
+
readonly: boolean;
|
|
17
17
|
hintLabel: string;
|
|
18
|
-
valid: boolean;
|
|
19
|
-
validLabel: string | unknown[];
|
|
20
18
|
invalid: boolean;
|
|
21
19
|
invalidLabel: string | unknown[];
|
|
20
|
+
valid: boolean;
|
|
21
|
+
validLabel: string | unknown[];
|
|
22
22
|
tabindex: string | number;
|
|
23
23
|
options: T[];
|
|
24
24
|
labelKey: string | Function;
|
|
@@ -30,16 +30,16 @@ declare const _default: <T extends string | Option>(__VLS_props: NonNullable<Awa
|
|
|
30
30
|
}> & Omit<{
|
|
31
31
|
readonly floating: boolean;
|
|
32
32
|
readonly disabled: boolean;
|
|
33
|
-
readonly readonly: boolean;
|
|
34
|
-
readonly required: boolean;
|
|
35
33
|
readonly iconPosition: "before" | "after";
|
|
34
|
+
readonly required: boolean;
|
|
36
35
|
readonly loading: boolean;
|
|
37
36
|
readonly loadingLabel: string;
|
|
38
37
|
readonly unselectable: boolean;
|
|
39
38
|
readonly multiple: boolean;
|
|
39
|
+
readonly readonly: boolean;
|
|
40
40
|
readonly hintLabel: string;
|
|
41
|
-
readonly valid: boolean;
|
|
42
41
|
readonly invalid: boolean;
|
|
42
|
+
readonly valid: boolean;
|
|
43
43
|
readonly tabindex: string | number;
|
|
44
44
|
readonly options: T[];
|
|
45
45
|
readonly labelKey: string | Function;
|
|
@@ -54,128 +54,17 @@ declare const _default: <T extends string | Option>(__VLS_props: NonNullable<Awa
|
|
|
54
54
|
readonly modelValue?: string | number | boolean | unknown[] | Record<string, any> | undefined;
|
|
55
55
|
readonly modifiers?: string | string[] | undefined;
|
|
56
56
|
readonly id?: string | number | undefined;
|
|
57
|
-
readonly icon?: string | import("../VvIcon
|
|
58
|
-
readonly validLabel?: string | unknown[] | undefined;
|
|
57
|
+
readonly icon?: string | import("../VvIcon").VvIconProps | undefined;
|
|
59
58
|
readonly invalidLabel?: string | unknown[] | undefined;
|
|
59
|
+
readonly validLabel?: string | unknown[] | undefined;
|
|
60
60
|
readonly placeholder?: string | undefined;
|
|
61
|
-
|
|
62
|
-
onBlur?: ((args_0: import("@vueuse/core").MaybeElement) => any) | undefined;
|
|
63
|
-
|
|
64
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps &
|
|
65
|
-
options: {
|
|
66
|
-
type: globalThis.PropType<T[]>;
|
|
67
|
-
default: () => never[];
|
|
68
|
-
};
|
|
69
|
-
multiple: BooleanConstructor;
|
|
70
|
-
required: BooleanConstructor;
|
|
71
|
-
size: (StringConstructor | NumberConstructor)[];
|
|
72
|
-
modelValue: {
|
|
73
|
-
type: (ObjectConstructor | ArrayConstructor | BooleanConstructor | StringConstructor | NumberConstructor)[];
|
|
74
|
-
default: undefined;
|
|
75
|
-
};
|
|
76
|
-
autoselectFirst: {
|
|
77
|
-
type: BooleanConstructor;
|
|
78
|
-
default: boolean;
|
|
79
|
-
};
|
|
80
|
-
placeholder: StringConstructor;
|
|
81
|
-
label: {
|
|
82
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
83
|
-
default: undefined;
|
|
84
|
-
};
|
|
85
|
-
unselectable: {
|
|
86
|
-
type: BooleanConstructor;
|
|
87
|
-
default: boolean;
|
|
88
|
-
};
|
|
89
|
-
floating: {
|
|
90
|
-
type: BooleanConstructor;
|
|
91
|
-
default: boolean;
|
|
92
|
-
};
|
|
93
|
-
icon: {
|
|
94
|
-
type: globalThis.PropType<string | import("../VvIcon/index.js").VvIconProps>;
|
|
95
|
-
default: undefined;
|
|
96
|
-
};
|
|
97
|
-
iconPosition: {
|
|
98
|
-
type: globalThis.PropType<`${import("../../constants.js").Position}`>;
|
|
99
|
-
default: import("../../constants.js").Position;
|
|
100
|
-
validation: (value: import("../../constants.js").Position) => boolean;
|
|
101
|
-
};
|
|
102
|
-
labelKey: {
|
|
103
|
-
type: (StringConstructor | FunctionConstructor)[];
|
|
104
|
-
default: string;
|
|
105
|
-
};
|
|
106
|
-
valueKey: {
|
|
107
|
-
type: (StringConstructor | FunctionConstructor)[];
|
|
108
|
-
default: string;
|
|
109
|
-
};
|
|
110
|
-
disabledKey: {
|
|
111
|
-
type: (StringConstructor | FunctionConstructor)[];
|
|
112
|
-
default: string;
|
|
113
|
-
};
|
|
114
|
-
modifiers: {
|
|
115
|
-
type: globalThis.PropType<string | string[]>;
|
|
116
|
-
default: undefined;
|
|
117
|
-
};
|
|
118
|
-
readonly: {
|
|
119
|
-
type: BooleanConstructor;
|
|
120
|
-
default: boolean;
|
|
121
|
-
};
|
|
122
|
-
disabled: {
|
|
123
|
-
type: BooleanConstructor;
|
|
124
|
-
default: boolean;
|
|
125
|
-
};
|
|
126
|
-
loading: {
|
|
127
|
-
type: BooleanConstructor;
|
|
128
|
-
default: boolean;
|
|
129
|
-
};
|
|
130
|
-
loadingLabel: {
|
|
131
|
-
type: StringConstructor;
|
|
132
|
-
default: string;
|
|
133
|
-
};
|
|
134
|
-
hintLabel: {
|
|
135
|
-
type: StringConstructor;
|
|
136
|
-
default: string;
|
|
137
|
-
};
|
|
138
|
-
invalid: {
|
|
139
|
-
type: BooleanConstructor;
|
|
140
|
-
default: boolean;
|
|
141
|
-
};
|
|
142
|
-
invalidLabel: {
|
|
143
|
-
type: (ArrayConstructor | StringConstructor)[];
|
|
144
|
-
default: undefined;
|
|
145
|
-
};
|
|
146
|
-
valid: {
|
|
147
|
-
type: BooleanConstructor;
|
|
148
|
-
default: boolean;
|
|
149
|
-
};
|
|
150
|
-
validLabel: {
|
|
151
|
-
type: (ArrayConstructor | StringConstructor)[];
|
|
152
|
-
default: undefined;
|
|
153
|
-
};
|
|
154
|
-
tabindex: {
|
|
155
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
156
|
-
default: number;
|
|
157
|
-
};
|
|
158
|
-
autocomplete: {
|
|
159
|
-
type: StringConstructor;
|
|
160
|
-
default: string;
|
|
161
|
-
};
|
|
162
|
-
autofocus: {
|
|
163
|
-
type: BooleanConstructor;
|
|
164
|
-
default: boolean;
|
|
165
|
-
};
|
|
166
|
-
name: {
|
|
167
|
-
type: StringConstructor;
|
|
168
|
-
required: boolean;
|
|
169
|
-
};
|
|
170
|
-
id: (StringConstructor | NumberConstructor)[];
|
|
171
|
-
}>> & {
|
|
172
|
-
onFocus?: ((args_0: import("@vueuse/core").MaybeElement) => any) | undefined;
|
|
173
|
-
onBlur?: ((args_0: import("@vueuse/core").MaybeElement) => any) | undefined;
|
|
174
|
-
"onUpdate:modelValue"?: ((args_0: any) => any) | undefined;
|
|
175
|
-
}, "floating" | "label" | "disabled" | "modelValue" | "modifiers" | "readonly" | "required" | "icon" | "iconPosition" | "loading" | "loadingLabel" | "unselectable" | "multiple" | "hintLabel" | "valid" | "validLabel" | "invalid" | "invalidLabel" | "tabindex" | "options" | "labelKey" | "valueKey" | "disabledKey" | "autoselectFirst" | "autocomplete" | "autofocus">, "size" | "name" | "id" | "onFocus" | "onBlur" | "onUpdate:modelValue" | "placeholder" | ("floating" | "label" | "disabled" | "modelValue" | "modifiers" | "readonly" | "required" | "icon" | "iconPosition" | "loading" | "loadingLabel" | "unselectable" | "multiple" | "hintLabel" | "valid" | "validLabel" | "invalid" | "invalidLabel" | "tabindex" | "options" | "labelKey" | "valueKey" | "disabledKey" | "autoselectFirst" | "autocomplete" | "autofocus")> & {}> & import("vue").PublicProps;
|
|
61
|
+
readonly "onUpdate:modelValue"?: ((args_0: any) => any) | undefined;
|
|
62
|
+
readonly onBlur?: ((args_0: import("@vueuse/core").MaybeElement) => any) | undefined;
|
|
63
|
+
readonly onFocus?: ((args_0: import("@vueuse/core").MaybeElement) => any) | undefined;
|
|
64
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "floating" | "label" | "disabled" | "modelValue" | "modifiers" | "icon" | "iconPosition" | "required" | "loading" | "loadingLabel" | "unselectable" | "multiple" | "readonly" | "hintLabel" | "invalid" | "invalidLabel" | "valid" | "validLabel" | "tabindex" | "options" | "labelKey" | "valueKey" | "disabledKey" | "autoselectFirst" | "autocomplete" | "autofocus">, "size" | "name" | "id" | "onFocus" | "onBlur" | "onUpdate:modelValue" | "placeholder" | ("floating" | "label" | "disabled" | "modelValue" | "modifiers" | "icon" | "iconPosition" | "required" | "loading" | "loadingLabel" | "unselectable" | "multiple" | "readonly" | "hintLabel" | "invalid" | "invalidLabel" | "valid" | "validLabel" | "tabindex" | "options" | "labelKey" | "valueKey" | "disabledKey" | "autoselectFirst" | "autocomplete" | "autofocus")> & Partial<{}> & {}> & import("vue").PublicProps;
|
|
176
65
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
177
66
|
attrs: any;
|
|
178
|
-
slots:
|
|
67
|
+
slots: {
|
|
179
68
|
before?(_: {
|
|
180
69
|
valid: boolean;
|
|
181
70
|
invalid: boolean;
|
|
@@ -210,14 +99,14 @@ declare const _default: <T extends string | Option>(__VLS_props: NonNullable<Awa
|
|
|
210
99
|
invalid: boolean;
|
|
211
100
|
loading: boolean;
|
|
212
101
|
}): any;
|
|
213
|
-
}
|
|
214
|
-
emit: ((
|
|
102
|
+
};
|
|
103
|
+
emit: ((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);
|
|
215
104
|
}>) => globalThis.VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
216
105
|
[key: string]: any;
|
|
217
106
|
}> & {
|
|
218
107
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
219
108
|
};
|
|
220
109
|
export default _default;
|
|
221
|
-
type
|
|
110
|
+
type __VLS_PrettifyLocal<T> = {
|
|
222
111
|
[K in keyof T]: T[K];
|
|
223
112
|
} & {};
|
|
@@ -56,16 +56,16 @@ export declare const VvSelectProps: {
|
|
|
56
56
|
default: boolean;
|
|
57
57
|
};
|
|
58
58
|
icon: {
|
|
59
|
-
type:
|
|
59
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
60
60
|
default: undefined;
|
|
61
61
|
};
|
|
62
62
|
iconPosition: {
|
|
63
|
-
type:
|
|
63
|
+
type: PropType<`${import("../../constants").Position}`>;
|
|
64
64
|
default: import("../../constants").Position;
|
|
65
65
|
validation: (value: import("../../constants").Position) => boolean;
|
|
66
66
|
};
|
|
67
67
|
options: {
|
|
68
|
-
type:
|
|
68
|
+
type: PropType<(Option | string)[]>;
|
|
69
69
|
default: () => never[];
|
|
70
70
|
};
|
|
71
71
|
labelKey: {
|
|
@@ -81,7 +81,7 @@ export declare const VvSelectProps: {
|
|
|
81
81
|
default: string;
|
|
82
82
|
};
|
|
83
83
|
modifiers: {
|
|
84
|
-
type:
|
|
84
|
+
type: PropType<string | string[]>;
|
|
85
85
|
default: undefined;
|
|
86
86
|
};
|
|
87
87
|
readonly: {
|
|
@@ -193,11 +193,11 @@ export declare function useVvSelectProps<T extends Option | string>(): {
|
|
|
193
193
|
default: boolean;
|
|
194
194
|
};
|
|
195
195
|
icon: {
|
|
196
|
-
type:
|
|
196
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
197
197
|
default: undefined;
|
|
198
198
|
};
|
|
199
199
|
iconPosition: {
|
|
200
|
-
type:
|
|
200
|
+
type: PropType<`${import("../../constants").Position}`>;
|
|
201
201
|
default: import("../../constants").Position;
|
|
202
202
|
validation: (value: import("../../constants").Position) => boolean;
|
|
203
203
|
};
|
|
@@ -214,7 +214,7 @@ export declare function useVvSelectProps<T extends Option | string>(): {
|
|
|
214
214
|
default: string;
|
|
215
215
|
};
|
|
216
216
|
modifiers: {
|
|
217
|
-
type:
|
|
217
|
+
type: PropType<string | string[]>;
|
|
218
218
|
default: undefined;
|
|
219
219
|
};
|
|
220
220
|
readonly: {
|
|
@@ -286,21 +286,11 @@ const NavProps = {
|
|
|
286
286
|
},
|
|
287
287
|
storageKey: String
|
|
288
288
|
});
|
|
289
|
-
const
|
|
289
|
+
const VvNavProps = {
|
|
290
290
|
...ModifiersProps,
|
|
291
|
-
|
|
292
|
-
type: [String, Array]
|
|
293
|
-
},
|
|
294
|
-
modelValue: {
|
|
295
|
-
type: String,
|
|
296
|
-
default: ""
|
|
297
|
-
},
|
|
298
|
-
items: {
|
|
299
|
-
type: Array,
|
|
300
|
-
default: () => []
|
|
301
|
-
}
|
|
291
|
+
...NavProps
|
|
302
292
|
};
|
|
303
|
-
const
|
|
293
|
+
const VvNavEvents = ["click"];
|
|
304
294
|
const VvActionEvents = ["click", "mouseover", "mouseleave"];
|
|
305
295
|
const VvActionProps = ActionProps;
|
|
306
296
|
function useVolver() {
|
|
@@ -478,11 +468,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
478
468
|
};
|
|
479
469
|
}
|
|
480
470
|
});
|
|
481
|
-
const VvNavProps = {
|
|
482
|
-
...ModifiersProps,
|
|
483
|
-
...NavProps
|
|
484
|
-
};
|
|
485
|
-
const VvNavEvents = ["click"];
|
|
486
471
|
function useModifiers(prefix, modifiers, others) {
|
|
487
472
|
return computed(() => {
|
|
488
473
|
const toReturn = {
|
|
@@ -566,6 +551,21 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
566
551
|
};
|
|
567
552
|
}
|
|
568
553
|
});
|
|
554
|
+
const VvTabProps = {
|
|
555
|
+
...ModifiersProps,
|
|
556
|
+
navModifiers: {
|
|
557
|
+
type: [String, Array]
|
|
558
|
+
},
|
|
559
|
+
modelValue: {
|
|
560
|
+
type: String,
|
|
561
|
+
default: ""
|
|
562
|
+
},
|
|
563
|
+
items: {
|
|
564
|
+
type: Array,
|
|
565
|
+
default: () => []
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
const VvTabEvents = ["update:modelValue"];
|
|
569
569
|
const __default__ = {
|
|
570
570
|
name: "VvTab"
|
|
571
571
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvTab=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.local="local",e.session="session",e))(t||{}),o=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(o||{}),n=(e=>(e.before="before",e.after="after",e))(n||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{}),l=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(l||{});const a=Symbol.for("volver"),i=Symbol.for("dropdownTrigger"),s=Symbol.for("dropdownAction"),u={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},d={disabled:{type:Boolean,default:!1}},c={active:{type:Boolean,default:!1}},v={current:{type:Boolean,default:!1}},m={pressed:{type:Boolean,default:!1}},f={label:{type:[String,Number],default:void 0}},p={modifiers:{type:[String,Array],default:void 0}};n.before,o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const b={...d,...f,...m,...c,...v,...u,type:{type:String,default:r.button,validator:e=>Object.values(r).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:l.button}},y={items:{type:Array,default:()=>[]}};t.local;const g={...p
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvTab=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.local="local",e.session="session",e))(t||{}),o=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(o||{}),n=(e=>(e.before="before",e.after="after",e))(n||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{}),l=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(l||{});const a=Symbol.for("volver"),i=Symbol.for("dropdownTrigger"),s=Symbol.for("dropdownAction"),u={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},d={disabled:{type:Boolean,default:!1}},c={active:{type:Boolean,default:!1}},v={current:{type:Boolean,default:!1}},m={pressed:{type:Boolean,default:!1}},f={label:{type:[String,Number],default:void 0}},p={modifiers:{type:[String,Array],default:void 0}};n.before,o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const b={...d,...f,...m,...c,...v,...u,type:{type:String,default:r.button,validator:e=>Object.values(r).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:l.button}},y={items:{type:Array,default:()=>[]}};t.local;const g={...p,...y},k=b;const B=e.defineComponent({name:"VvAction",props:k,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:n}){const r=t,u=n,d=e.getCurrentInstance(),c=e.inject(a),v=e.ref(null);o({$el:v});const{reference:m,bus:f,aria:p,expanded:b}=e.inject(i,{});e.watch((()=>v.value),(e=>{m&&(m.value=e)}));const y=e.computed((()=>r.pressed||(null==b?void 0:b.value))),{role:g}=e.inject(s,{}),k=e.computed((()=>{switch(!0){case r.disabled:return l.button;case void 0!==r.to:return(null==c?void 0:c.nuxt)?l.nuxtLink:l.routerLink;case void 0!==r.href:return l.a;default:return r.defaultTag}})),B=e.computed((()=>{const e={...null==p?void 0:p.value,ariaPressed:!!y.value||void 0,ariaLabel:r.ariaLabel,role:null==g?void 0:g.value};switch(k.value){case l.a:return{...e,href:r.href,target:r.target,rel:r.rel};case l.routerLink:case l.nuxtLink:return{...e,to:r.to,target:r.target};case l.button:return{...e,type:r.type,disabled:r.disabled};default:return e}}));function x(e){var t;r.disabled?e.preventDefault():(null==(t=null==d?void 0:d.vnode.props)?void 0:t.onClick)?u("click",e):null==f||f.emit("click",e)}function S(e){var t;(null==(t=null==d?void 0:d.vnode.props)?void 0:t.onMouseover)?u("mouseover",e):null==f||f.emit("mouseover",e)}function h(e){var t;(null==(t=null==d?void 0:d.vnode.props)?void 0:t.onMouseleave)?u("mouseleave",e):null==f||f.emit("mouseleave",e)}return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(k)),e.mergeProps(e.unref(B),{ref_key:"element",ref:v,class:{active:t.active,pressed:e.unref(y),disabled:t.disabled,current:t.current},onClickPassive:x,onMouseoverPassive:S,onMouseleavePassive:h}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}}),x={class:"vv-nav__item",role:"presentation"},S=e.defineComponent({name:"VvNavItem",inheritAttrs:!1,setup:t=>(t,o)=>(e.openBlock(),e.createElementBlock("li",x,[e.createVNode(B,e.mergeProps(t.$attrs,{class:"vv-nav__item-label",role:"menuitem"}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default")])),_:3},16)]))});function h(t,o,n){return e.computed((()=>{const e={[t]:!0},n="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return n&&Array.isArray(n)&&n.forEach((o=>{o&&(e[`${t}--${o}`]=!0)})),e}))}const C=e.defineComponent({name:"VvNav",props:g,emits:["click"],setup(t,{emit:o}){const n=t,r=o,{modifiers:l}=e.toRefs(n);function a(e){var t;const o=e.target;if(null==o?void 0:o.dataset.index){const e=Number.parseInt(o.dataset.index),l=null==(t=n.items)?void 0:t[e];if(!l||(null==l?void 0:l.disabled))return;r("click",l)}}const i=h("vv-nav",l);return(t,o)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(e.unref(i))},[e.createElementVNode("ul",{class:"vv-nav__menu",role:"menu",onClick:e.withModifiers(a,["stop"])},[e.renderSlot(t.$slots,"default",{},(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(({on:o={},data:n,...r},l)=>(e.openBlock(),e.createBlock(S,e.mergeProps({key:l,"data-index":l,ref_for:!0},r,e.toHandlers(o)),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"item",e.mergeProps({ref_for:!0},{item:r,data:n,index:l}))])),_:2},1040,["data-index"])))),128))]))])],2))}}),_={...p,navModifiers:{type:[String,Array]},modelValue:{type:String,default:""},items:{type:Array,default:()=>[]}};return e.defineComponent({name:"VvTab",props:_,emits:["update:modelValue"],setup(t,{emit:o}){const n=t,r=o,{modifiers:l,items:a}=e.toRefs(n),i=e.computed((()=>a.value.reduce(((e,t)=>(t.tab&&e.push(t.tab),e)),[]))),s=e.ref(),u=e.computed({get:()=>{var e;return n.modelValue||s.value||(null==(e=i.value)?void 0:e[0])},set:e=>{s.value=e,r("update:modelValue",e)}}),d=e.computed((()=>{var e;return["tabs",...Array.isArray(n.navModifiers)?n.navModifiers:(null==(e=n.navModifiers)?void 0:e.split(" "))??[]]}));function c(e){e.tab&&(u.value=e.tab)}const v=e.computed((()=>n.items.map((e=>({current:e.tab===u.value,...e}))))),m=h("vv-tab",l);return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(m))},[e.createVNode(C,e.mergeProps({items:e.unref(v),modifiers:e.unref(d)},{onClick:c}),{item:e.withCtx((({item:o,data:n,index:r})=>[e.renderSlot(t.$slots,"nav-item",e.normalizeProps(e.guardReactiveProps({item:o,data:n,index:r})))])),_:3},16),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),((o,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[o.tab?(e.openBlock(),e.createElementBlock("article",{key:0,class:e.normalizeClass([{target:e.unref(u)===o.tab},"vv-tab__panel"])},[e.renderSlot(t.$slots,`panel::${o.tab}`)],2)):e.createCommentVNode("v-if",!0)],64)))),128))],2))}})}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NavItemTab } from '@/types/nav';
|
|
2
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
3
3
|
navModifiers: {
|
|
4
4
|
type: PropType<string | string[]>;
|
|
5
5
|
};
|
|
@@ -12,12 +12,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
12
12
|
default: () => never[];
|
|
13
13
|
};
|
|
14
14
|
modifiers: {
|
|
15
|
-
type:
|
|
15
|
+
type: PropType<string | string[]>;
|
|
16
16
|
default: undefined;
|
|
17
17
|
};
|
|
18
|
-
}
|
|
19
|
-
[x: string]: (...args: any[]) => void;
|
|
20
|
-
}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
18
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
21
19
|
navModifiers: {
|
|
22
20
|
type: PropType<string | string[]>;
|
|
23
21
|
};
|
|
@@ -30,14 +28,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
30
28
|
default: () => never[];
|
|
31
29
|
};
|
|
32
30
|
modifiers: {
|
|
33
|
-
type:
|
|
31
|
+
type: PropType<string | string[]>;
|
|
34
32
|
default: undefined;
|
|
35
33
|
};
|
|
36
|
-
}
|
|
34
|
+
}>> & Readonly<{}>, {
|
|
37
35
|
modelValue: string;
|
|
38
36
|
modifiers: string | string[];
|
|
39
37
|
items: NavItemTab[];
|
|
40
|
-
}, {}>, Partial<Record<`panel::${string}`, (_: {}) => any>> & {
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>, Partial<Record<`panel::${string}`, (_: {}) => any>> & {
|
|
41
39
|
"nav-item"?(_: {
|
|
42
40
|
item: {
|
|
43
41
|
label: string;
|