Refactor modal close behavior and improve styling

- Changed modal close event from `@click.away` to `@click.self` for better control over closing modals.
- Updated various modal button styles for consistency and improved accessibility.
- Adjusted transition durations for modal animations to enhance user experience.
- Added aria-labels to close buttons for better screen reader support.
This commit is contained in:
2026-02-23 20:02:41 -05:00
parent f394483daa
commit af62a16354
45 changed files with 393 additions and 4700 deletions

View File

@@ -69,30 +69,30 @@
x-transition:leave-start="opacity-100 scale-100 translate-y-0"
x-transition:leave-end="opacity-0 scale-95 translate-y-4"
@click.stop
class="w-full {{ $maxWidthClass }} max-h-[90vh] overflow-y-auto bg-background dark:bg-gray-800 border border-neutral dark:border-gray-700 rounded-xl shadow-2xl"
class="w-full {{ $maxWidthClass }} max-h-[90vh] overflow-y-auto bg-background border border-neutral rounded-xl shadow-2xl"
>
{{-- Header --}}
@if($title || $closeable)
<div class="flex items-center justify-between p-5 border-b border-neutral dark:border-gray-700">
<div class="flex items-center justify-between p-5 border-b border-neutral">
<div class="flex items-center gap-3">
@if($icon)
<span class="flex items-center justify-center w-10 h-10 bg-background-secondary dark:bg-gray-700 rounded-lg">
<span class="flex items-center justify-center w-10 h-10 bg-background-secondary rounded-lg">
<x-dynamic-component :component="$icon" class="size-5 {{ $iconColor }}" />
</span>
@endif
<div>
@if($title)
<h5 class="text-lg font-semibold text-primary dark:text-gray-100">{{ $title }}</h5>
<h5 class="text-lg font-semibold text-primary">{{ $title }}</h5>
@endif
@if($subtitle)
<p class="text-sm text-secondary dark:text-gray-400 mt-0.5">{{ $subtitle }}</p>
<p class="text-sm text-secondary mt-0.5">{{ $subtitle }}</p>
@endif
</div>
</div>
@if($closeable)
<button
@click="show = false"
class="flex items-center justify-center w-8 h-8 rounded-lg text-secondary dark:text-gray-400 hover:bg-background-secondary dark:hover:bg-gray-700 hover:text-primary dark:hover:text-gray-100 transition-all duration-200"
class="flex items-center justify-center w-8 h-8 rounded-lg text-secondary hover:bg-background-secondary hover:text-primary transition-all duration-200"
aria-label="Close"
>
<x-ri-close-line class="size-5" />
@@ -108,7 +108,7 @@
{{-- Footer --}}
@if($footer)
<div class="flex items-center justify-end gap-3 p-5 border-t border-neutral dark:border-gray-700">
<div class="flex items-center justify-end gap-3 p-5 border-t border-neutral">
{{ $footer }}
</div>
@endif