Add AdminLTE-style CSS framework to app.css

- Introduced AdminLTE CSS variables for color palette, body colors, card styles, and button styles.
- Implemented card components with variants for primary, success, warning, danger, and info.
- Added button styles including sizes and outline variants.
- Created form controls, select inputs, and input groups with consistent styling.
- Included utility classes for text and background colors, gradients, and shadows.
- Developed components for badges, alerts, callouts, progress bars, tables, small boxes, and info boxes.
- Integrated modal, dropdown, spinner, tooltip, and direct chat styles.
- Established timeline and close button styles, with dark mode support for specific components.
This commit is contained in:
2025-12-17 13:45:56 -05:00
parent 3219d4d7f3
commit 760cf84451
52 changed files with 4525 additions and 1537 deletions

View File

@@ -1,5 +1,6 @@
{{--
Button Component - TailAdmin Theme
Button Component - AdminLTE Theme
Based on AdminLTE v4 Button styling patterns
Usage:
<x-proxmox::ui.button>Click me</x-proxmox::ui.button>
@@ -19,32 +20,31 @@
'href' => null,
'type' => 'button',
'full' => false,
'outline' => false,
])
@php
$tag = $href ? 'a' : 'button';
$baseClasses = 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg font-medium transition-colors focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-brand-500/10 disabled:pointer-events-none disabled:opacity-50';
// AdminLTE button classes
$variantClasses = [
'primary' => 'bg-brand-500 text-white shadow-theme-xs hover:bg-brand-600',
'secondary' => 'bg-white text-gray-700 shadow-theme-xs ring-1 ring-gray-300 hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-400 dark:ring-gray-700 dark:hover:bg-white/[0.03]',
'outline' => 'border border-gray-300 bg-white shadow-theme-xs hover:bg-gray-50 hover:text-gray-800 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-white/[0.03] dark:hover:text-gray-200',
'ghost' => 'hover:bg-gray-100 hover:text-gray-700 dark:hover:bg-white/5 dark:hover:text-gray-300',
'danger' => 'bg-error-500 text-white shadow-theme-xs hover:bg-error-600',
'success' => 'bg-success-500 text-white shadow-theme-xs hover:bg-success-600',
'warning' => 'bg-warning-500 text-white shadow-theme-xs hover:bg-warning-600',
'info' => 'bg-blue-light-500 text-white shadow-theme-xs hover:bg-blue-light-600',
'link' => 'text-brand-500 hover:text-brand-600 hover:underline underline-offset-4',
'primary' => $outline ? 'lte-btn-outline-primary' : 'lte-btn-primary',
'secondary' => $outline ? 'lte-btn-outline-secondary' : 'lte-btn-secondary',
'danger' => $outline ? 'lte-btn-outline-danger' : 'lte-btn-danger',
'success' => $outline ? 'lte-btn-outline-success' : 'lte-btn-success',
'warning' => 'lte-btn-warning',
'info' => 'lte-btn-info',
'ghost' => 'lte-btn-outline-secondary border-0',
'link' => 'lte-text-primary',
];
$sizeClasses = [
'xs' => 'h-8 px-2.5 text-xs',
'sm' => 'h-9 px-3 text-sm',
'md' => 'h-10 px-4 text-sm',
'lg' => 'h-11 px-5 text-sm',
'xl' => 'h-12 px-6 text-base',
'icon' => 'h-10 w-10',
'xs' => 'lte-btn-sm',
'sm' => 'lte-btn-sm',
'md' => '',
'lg' => 'lte-btn-lg',
'xl' => 'lte-btn-lg',
'icon' => 'lte-btn-sm',
];
$iconSizes = [
@@ -56,13 +56,6 @@
'icon' => 'size-5',
];
$classes = collect([
$baseClasses,
$variantClasses[$variant] ?? $variantClasses['secondary'],
$sizeClasses[$size] ?? $sizeClasses['md'],
$full ? 'w-full' : '',
])->filter()->join(' ');
$iconSize = $iconSizes[$size] ?? $iconSizes['md'];
@endphp
@@ -70,13 +63,15 @@
@if($href) href="{{ $href }}" @endif
@if($tag === 'button') type="{{ $type }}" @endif
@if($disabled || $loading) disabled @endif
{{ $attributes->class([$classes]) }}
{{ $attributes->class([
'lte-btn',
$variantClasses[$variant] ?? $variantClasses['secondary'],
$sizeClasses[$size] ?? '',
$full ? 'w-full' : '',
]) }}
>
@if($loading)
<svg class="animate-spin {{ $iconSize }}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
<span class="lte-spinner lte-spinner-sm me-2" role="status" aria-hidden="true"></span>
<span>{{ $loadingText ?? $slot }}</span>
@else
@if($icon)