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

@@ -19,12 +19,12 @@
@php
$inputId = $id ?? $name ?? Str::random(8);
// AdminLTE size classes
// LucentUI size classes
$sizeClasses = match($size) {
'sm' => 'lte-form-control-sm',
'md' => '',
'lg' => 'lte-form-control-lg',
default => '',
'sm' => 'px-2.5 py-1.5 text-sm',
'md' => 'px-3 py-2 text-sm',
'lg' => 'px-4 py-2.5 text-base',
default => 'px-3 py-2 text-sm',
};
$iconSizeClasses = match($size) {
@@ -34,35 +34,38 @@
default => 'size-4',
};
// AdminLTE input classes
$inputClasses = "lte-form-control $sizeClasses";
// LucentUI input classes
$inputClasses = "w-full bg-background border border-neutral rounded-lg text-base placeholder:text-base/50 focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary transition-all duration-200 $sizeClasses";
if ($error) {
$inputClasses .= ' is-invalid';
$inputClasses .= ' border-error focus:ring-error/50 focus:border-error';
}
if ($disabled) {
$inputClasses .= ' opacity-50 cursor-not-allowed';
}
@endphp
<div {{ $attributes->only('class')->merge(['class' => 'mb-3']) }}>
{{-- Label --}}
@if($label)
<label for="{{ $inputId }}" class="form-label" style="display: block; margin-bottom: 0.5rem; font-weight: 500;">
<label for="{{ $inputId }}" class="block mb-2 font-medium text-sm text-base">
{{ $label }}
@if($required)
<span class="lte-text-danger">*</span>
<span class="text-error">*</span>
@endif
</label>
@endif
{{-- Input wrapper --}}
@if($icon || $prefix || $suffix)
<div class="lte-input-group">
<div class="flex items-stretch">
{{-- Left icon/prefix --}}
@if($icon && $iconPosition === 'left')
<span class="lte-input-group-text">
<span class="inline-flex items-center px-3 bg-background-secondary border border-r-0 border-neutral rounded-l-lg text-base/60">
<x-dynamic-component :component="$icon" class="{{ $iconSizeClasses }}" />
</span>
@endif
@if($prefix)
<span class="lte-input-group-text">{{ $prefix }}</span>
<span class="inline-flex items-center px-3 bg-background-secondary border border-r-0 border-neutral {{ ($icon && $iconPosition === 'left') ? '' : 'rounded-l-lg' }} text-base/60 text-sm">{{ $prefix }}</span>
@endif
{{-- Input --}}
@@ -74,17 +77,17 @@
@if($required) required @endif
@if($disabled) disabled @endif
@if($readonly) readonly @endif
{{ $attributes->except('class')->merge(['class' => $inputClasses]) }}
{{ $attributes->except('class')->merge(['class' => $inputClasses . ' rounded-none ' . ((!$icon || $iconPosition !== 'left') && !$prefix ? 'rounded-l-lg' : '') . ' ' . ((!$icon || $iconPosition !== 'right') && !$suffix ? 'rounded-r-lg' : '')]) }}
>
{{-- Right icon/suffix --}}
@if($icon && $iconPosition === 'right')
<span class="lte-input-group-text">
<span class="inline-flex items-center px-3 bg-background-secondary border border-l-0 border-neutral rounded-r-lg text-base/60">
<x-dynamic-component :component="$icon" class="{{ $iconSizeClasses }}" />
</span>
@endif
@if($suffix)
<span class="lte-input-group-text">{{ $suffix }}</span>
<span class="inline-flex items-center px-3 bg-background-secondary border border-l-0 border-neutral {{ ($icon && $iconPosition === 'right') ? '' : 'rounded-r-lg' }} text-base/60 text-sm">{{ $suffix }}</span>
@endif
</div>
@else
@@ -103,12 +106,12 @@
{{-- Hint text --}}
@if($hint && !$error)
<small class="lte-text-muted" style="display: block; margin-top: 0.25rem;">{{ $hint }}</small>
<small class="block mt-1 text-xs text-base/60">{{ $hint }}</small>
@endif
{{-- Error message --}}
@if($error)
<div class="invalid-feedback" style="display: flex; align-items: center; gap: 0.25rem; margin-top: 0.25rem; color: var(--lte-danger);">
<div class="flex items-center gap-1 mt-1 text-sm text-error">
<x-ri-error-warning-line class="size-3.5" />
{{ $error }}
</div>