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

Commit

Permalink
(0.9.5) Disable hover menu for now (#169)
Browse files Browse the repository at this point in the history
* (0.9.5) Disable hover menu for now

* Remove allow-hover class
  • Loading branch information
Prospector authored Dec 8, 2023
1 parent 069b1cc commit 9553747
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 30 deletions.
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

0 comments on commit 9553747

Please sign in to comment.