From abff5a381fceba33ba7156063ae456b5a7d3bdbf Mon Sep 17 00:00:00 2001 From: "Joseph.Rawlings" Date: Sun, 1 Feb 2026 14:16:57 -0500 Subject: [PATCH] Migrate UI components from AdminLTE to LucentUI Theme using Tailwind CSS - Updated tab-panel component to use Tailwind for styling and transitions. - Refactored table-row component to implement Tailwind classes for hover effects and borders. - Converted table-td component to utilize Tailwind for alignment and text styles. - Changed table-th component to apply Tailwind for header styling and sorting indicators. - Revised table component to adopt Tailwind for layout, borders, and responsive design. - Enhanced tabs component with Tailwind for navigation styles and transitions. - Updated toggle component to use Tailwind for switch styles and accessibility. - Refactored tooltip component to implement Tailwind for positioning and styling. - Added visual enhancements to app.css for improved UI interactions and animations. --- .../Proxmox/views/components/alert.blade.php | 32 +- .../Proxmox/views/components/badge.blade.php | 96 +++--- .../Proxmox/views/components/button.blade.php | 77 +++-- .../Proxmox/views/components/card.blade.php | 37 ++- .../Proxmox/views/components/input.blade.php | 39 +-- .../views/components/progress.blade.php | 61 ++-- .../Proxmox/views/components/table.blade.php | 41 +-- .../components/ui/action-button.blade.php | 151 ++------- .../components/ui/action-toolbar.blade.php | 18 +- .../views/components/ui/alert.blade.php | 52 ++-- .../components/ui/allocation-card.blade.php | 190 ++---------- .../views/components/ui/badge.blade.php | 39 ++- .../views/components/ui/button.blade.php | 52 ++-- .../views/components/ui/card.blade.php | 39 ++- .../components/ui/confirm-dialog.blade.php | 159 ++-------- .../views/components/ui/copy-button.blade.php | 47 +-- .../views/components/ui/copyable.blade.php | 102 +------ .../components/ui/dropdown-divider.blade.php | 17 +- .../components/ui/dropdown-item.blade.php | 85 ++---- .../views/components/ui/dropdown.blade.php | 57 +--- .../components/ui/editable-field.blade.php | 287 ++---------------- .../views/components/ui/empty-state.blade.php | 106 +------ .../views/components/ui/icon-picker.blade.php | 76 ++--- .../views/components/ui/index.blade.php | 57 ++-- .../views/components/ui/info-row.blade.php | 97 +----- .../views/components/ui/input.blade.php | 36 ++- .../views/components/ui/modal.blade.php | 28 +- .../views/components/ui/progress.blade.php | 38 +-- .../components/ui/resource-gauge.blade.php | 142 ++------- .../views/components/ui/select.blade.php | 123 ++------ .../components/ui/server-status.blade.php | 127 +++----- .../views/components/ui/spinner.blade.php | 51 ++-- .../views/components/ui/stat-card.blade.php | 77 ++--- .../views/components/ui/tab-panel.blade.php | 35 +-- .../views/components/ui/table-row.blade.php | 37 +-- .../views/components/ui/table-td.blade.php | 57 +--- .../views/components/ui/table-th.blade.php | 75 ++--- .../views/components/ui/table.blade.php | 111 +------ .../views/components/ui/tabs.blade.php | 192 ++---------- .../views/components/ui/toggle.blade.php | 113 +------ .../views/components/ui/tooltip.blade.php | 45 +-- themes/lucentui/css/app.css | 187 ++++++++++++ 42 files changed, 1061 insertions(+), 2427 deletions(-) diff --git a/extensions/Servers/Proxmox/views/components/alert.blade.php b/extensions/Servers/Proxmox/views/components/alert.blade.php index 24a3baebb..98fafb821 100644 --- a/extensions/Servers/Proxmox/views/components/alert.blade.php +++ b/extensions/Servers/Proxmox/views/components/alert.blade.php @@ -11,15 +11,29 @@ ]) @php - // AdminLTE variant classes + // LucentUI Tailwind variant classes $variantClasses = match($variant) { - 'success' => $callout ? 'lte-callout lte-callout-success' : 'lte-alert lte-alert-success', - 'danger', 'error' => $callout ? 'lte-callout lte-callout-danger' : 'lte-alert lte-alert-danger', - 'warning' => $callout ? 'lte-callout lte-callout-warning' : 'lte-alert lte-alert-warning', - 'info' => $callout ? 'lte-callout lte-callout-info' : 'lte-alert lte-alert-info', - 'primary' => $callout ? 'lte-callout lte-callout-primary' : 'lte-alert lte-alert-primary', - 'neutral' => $callout ? 'lte-callout' : 'lte-alert', - default => $callout ? 'lte-callout lte-callout-info' : 'lte-alert lte-alert-info', + 'success' => $callout + ? 'border-l-4 border-l-success bg-success/5 text-success' + : 'bg-success/10 border border-success/30 text-success', + 'danger', 'error' => $callout + ? 'border-l-4 border-l-error bg-error/5 text-error' + : 'bg-error/10 border border-error/30 text-error', + 'warning' => $callout + ? 'border-l-4 border-l-warning bg-warning/5 text-warning' + : 'bg-warning/10 border border-warning/30 text-warning', + 'info' => $callout + ? 'border-l-4 border-l-info bg-info/5 text-info' + : 'bg-info/10 border border-info/30 text-info', + 'primary' => $callout + ? 'border-l-4 border-l-primary bg-primary/5 text-primary' + : 'bg-primary/10 border border-primary/30 text-primary', + 'neutral' => $callout + ? 'border-l-4 border-l-neutral bg-background-secondary text-base/80' + : 'bg-background-secondary border border-neutral text-base/80', + default => $callout + ? 'border-l-4 border-l-info bg-info/5 text-info' + : 'bg-info/10 border border-info/30 text-info', }; // Default icons per variant @@ -34,7 +48,7 @@ }; $alertIcon = $icon ?? $defaultIcon; - $baseClasses = "$variantClasses lte-fade-in"; + $baseClasses = "relative p-4 rounded-lg transition-all duration-300 $variantClasses"; @endphp
'padding: 0.2em 0.5em; font-size: 0.65em;', - 'sm' => 'padding: 0.25em 0.55em; font-size: 0.7em;', - 'md' => '', - 'lg' => 'padding: 0.4em 0.75em; font-size: 0.85em;', - default => '', + // Size classes + $sizeClasses = match($size) { + 'xs' => 'px-1.5 py-0.5 text-[10px]', + 'sm' => 'px-2 py-0.5 text-xs', + 'md' => 'px-2.5 py-1 text-xs', + 'lg' => 'px-3 py-1.5 text-sm', + default => 'px-2.5 py-1 text-xs', }; // Icon size classes @@ -41,47 +41,61 @@ default => 'size-2', }; - // AdminLTE variant classes + // Variant classes - LucentUI Tailwind $variantClasses = match($variant) { - 'success' => 'lte-badge-success', - 'danger' => 'lte-badge-danger', - 'warning' => 'lte-badge-warning', - 'info' => 'lte-badge-info', - 'primary' => 'lte-badge-primary', - 'secondary' => 'lte-badge-secondary', - 'neutral' => 'lte-badge-light', - default => 'lte-badge-secondary', + 'success' => $outline + ? 'border border-success text-success bg-transparent' + : 'bg-success/20 text-success', + 'danger' => $outline + ? 'border border-error text-error bg-transparent' + : 'bg-error/20 text-error', + 'warning' => $outline + ? 'border border-warning text-warning bg-transparent' + : 'bg-warning/20 text-warning', + 'info' => $outline + ? 'border border-info text-info bg-transparent' + : 'bg-info/20 text-info', + 'primary' => $outline + ? 'border border-primary text-primary bg-transparent' + : 'bg-primary/20 text-primary', + 'secondary' => $outline + ? 'border border-neutral text-base/70 bg-transparent' + : 'bg-neutral/20 text-base/70', + 'neutral' => $outline + ? 'border border-neutral/50 text-base/60 bg-transparent' + : 'bg-neutral/10 text-base/60', + default => $outline + ? 'border border-neutral text-base/70 bg-transparent' + : 'bg-neutral/20 text-base/70', }; - // Dot color classes - AdminLTE colors + // Dot color classes $dotColorClasses = match($variant) { - 'success' => 'lte-bg-success', - 'danger' => 'lte-bg-danger', - 'warning' => 'lte-bg-warning', - 'info' => 'lte-bg-info', - 'primary' => 'lte-bg-primary', - 'secondary' => 'lte-bg-secondary', - 'neutral' => 'lte-bg-light', - default => 'lte-bg-secondary', + 'success' => 'bg-success', + 'danger' => 'bg-error', + 'warning' => 'bg-warning', + 'info' => 'bg-info', + 'primary' => 'bg-primary', + 'secondary' => 'bg-neutral', + 'neutral' => 'bg-neutral/50', + default => 'bg-neutral', + }; + + // Border radius + $roundedClasses = match($rounded) { + 'none' => 'rounded-none', + 'sm' => 'rounded-sm', + 'md' => 'rounded-md', + 'lg' => 'rounded-lg', + 'full' => 'rounded-full', + default => 'rounded-full', }; // Combined classes - $classes = "$baseClasses $variantClasses"; - - // Border radius style - $borderRadius = match($rounded) { - 'none' => 'border-radius: 0;', - 'sm' => 'border-radius: 0.125rem;', - 'md' => 'border-radius: 0.25rem;', - 'lg' => 'border-radius: 0.375rem;', - 'full' => 'border-radius: 9999px;', - default => 'border-radius: 9999px;', - }; - - $styles = trim("$sizeStyles $borderRadius"); + $classes = "$baseClasses $sizeClasses $variantClasses $roundedClasses"; @endphp -merge(['class' => $classes]) }} @if($styles) style="{{ $styles }}" @endif> +merge(['class' => $classes]) }}> {{-- Dot indicator --}} @if($dot) diff --git a/extensions/Servers/Proxmox/views/components/button.blade.php b/extensions/Servers/Proxmox/views/components/button.blade.php index caa90c1a7..202c47d32 100644 --- a/extensions/Servers/Proxmox/views/components/button.blade.php +++ b/extensions/Servers/Proxmox/views/components/button.blade.php @@ -14,17 +14,17 @@ ]) @php - // AdminLTE button base class - $baseClasses = 'lte-btn'; + // LucentUI button base classes + $baseClasses = 'inline-flex items-center justify-center gap-2 font-semibold transition-all duration-200 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 active:scale-95'; - // Size classes - AdminLTE style + // Size classes $sizeClasses = match($size) { - 'xs' => 'lte-btn-sm', - 'sm' => 'lte-btn-sm', - 'md' => '', - 'lg' => 'lte-btn-lg', - 'xl' => 'lte-btn-lg', - default => '', + 'xs' => 'px-2 py-1 text-xs', + 'sm' => 'px-3 py-1.5 text-sm', + 'md' => 'px-4 py-2 text-sm', + 'lg' => 'px-5 py-2.5 text-base', + 'xl' => 'px-6 py-3 text-base', + default => 'px-4 py-2 text-sm', }; // Icon size classes @@ -37,43 +37,66 @@ default => 'size-4', }; - // Variant classes - AdminLTE style + // Variant classes - LucentUI Tailwind $variantClasses = match($variant) { - 'primary' => $outline ? 'lte-btn-outline-primary' : 'lte-btn-primary', - 'secondary' => $outline ? 'lte-btn-outline-secondary' : 'lte-btn-secondary', - 'success' => $outline ? 'lte-btn-outline-success' : 'lte-btn-success', - 'danger' => $outline ? 'lte-btn-outline-danger' : 'lte-btn-danger', - 'warning' => 'lte-btn-warning', - 'info' => 'lte-btn-info', - 'ghost' => 'lte-btn-outline-secondary', - 'link' => 'lte-text-primary', - 'neutral' => $outline ? 'lte-btn-outline-secondary' : 'lte-btn-secondary', - default => $outline ? 'lte-btn-outline-primary' : 'lte-btn-primary', + 'primary' => $outline + ? 'border border-primary text-primary bg-transparent hover:bg-primary/10 focus:ring-2 focus:ring-primary/50' + : 'bg-primary text-white hover:bg-primary/80 focus:ring-2 focus:ring-primary/50', + 'secondary' => $outline + ? 'border border-neutral text-base/80 bg-transparent hover:bg-neutral/10 focus:ring-2 focus:ring-neutral/50' + : 'bg-background-secondary text-base/80 border border-neutral hover:bg-background-secondary/80 focus:ring-2 focus:ring-neutral/50', + 'success' => $outline + ? 'border border-success text-success bg-transparent hover:bg-success/10 focus:ring-2 focus:ring-success/50' + : 'bg-success text-white hover:bg-success/80 focus:ring-2 focus:ring-success/50', + 'danger' => $outline + ? 'border border-error text-error bg-transparent hover:bg-error/10 focus:ring-2 focus:ring-error/50' + : 'bg-error text-white hover:bg-error/80 focus:ring-2 focus:ring-error/50', + 'warning' => $outline + ? 'border border-warning text-warning bg-transparent hover:bg-warning/10 focus:ring-2 focus:ring-warning/50' + : 'bg-warning text-white hover:bg-warning/80 focus:ring-2 focus:ring-warning/50', + 'info' => $outline + ? 'border border-info text-info bg-transparent hover:bg-info/10 focus:ring-2 focus:ring-info/50' + : 'bg-info text-white hover:bg-info/80 focus:ring-2 focus:ring-info/50', + 'ghost' => 'text-base/80 bg-transparent hover:bg-neutral/10 focus:ring-2 focus:ring-neutral/50', + 'link' => 'text-primary bg-transparent hover:underline p-0', + 'neutral' => $outline + ? 'border border-neutral text-base/70 bg-transparent hover:bg-neutral/10 focus:ring-2 focus:ring-neutral/50' + : 'bg-neutral/20 text-base/80 hover:bg-neutral/30 focus:ring-2 focus:ring-neutral/50', + default => $outline + ? 'border border-primary text-primary bg-transparent hover:bg-primary/10 focus:ring-2 focus:ring-primary/50' + : 'bg-primary text-white hover:bg-primary/80 focus:ring-2 focus:ring-primary/50', }; // Full width $widthClasses = $fullWidth ? 'w-full' : ''; - // Combined classes - $classes = trim("$baseClasses $sizeClasses $variantClasses $widthClasses"); + // Border radius + $roundedClasses = match($rounded) { + 'none' => 'rounded-none', + 'sm' => 'rounded-sm', + 'md' => 'rounded-md', + 'lg' => 'rounded-lg', + 'xl' => 'rounded-xl', + 'full' => 'rounded-full', + default => 'rounded-lg', + }; - // Determine tag - $tag = $href ? 'a' : 'button'; + // Combined classes + $classes = trim("$baseClasses $sizeClasses $variantClasses $widthClasses $roundedClasses"); @endphp @if($href) - merge(['class' => $classes]) }} style="border-radius: 0.375rem;"> + merge(['class' => $classes]) }}> @else