Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

(0.9.5) Disable hover menu for now #169

Merged
merged 2 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 37 additions & 19 deletions docs/components/popout-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,41 @@
</PopoutMenu>
```

# Popout Menu on hover
<DemoContainer>
<PopoutMenu class="btn btn-dropdown-animation" position="bottom" direction="right" allow-hover>
Hover me! <DropdownIcon />
<template #menu>
Menu contents!
Menu contents!
Menu contents!
</template>
</PopoutMenu>
</DemoContainer>
[//]: # (# Popout Menu on hover)

```vue
<PopoutMenu class="btn" position="bottom" direction="right" allow-hover>
Hover me!
<template #menu>
Menu contents!
</template>
</PopoutMenu>
```
[//]: # (<DemoContainer>)

[//]: # ( <PopoutMenu class="btn btn-dropdown-animation" position="bottom" direction="right" allow-hover>)

[//]: # ( Hover me! <DropdownIcon />)

[//]: # ( <template #menu>)

[//]: # ( Menu contents!)

[//]: # ( Menu contents!)

[//]: # ( Menu contents!)

[//]: # ( </template>)

[//]: # ( </PopoutMenu>)

[//]: # (</DemoContainer>)

[//]: # ()
[//]: # (```vue)

[//]: # (<PopoutMenu class="btn" position="bottom" direction="right" allow-hover>)

[//]: # ( Hover me!)

[//]: # ( <template #menu>)

[//]: # ( Menu contents!)

[//]: # ( </template>)

[//]: # (</PopoutMenu>)

[//]: # (```)
12 changes: 2 additions & 10 deletions lib/components/base/PopoutMenu.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
<template>
<div
ref="dropdown"
class="popup-container"
tabindex="-1"
:aria-expanded="dropdownVisible"
:class="{ 'allow-hover': allowHover }"
>
<div ref="dropdown" class="popup-container" tabindex="-1" :aria-expanded="dropdownVisible">
<button
v-bind="$attrs"
ref="dropdownButton"
Expand Down Expand Up @@ -141,9 +135,7 @@ onBeforeUnmount(() => {
}
}

&:not(.allow-hover) .popup-menu:not(.visible):not(:focus-within),
&.allow-hover:not(:has(.hover-bounding-box:hover)):not(:has(.popup-menu:hover))
.popup-menu:not(.visible):not(:focus-within) {
.popup-menu:not(.visible):not(:focus-within) {
pointer-events: none;

*,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "omorphia",
"type": "module",
"version": "0.9.4",
"version": "0.9.5",
"files": [
"dist",
"locales"
Expand Down