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:
@@ -11,16 +11,16 @@
|
||||
])
|
||||
|
||||
@php
|
||||
// AdminLTE badge base class
|
||||
$baseClasses = 'lte-badge';
|
||||
// LucentUI badge base classes
|
||||
$baseClasses = 'inline-flex items-center gap-1.5 font-semibold transition-all duration-200';
|
||||
|
||||
// Size classes - inline style adjustments
|
||||
$sizeStyles = match($size) {
|
||||
'xs' => '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
|
||||
|
||||
<span {{ $attributes->merge(['class' => $classes]) }} @if($styles) style="{{ $styles }}" @endif>
|
||||
<span {{ $attributes->merge(['class' => $classes]) }}>
|
||||
{{-- Dot indicator --}}
|
||||
@if($dot)
|
||||
<span class="{{ $dotSizeClasses }} {{ $dotColorClasses }} rounded-full {{ $pulse ? 'animate-pulse' : '' }}"></span>
|
||||
|
||||
Reference in New Issue
Block a user