@endif
-
- @if($prefix)
-
- {{ $prefix }}
+
+ @if($prefix || $prepend)
+
+ {{ $prepend ?? $prefix }}
@endif
@@ -55,10 +60,15 @@ public function render(): View|Closure|string
@if($icon)
@endif
+
+
+ @if($iconRight)
+
+ @endif
@if($money)
-
+
@endif
@@ -69,7 +79,7 @@ public function render(): View|Closure|string
@if($money)
:value="display"
x-mask:dynamic="$money($input, '{{ $fractionSeparator}}', '{{ $thousandsSeparator }}')"
- @input="$wire.{{ $name() }} = $el.value.replaceAll('{{ $thousandsSeparator }}', '').replaceAll('{{ $fractionSeparator }}', '.')"
+ @input="$wire.{{ $modelName() }} = $el.value.replaceAll('{{ $thousandsSeparator }}', '').replaceAll('{{ $fractionSeparator }}', '.')"
@endif
{{
@@ -81,10 +91,10 @@ public function render(): View|Closure|string
'pl-10' => ($icon),
'h-14' => ($inline),
'pt-3' => ($inline && $label),
- 'rounded-l-none' => $prefix,
- 'rounded-r-none' => $sufix,
+ 'rounded-l-none' => $prefix || $prepend,
+ 'rounded-r-none' => $sufix || $append,
'border border-dashed' => $attributes->has('readonly'),
- 'input-error' => $errors->has($name())
+ 'input-error' => $errors->has($modelName())
])
}}
/>
@@ -103,26 +113,26 @@ public function render(): View|Closure|string
@endif
-
- @if($sufix)
-
- {{ $sufix }}
+
+ @if($sufix || $append)
+
+ {{ $append ?? $sufix }}
@endif
-
- @if($prefix || $sufix)
+
+ @if($prefix || $sufix || $prepend || $append)
@endif
- @error($name())
+ @error($modelName())
{{ $message }}
@enderror
@if($hint)
-
{{ $hint }}
+
{{ $hint }}
@endif
HTML;
diff --git a/src/View/Components/MenuItem.php b/src/View/Components/MenuItem.php
index 1435ffb7..00e206f4 100644
--- a/src/View/Components/MenuItem.php
+++ b/src/View/Components/MenuItem.php
@@ -35,7 +35,7 @@ public function render(): View|Closure|string
@endif
- {{ $title }}
+ {{ $title ?? $slot }}
HTML;
diff --git a/src/View/Components/Select.php b/src/View/Components/Select.php
index 839c480e..57ef37c6 100644
--- a/src/View/Components/Select.php
+++ b/src/View/Components/Select.php
@@ -14,6 +14,7 @@ class Select extends Component
public function __construct(
public ?string $label = null,
public ?string $icon = null,
+ public ?string $iconRight = null,
public ?string $hint = null,
public ?string $placeholder = null,
public ?bool $inline = false,
@@ -32,17 +33,23 @@ public function name(): string
public function render(): View|Closure|string
{
return <<<'HTML'
-
-
+
+
@if($label && !$inline)
@endif
+
@if($icon)
@endif
+
+ @if($iconRight)
+
+ @endif
+
+
@if($label && $inline)
+
@error($name)
{{ $message }}
@enderror
+
@if($hint)
{{ $hint }}
@endif
diff --git a/src/View/Components/Toggle.php b/src/View/Components/Toggle.php
index 9d8a3ffd..570ac86d 100644
--- a/src/View/Components/Toggle.php
+++ b/src/View/Components/Toggle.php
@@ -19,15 +19,17 @@ public function __construct(
public function render(): View|Closure|string
{
return <<<'HTML'
-