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:
@@ -1,5 +1,5 @@
|
||||
{{--
|
||||
Select Component - TailAdmin style
|
||||
Select Component - AdminLTE style
|
||||
|
||||
Usage:
|
||||
<x-proxmox::ui.select name="country" label="Country">
|
||||
@@ -19,49 +19,126 @@
|
||||
])
|
||||
|
||||
@php
|
||||
$sizeClasses = [
|
||||
'sm' => 'h-9 text-theme-xs py-2',
|
||||
'md' => 'h-11 text-theme-sm py-2.5',
|
||||
'lg' => 'h-12 text-base py-3',
|
||||
$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;',
|
||||
];
|
||||
$sizeClass = $sizeClasses[$size] ?? $sizeClasses['md'];
|
||||
|
||||
$selectClasses = 'block w-full appearance-none rounded-lg border bg-transparent px-4 pr-10 shadow-theme-xs transition-colors duration-150 placeholder:text-gray-400 focus:outline-none focus:ring-3 disabled:cursor-not-allowed disabled:bg-gray-50 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-gray-500 dark:disabled:bg-gray-800';
|
||||
|
||||
if ($error) {
|
||||
$selectClasses .= ' border-error-300 focus:border-error-300 focus:ring-error-500/10 dark:border-error-700';
|
||||
} else {
|
||||
$selectClasses .= ' border-gray-300 focus:border-brand-300 focus:ring-brand-500/10 dark:border-gray-700 dark:focus:border-brand-600';
|
||||
}
|
||||
$sizeStyle = $sizeStyles[$size] ?? $sizeStyles['md'];
|
||||
@endphp
|
||||
|
||||
<div {{ $attributes->only('class')->class(['space-y-2']) }}>
|
||||
<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']) }}>
|
||||
@if($label)
|
||||
<label @if($name) for="{{ $name }}" @endif class="text-theme-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
<label @if($name) for="{{ $name }}" @endif class="form-label-lte @if($required) form-label-lte-required @endif">
|
||||
{{ $label }}
|
||||
@if($required)
|
||||
<span class="text-error-500">*</span>
|
||||
@endif
|
||||
</label>
|
||||
@endif
|
||||
|
||||
<div class="relative">
|
||||
<div class="form-select-wrapper-lte">
|
||||
<select
|
||||
@if($name) name="{{ $name }}" id="{{ $name }}" @endif
|
||||
@if($disabled) disabled @endif
|
||||
@if($required) required @endif
|
||||
{{ $attributes->except('class')->class([$selectClasses, $sizeClass]) }}
|
||||
style="{{ $sizeStyle }}"
|
||||
{{ $attributes->except('class')->class(['form-select-lte', 'form-select-lte-error' => $error]) }}
|
||||
>
|
||||
{{ $slot }}
|
||||
</select>
|
||||
<div class="pointer-events-none absolute inset-y-0 end-0 flex items-center pe-4 text-gray-500 dark:text-gray-400">
|
||||
<div class="form-select-icon-lte">
|
||||
<x-ri-arrow-down-s-line class="size-5" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($error)
|
||||
<p class="text-theme-xs font-medium text-error-500">{{ $error }}</p>
|
||||
<p class="form-error-lte">{{ $error }}</p>
|
||||
@elseif($hint)
|
||||
<p class="text-theme-xs text-gray-500 dark:text-gray-400">{{ $hint }}</p>
|
||||
<p class="form-hint-lte">{{ $hint }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user