@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,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import { VvAccordionEvents, VvAccordionProps
|
|
2
|
+
import { useId } from 'vue'
|
|
3
|
+
import { useGroupProps, VvAccordionEvents, VvAccordionProps } from '.'
|
|
4
4
|
|
|
5
5
|
// props, attrs and emit
|
|
6
6
|
const props = defineProps(VvAccordionProps)
|
|
@@ -12,7 +12,7 @@ const modelValue = useVModel(props, 'modelValue', emit)
|
|
|
12
12
|
|
|
13
13
|
// data
|
|
14
14
|
const accordionName = computed(
|
|
15
|
-
() => props.name || (attrs?.id as string) ||
|
|
15
|
+
() => props.name || (attrs?.id as string) || useId(),
|
|
16
16
|
)
|
|
17
17
|
const { title, content, not } = toRefs(props)
|
|
18
18
|
const { isInGroup, modifiers, disabled, bus } = useGroupProps(props)
|
|
@@ -90,7 +90,7 @@ function collapse() {
|
|
|
90
90
|
function groupExpand(name?: string | string[]) {
|
|
91
91
|
if (!bus) {
|
|
92
92
|
console.warn(
|
|
93
|
-
|
|
93
|
+
`[VvAccordion]: You are trying to expand accordion group of "${accordionName.value}" but it is not in a group`,
|
|
94
94
|
)
|
|
95
95
|
return
|
|
96
96
|
}
|
|
@@ -100,7 +100,7 @@ function groupExpand(name?: string | string[]) {
|
|
|
100
100
|
function groupCollapse(name?: string | string[]) {
|
|
101
101
|
if (!bus) {
|
|
102
102
|
console.warn(
|
|
103
|
-
|
|
103
|
+
`[VvAccordion]: You are trying to collapse accordion group of "${accordionName.value}" but it is not in a group`,
|
|
104
104
|
)
|
|
105
105
|
return
|
|
106
106
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ExtractPropTypes } from 'vue'
|
|
2
2
|
import type { AccordionGroupState } from '../../types/group'
|
|
3
|
-
import { INJECTION_KEY_ACCORDION_GROUP } from '../../constants'
|
|
4
3
|
import { ModifiersProps } from '@/props'
|
|
4
|
+
import { INJECTION_KEY_ACCORDION_GROUP } from '../../constants'
|
|
5
5
|
|
|
6
6
|
export const VvAccordionProps = {
|
|
7
7
|
...ModifiersProps,
|
|
@@ -41,7 +41,7 @@ export type VvAccordionPropsTypes = ExtractPropTypes<typeof VvAccordionProps>
|
|
|
41
41
|
* Merges local and group props
|
|
42
42
|
*/
|
|
43
43
|
export function useGroupProps(props: VvAccordionPropsTypes) {
|
|
44
|
-
const { group, isInGroup } =
|
|
44
|
+
const { group, isInGroup } = useGroupStateInject<AccordionGroupState>(
|
|
45
45
|
INJECTION_KEY_ACCORDION_GROUP,
|
|
46
46
|
)
|
|
47
47
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import mitt from 'mitt'
|
|
3
2
|
import type {
|
|
4
|
-
AccordionGroupState,
|
|
5
3
|
AccordionGroupBusEvents,
|
|
4
|
+
AccordionGroupState,
|
|
6
5
|
} from '../../types/group'
|
|
6
|
+
import mitt from 'mitt'
|
|
7
|
+
import { VvAccordionGroupEvents, VvAccordionGroupProps } from '.'
|
|
7
8
|
import { INJECTION_KEY_ACCORDION_GROUP } from '../../constants'
|
|
8
9
|
import VvAccordion from '../VvAccordion/VvAccordion.vue'
|
|
9
|
-
import { VvAccordionGroupProps, VvAccordionGroupEvents } from '.'
|
|
10
10
|
|
|
11
11
|
// props and emit
|
|
12
12
|
const props = defineProps(VvAccordionGroupProps)
|
|
@@ -24,7 +24,7 @@ const {
|
|
|
24
24
|
watchEffect(() => {
|
|
25
25
|
if (typeof props.modelValue === 'string' && props.collapse) {
|
|
26
26
|
console.warn(
|
|
27
|
-
|
|
27
|
+
`[VvAccordionGroup]: modelValue is a string but collapse is true.`,
|
|
28
28
|
)
|
|
29
29
|
}
|
|
30
30
|
})
|
|
@@ -112,7 +112,7 @@ onMounted(() => {
|
|
|
112
112
|
|
|
113
113
|
// provide
|
|
114
114
|
const bus = mitt<AccordionGroupBusEvents>()
|
|
115
|
-
|
|
115
|
+
useGroupStateProvide<AccordionGroupState>(INJECTION_KEY_ACCORDION_GROUP, {
|
|
116
116
|
disabled,
|
|
117
117
|
modifiers: itemModifiers,
|
|
118
118
|
bus,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { AlertModifier } from '@/types'
|
|
1
2
|
import type { ExtractPropTypes, PropType } from 'vue'
|
|
2
3
|
import { AlertRole } from '@/constants'
|
|
3
4
|
import { IconProps, IdProps } from '@/props'
|
|
4
|
-
import type { AlertModifier } from '@/types'
|
|
5
5
|
|
|
6
6
|
export const VvAlertProps = {
|
|
7
7
|
...IdProps,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ExtractPropTypes } from 'vue'
|
|
2
1
|
import type { Alert } from '@/types'
|
|
2
|
+
import type { ExtractPropTypes } from 'vue'
|
|
3
3
|
import { ModifiersProps } from '@/props'
|
|
4
4
|
|
|
5
5
|
export const VvAlertGroupProps = {
|
|
@@ -51,12 +51,12 @@ export const VvAlertGroupEvents = [
|
|
|
51
51
|
]
|
|
52
52
|
|
|
53
53
|
export function useVvAlertGroup(props: Readonly<ExtractPropTypes<typeof VvAlertGroupProps>>, emit: (event: string, ...args: unknown[]) => void) {
|
|
54
|
-
const bus =
|
|
54
|
+
const bus = useAlertProvideGroup({ name: computed(() => props.name) })
|
|
55
55
|
|
|
56
56
|
// check props block and inline coexist
|
|
57
57
|
if ((props.block && !props.inline) || (!props.block && props.inline)) {
|
|
58
58
|
console.warn(
|
|
59
|
-
|
|
59
|
+
`[VvAlertGroup]: block and inline props must coexist at the same time.`,
|
|
60
60
|
)
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { VvAvatarGroupProps } from '@/components/VvAvatarGroup'
|
|
3
2
|
import VvAvatar from '@/components/VvAvatar/VvAvatar.vue'
|
|
3
|
+
import { VvAvatarGroupProps } from '@/components/VvAvatarGroup'
|
|
4
4
|
|
|
5
5
|
const props = defineProps(VvAvatarGroupProps)
|
|
6
6
|
const { modifiers, items, toShow, totalItems, avatarModifiers }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { VvBreadcrumbProps } from '.'
|
|
2
3
|
import { useModifiers } from '../../composables/useModifiers'
|
|
3
4
|
import VvAction from '../VvAction/VvAction.vue'
|
|
4
|
-
import { VvBreadcrumbProps } from '.'
|
|
5
5
|
|
|
6
6
|
const props = defineProps(VvBreadcrumbProps)
|
|
7
7
|
|
|
@@ -45,7 +45,7 @@ export default {
|
|
|
45
45
|
default-tag="span"
|
|
46
46
|
>
|
|
47
47
|
<!-- @slot Slot for label -->
|
|
48
|
-
<slot name="label" v-bind="{ route, index }">
|
|
48
|
+
<slot name="label" v-bind="{ ...route, index, label, isLast: isLast(index) }">
|
|
49
49
|
{{ label }}
|
|
50
50
|
</slot>
|
|
51
51
|
</VvAction>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import
|
|
3
|
-
import VvAction from '../VvAction/VvAction.vue'
|
|
2
|
+
import { useGroupProps, VvButtonEvents, VvButtonProps } from '.'
|
|
4
3
|
import { Side } from '../../constants'
|
|
5
|
-
import
|
|
4
|
+
import VvAction from '../VvAction/VvAction.vue'
|
|
5
|
+
import VvIcon from '../VvIcon/VvIcon.vue'
|
|
6
6
|
|
|
7
7
|
// props, attrs, slots and emit
|
|
8
8
|
const props = defineProps(VvButtonProps)
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ExtractPropTypes, PropType } from 'vue'
|
|
2
2
|
import type { ButtonGroupState } from '../../types/group'
|
|
3
|
+
import { INJECTION_KEY_BUTTON_GROUP, Side } from '../../constants'
|
|
3
4
|
import {
|
|
4
5
|
ActionProps,
|
|
6
|
+
IconProps,
|
|
5
7
|
IdProps,
|
|
6
8
|
LoadingProps,
|
|
7
9
|
ModifiersProps,
|
|
8
10
|
UnselectableProps,
|
|
9
|
-
IconProps,
|
|
10
11
|
} from '../../props'
|
|
11
|
-
import { INJECTION_KEY_BUTTON_GROUP, Side } from '../../constants'
|
|
12
12
|
|
|
13
13
|
export const VvButtonEvents = ['update:modelValue']
|
|
14
14
|
|
|
@@ -71,7 +71,7 @@ export function useGroupProps(
|
|
|
71
71
|
emit: (event: (typeof VvButtonEvents)[number], value: unknown) => void,
|
|
72
72
|
) {
|
|
73
73
|
const { group, isInGroup, getGroupOrLocalRef }
|
|
74
|
-
=
|
|
74
|
+
= useGroupStateInject<ButtonGroupState>(INJECTION_KEY_BUTTON_GROUP)
|
|
75
75
|
|
|
76
76
|
// local props
|
|
77
77
|
const { id, iconPosition, icon, label, pressed } = toRefs(props)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { ButtonGroupState } from '../../types/group'
|
|
3
|
+
import { VvButtonGroupEvents, VvButtonGroupProps } from '.'
|
|
3
4
|
import { INJECTION_KEY_BUTTON_GROUP } from '../../constants'
|
|
4
|
-
import { VvButtonGroupProps, VvButtonGroupEvents } from '.'
|
|
5
5
|
|
|
6
6
|
const props = defineProps(VvButtonGroupProps)
|
|
7
7
|
|
|
@@ -20,7 +20,7 @@ const {
|
|
|
20
20
|
watchEffect(() => {
|
|
21
21
|
if (typeof props.modelValue === 'string' && multiple.value) {
|
|
22
22
|
console.warn(
|
|
23
|
-
|
|
23
|
+
`[VvButtonGroup]: modelValue is a string but multiple is true.`,
|
|
24
24
|
)
|
|
25
25
|
}
|
|
26
26
|
})
|
|
@@ -46,7 +46,7 @@ const modelValue = computed({
|
|
|
46
46
|
})
|
|
47
47
|
|
|
48
48
|
// provide
|
|
49
|
-
|
|
49
|
+
useGroupStateProvide<ButtonGroupState>(INJECTION_KEY_BUTTON_GROUP, {
|
|
50
50
|
modelValue,
|
|
51
51
|
disabled,
|
|
52
52
|
toggle,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { useGroupProps, VvCheckboxEvents, VvCheckboxProps } from '.'
|
|
2
3
|
import { HintSlotFactory } from '../common/HintSlot'
|
|
3
|
-
import { VvCheckboxProps, VvCheckboxEvents, useGroupProps } from '.'
|
|
4
4
|
|
|
5
5
|
// props, emits and slots
|
|
6
6
|
const props = defineProps(VvCheckboxProps)
|
|
@@ -124,7 +124,7 @@ const bemCssClasses = useModifiers(
|
|
|
124
124
|
watchEffect(() => {
|
|
125
125
|
if (isBinary.value && Array.isArray(modelValue.value)) {
|
|
126
126
|
console.warn(
|
|
127
|
-
|
|
127
|
+
`[VvCheckbox] The model value is an array but the component is in binary mode.`,
|
|
128
128
|
)
|
|
129
129
|
}
|
|
130
130
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ExtractPropTypes, Ref } from 'vue'
|
|
2
2
|
import type { InputGroupState } from '../../types/group'
|
|
3
|
-
import { CheckboxRadioProps, ModifiersProps } from '../../props'
|
|
4
3
|
import { INJECTION_KEY_CHECK_GROUP } from '../../constants'
|
|
4
|
+
import { CheckboxRadioProps, ModifiersProps } from '../../props'
|
|
5
5
|
|
|
6
6
|
export const VvCheckboxProps = {
|
|
7
7
|
...CheckboxRadioProps,
|
|
@@ -32,7 +32,7 @@ export function useGroupProps(
|
|
|
32
32
|
emit: (event: (typeof VvCheckboxEvents)[number], value: unknown) => void,
|
|
33
33
|
) {
|
|
34
34
|
const { group, isInGroup, getGroupOrLocalRef }
|
|
35
|
-
=
|
|
35
|
+
= useGroupStateInject<InputGroupState>(INJECTION_KEY_CHECK_GROUP)
|
|
36
36
|
|
|
37
37
|
// local props
|
|
38
38
|
const { id, switch: propsSwitch, indeterminate } = toRefs(props)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { Option } from '../../types/generic'
|
|
3
3
|
import type { InputGroupState } from '../../types/group'
|
|
4
|
+
import { VvCheckboxGroupEvents, VvCheckboxGroupProps } from '.'
|
|
4
5
|
import { INJECTION_KEY_CHECK_GROUP } from '../../constants'
|
|
5
6
|
import { HintSlotFactory } from '../common/HintSlot'
|
|
6
7
|
import VvCheckbox from '../VvCheckbox/VvCheckbox.vue'
|
|
7
|
-
import { VvCheckboxGroupProps, VvCheckboxGroupEvents } from '.'
|
|
8
8
|
|
|
9
9
|
// props, emit and slots
|
|
10
10
|
const props = defineProps(VvCheckboxGroupProps)
|
|
@@ -25,7 +25,7 @@ const modelValue = useVModel(props, 'modelValue', emit)
|
|
|
25
25
|
const { disabled, readonly, vertical, valid, invalid, modifiers }
|
|
26
26
|
= toRefs(props)
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
useGroupStateProvide<InputGroupState>(INJECTION_KEY_CHECK_GROUP, {
|
|
29
29
|
modelValue,
|
|
30
30
|
disabled,
|
|
31
31
|
readonly,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<script setup lang="ts" generic="T extends string | Option">
|
|
2
2
|
import type { Ref } from 'vue'
|
|
3
|
+
import type { Option } from '../../types/generic'
|
|
3
4
|
import { toRefs } from 'vue'
|
|
4
|
-
import
|
|
5
|
+
import { useVvComboboxProps, type VvComboboxEvents } from '.'
|
|
6
|
+
import { DropdownRole } from '../../constants'
|
|
7
|
+
import HintSlotFactory from '../common/HintSlot'
|
|
8
|
+
import VvBadge from '../VvBadge/VvBadge.vue'
|
|
9
|
+
import VvButton from '../VvButton/VvButton.vue'
|
|
5
10
|
import VvDropdown from '../VvDropdown/VvDropdown.vue'
|
|
6
|
-
import VvDropdownOption from '../VvDropdown/VvDropdownOption.vue'
|
|
7
11
|
import VvDropdownOptgroup from '../VvDropdown/VvDropdownOptgroup.vue'
|
|
12
|
+
import VvDropdownOption from '../VvDropdown/VvDropdownOption.vue'
|
|
13
|
+
import VvIcon from '../VvIcon/VvIcon.vue'
|
|
8
14
|
import VvSelect from '../VvSelect/VvSelect.vue'
|
|
9
|
-
import VvBadge from '../VvBadge/VvBadge.vue'
|
|
10
|
-
import VvButton from '../VvButton/VvButton.vue'
|
|
11
|
-
import HintSlotFactory from '../common/HintSlot'
|
|
12
|
-
import type { Option } from '../../types/generic'
|
|
13
|
-
import { DropdownRole } from '../../constants'
|
|
14
|
-
import { type VvComboboxEvents, useVvComboboxProps } from '.'
|
|
15
15
|
|
|
16
16
|
// props, emit and slots
|
|
17
17
|
// WARNING: This is a provisiaonal implementation, it may change in the future
|
|
@@ -31,7 +31,7 @@ const propsDefaults = useDefaults<typeof VvComboboxProps>(
|
|
|
31
31
|
const inputEl: Ref<HTMLElement | null> = ref(null)
|
|
32
32
|
const inputSearchEl: Ref<HTMLElement | null> = ref(null)
|
|
33
33
|
const wrapperEl: Ref<HTMLElement | null> = ref(null)
|
|
34
|
-
const dropdownEl =
|
|
34
|
+
const dropdownEl = useTemplateRef<typeof VvDropdown>('dropdownEl')
|
|
35
35
|
|
|
36
36
|
// hint slot
|
|
37
37
|
const {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import type { PropType } from 'vue'
|
|
2
1
|
import type { MaybeElement } from '@vueuse/core'
|
|
2
|
+
import type { PropType } from 'vue'
|
|
3
|
+
import type { Option } from '../../types/generic'
|
|
3
4
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
DisabledProps,
|
|
6
|
+
DropdownProps,
|
|
7
|
+
FloatingLabelProps,
|
|
6
8
|
HintProps,
|
|
9
|
+
IconProps,
|
|
10
|
+
IdNameProps,
|
|
11
|
+
InvalidProps,
|
|
12
|
+
LabelProps,
|
|
7
13
|
LoadingProps,
|
|
8
|
-
DisabledProps,
|
|
9
|
-
ReadonlyProps,
|
|
10
14
|
ModifiersProps,
|
|
11
15
|
OptionsProps,
|
|
12
|
-
|
|
16
|
+
ReadonlyProps,
|
|
13
17
|
TabindexProps,
|
|
14
|
-
|
|
15
|
-
IdNameProps,
|
|
16
|
-
DropdownProps,
|
|
17
|
-
LabelProps,
|
|
18
|
+
ValidProps,
|
|
18
19
|
} from '../../props'
|
|
19
|
-
import type { Option } from '../../types/generic'
|
|
20
20
|
|
|
21
21
|
export type VvComboboxEvents = {
|
|
22
22
|
'update:modelValue': [any]
|
|
@@ -100,8 +100,8 @@ export const VvComboboxProps = {
|
|
|
100
100
|
searchFunction: {
|
|
101
101
|
type: Function as PropType<
|
|
102
102
|
(
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
search: string,
|
|
104
|
+
options: (Option | string)[],
|
|
105
105
|
) => (Option | string)[] | Promise<(Option | string)[]>
|
|
106
106
|
>,
|
|
107
107
|
default: undefined,
|
|
@@ -208,8 +208,8 @@ export function useVvComboboxProps<T extends Option | string>() {
|
|
|
208
208
|
...VvComboboxProps.searchFunction,
|
|
209
209
|
type: Function as PropType<
|
|
210
210
|
(
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
search: string,
|
|
212
|
+
options: T[],
|
|
213
213
|
) => T[] | Promise<T[]>
|
|
214
214
|
>,
|
|
215
215
|
},
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { Ref } from 'vue'
|
|
3
|
-
import {
|
|
4
|
-
useFloating,
|
|
5
|
-
offset,
|
|
6
|
-
flip,
|
|
7
|
-
autoUpdate,
|
|
8
|
-
shift,
|
|
9
|
-
autoPlacement,
|
|
10
|
-
arrow,
|
|
11
|
-
size,
|
|
12
|
-
} from '@floating-ui/vue'
|
|
13
3
|
import type {
|
|
14
4
|
AutoPlacementOptions,
|
|
15
5
|
FlipOptions,
|
|
@@ -17,8 +7,18 @@ import type {
|
|
|
17
7
|
ShiftOptions,
|
|
18
8
|
SizeOptions,
|
|
19
9
|
} from '../../types/floating-ui'
|
|
20
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
arrow,
|
|
12
|
+
autoPlacement,
|
|
13
|
+
autoUpdate,
|
|
14
|
+
flip,
|
|
15
|
+
offset,
|
|
16
|
+
shift,
|
|
17
|
+
size,
|
|
18
|
+
useFloating,
|
|
19
|
+
} from '@floating-ui/vue'
|
|
21
20
|
import { VvDropdownProps } from '.'
|
|
21
|
+
import { Side, Strategy } from '../../constants'
|
|
22
22
|
|
|
23
23
|
// props, emit and attrs
|
|
24
24
|
const props = defineProps(VvDropdownProps)
|
|
@@ -48,10 +48,10 @@ const maxWidth = ref('auto')
|
|
|
48
48
|
const maxHeight = ref('auto')
|
|
49
49
|
|
|
50
50
|
// template elements
|
|
51
|
-
const localReferenceEl = ref<HTMLElement
|
|
51
|
+
const localReferenceEl = ref<HTMLElement>()
|
|
52
52
|
const floatingEl: Ref = ref()
|
|
53
|
-
const arrowEl =
|
|
54
|
-
const listEl =
|
|
53
|
+
const arrowEl = useTemplateRef<HTMLElement>('arrowEl')
|
|
54
|
+
const listEl = useTemplateRef<HTMLElement>('listEl')
|
|
55
55
|
const referenceEl = computed({
|
|
56
56
|
get: () => props.reference ?? localReferenceEl.value,
|
|
57
57
|
set: (newValue) => {
|
|
@@ -69,9 +69,9 @@ onMounted(() => {
|
|
|
69
69
|
() => {
|
|
70
70
|
hasCustomPosition.value
|
|
71
71
|
= window
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
.getComputedStyle(floatingEl.value)
|
|
73
|
+
.getPropertyValue('--dropdown-custom-position')
|
|
74
|
+
?.trim() === 'true'
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
attributeFilter: ['style'],
|
|
@@ -294,7 +294,7 @@ const referenceAria = computed(() => ({
|
|
|
294
294
|
|
|
295
295
|
// provide to dropdown
|
|
296
296
|
const { component: VvDropdownTriggerProvider, bus }
|
|
297
|
-
=
|
|
297
|
+
= useDropdownProvideTrigger({
|
|
298
298
|
reference: referenceEl,
|
|
299
299
|
id: hasId,
|
|
300
300
|
expanded,
|
|
@@ -383,7 +383,7 @@ function focusPrev() {
|
|
|
383
383
|
const hovered = useElementHover(floatingEl)
|
|
384
384
|
|
|
385
385
|
// provide top dropdown item
|
|
386
|
-
const { itemRole } =
|
|
386
|
+
const { itemRole } = useDropdownProvideItem({
|
|
387
387
|
role,
|
|
388
388
|
expanded,
|
|
389
389
|
focused,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { ActionProps, ModifiersProps } from '../../props'
|
|
2
3
|
import VvAction from '../VvAction/VvAction.vue'
|
|
3
4
|
import VvDropdownItem from '../VvDropdown/VvDropdownItem.vue'
|
|
4
|
-
import { ActionProps, ModifiersProps } from '../../props'
|
|
5
5
|
|
|
6
6
|
// props
|
|
7
7
|
const props = defineProps({
|
|
@@ -5,7 +5,7 @@ const props = defineProps(VvDropdownItemProps)
|
|
|
5
5
|
|
|
6
6
|
const { role, expanded } = useInjectedDropdownItem()
|
|
7
7
|
const element = ref(null)
|
|
8
|
-
|
|
8
|
+
useDropdownProvideAction({ expanded })
|
|
9
9
|
const hovered = useElementHover(element)
|
|
10
10
|
const { focused } = useFocus(element)
|
|
11
11
|
const { focused: focusedWithin } = useFocusWithin(element)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { PropType } from 'vue'
|
|
2
|
+
import { DropdownRole } from '../../constants'
|
|
2
3
|
import {
|
|
4
|
+
DisabledProps,
|
|
3
5
|
DropdownProps,
|
|
4
6
|
IdProps,
|
|
5
|
-
DisabledProps,
|
|
6
7
|
ModifiersProps,
|
|
7
8
|
SelectedProps,
|
|
8
9
|
UnselectableProps,
|
|
9
10
|
} from '../../props'
|
|
10
|
-
import { DropdownRole } from '../../constants'
|
|
11
11
|
|
|
12
12
|
export const VvDropdownProps = {
|
|
13
13
|
...IdProps,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { addIcon, Icon, iconExists } from '@iconify/vue'
|
|
3
3
|
import { type VvIconProps, VvIconPropsDefaults } from '.'
|
|
4
4
|
|
|
5
5
|
// props
|
|
@@ -61,7 +61,7 @@ function getSvgContent(svg: string): SVGSVGElement | undefined {
|
|
|
61
61
|
let dom
|
|
62
62
|
if (typeof window === 'undefined') {
|
|
63
63
|
// SSR
|
|
64
|
-
// eslint-disable-next-line ts/no-require-imports
|
|
64
|
+
// eslint-disable-next-line ts/no-require-imports
|
|
65
65
|
const { JSDOM } = require('jsdom')
|
|
66
66
|
dom = new JSDOM().window
|
|
67
67
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { UploadedFile } from '../../types'
|
|
2
3
|
import { useVModel } from '@vueuse/core'
|
|
3
4
|
import { computed, onBeforeUnmount, ref } from 'vue'
|
|
4
5
|
import Sortable from 'vuedraggable'
|
|
5
|
-
import type
|
|
6
|
+
import { type VvInputFileEvents, VvInputFileProps } from '.'
|
|
7
|
+
import HintSlotFactory from '../common/HintSlot'
|
|
6
8
|
import VvButton from '../VvButton/VvButton.vue'
|
|
7
9
|
import VvIcon from '../VvIcon/VvIcon.vue'
|
|
8
|
-
import HintSlotFactory from '../common/HintSlot'
|
|
9
|
-
import { type VvInputFileEvents, VvInputFileProps } from '.'
|
|
10
10
|
|
|
11
11
|
// props, emit, slots and attrs
|
|
12
12
|
const props = defineProps(VvInputFileProps)
|
|
@@ -66,7 +66,7 @@ const files = computed({
|
|
|
66
66
|
if (
|
|
67
67
|
!localModelValue.value
|
|
68
68
|
|| (!Array.isArray(localModelValue.value)
|
|
69
|
-
|
|
69
|
+
&& !(localModelValue.value as File)?.name)
|
|
70
70
|
) {
|
|
71
71
|
return []
|
|
72
72
|
}
|
|
@@ -105,7 +105,7 @@ const isMultiple = computed(() => {
|
|
|
105
105
|
|
|
106
106
|
const isDragging = ref(false)
|
|
107
107
|
|
|
108
|
-
const inputEl =
|
|
108
|
+
const inputEl = useTemplateRef<HTMLInputElement>('inputEl')
|
|
109
109
|
function onDragenter() {
|
|
110
110
|
isDragging.value = true
|
|
111
111
|
}
|
|
@@ -146,8 +146,8 @@ function addFiles(uploadedFiles: FileList) {
|
|
|
146
146
|
else {
|
|
147
147
|
toReturn
|
|
148
148
|
= localModelValue.value && Array.isArray(localModelValue.value)
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
? [...localModelValue.value]
|
|
150
|
+
: toReturn
|
|
151
151
|
}
|
|
152
152
|
for (const file of uploadedFiles) {
|
|
153
153
|
if (hasMax.value && toReturn.length >= hasMax.value) {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import type { UploadedFile } from '@/types'
|
|
1
2
|
import {
|
|
3
|
+
DisabledProps,
|
|
4
|
+
HintProps,
|
|
5
|
+
IconProps,
|
|
2
6
|
IdNameProps,
|
|
3
|
-
ModifiersProps,
|
|
4
|
-
ValidProps,
|
|
5
7
|
InvalidProps,
|
|
6
|
-
HintProps,
|
|
7
8
|
LabelProps,
|
|
8
9
|
LoadingProps,
|
|
10
|
+
ModifiersProps,
|
|
9
11
|
ReadonlyProps,
|
|
10
|
-
|
|
11
|
-
IconProps,
|
|
12
|
+
ValidProps,
|
|
12
13
|
} from '../../props'
|
|
13
|
-
import { type VvIconProps
|
|
14
|
-
import type { UploadedFile } from '@/types'
|
|
14
|
+
import { ACTION_ICONS, type VvIconProps } from '../VvIcon'
|
|
15
15
|
|
|
16
16
|
export type VvInputFileEvents = {
|
|
17
17
|
'remove': [
|