mailwolt/resources/views/vendor/wire-elements-modal/modal.blade.php

69 lines
3.2 KiB
PHP

{{-- resources/views/vendor/livewire-ui-modal/modal.blade.php --}}
<div>
@isset($jsPath)<script>{!! file_get_contents($jsPath) !!}</script>@endisset
@isset($cssPath)<style>{!! file_get_contents($cssPath) !!}</style>@endisset
<span class="hidden sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl"></span>
{{-- overflow hier entfernen (zieht sonst Artefakte) --}}
<div x-data="LivewireUIModal()"
x-on:close.stop="setShowPropertyTo(false)"
x-on:keydown.escape.window="show && closeModalOnEscape()"
x-show="show"
class="fixed inset-0 z-50"
style="display:none;">
<div class="flex min-h-dvh items-center justify-center px-4 py-10">
{{-- Overlay in ZWEI Ebenen: Dim + Blur (keine Ränder/Scroll hier) --}}
<div x-show="show"
x-on:click="closeModalOnClickAway()"
x-transition:enter="ease-out duration-300"
x-transition:enter-start="opacity-0"
x-transition:enter-end="opacity-100"
x-transition:leave="ease-in duration-200"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0"
class="fixed inset-0">
{{-- Dim-Layer: NUR Farbe --}}
<div class="absolute inset-0 bg-black/60"></div>
{{-- Blur-Layer: NUR Blur (GPU hint) --}}
<div class="absolute inset-0 backdrop-blur-sm transform-gpu will-change-[backdrop-filter]"></div>
</div>
<span class="hidden"></span>
<div x-show="show && showActiveComponent"
x-bind:class="modalWidth"
id="modal-container"
x-trap.noscroll.inert="show && showActiveComponent"
aria-modal="true"
class="inline-block w-full sm:max-w-md align-middle rounded-2xl
ring-1 ring-white/10 border border-white/10 shadow-2xl shadow-black/40
bg-[radial-gradient(120%_100%_at_20%_0%,rgba(34,211,238,.12),transparent_60%),radial-gradient(120%_100%_at_100%_120%,rgba(16,185,129,.10),transparent_65%)]
bg-slate-900/70 relative z-10">
<div class="max-h-[90vh] flex flex-col">
<div class="flex-1 order-2 overflow-y-auto" id="modal-body">
@forelse($components as $id => $component)
<div x-show.immediate="activeComponent == '{{ $id }}'"
x-ref="{{ $id }}"
wire:key="{{ $id }}">
@livewire($component['name'], $component['arguments'], key($id))
</div>
@empty @endforelse
</div>
<div class="shrink-0 order-1" id="modal-header">
@stack('modal.header')
</div>
<div class="shrink-0 order-3" id="modal-footer">
@stack('modal.footer')
</div>
</div>
</div>
</div>
</div>
</div>