2023-07-13 11:16:24 +00:00
|
|
|
<div class="form-control">
|
2023-06-02 13:15:12 +00:00
|
|
|
@if ($label)
|
2023-08-22 15:44:49 +00:00
|
|
|
<label class="flex items-center gap-1 mb-1 text-sm font-medium">
|
|
|
|
<span>
|
2023-05-17 13:46:20 +00:00
|
|
|
@if ($label)
|
|
|
|
{{ $label }}
|
|
|
|
@else
|
|
|
|
{{ $id }}
|
|
|
|
@endif
|
|
|
|
@if ($required)
|
2023-08-22 15:44:49 +00:00
|
|
|
<x-highlighted text="*" />
|
2023-05-17 13:46:20 +00:00
|
|
|
@endif
|
|
|
|
@if ($helper)
|
2023-06-07 19:44:16 +00:00
|
|
|
<div class="group">
|
|
|
|
<div class="cursor-pointer text-warning">
|
2023-05-17 13:46:20 +00:00
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
2023-08-11 18:19:42 +00:00
|
|
|
class="w-4 h-4 stroke-current">
|
2023-05-17 13:46:20 +00:00
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
2023-08-11 18:19:42 +00:00
|
|
|
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
2023-05-17 13:46:20 +00:00
|
|
|
</svg>
|
2023-06-07 19:44:16 +00:00
|
|
|
</div>
|
|
|
|
<div class="absolute hidden text-xs group-hover:block border-coolgray-400 bg-coolgray-500">
|
|
|
|
<div class="p-4 card-body">
|
|
|
|
{!! $helper !!}
|
2023-05-17 13:46:20 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</span>
|
|
|
|
</label>
|
|
|
|
@endif
|
2023-08-11 18:19:42 +00:00
|
|
|
<textarea placeholder="{{ $placeholder }}" {{ $attributes->merge(['class' => $defaultClass]) }}
|
|
|
|
wire:model.defer={{ $id }} @disabled($disabled) @readonly($readonly) @required($required)
|
|
|
|
id="{{ $id }}" name="{{ $name }}" name={{ $id }} wire:model.defer={{ $value ?? $id }}
|
|
|
|
wire:dirty.class="input-warning"></textarea>
|
2023-05-17 13:46:20 +00:00
|
|
|
@error($id)
|
2023-08-11 18:19:42 +00:00
|
|
|
<label class="label">
|
|
|
|
<span class="text-red-500 label-text-alt">{{ $message }}</span>
|
|
|
|
</label>
|
2023-05-17 13:46:20 +00:00
|
|
|
@enderror
|
|
|
|
</div>
|