refactor: Update UI components to TailAdmin theme
- Changed badge, button, card, dropdown, input, modal, select, table, tabs, toggle, and tooltip components to align with the TailAdmin design system. - Updated class names and styles for consistency across components. - Enhanced accessibility and responsiveness in various components. - Improved hover and focus states for better user experience.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{{--
|
||||
Modal Component - shadcn-style Dialog
|
||||
Modal Component - TailAdmin Dialog
|
||||
|
||||
Usage:
|
||||
<x-proxmox::ui.modal name="my-modal" title="Modal Title">Content</x-proxmox::ui.modal>
|
||||
@@ -13,7 +13,7 @@
|
||||
'title' => null,
|
||||
'subtitle' => null,
|
||||
'icon' => null,
|
||||
'iconColor' => 'text-primary',
|
||||
'iconColor' => 'text-brand-500',
|
||||
'maxWidth' => 'md',
|
||||
'closeable' => true,
|
||||
'footer' => null,
|
||||
@@ -41,59 +41,59 @@
|
||||
x-on:keydown.escape.window="@if($closeable) show = false @endif"
|
||||
x-show="show"
|
||||
x-cloak
|
||||
class="fixed inset-0 z-50 overflow-y-auto"
|
||||
class="fixed inset-0 z-99999 overflow-y-auto"
|
||||
{{ $attributes }}
|
||||
>
|
||||
{{-- Backdrop --}}
|
||||
<div
|
||||
x-show="show"
|
||||
x-transition:enter="transition ease-out duration-150"
|
||||
x-transition:enter="transition ease-out duration-200"
|
||||
x-transition:enter-start="opacity-0"
|
||||
x-transition:enter-end="opacity-100"
|
||||
x-transition:leave="transition ease-in duration-100"
|
||||
x-transition:leave="transition ease-in duration-150"
|
||||
x-transition:leave-start="opacity-100"
|
||||
x-transition:leave-end="opacity-0"
|
||||
@if($closeable) @click="show = false" @endif
|
||||
class="fixed inset-0 bg-black/50 backdrop-blur-sm"
|
||||
class="fixed inset-0 bg-gray-900/50 backdrop-blur-sm dark:bg-gray-900/80"
|
||||
></div>
|
||||
|
||||
{{-- Modal Panel --}}
|
||||
<div class="fixed inset-0 flex items-center justify-center p-4">
|
||||
<div
|
||||
x-show="show"
|
||||
x-transition:enter="transition ease-out duration-150"
|
||||
x-transition:enter="transition ease-out duration-200"
|
||||
x-transition:enter-start="opacity-0 scale-95"
|
||||
x-transition:enter-end="opacity-100 scale-100"
|
||||
x-transition:leave="transition ease-in duration-100"
|
||||
x-transition:leave="transition ease-in duration-150"
|
||||
x-transition:leave-start="opacity-100 scale-100"
|
||||
x-transition:leave-end="opacity-0 scale-95"
|
||||
@click.stop
|
||||
class="relative w-full {{ $maxWidthClass }} max-h-[90vh] overflow-y-auto rounded-xl border bg-background-secondary shadow-lg"
|
||||
class="relative w-full {{ $maxWidthClass }} max-h-[90vh] overflow-y-auto rounded-2xl border border-gray-200 bg-white shadow-theme-lg dark:border-gray-800 dark:bg-gray-900"
|
||||
>
|
||||
{{-- Header --}}
|
||||
@if($title || $closeable)
|
||||
<div class="flex items-start justify-between gap-4 px-6 pt-6 pb-4">
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="flex items-start justify-between gap-4 border-b border-gray-200 px-6 py-5 dark:border-gray-800">
|
||||
<div class="flex items-center gap-3.5">
|
||||
@if($icon)
|
||||
<div class="flex-shrink-0 flex items-center justify-center size-9 rounded-lg bg-primary/10">
|
||||
<x-dynamic-component :component="$icon" class="size-4 {{ $iconColor }}" />
|
||||
<div class="flex size-11 flex-shrink-0 items-center justify-center rounded-xl bg-brand-50 dark:bg-brand-500/10">
|
||||
<x-dynamic-component :component="$icon" class="size-5 {{ $iconColor }} dark:text-brand-400" />
|
||||
</div>
|
||||
@endif
|
||||
<div class="space-y-1">
|
||||
@if($title)
|
||||
<h3 class="text-lg font-semibold leading-none tracking-tight">{{ $title }}</h3>
|
||||
<h3 class="text-lg font-semibold text-gray-800 dark:text-white/90">{{ $title }}</h3>
|
||||
@endif
|
||||
@if($subtitle)
|
||||
<p class="text-sm text-muted-foreground">{{ $subtitle }}</p>
|
||||
<p class="text-theme-sm text-gray-500 dark:text-gray-400">{{ $subtitle }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@if($closeable)
|
||||
<button
|
||||
@click="show = false"
|
||||
class="rounded-sm opacity-70 ring-offset-background transition-opacity duration-150 hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"
|
||||
class="flex size-9 items-center justify-center rounded-lg text-gray-500 transition-colors duration-150 hover:bg-gray-100 hover:text-gray-700 focus:outline-none focus:ring-2 focus:ring-brand-500/20 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300"
|
||||
>
|
||||
<x-ri-close-line class="size-4" />
|
||||
<x-ri-close-line class="size-5" />
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
@endif
|
||||
@@ -101,13 +101,13 @@
|
||||
@endif
|
||||
|
||||
{{-- Content --}}
|
||||
<div class="px-6 pb-6">
|
||||
<div class="px-6 py-5">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
||||
{{-- Footer --}}
|
||||
@if($footer)
|
||||
<div class="flex items-center justify-end gap-2 px-6 py-4 border-t">
|
||||
<div class="flex items-center justify-end gap-3 border-t border-gray-200 px-6 py-4 dark:border-gray-800">
|
||||
{{ $footer }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user