onlyProps([ 'badge' => null, 'badgeColor' => 'primary', 'color' => 'primary', 'disabled' => false, 'form' => null, 'href' => null, 'icon' => null, 'iconAlias' => null, 'iconSize' => null, 'keyBindings' => null, 'label' => null, 'size' => 'md', 'tag' => 'button', 'target' => null, 'tooltip' => null, 'type' => 'button', ]) as $__key => $__value) { $$__key = $$__key ?? $__value; } ?> exceptProps([ 'badge' => null, 'badgeColor' => 'primary', 'color' => 'primary', 'disabled' => false, 'form' => null, 'href' => null, 'icon' => null, 'iconAlias' => null, 'iconSize' => null, 'keyBindings' => null, 'label' => null, 'size' => 'md', 'tag' => 'button', 'target' => null, 'tooltip' => null, 'type' => 'button', ]); ?> null, 'badgeColor' => 'primary', 'color' => 'primary', 'disabled' => false, 'form' => null, 'href' => null, 'icon' => null, 'iconAlias' => null, 'iconSize' => null, 'keyBindings' => null, 'label' => null, 'size' => 'md', 'tag' => 'button', 'target' => null, 'tooltip' => null, 'type' => 'button', ]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) { $$__key = $$__key ?? $__value; } ?> $__value) { if (array_key_exists($__key, $__defined_vars)) unset($$__key); } ?> IconSize::Small, ActionSize::Small, ActionSize::Medium, 'sm', 'md' => IconSize::Medium, ActionSize::Large, ActionSize::ExtraLarge, 'lg', 'xl' => IconSize::Large, }; $buttonClasses = \Illuminate\Support\Arr::toCssClasses([ 'fi-icon-btn relative flex items-center justify-center rounded-lg outline-none transition duration-75 focus:ring-2 disabled:pointer-events-none disabled:opacity-70', match ($size) { ActionSize::ExtraSmall, 'xs' => 'h-7 w-7', ActionSize::Small, 'sm' => 'h-8 w-8', ActionSize::Medium, 'md' => 'h-9 w-9', ActionSize::Large, 'lg' => 'h-10 w-10', ActionSize::ExtraLarge, 'xl' => 'h-11 w-11', default => $size, }, match ($color) { 'gray' => 'text-gray-400 hover:text-gray-500 focus:ring-primary-600 dark:text-gray-500 dark:hover:text-gray-400 dark:focus:ring-primary-500', default => 'text-custom-500 hover:text-custom-600 focus:ring-custom-600 dark:text-custom-400 dark:hover:text-custom-300 dark:focus:ring-custom-500', }, ]); $buttonStyles = \Filament\Support\get_color_css_variables($color, shades: [300, 400, 500, 600]); $iconClasses = \Illuminate\Support\Arr::toCssClasses([ 'fi-icon-btn-icon', match ($iconSize) { IconSize::Small, 'sm' => 'h-4 w-4', IconSize::Medium, 'md' => 'h-5 w-5', IconSize::Large, 'lg' => 'h-6 w-6', default => $iconSize, }, ]); $badgeContainerClasses = 'fi-icon-btn-badge-ctn absolute start-full top-0 z-[1] -ms-1 w-max -translate-x-1/2 rounded-md bg-white rtl:translate-x-1/2 dark:bg-gray-900'; $wireTarget = $attributes->whereStartsWith(['wire:target', 'wire:click'])->filter(fn ($value): bool => filled($value))->first(); $hasLoadingIndicator = filled($wireTarget) || ($type === 'submit' && filled($form)); if ($hasLoadingIndicator) { $loadingIndicatorTarget = html_entity_decode($wireTarget ?: $form, ENT_QUOTES); } ?> x-data="{}" x-mousetrap.global.map(fn (string $keyBinding): string => str_replace('+', '-', $keyBinding))->implode('.')); ?> x-tooltip="{ content: toHtml() ?>, theme: $store.theme, }" merge([ 'disabled' => $disabled, 'title' => $label, 'type' => $type, ], escape: false) ->class([$buttonClasses]) ->style([$buttonStyles])); ?> > 'filament::components.icon','data' => ['alias' => $iconAlias,'icon' => $icon,'wire:loading.remove.delay' => $hasLoadingIndicator,'wire:target' => $hasLoadingIndicator ? $loadingIndicatorTarget : null,'class' => $iconClasses]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> withName('filament::icon'); ?> shouldRender()): ?> startComponent($component->resolveView(), $component->data()); ?> getConstructor()): ?> except(collect($constructor->getParameters())->map->getName()->all()); ?> withAttributes(['alias' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconAlias),'icon' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($icon),'wire:loading.remove.delay' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($hasLoadingIndicator),'wire:target' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($hasLoadingIndicator ? $loadingIndicatorTarget : null),'class' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconClasses)]); ?> renderComponent(); ?> 'filament::components.loading-indicator','data' => ['wire:loading.delay' => '','wire:target' => $loadingIndicatorTarget,'class' => $iconClasses]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> withName('filament::loading-indicator'); ?> shouldRender()): ?> startComponent($component->resolveView(), $component->data()); ?> getConstructor()): ?> except(collect($constructor->getParameters())->map->getName()->all()); ?> withAttributes(['wire:loading.delay' => '','wire:target' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($loadingIndicatorTarget),'class' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconClasses)]); ?> renderComponent(); ?> 'filament::components.badge','data' => ['color' => $badgeColor,'size' => 'xs']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> withName('filament::badge'); ?> shouldRender()): ?> startComponent($component->resolveView(), $component->data()); ?> getConstructor()): ?> except(collect($constructor->getParameters())->map->getName()->all()); ?> withAttributes(['color' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($badgeColor),'size' => 'xs']); ?> renderComponent(); ?> x-data="{}" x-mousetrap.global.map(fn (string $keyBinding): string => str_replace('+', '-', $keyBinding))->implode('.')); ?> x-tooltip="{ content: toHtml() ?>, theme: $store.theme, }" merge([ 'title' => $label, ], escape: false) ->class([$buttonClasses]) ->style([$buttonStyles])); ?> > 'filament::components.icon','data' => ['alias' => $iconAlias,'icon' => $icon,'class' => $iconClasses]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> withName('filament::icon'); ?> shouldRender()): ?> startComponent($component->resolveView(), $component->data()); ?> getConstructor()): ?> except(collect($constructor->getParameters())->map->getName()->all()); ?> withAttributes(['alias' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconAlias),'icon' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($icon),'class' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconClasses)]); ?> renderComponent(); ?> 'filament::components.badge','data' => ['color' => $badgeColor,'size' => 'xs']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> withName('filament::badge'); ?> shouldRender()): ?> startComponent($component->resolveView(), $component->data()); ?> getConstructor()): ?> except(collect($constructor->getParameters())->map->getName()->all()); ?> withAttributes(['color' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($badgeColor),'size' => 'xs']); ?> renderComponent(); ?>