@props([ 'header'=>null, 'footer'=>null ]) @use('Filament\Support\Facades\FilamentAsset') @use('Filament\Support\Enums\MaxWidth') @php $isClosedByClickingAway = $this->getConfigs()->isClosedByClickingAway(); $isClosedByEscaping = $this->getConfigs()->isClosedByEscaping(); $hasCloseButton=$this->getConfigs()->hasCloseButton(); $isSwappableOnMobile= $this->getConfigs()->isSwappableOnMobile(); $isSlideOver = $this->getConfigs()->isSlideOver(); $maxWidth=$this->getConfigs()->getMaxWidth(); $position = $this->getConfigs()->getPosition(); $top = $position?->getTop() ?: ($isSlideOver ? '0px' : '100px'); $left = $position?->getLeft() ?? '0'; $right = $position?->getRight() ?? '0'; $bottom = $position?->getBottom() ?? '0'; @endphp
!$isSlideOver ]) role="dialog" aria-modal="true" style="display: none" x-show="$store.globalSearchModalStore.isOpen" @if ($isClosedByEscaping) x-on:keydown.escape.window="$store.globalSearchModalStore.hideModal()" @endif x-id="['modal-title']" x-bind:aria-labelledby="$id('modal-title')">
!$isSlideOver, "top: 0;" => $isSlideOver, "height:screen;"=>$isSlideOver ]) @else style=" top: {{ $top }}; left: {{ $left }}; right: {{ $right }}; bottom: {{ $bottom }}; " @endif @class([ 'absolute py-1 px-0.5 shadow-lg dark:bg-gray-900 bg-white', 'inset-y-0 overflow-y-auto rounded right-0 max-w-2xl w-full sm:w-1/2' => $isSlideOver, 'inset-x-0 w-full rounded-xl mx-auto mx-2' => !$isSlideOver, match ($maxWidth) { MaxWidth::ExtraSmall => 'max-w-xs', MaxWidth::Small => 'max-w-sm', MaxWidth::Medium => 'max-w-md', MaxWidth::Large => 'max-w-lg', MaxWidth::ExtraLarge => 'max-w-xl', MaxWidth::TwoExtraLarge => 'max-w-2xl', MaxWidth::ThreeExtraLarge => 'max-w-3xl', MaxWidth::FourExtraLarge => 'max-w-4xl', MaxWidth::FiveExtraLarge => 'max-w-5xl', MaxWidth::SixExtraLarge => 'max-w-6xl', MaxWidth::SevenExtraLarge => 'max-w-7xl', MaxWidth::Full => 'max-w-full', MaxWidth::MinContent => 'max-w-min', MaxWidth::MaxContent => 'max-w-max', MaxWidth::FitContent => 'max-w-fit', MaxWidth::Prose => 'max-w-prose', MaxWidth::ScreenSmall => 'max-w-screen-sm', MaxWidth::ScreenMedium => 'max-w-screen-md', MaxWidth::ScreenLarge => 'max-w-screen-lg', MaxWidth::ScreenExtraLarge => 'max-w-screen-xl', MaxWidth::ScreenTwoExtraLarge => 'max-w-screen-2xl', MaxWidth::Screen => 'fixed inset-0', default => "max-w-2xl", }, ]) x-on:click.stop x-trap.noscroll.inert="$store.globalSearchModalStore.isOpen" >
!$isSlideOver, 'h-[90vh]' => $isSlideOver ])> @if ($isSwappableOnMobile)
@endif @if (filled($header))
{{ $header }}
@endif
!$isSlideOver, 'max-h-full'=>$isSlideOver ]) > {{ $dropdown }}
@if (filled($footer)) @endif