- 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.
94 lines
3.1 KiB
PHP
94 lines
3.1 KiB
PHP
{{--
|
|
Input Component - TailServer Theme
|
|
|
|
Usage:
|
|
<x-proxmox::ui.input name="email" label="Email" />
|
|
<x-proxmox::ui.input name="search" placeholder="Search..." icon="ri-search-line" />
|
|
<x-proxmox::ui.input name="password" type="password" label="Password" error="Password is required" />
|
|
--}}
|
|
|
|
@props([
|
|
'type' => 'text',
|
|
'name' => null,
|
|
'label' => null,
|
|
'placeholder' => null,
|
|
'icon' => null,
|
|
'iconRight' => null,
|
|
'error' => null,
|
|
'hint' => null,
|
|
'disabled' => false,
|
|
'readonly' => 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'];
|
|
|
|
$inputClasses = 'block w-full rounded-xl border bg-background leading-6 placeholder-base/40 shadow-sm transition-all duration-200 focus:ring-2 focus:ring-offset-0 focus:shadow-md hover:border-neutral/50 hover:shadow';
|
|
|
|
if ($error) {
|
|
$inputClasses .= ' border-danger/50 focus:border-danger focus:ring-danger/25 focus:shadow-danger/10';
|
|
} else {
|
|
$inputClasses .= ' border-neutral/30 focus:border-primary focus:ring-primary/25 focus:shadow-primary/10';
|
|
}
|
|
|
|
if ($icon) {
|
|
$inputClasses .= ' ps-10';
|
|
} else {
|
|
$inputClasses .= ' ps-3';
|
|
}
|
|
|
|
if ($iconRight) {
|
|
$inputClasses .= ' pe-10';
|
|
} else {
|
|
$inputClasses .= ' pe-3';
|
|
}
|
|
@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/input">
|
|
@if($icon)
|
|
<div class="pointer-events-none absolute inset-y-0 start-0 flex items-center ps-3 text-base/40 transition-colors duration-200 group-focus-within/input:text-primary">
|
|
<x-dynamic-component :component="$icon" class="size-5" />
|
|
</div>
|
|
@endif
|
|
|
|
<input
|
|
type="{{ $type }}"
|
|
@if($name) name="{{ $name }}" id="{{ $name }}" @endif
|
|
@if($placeholder) placeholder="{{ $placeholder }}" @endif
|
|
@if($disabled) disabled @endif
|
|
@if($readonly) readonly @endif
|
|
@if($required) required @endif
|
|
{{ $attributes->except('class')->class([$inputClasses, $sizeClass]) }}
|
|
/>
|
|
|
|
@if($iconRight)
|
|
<div class="pointer-events-none absolute inset-y-0 end-0 flex items-center pe-3 text-base/40 transition-colors duration-200 group-focus-within/input:text-primary">
|
|
<x-dynamic-component :component="$iconRight" class="size-5" />
|
|
</div>
|
|
@endif
|
|
</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>
|