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:
@@ -1,6 +1,6 @@
|
||||
{{--
|
||||
Input Component - AdminLTE Theme
|
||||
Based on AdminLTE v4 Form Control styling patterns
|
||||
Input Component - LucentUI Theme
|
||||
Migrated from AdminLTE to Tailwind
|
||||
|
||||
Usage:
|
||||
<x-proxmox::ui.input name="email" label="Email" />
|
||||
@@ -25,27 +25,31 @@
|
||||
|
||||
@php
|
||||
$sizeClasses = [
|
||||
'sm' => 'lte-form-control-sm',
|
||||
'md' => '',
|
||||
'lg' => 'lte-form-control-lg',
|
||||
'sm' => 'h-8 text-xs',
|
||||
'md' => 'h-10',
|
||||
'lg' => 'h-12 text-base',
|
||||
];
|
||||
$sizeClass = $sizeClasses[$size] ?? '';
|
||||
$sizeClass = $sizeClasses[$size] ?? $sizeClasses['md'];
|
||||
|
||||
$inputClasses = 'w-full px-4 py-2 text-sm text-primary dark:text-gray-100 bg-background dark:bg-gray-900 border border-neutral dark:border-gray-600 rounded-lg placeholder:text-secondary/50 dark:placeholder:text-gray-500 focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/25 transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed';
|
||||
|
||||
$errorClasses = $error ? 'border-error focus:border-error focus:ring-error/25' : '';
|
||||
@endphp
|
||||
|
||||
<div {{ $attributes->only('class')->class(['mb-3']) }}>
|
||||
@if($label)
|
||||
<label @if($name) for="{{ $name }}" @endif class="form-label" style="margin-bottom: 0.5rem; display: block; font-weight: 500;">
|
||||
<label @if($name) for="{{ $name }}" @endif class="block mb-2 font-medium text-sm text-secondary dark:text-gray-300">
|
||||
{{ $label }}
|
||||
@if($required)
|
||||
<span class="lte-text-danger">*</span>
|
||||
<span class="text-error">*</span>
|
||||
@endif
|
||||
</label>
|
||||
@endif
|
||||
|
||||
@if($icon || $iconRight)
|
||||
<div class="lte-input-group">
|
||||
<div class="relative flex items-stretch">
|
||||
@if($icon)
|
||||
<span class="lte-input-group-text">
|
||||
<span class="flex items-center px-3 bg-background-secondary dark:bg-gray-800 border border-r-0 border-neutral dark:border-gray-600 rounded-l-lg text-secondary dark:text-gray-400">
|
||||
<x-dynamic-component :component="$icon" class="size-4" />
|
||||
</span>
|
||||
@endif
|
||||
@@ -57,11 +61,12 @@
|
||||
@if($disabled) disabled @endif
|
||||
@if($readonly) readonly @endif
|
||||
@if($required) required @endif
|
||||
{{ $attributes->except('class')->class(['lte-form-control', $sizeClass, 'is-invalid' => $error]) }}
|
||||
class="{{ $inputClasses }} {{ $sizeClass }} {{ $errorClasses }} {{ $icon ? 'rounded-l-none' : '' }} {{ $iconRight ? 'rounded-r-none' : '' }}"
|
||||
{{ $attributes->except('class') }}
|
||||
/>
|
||||
|
||||
@if($iconRight)
|
||||
<span class="lte-input-group-text">
|
||||
<span class="flex items-center px-3 bg-background-secondary dark:bg-gray-800 border border-l-0 border-neutral dark:border-gray-600 rounded-r-lg text-secondary dark:text-gray-400">
|
||||
<x-dynamic-component :component="$iconRight" class="size-4" />
|
||||
</span>
|
||||
@endif
|
||||
@@ -74,13 +79,14 @@
|
||||
@if($disabled) disabled @endif
|
||||
@if($readonly) readonly @endif
|
||||
@if($required) required @endif
|
||||
{{ $attributes->except('class')->class(['lte-form-control', $sizeClass, 'is-invalid' => $error]) }}
|
||||
class="{{ $inputClasses }} {{ $sizeClass }} {{ $errorClasses }}"
|
||||
{{ $attributes->except('class') }}
|
||||
/>
|
||||
@endif
|
||||
|
||||
@if($error)
|
||||
<div class="invalid-feedback" style="display: block; color: var(--lte-danger); font-size: 0.875rem; margin-top: 0.25rem;">{{ $error }}</div>
|
||||
<div class="mt-1 text-sm text-error">{{ $error }}</div>
|
||||
@elseif($hint)
|
||||
<div class="form-text lte-text-muted" style="font-size: 0.875rem; margin-top: 0.25rem;">{{ $hint }}</div>
|
||||
<div class="mt-1 text-sm text-secondary dark:text-gray-400">{{ $hint }}</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user