{{-- Input Component - TailServer Theme Usage: --}} @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
only('class')->class(['']) }}> @if($label) @endif
@if($icon)
@endif except('class')->class([$inputClasses, $sizeClass]) }} /> @if($iconRight)
@endif
@if($error)

{{ $error }}

@elseif($hint)

{{ $hint }}

@endif