diff options
| author | Sean King <seanking2919@protonmail.com> | 2022-08-01 18:17:09 -0600 |
|---|---|---|
| committer | Sean King <seanking2919@protonmail.com> | 2022-08-01 18:17:09 -0600 |
| commit | 081aa0fd0552732f208bd35e37cde06c66536791 (patch) | |
| tree | 053827cd9d9b258d6752195ab09eabd37d4c813b /src/components/popover/popover.vue | |
| parent | 75216c5feb32b32e24952663ffa4233410585785 (diff) | |
| parent | 3fc9673a7d0fb851283e4ed687c2fd7790f03317 (diff) | |
Fix merge conflicts
Diffstat (limited to 'src/components/popover/popover.vue')
| -rw-r--r-- | src/components/popover/popover.vue | 48 |
1 files changed, 28 insertions, 20 deletions
diff --git a/src/components/popover/popover.vue b/src/components/popover/popover.vue index c2a3e801..bd59cade 100644 --- a/src/components/popover/popover.vue +++ b/src/components/popover/popover.vue @@ -1,5 +1,5 @@ <template> - <div + <span @mouseenter="onMouseenter" @mouseleave="onMouseleave" > @@ -11,20 +11,27 @@ > <slot name="trigger" /> </button> - <div - v-if="!hidden" - ref="content" - :style="styles" - class="popover" - :class="popoverClass || 'popover-default'" - > - <slot - name="content" - class="popover-inner" - :close="hidePopover" - /> - </div> - </div> + <teleport to="#popovers"> + <transition name="fade"> + <div + v-if="!hidden" + ref="content" + :style="styles" + class="popover" + :class="popoverClass || 'popover-default'" + @mouseenter="onMouseenterContent" + @mouseleave="onMouseleaveContent" + @click="onClickContent" + > + <slot + name="content" + class="popover-inner" + :close="hidePopover" + /> + </div> + </transition> + </teleport> + </span> </template> <script src="./popover.js" /> @@ -37,14 +44,15 @@ } .popover { - z-index: 500; - position: absolute; + z-index: var(--ZI_popover_override, var(--ZI_popovers)); + position: fixed; min-width: 0; + max-width: calc(100vw - 20px); + box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5); + box-shadow: var(--popupShadow); } .popover-default { - transition: opacity 0.3s; - &:after { content: ''; position: absolute; @@ -80,7 +88,7 @@ text-align: left; list-style: none; max-width: 100vw; - z-index: 200; + z-index: var(--ZI_popover_override, var(--ZI_popovers)); white-space: nowrap; .dropdown-divider { |
