@props([ 'type' => 'text', 'label' => null, 'help' => null, 'error' => null, 'size' => 'md', 'state' => null, 'floating' => false, 'id' => null, 'name' => null, 'value' => null, 'placeholder' => null, 'required' => false, 'disabled' => false, 'autocomplete' => null, 'min' => null, ]) @php $inputClass = trim(implode(' ', array_filter([ 'input', "input-{$size}", $floating ? 'ui-input-floating' : null, $error ? 'input-error' : null, $state === 'success' ? 'input-success' : null, $disabled ? 'input-disabled' : null, ]))); @endphp @php $inputAttributes = $attributes->merge([ 'id' => $id, 'name' => $name, 'value' => $value, 'placeholder' => $placeholder, 'autocomplete' => $autocomplete, 'class' => $inputClass, ]); $floatingInputAttributes = $attributes->except(['placeholder'])->merge([ 'id' => $id, 'name' => $name, 'value' => $value, 'autocomplete' => $autocomplete, 'class' => $inputClass, ]); if ($min !== null && $min !== '') { $inputAttributes = $inputAttributes->merge(['min' => $min]); $floatingInputAttributes = $floatingInputAttributes->merge(['min' => $min]); } @endphp @if ($floating)
except(['class'])->class(['form-group', 'ui-floating-field', $error ? 'ui-floating-error' : null]) }} data-floating-filled="{{ filled($value) ? '1' : '0' }}" > @if ($label) @endif @if ($error) {{ $error }} @elseif ($help) {{ $help }} @endif
@elseif ($label || $help || $error)
except(['class'])->class('form-group') }}> @if ($label) @endif @if ($error) {{ $error }} @elseif ($help) {{ $help }} @endif
@else @endif