null, 'badgeColor' => 'primary', 'badgeSize' => Size::ExtraSmall, 'color' => 'primary', 'disabled' => false, 'form' => null, 'formId' => null, 'href' => null, 'icon' => null, 'iconAlias' => null, 'iconPosition' => IconPosition::Before, 'iconSize' => null, 'keyBindings' => null, 'labeledFrom' => null, 'labelSrOnly' => false, 'loadingIndicator' => true, 'outlined' => false, 'size' => Size::Medium, 'spaMode' => null, 'tag' => 'button', 'target' => null, 'tooltip' => null, 'type' => 'button', ])); foreach ($attributes->all() as $__key => $__value) { if (in_array($__key, $__propNames)) { $$__key = $$__key ?? $__value; } else { $__newAttributes[$__key] = $__value; } } $attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes); unset($__propNames); unset($__newAttributes); foreach (array_filter(([ 'badge' => null, 'badgeColor' => 'primary', 'badgeSize' => Size::ExtraSmall, 'color' => 'primary', 'disabled' => false, 'form' => null, 'formId' => null, 'href' => null, 'icon' => null, 'iconAlias' => null, 'iconPosition' => IconPosition::Before, 'iconSize' => null, 'keyBindings' => null, 'labeledFrom' => null, 'labelSrOnly' => false, 'loadingIndicator' => true, 'outlined' => false, 'size' => Size::Medium, 'spaMode' => null, 'tag' => 'button', 'target' => null, 'tooltip' => null, 'type' => 'button', ]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) { $$__key = $$__key ?? $__value; } $__defined_vars = get_defined_vars(); foreach ($attributes->all() as $__key => $__value) { if (array_key_exists($__key, $__defined_vars)) unset($$__key); } unset($__defined_vars, $__key, $__value); ?> IconSize::Small, default => null, }; $wireTarget = $loadingIndicator ? $attributes->whereStartsWith(['wire:target', 'wire:click'])->filter(fn ($value): bool => filled($value))->first() : null; $hasFormProcessingLoadingIndicator = $type === 'submit' && filled($form); $hasLoadingIndicator = filled($wireTarget) || $hasFormProcessingLoadingIndicator; if ($hasLoadingIndicator) { $loadingIndicatorTarget = html_entity_decode($wireTarget ?: $form, ENT_QUOTES); } $hasTooltip = filled($tooltip); ?> 'filament::components.icon-button','data' => ['badge' => $badge,'badgeColor' => $badgeColor,'badgeSize' => $badgeSize,'color' => $color,'disabled' => $disabled,'form' => $form,'formId' => $formId,'href' => $href,'icon' => $icon,'iconAlias' => $iconAlias,'iconSize' => $iconSize,'keyBindings' => $keyBindings,'label' => $slot,'loadingIndicator' => $loadingIndicator,'size' => $size,'spaMode' => $spaMode,'tag' => $tag,'target' => $target,'tooltip' => $tooltip,'type' => $type,'attributes' => \Filament\Support\prepare_inherited_attributes($attributes)]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> withName('filament::icon-button'); ?> shouldRender()): ?> startComponent($component->resolveView(), $component->data()); ?> except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?> withAttributes(['badge' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($badge),'badge-color' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($badgeColor),'badge-size' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($badgeSize),'color' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($color),'disabled' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($disabled),'form' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($form),'form-id' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($formId),'href' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($href),'icon' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($icon),'icon-alias' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconAlias),'icon-size' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconSize),'key-bindings' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($keyBindings),'label' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($slot),'loading-indicator' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($loadingIndicator),'size' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($size),'spa-mode' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($spaMode),'tag' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($tag),'target' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($target),'tooltip' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($tooltip),'type' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($type),'attributes' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(\Filament\Support\prepare_inherited_attributes($attributes))]); ?> renderComponent(); ?> < x-bind:id="$id('key-bindings')" x-mousetrap.global.map(fn (string $keyBinding): string => str_replace('+', '-', $keyBinding))->implode('.')); ?>="document.getElementById($el.id)?.click()" x-tooltip="{ content: toHtml() ?>, theme: $store.theme, allowHTML: toHtml() ?>, }" x-data="filamentFormButton" x-bind:class="{ 'fi-processing': isProcessing }" merge([ 'aria-disabled' => $disabled ? 'true' : null, 'aria-label' => $labelSrOnly ? trim(strip_tags($slot->toHtml())) : null, 'disabled' => $disabled && blank($tooltip), 'form' => $formId, 'type' => $tag === 'button' ? $type : null, 'wire:loading.attr' => $tag === 'button' ? 'disabled' : null, 'wire:target' => ($hasLoadingIndicator && $loadingIndicatorTarget) ? $loadingIndicatorTarget : null, 'x-bind:disabled' => $hasFormProcessingLoadingIndicator ? 'isProcessing' : null, 'x-bind:aria-label' => ($labelSrOnly && $hasFormProcessingLoadingIndicator) ? ('isProcessing ? processingMessage : ' . \Illuminate\Support\Js::from(trim(strip_tags($slot->toHtml())))) : null, ], escape: false) ->when( $disabled && $hasTooltip, fn (ComponentAttributeBag $attributes) => $attributes->filter( fn (mixed $value, string $key): bool => ! str($key)->startsWith(['href', 'x-on:', 'wire:click']), ), ) ->class([ 'fi-btn', 'fi-disabled' => $disabled, 'fi-outlined' => $outlined, ($size instanceof Size) ? "fi-size-{$size->value}" : (is_string($size) ? $size : ''), is_string($labeledFrom) ? "fi-labeled-from-{$labeledFrom}" : null, ]) ->color(app(ButtonComponent::class, ['isOutlined' => $outlined]), $color)); ?> > $hasLoadingIndicator, 'wire:target' => $hasLoadingIndicator ? $loadingIndicatorTarget : false, ])), size: $iconSize)); ?> '', 'wire:target' => $loadingIndicatorTarget, ])), size: $iconSize)); ?> 'x-cloak', 'x-show' => 'isProcessing', ])), size: $iconSize)); ?> $hasLoadingIndicator, 'wire:target' => $hasLoadingIndicator ? $loadingIndicatorTarget : false, ])), size: $iconSize)); ?> '', 'wire:target' => $loadingIndicatorTarget, ])), size: $iconSize)); ?> 'x-cloak', 'x-show' => 'isProcessing', ])), size: $iconSize)); ?>
color(BadgeComponent::class, $badgeColor)->class([ 'fi-badge', ($badgeSize instanceof Size) ? "fi-size-{$badgeSize->value}" : (is_string($badgeSize) ? $badgeSize : ''), ])); ?> >
>