- Updated server card component to use new UI elements and improved layout. - Enhanced status display with badges and better status indicators. - Refined quick info row for server details with consistent styling. - Reorganized server configuration statistics into stat cards for clarity. - Improved help modals for statistics and storage management sections. - Streamlined alerts and warnings for better user experience. - Updated storage management view to utilize new UI components and improve readability.
68 lines
2.3 KiB
PHP
68 lines
2.3 KiB
PHP
{{--
|
|
Select Component - TailServer Theme
|
|
|
|
Usage:
|
|
<x-proxmox::ui.select name="country" label="Country">
|
|
<option value="us">United States</option>
|
|
<option value="uk">United Kingdom</option>
|
|
</x-proxmox::ui.select>
|
|
--}}
|
|
|
|
@props([
|
|
'name' => null,
|
|
'label' => null,
|
|
'error' => null,
|
|
'hint' => null,
|
|
'disabled' => false,
|
|
'required' => false,
|
|
'size' => 'md',
|
|
])
|
|
|
|
@php
|
|
$sizeClasses = [
|
|
'sm' => 'py-1.5 text-sm',
|
|
'md' => 'py-2 text-sm',
|
|
'lg' => 'py-2.5 text-base',
|
|
];
|
|
$sizeClass = $sizeClasses[$size] ?? $sizeClasses['md'];
|
|
|
|
$selectClasses = 'block w-full rounded-xl border bg-background px-3 leading-6 shadow-sm transition-all duration-200 focus:ring-2 focus:ring-offset-0 focus:shadow-md hover:border-neutral/50 hover:shadow appearance-none cursor-pointer';
|
|
|
|
if ($error) {
|
|
$selectClasses .= ' border-danger/50 focus:border-danger focus:ring-danger/25 focus:shadow-danger/10';
|
|
} else {
|
|
$selectClasses .= ' border-neutral/30 focus:border-primary focus:ring-primary/25 focus:shadow-primary/10';
|
|
}
|
|
@endphp
|
|
|
|
<div {{ $attributes->only('class')->class(['']) }}>
|
|
@if($label)
|
|
<label @if($name) for="{{ $name }}" @endif class="block text-sm font-medium text-base/80 mb-1.5">
|
|
{{ $label }}
|
|
@if($required)
|
|
<span class="text-danger">*</span>
|
|
@endif
|
|
</label>
|
|
@endif
|
|
|
|
<div class="relative group/select">
|
|
<select
|
|
@if($name) name="{{ $name }}" id="{{ $name }}" @endif
|
|
@if($disabled) disabled @endif
|
|
@if($required) required @endif
|
|
{{ $attributes->except('class')->class([$selectClasses, $sizeClass]) }}
|
|
>
|
|
{{ $slot }}
|
|
</select>
|
|
<div class="pointer-events-none absolute inset-y-0 end-0 flex items-center pe-3 text-base/40 transition-all duration-200 group-focus-within/select:text-primary group-hover/select:text-base/60">
|
|
<x-ri-arrow-down-s-line class="size-5 transition-transform duration-200 group-focus-within/select:rotate-180" />
|
|
</div>
|
|
</div>
|
|
|
|
@if($error)
|
|
<p class="mt-1.5 text-xs text-danger">{{ $error }}</p>
|
|
@elseif($hint)
|
|
<p class="mt-1.5 text-xs text-base/50">{{ $hint }}</p>
|
|
@endif
|
|
</div>
|