From 7a089f53e25a157d9360fd01238e3f801e8c2f30 Mon Sep 17 00:00:00 2001 From: "Joseph.Rawlings" Date: Wed, 17 Dec 2025 12:07:54 -0500 Subject: [PATCH] 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. --- .../views/components/ui/alert.blade.php | 39 +++++++++------- .../views/components/ui/badge.blade.php | 32 ++++++------- .../views/components/ui/button.blade.php | 46 +++++++++---------- .../views/components/ui/card.blade.php | 34 +++++++------- .../views/components/ui/dropdown.blade.php | 10 ++-- .../views/components/ui/input.blade.php | 38 +++++++-------- .../views/components/ui/modal.blade.php | 38 +++++++-------- .../views/components/ui/select.blade.php | 26 +++++------ .../views/components/ui/table-row.blade.php | 12 ++--- .../views/components/ui/table-td.blade.php | 8 ++-- .../views/components/ui/table-th.blade.php | 8 ++-- .../views/components/ui/table.blade.php | 16 +++---- .../views/components/ui/tabs.blade.php | 28 +++++------ .../views/components/ui/toggle.blade.php | 21 +++++---- .../views/components/ui/tooltip.blade.php | 8 ++-- 15 files changed, 184 insertions(+), 180 deletions(-) diff --git a/extensions/Servers/Proxmox/views/components/ui/alert.blade.php b/extensions/Servers/Proxmox/views/components/ui/alert.blade.php index 6985e6c70..c65d151b1 100644 --- a/extensions/Servers/Proxmox/views/components/ui/alert.blade.php +++ b/extensions/Servers/Proxmox/views/components/ui/alert.blade.php @@ -1,5 +1,5 @@ {{-- - Alert Component - TailServer Theme (shadcn-inspired) + Alert Component - TailAdmin Theme Usage: Default alert @@ -19,23 +19,28 @@ @php $variantConfig = [ 'default' => [ - 'class' => 'bg-card text-card-foreground', + 'class' => 'border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03] text-gray-800 dark:text-white/90', + 'iconClass' => 'fill-gray-500 dark:fill-gray-400', 'icon' => $icon ?? 'ri-information-line', ], 'info' => [ - 'class' => 'border-info/20 bg-info/5 text-info [&>svg]:text-info', + 'class' => 'border-blue-light-200 bg-blue-light-50 dark:border-blue-light-500/20 dark:bg-blue-light-500/10 text-blue-light-600 dark:text-blue-light-400', + 'iconClass' => 'fill-blue-light-500', 'icon' => $icon ?? 'ri-information-line', ], 'success' => [ - 'class' => 'border-success/20 bg-success/5 text-success [&>svg]:text-success', + 'class' => 'border-success-200 bg-success-50 dark:border-success-500/20 dark:bg-success-500/10 text-success-600 dark:text-success-400', + 'iconClass' => 'fill-success-500', 'icon' => $icon ?? 'ri-checkbox-circle-line', ], 'warning' => [ - 'class' => 'border-warning/20 bg-warning/5 text-warning [&>svg]:text-warning', + 'class' => 'border-warning-200 bg-warning-50 dark:border-warning-500/20 dark:bg-warning-500/10 text-warning-600 dark:text-orange-400', + 'iconClass' => 'fill-warning-500', 'icon' => $icon ?? 'ri-error-warning-line', ], 'danger' => [ - 'class' => 'border-danger/20 bg-danger/5 text-danger [&>svg]:text-danger', + 'class' => 'border-error-200 bg-error-50 dark:border-error-500/20 dark:bg-error-500/10 text-error-600 dark:text-error-400', + 'iconClass' => 'fill-error-500', 'icon' => $icon ?? 'ri-error-warning-fill', ], ]; @@ -46,7 +51,7 @@
class([ - 'relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5', + 'relative w-full rounded-xl border p-4 flex gap-3 items-start', $config['class'], ]) }} @if($dismissible || $collapsible) @@ -55,24 +60,24 @@ @if($collapsible) collapsed: {{ $collapsed ? 'true' : 'false' }} @endif }" 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" @endif > - +
@if($title) -
{{ $title }}
+
{{ $title }}
@endif
@if($dismissible || $collapsible) -
+
@if($collapsible) @@ -98,7 +103,7 @@ diff --git a/extensions/Servers/Proxmox/views/components/ui/badge.blade.php b/extensions/Servers/Proxmox/views/components/ui/badge.blade.php index d1cfce2b1..373a5f258 100644 --- a/extensions/Servers/Proxmox/views/components/ui/badge.blade.php +++ b/extensions/Servers/Proxmox/views/components/ui/badge.blade.php @@ -1,5 +1,5 @@ {{-- - Badge Component - TailServer Theme (shadcn-inspired) + Badge Component - TailAdmin Theme Usage: Default @@ -18,31 +18,31 @@ ]) @php - $baseClasses = 'inline-flex items-center rounded-md border font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2'; + $baseClasses = 'inline-flex items-center rounded-full font-medium transition-colors'; $variantClasses = [ - 'default' => 'border-transparent bg-primary text-primary-foreground shadow', - 'secondary' => 'border-transparent bg-secondary text-secondary-foreground', - 'success' => $outline ? 'border-success/40 text-success bg-transparent' : 'border-transparent bg-success/15 text-success', - 'warning' => $outline ? 'border-warning/40 text-warning bg-transparent' : 'border-transparent bg-warning/15 text-warning', - 'danger' => $outline ? 'border-danger/40 text-danger bg-transparent' : 'border-transparent bg-danger/15 text-danger', - 'info' => $outline ? 'border-info/40 text-info bg-transparent' : 'border-transparent bg-info/15 text-info', - 'outline' => 'text-foreground border-neutral/20', - 'muted' => 'border-transparent bg-muted text-muted-foreground', + 'default' => 'bg-brand-50 text-brand-500 dark:bg-brand-500/15 dark:text-brand-400', + 'secondary' => 'bg-gray-100 text-gray-700 dark:bg-white/5 dark:text-white/80', + 'success' => $outline ? 'ring-1 ring-success-500/40 text-success-600 bg-transparent dark:text-success-400' : 'bg-success-50 text-success-600 dark:bg-success-500/15 dark:text-success-400', + 'warning' => $outline ? 'ring-1 ring-warning-500/40 text-warning-600 bg-transparent dark:text-orange-400' : 'bg-warning-50 text-warning-600 dark:bg-warning-500/15 dark:text-orange-400', + 'danger' => $outline ? 'ring-1 ring-error-500/40 text-error-600 bg-transparent dark:text-error-400' : 'bg-error-50 text-error-600 dark:bg-error-500/15 dark:text-error-400', + 'info' => $outline ? 'ring-1 ring-blue-light-500/40 text-blue-light-600 bg-transparent dark:text-blue-light-400' : 'bg-blue-light-50 text-blue-light-500 dark:bg-blue-light-500/15 dark:text-blue-light-500', + 'outline' => 'text-gray-700 ring-1 ring-gray-300 dark:text-gray-400 dark:ring-gray-700', + 'muted' => 'bg-gray-500 text-white dark:bg-white/5 dark:text-white/80', ]; $sizeClasses = [ - 'xs' => 'px-1.5 py-0.5 text-[10px]', - 'sm' => 'px-2 py-0.5 text-[11px]', - 'md' => 'px-2.5 py-0.5 text-xs', + 'xs' => 'px-2 py-0.5 text-[10px]', + 'sm' => 'px-2 py-0.5 text-xs', + 'md' => 'px-2.5 py-0.5 text-sm', 'lg' => 'px-3 py-1 text-sm', ]; $iconSizes = [ 'xs' => 'size-2.5', 'sm' => 'size-3', - 'md' => 'size-3', - 'lg' => 'size-3.5', + 'md' => 'size-3.5', + 'lg' => 'size-4', ]; $dotSizes = [ @@ -72,7 +72,7 @@ @endif @if($icon) - + @endif {{ $slot }} diff --git a/extensions/Servers/Proxmox/views/components/ui/button.blade.php b/extensions/Servers/Proxmox/views/components/ui/button.blade.php index 86bf21605..90a73c32a 100644 --- a/extensions/Servers/Proxmox/views/components/ui/button.blade.php +++ b/extensions/Servers/Proxmox/views/components/ui/button.blade.php @@ -1,5 +1,5 @@ {{-- - Button Component - shadcn-inspired + Button Component - TailAdmin Theme Usage: Click me @@ -24,36 +24,36 @@ @php $tag = $href ? 'a' : 'button'; - $baseClasses = 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50'; + $baseClasses = 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg font-medium transition-colors focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-brand-500/10 disabled:pointer-events-none disabled:opacity-50'; $variantClasses = [ - 'primary' => 'bg-primary text-primary-foreground shadow hover:bg-primary/90', - 'secondary' => 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80', - 'outline' => 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground', - 'ghost' => 'hover:bg-accent hover:text-accent-foreground', - 'danger' => 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90', - 'success' => 'bg-success text-white shadow-sm hover:bg-success/90', - 'warning' => 'bg-warning text-white shadow-sm hover:bg-warning/90', - 'info' => 'bg-info text-white shadow-sm hover:bg-info/90', - 'link' => 'text-primary underline-offset-4 hover:underline', + 'primary' => 'bg-brand-500 text-white shadow-theme-xs hover:bg-brand-600', + 'secondary' => 'bg-white text-gray-700 shadow-theme-xs ring-1 ring-gray-300 hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-400 dark:ring-gray-700 dark:hover:bg-white/[0.03]', + 'outline' => 'border border-gray-300 bg-white shadow-theme-xs hover:bg-gray-50 hover:text-gray-800 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-white/[0.03] dark:hover:text-gray-200', + 'ghost' => 'hover:bg-gray-100 hover:text-gray-700 dark:hover:bg-white/5 dark:hover:text-gray-300', + 'danger' => 'bg-error-500 text-white shadow-theme-xs hover:bg-error-600', + 'success' => 'bg-success-500 text-white shadow-theme-xs hover:bg-success-600', + 'warning' => 'bg-warning-500 text-white shadow-theme-xs hover:bg-warning-600', + 'info' => 'bg-blue-light-500 text-white shadow-theme-xs hover:bg-blue-light-600', + 'link' => 'text-brand-500 hover:text-brand-600 hover:underline underline-offset-4', ]; $sizeClasses = [ - 'xs' => 'h-7 px-2 text-xs', - 'sm' => 'h-8 px-3 text-xs', - 'md' => 'h-9 px-4 py-2', - 'lg' => 'h-10 px-8', - 'xl' => 'h-11 px-10 text-base', - 'icon' => 'h-9 w-9', + 'xs' => 'h-8 px-2.5 text-xs', + 'sm' => 'h-9 px-3 text-sm', + 'md' => 'h-10 px-4 text-sm', + 'lg' => 'h-11 px-5 text-sm', + 'xl' => 'h-12 px-6 text-base', + 'icon' => 'h-10 w-10', ]; $iconSizes = [ - 'xs' => 'size-3', - 'sm' => 'size-3.5', + 'xs' => 'size-3.5', + 'sm' => 'size-4', 'md' => 'size-4', - 'lg' => 'size-4', + 'lg' => 'size-5', 'xl' => 'size-5', - 'icon' => 'size-4', + 'icon' => 'size-5', ]; $classes = collect([ @@ -80,11 +80,11 @@ {{ $loadingText ?? $slot }} @else @if($icon) - + @endif {{ $slot }} @if($iconRight) - + @endif @endif diff --git a/extensions/Servers/Proxmox/views/components/ui/card.blade.php b/extensions/Servers/Proxmox/views/components/ui/card.blade.php index 93c6634d2..5dfaa6821 100644 --- a/extensions/Servers/Proxmox/views/components/ui/card.blade.php +++ b/extensions/Servers/Proxmox/views/components/ui/card.blade.php @@ -1,5 +1,5 @@ {{-- - Card Component - shadcn-inspired + Card Component - TailAdmin Theme Usage: Content @@ -11,7 +11,7 @@ 'title' => null, 'subtitle' => null, 'icon' => null, - 'iconColor' => 'text-primary', + 'iconColor' => 'text-brand-500', 'actions' => null, 'footer' => null, 'footerClass' => '', @@ -24,8 +24,8 @@
class([ - 'rounded-xl border bg-card shadow-sm', - 'hover:bg-accent/50 transition-colors duration-150' => $hover || $clickable, + 'rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]', + 'hover:shadow-theme-md transition-shadow duration-200' => $hover || $clickable, 'cursor-pointer' => $clickable, ]) }} @if($collapsible) @@ -33,19 +33,19 @@ @endif > @if($title || $actions) -
+
@if($icon) -
- +
+
@endif -
+
@if($title) -

{{ $title }}

+

{{ $title }}

@endif @if($subtitle) -

{{ $subtitle }}

+

{{ $subtitle }}

@endif
@@ -58,10 +58,10 @@ @@ -73,15 +73,15 @@
$title, + 'border-t border-gray-100 dark:border-gray-800' => $title, + 'p-5 sm:p-6', ]) @if($collapsible) x-show="!isCollapsed" - 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" @endif @@ -90,7 +90,7 @@
@if($footer) -
+
{{ $footer }}
@endif diff --git a/extensions/Servers/Proxmox/views/components/ui/dropdown.blade.php b/extensions/Servers/Proxmox/views/components/ui/dropdown.blade.php index 726fd5cc7..1c7635dfe 100644 --- a/extensions/Servers/Proxmox/views/components/ui/dropdown.blade.php +++ b/extensions/Servers/Proxmox/views/components/ui/dropdown.blade.php @@ -1,5 +1,5 @@ {{-- - Dropdown Component - shadcn-style + Dropdown Component - TailAdmin style Usage: @@ -44,17 +44,17 @@