fix(ui): center spinner via top-1/2 left-1/2 translate instead of inset-0 flex

inset-0 flex relies on display:flex being restored after Livewire removes
display:none — display type ambiguous in that moment. Explicit 50%/50%
translate centering is display-independent and always correct.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
boban 2026-05-17 15:15:52 +02:00
parent 695727e321
commit be8fdc8fe4
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ $cls = $base . ' ' . ($variants[$variant] ?? $variants['primary']);
{{ $slot->isNotEmpty() ? $slot : $label }} {{ $slot->isNotEmpty() ? $slot : $label }}
</span> </span>
@if($action) @if($action)
<span wire:loading wire:target="{{ $action }}" class="absolute inset-0 flex items-center justify-center pointer-events-none"> <span wire:loading wire:target="{{ $action }}" class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 pointer-events-none">
<svg class="animate-spin w-5 h-5 flex-shrink-0" viewBox="0 0 24 24" fill="none"> <svg class="animate-spin w-5 h-5 flex-shrink-0" viewBox="0 0 24 24" fill="none">
<circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="2.5" stroke-opacity="0.25"/> <circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="2.5" stroke-opacity="0.25"/>
<circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="2.5" <circle cx="12" cy="12" r="9" stroke="currentColor" stroke-width="2.5"