@props([ 'type' => 'text', 'name' => '', ]) @switch($type) @case('hidden') @case('text') @case('email') @case('password') @case('number') only(['name', ':name', 'value', ':value', 'v-model', 'rules', ':rules', 'label', ':label']) }} name="{{ $name }}" > except(['value', ':value', 'v-model', 'rules', ':rules', 'label', ':label'])->merge(['class' => 'w-full rounded-md border px-3 py-2.5 text-sm text-gray-600 transition-all hover:border-gray-400 focus:border-gray-400 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-300 dark:hover:border-gray-400 dark:focus:border-gray-400']) }} /> @break @case('price') only(['name', ':name', 'value', ':value', 'v-model', 'rules', ':rules', 'label', ':label']) }} name="{{ $name }}" >
@if (isset($currency)) attributes->merge(['class' => 'py-2.5 text-gray-500 ltr:pl-4 rtl:pr-4']) }}> {{ $currency }} @else {{ core()->currencySymbol(core()->getBaseCurrencyCode()) }} @endif except(['value', ':value', 'v-model', 'rules', ':rules', 'label', ':label'])->merge(['class' => 'w-full p-2.5 text-sm text-gray-600 dark:bg-gray-900 dark:text-gray-300']) }} />
@break @case('file') only(['name', ':name', 'value', ':value', 'v-model', 'rules', ':rules', ':rules', 'label', ':label']) }} name="{{ $name }}" > except(['value', ':value', 'v-model', 'rules', ':rules', 'label', ':label'])->merge(['class' => 'w-full rounded-md border px-3 py-2.5 text-sm text-gray-600 transition-all hover:border-gray-400 focus:border-gray-400 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-300 dark:file:bg-gray-800 dark:file:dark:text-white dark:hover:border-gray-400 dark:focus:border-gray-400']) }} @change="handleChange" @blur="handleBlur" /> @break @case('color') except('class') }} > except(['value'])->merge(['class' => 'w-full appearance-none rounded-md border text-sm text-gray-600 transition-all hover:border-gray-400 dark:text-gray-300 dark:hover:border-gray-400']) }} > @break @case('textarea') only(['name', ':name', 'value', ':value', 'v-model', 'rules', ':rules', 'label', ':label']) }} name="{{ $name }}" > @if ($attributes->get('tinymce', false) || $attributes->get(':tinymce', false)) @endif @break @case('date') only(['name', ':name', 'value', ':value', 'v-model', 'rules', ':rules', 'label', ':label']) }} name="{{ $name }}" > except(['value', ':value', 'v-model', 'rules', ':rules', 'label', ':label'])->merge(['class' => 'w-full rounded-md border px-3 py-2.5 text-sm text-gray-600 transition-all hover:border-gray-400 focus:border-gray-400 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-300 dark:hover:border-gray-400 dark:focus:border-gray-400']) }} autocomplete="off" /> @break @case('datetime') only(['name', ':name', 'value', ':value', 'v-model', 'rules', ':rules', 'label', ':label']) }} name="{{ $name }}" > except(['value', ':value', 'v-model', 'rules', ':rules', 'label', ':label'])->merge(['class' => 'w-full rounded-md border px-3 py-2.5 text-sm text-gray-600 transition-all hover:border-gray-400 focus:border-gray-400 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-300 dark:hover:border-gray-400 dark:focus:border-gray-400']) }} autocomplete="off" > @break @case('select') only(['name', ':name', 'value', ':value', 'v-model', 'rules', ':rules', 'label', ':label']) }} name="{{ $name }}" > @break @case('multiselect') except([])->merge(['class' => 'flex w-full flex-col rounded-md border bg-white px-3 py-2.5 text-sm font-normal text-gray-600 transition-all hover:border-gray-400 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-300 dark:hover:border-gray-400']) }} name="{{ $name }}" multiple > {{ $slot }} @break @case('checkbox') @break @case('radio') @break @case('switch') @break @case('image') @break @case('custom') {{ $slot }} @endswitch @pushOnce('scripts') @endpushOnce