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.
This commit is contained in:
2026-02-01 14:16:57 -05:00
parent fa0bc93c83
commit abff5a381f
42 changed files with 1061 additions and 2427 deletions

View File

@@ -1,5 +1,6 @@
{{--
Select Component - AdminLTE style
Select Component - LucentUI Theme
Migrated from AdminLTE to Tailwind
Usage:
<x-proxmox::ui.select name="country" label="Country">
@@ -19,126 +20,46 @@
])
@php
$sizeStyles = [
'sm' => 'height: 2.25rem; padding: 0.375rem 2.25rem 0.375rem 0.75rem; font-size: 0.8125rem;',
'md' => 'height: 2.625rem; padding: 0.5rem 2.5rem 0.5rem 1rem; font-size: 0.875rem;',
'lg' => 'height: 3rem; padding: 0.625rem 2.75rem 0.625rem 1rem; font-size: 1rem;',
$sizeClasses = [
'sm' => 'h-9 py-1.5 px-3 pr-9 text-xs',
'md' => 'h-10 py-2 px-4 pr-10 text-sm',
'lg' => 'h-12 py-2.5 px-4 pr-11 text-base',
];
$sizeStyle = $sizeStyles[$size] ?? $sizeStyles['md'];
$sizeClass = $sizeClasses[$size] ?? $sizeClasses['md'];
$baseClasses = 'block w-full appearance-none bg-background dark:bg-gray-900 border border-neutral dark:border-gray-600 rounded-lg shadow-sm text-primary dark:text-gray-100 transition-all duration-150 focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/25 disabled:bg-background-secondary dark:disabled:bg-gray-800 disabled:cursor-not-allowed disabled:opacity-65';
$errorClasses = $error ? 'border-error focus:border-error focus:ring-error/25' : '';
@endphp
<style>
.form-group-lte {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.form-label-lte {
font-size: 0.875rem;
font-weight: 500;
color: #495057;
}
.form-label-lte-required::after {
content: " *";
color: var(--lte-danger, #dc3545);
}
.form-select-wrapper-lte {
position: relative;
}
.form-select-lte {
display: block;
width: 100%;
appearance: none;
background-color: #fff;
border: 1px solid #ced4da;
border-radius: var(--lte-border-radius, 0.375rem);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075);
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
color: #212529;
}
.form-select-lte:focus {
border-color: #86b7fe;
outline: 0;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075), 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.form-select-lte:disabled {
background-color: #e9ecef;
cursor: not-allowed;
opacity: 0.65;
}
.form-select-lte-error {
border-color: var(--lte-danger, #dc3545);
}
.form-select-lte-error:focus {
border-color: var(--lte-danger, #dc3545);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075), 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}
.form-select-icon-lte {
position: absolute;
top: 50%;
right: 1rem;
transform: translateY(-50%);
pointer-events: none;
color: #6c757d;
}
.form-hint-lte {
font-size: 0.8125rem;
color: var(--lte-secondary, #6c757d);
}
.form-error-lte {
font-size: 0.8125rem;
font-weight: 500;
color: var(--lte-danger, #dc3545);
}
/* Dark mode */
.dark .form-label-lte {
color: #d1d5db;
}
.dark .form-select-lte {
background-color: #1f2937;
border-color: #374151;
color: #f3f4f6;
}
.dark .form-select-lte:focus {
border-color: var(--lte-primary, #0d6efd);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.dark .form-select-lte:disabled {
background-color: #374151;
}
.dark .form-select-icon-lte {
color: #9ca3af;
}
.dark .form-hint-lte {
color: #9ca3af;
}
</style>
<div {{ $attributes->only('class')->class(['form-group-lte']) }}>
<div {{ $attributes->only('class')->class(['flex flex-col gap-2']) }}>
@if($label)
<label @if($name) for="{{ $name }}" @endif class="form-label-lte @if($required) form-label-lte-required @endif">
<label @if($name) for="{{ $name }}" @endif class="text-sm font-medium text-secondary dark:text-gray-300">
{{ $label }}
@if($required)
<span class="text-error">*</span>
@endif
</label>
@endif
<div class="form-select-wrapper-lte">
<div class="relative">
<select
@if($name) name="{{ $name }}" id="{{ $name }}" @endif
@if($disabled) disabled @endif
@if($required) required @endif
style="{{ $sizeStyle }}"
{{ $attributes->except('class')->class(['form-select-lte', 'form-select-lte-error' => $error]) }}
class="{{ $baseClasses }} {{ $sizeClass }} {{ $errorClasses }}"
{{ $attributes->except('class') }}
>
{{ $slot }}
</select>
<div class="form-select-icon-lte">
<div class="absolute top-1/2 right-4 -translate-y-1/2 pointer-events-none text-secondary dark:text-gray-400">
<x-ri-arrow-down-s-line class="size-5" />
</div>
</div>
@if($error)
<p class="form-error-lte">{{ $error }}</p>
<p class="text-xs font-medium text-error">{{ $error }}</p>
@elseif($hint)
<p class="form-hint-lte">{{ $hint }}</p>
<p class="text-xs text-secondary dark:text-gray-400">{{ $hint }}</p>
@endif
</div>