D3vugu-components/components/overlay/container.vugu

127 lines
3.3 KiB
Plaintext
Raw Permalink Normal View History

<div class="d3c-1684423938">
<div vg-if="c.modal != nil" class="d3c-1684423938-modal-container">
<div :class='c.modalContainerClasses'>
<div :class='"d3c-1684423938-modal-menu " + c.modalSignalClasses'>
<h3 class="d3c-1684423938-modal-title" style="flex-grow:1; margin: 0;" vg-content="c.modalTitle"></h3>
<input:Button @Click="c.handleModalClose(event)" class="d3c-button-borderless"><vg-slot name="IconSlot"><icons:LCancel></icons:LCancel></vg-slot></input:Button>
</div>
<vg-comp expr="c.modal"></vg-comp>
</div>
</div>
<div class="d3c-1684423938-toast-container">
<div :class='"d3c-1684423938-toast " + toast.containerClasses' vg-for="_, toast := range c.toasts">
<div :class='"d3c-1684423938-toast-signal " + toast.signalClasses '></div>
<div class="d3c-1684423938-toast-body"><vg-comp expr="toast.body"></vg-comp></div>
<div class="d3c-1684423938-toast-menu">
<input:Button @Click="c.handleToastClose(event, toast.body)" class="d3c-button-borderless"><vg-slot name="IconSlot"><icons:LCancel></icons:LCancel></vg-slot></input:Button>
</div>
</div>
</div>
<div vg-if="c.WaitOverlayActive()" class="d3c-1684423938-wait-overlay">
<icons:LLoadingCircle style="font-size: 4em;"></icons:LLoadingCircle>
</div>
</div>
<style>
.d3c-1684423938 {
position: fixed;
z-index: 2;
}
.d3c-1684423938-modal-container {
width: 100vw;
height: 100vh;
position: fixed;
backdrop-filter: blur(1px) brightness(80%);
display: flex;
justify-content: center;
align-items: center;
z-index: 1;
}
.d3c-1684423938-modal-container > div {
background-color: var(--d3c-color-background);
color: var(--d3c-color-text);
border-radius: 4px;
max-width: 100%;
max-height: 100%;
overflow: auto;
box-shadow: 0 1em 3em var(--d3c-color-shadow);
}
.d3c-1684423938-modal-menu {
padding: 0.5em;
display: flex;
gap: 0.5em;
justify-content: flex-end;
align-items: baseline;
background-color: var(--d3c-color-background);
color: var(--d3c-color-text);
}
.d3c-1684423938-modal-title {
text-align: center;
}
.d3c-1684423938-toast-container {
padding: 1em;
pointer-events: none;
width: 100vw;
height: 100vh;
position: fixed;
z-index: 2;
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: center;
gap: 1em;
box-sizing: border-box;
}
.d3c-1684423938-toast {
pointer-events: auto;
display: flex;
background-color: var(--d3c-color-background);
border-radius: 4px;
overflow: hidden;
color: var(--d3c-color-text);
box-shadow: 0 1em 2em var(--d3c-color-shadow);
}
.d3c-1684423938-toast-signal {
width: 0.5em;
height: 100%;
background-color: var(--d3c-color-background);
color: var(--d3c-color-text);
}
.d3c-1684423938-toast-menu {
padding: 0.5em 0.5em 0 0;
}
.d3c-1684423938-wait-overlay {
pointer-events: none;
position: fixed;
box-sizing: border-box;
width: 100vw;
height: 100vh;
z-index: 3;
display: flex;
justify-content: center;
align-items: center;
animation: d3c-1684423938-blur-in 2s forwards;
}
@keyframes d3c-1684423938-blur-in {
from {backdrop-filter: blur(0px) brightness(100%);}
to {backdrop-filter: blur(1px) brightness(80%);}
}
</style>
<script type="application/x-go">
import (
"git.d3nexus.de/Dadido3/D3vugu-components/icons"
"git.d3nexus.de/Dadido3/D3vugu-components/components/input"
)
</script>