This commit is contained in:
Freeplay 2023-04-28 20:26:10 -04:00
parent 3be2147397
commit 23beca49e3
2 changed files with 35 additions and 34 deletions

View File

@ -1,6 +1,6 @@
<template>
<FocusTrap v-bind:active="isActive">
<div tabindex="-1" v-focus>
<div tabindex="-1" v-focus>
<div
ref="itemsEl"
class="rrevdjwt _popup _shadow"

View File

@ -14,45 +14,46 @@
:duration="transitionDuration"
appear
@after-leave="emit('closed')"
@keyup.esc="emit('click')"
@enter="emit('opening')"
@after-enter="onOpened"
>
<div
v-show="manualShowing != null ? manualShowing : showing"
v-hotkey.global="keymap"
:class="[
$style.root,
{
[$style.drawer]: type === 'drawer',
[$style.dialog]: type === 'dialog' || type === 'dialog:top',
[$style.popup]: type === 'popup',
},
]"
:style="{
zIndex,
pointerEvents: (manualShowing != null ? manualShowing : showing)
? 'auto'
: 'none',
'--transformOrigin': transformOrigin,
}"
tabindex="-1"
v-focus
>
<focus-trap v-model:active="isActive">
<div
class="_modalBg data-cy-bg"
v-show="manualShowing != null ? manualShowing : showing"
v-hotkey.global="keymap"
:class="[
$style.bg,
$style.root,
{
[$style.bgTransparent]: isEnableBgTransparent,
'data-cy-transparent': isEnableBgTransparent,
[$style.drawer]: type === 'drawer',
[$style.dialog]: type === 'dialog' || type === 'dialog:top',
[$style.popup]: type === 'popup',
},
]"
:style="{ zIndex }"
@click="onBgClick"
@mousedown="onBgClick"
@contextmenu.prevent.stop="() => {}"
></div>
<focus-trap v-model:active="isActive">
:style="{
zIndex,
pointerEvents: (manualShowing != null ? manualShowing : showing)
? 'auto'
: 'none',
'--transformOrigin': transformOrigin,
}"
tabindex="-1"
v-focus
>
<div
class="_modalBg data-cy-bg"
:class="[
$style.bg,
{
[$style.bgTransparent]: isEnableBgTransparent,
'data-cy-transparent': isEnableBgTransparent,
},
]"
:style="{ zIndex }"
@click="onBgClick"
@mousedown="onBgClick"
@contextmenu.prevent.stop="() => {}"
></div>
<div
ref="content"
:class="[
@ -64,8 +65,8 @@
>
<slot :max-height="maxHeight" :type="type"></slot>
</div>
</focus-trap>
</div>
</div>
</focus-trap>
</Transition>
</template>