| Current Path : /var/www/html/dynaweb-starter/storage/framework/views/ |
| Current File : /var/www/html/dynaweb-starter/storage/framework/views/eaa5eac8fa51985083978bc742dd12fe.php |
<?php
use Filament\Support\Enums\ActionSize;
use Filament\Support\Enums\IconSize;
?>
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag; ?>
<?php foreach($attributes->onlyProps([
'badge' => null,
'badgeColor' => 'primary',
'color' => 'primary',
'disabled' => false,
'form' => null,
'href' => null,
'icon' => null,
'iconAlias' => null,
'iconSize' => null,
'keyBindings' => null,
'label' => null,
'loadingIndicator' => true,
'size' => 'md',
'tag' => 'button',
'target' => null,
'tooltip' => null,
'type' => 'button',
]) as $__key => $__value) {
$$__key = $$__key ?? $__value;
} ?>
<?php $attributes = $attributes->exceptProps([
'badge' => null,
'badgeColor' => 'primary',
'color' => 'primary',
'disabled' => false,
'form' => null,
'href' => null,
'icon' => null,
'iconAlias' => null,
'iconSize' => null,
'keyBindings' => null,
'label' => null,
'loadingIndicator' => true,
'size' => 'md',
'tag' => 'button',
'target' => null,
'tooltip' => null,
'type' => 'button',
]); ?>
<?php foreach (array_filter(([
'badge' => null,
'badgeColor' => 'primary',
'color' => 'primary',
'disabled' => false,
'form' => null,
'href' => null,
'icon' => null,
'iconAlias' => null,
'iconSize' => null,
'keyBindings' => null,
'label' => null,
'loadingIndicator' => true,
'size' => 'md',
'tag' => 'button',
'target' => null,
'tooltip' => null,
'type' => 'button',
]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
$$__key = $$__key ?? $__value;
} ?>
<?php $__defined_vars = get_defined_vars(); ?>
<?php foreach ($attributes as $__key => $__value) {
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
} ?>
<?php unset($__defined_vars); ?>
<?php
$iconSize ??= match ($size) {
ActionSize::ExtraSmall, 'xs' => 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-visible: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' => 'fi-color-gray text-gray-400 hover:text-gray-500 focus-visible:ring-primary-600 dark:text-gray-500 dark:hover:text-gray-400 dark:focus-visible:ring-primary-500',
default => 'fi-color-custom text-custom-500 hover:text-custom-600 focus-visible:ring-custom-600 dark:text-custom-400 dark:hover:text-custom-300 dark:focus-visible: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 = $loadingIndicator ? $attributes->whereStartsWith(['wire:target', 'wire:click'])->filter(fn ($value): bool => filled($value))->first() : null;
$hasLoadingIndicator = filled($wireTarget) || ($type === 'submit' && filled($form));
if ($hasLoadingIndicator) {
$loadingIndicatorTarget = html_entity_decode($wireTarget ?: $form, ENT_QUOTES);
}
$hasTooltip = filled($tooltip);
?>
<!--[if BLOCK]><![endif]--><?php if($tag === 'button'): ?>
<button
<?php if($keyBindings || $hasTooltip): ?>
x-data="{}"
<?php endif; ?>
<?php if($keyBindings): ?>
x-mousetrap.global.<?php echo e(collect($keyBindings)->map(fn (string $keyBinding): string => str_replace('+', '-', $keyBinding))->implode('.')); ?>
<?php endif; ?>
<?php if($hasTooltip): ?>
x-tooltip="{
content: <?php echo \Illuminate\Support\Js::from($tooltip)->toHtml() ?>,
theme: $store.theme,
}"
<?php endif; ?>
<?php echo e($attributes
->merge([
'disabled' => $disabled,
'title' => $label,
'type' => $type,
], escape: false)
->class([$buttonClasses])
->style([$buttonStyles])); ?>
>
<!--[if BLOCK]><![endif]--><?php if($label): ?>
<span class="sr-only">
<?php echo e($label); ?>
</span>
<?php endif; ?> <!--[if ENDBLOCK]><![endif]-->
<?php if (isset($component)) { $__componentOriginal71c6471fa76ce19017edc287b6f4508c = $component; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'filament::components.icon','data' => ['attributes' =>
\Filament\Support\prepare_inherited_attributes(
new \Illuminate\View\ComponentAttributeBag([
'alias' => $iconAlias,
'icon' => $icon,
'wire:loading.remove.delay.' . config('filament.livewire_loading_delay', 'default') => $hasLoadingIndicator,
'wire:target' => $hasLoadingIndicator ? $loadingIndicatorTarget : null,
])
)->class([$iconClasses])
]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('filament::icon'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['attributes' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(
\Filament\Support\prepare_inherited_attributes(
new \Illuminate\View\ComponentAttributeBag([
'alias' => $iconAlias,
'icon' => $icon,
'wire:loading.remove.delay.' . config('filament.livewire_loading_delay', 'default') => $hasLoadingIndicator,
'wire:target' => $hasLoadingIndicator ? $loadingIndicatorTarget : null,
])
)->class([$iconClasses])
)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal71c6471fa76ce19017edc287b6f4508c)): ?>
<?php $component = $__componentOriginal71c6471fa76ce19017edc287b6f4508c; ?>
<?php unset($__componentOriginal71c6471fa76ce19017edc287b6f4508c); ?>
<?php endif; ?>
<!--[if BLOCK]><![endif]--><?php if($hasLoadingIndicator): ?>
<?php if (isset($component)) { $__componentOriginal71c6471fa76ce19017edc287b6f4508c = $component; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'filament::components.loading-indicator','data' => ['attributes' =>
\Filament\Support\prepare_inherited_attributes(
new \Illuminate\View\ComponentAttributeBag([
'wire:loading.delay.' . config('filament.livewire_loading_delay', 'default') => '',
'wire:target' => $loadingIndicatorTarget,
])
)->class([$iconClasses])
]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('filament::loading-indicator'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['attributes' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(
\Filament\Support\prepare_inherited_attributes(
new \Illuminate\View\ComponentAttributeBag([
'wire:loading.delay.' . config('filament.livewire_loading_delay', 'default') => '',
'wire:target' => $loadingIndicatorTarget,
])
)->class([$iconClasses])
)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal71c6471fa76ce19017edc287b6f4508c)): ?>
<?php $component = $__componentOriginal71c6471fa76ce19017edc287b6f4508c; ?>
<?php unset($__componentOriginal71c6471fa76ce19017edc287b6f4508c); ?>
<?php endif; ?>
<?php endif; ?> <!--[if ENDBLOCK]><![endif]-->
<!--[if BLOCK]><![endif]--><?php if(filled($badge)): ?>
<div class="<?php echo e($badgeContainerClasses); ?>">
<?php if (isset($component)) { $__componentOriginal71c6471fa76ce19017edc287b6f4508c = $component; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'filament::components.badge','data' => ['color' => $badgeColor,'size' => 'xs']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('filament::badge'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['color' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($badgeColor),'size' => 'xs']); ?>
<?php echo e($badge); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal71c6471fa76ce19017edc287b6f4508c)): ?>
<?php $component = $__componentOriginal71c6471fa76ce19017edc287b6f4508c; ?>
<?php unset($__componentOriginal71c6471fa76ce19017edc287b6f4508c); ?>
<?php endif; ?>
</div>
<?php endif; ?> <!--[if ENDBLOCK]><![endif]-->
</button>
<?php elseif($tag === 'a'): ?>
<a
<?php echo e(\Filament\Support\generate_href_html($href, $target === '_blank')); ?>
<?php if($keyBindings || $hasTooltip): ?>
x-data="{}"
<?php endif; ?>
<?php if($keyBindings): ?>
x-mousetrap.global.<?php echo e(collect($keyBindings)->map(fn (string $keyBinding): string => str_replace('+', '-', $keyBinding))->implode('.')); ?>
<?php endif; ?>
<?php if($hasTooltip): ?>
x-tooltip="{
content: <?php echo \Illuminate\Support\Js::from($tooltip)->toHtml() ?>,
theme: $store.theme,
}"
<?php endif; ?>
<?php echo e($attributes
->merge([
'title' => $label,
], escape: false)
->class([$buttonClasses])
->style([$buttonStyles])); ?>
>
<!--[if BLOCK]><![endif]--><?php if($label): ?>
<span class="sr-only">
<?php echo e($label); ?>
</span>
<?php endif; ?> <!--[if ENDBLOCK]><![endif]-->
<?php if (isset($component)) { $__componentOriginal71c6471fa76ce19017edc287b6f4508c = $component; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'filament::components.icon','data' => ['alias' => $iconAlias,'icon' => $icon,'class' => $iconClasses]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('filament::icon'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['alias' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconAlias),'icon' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($icon),'class' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconClasses)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal71c6471fa76ce19017edc287b6f4508c)): ?>
<?php $component = $__componentOriginal71c6471fa76ce19017edc287b6f4508c; ?>
<?php unset($__componentOriginal71c6471fa76ce19017edc287b6f4508c); ?>
<?php endif; ?>
<!--[if BLOCK]><![endif]--><?php if(filled($badge)): ?>
<div class="<?php echo e($badgeContainerClasses); ?>">
<?php if (isset($component)) { $__componentOriginal71c6471fa76ce19017edc287b6f4508c = $component; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'filament::components.badge','data' => ['color' => $badgeColor,'size' => 'xs']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('filament::badge'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['color' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($badgeColor),'size' => 'xs']); ?>
<?php echo e($badge); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal71c6471fa76ce19017edc287b6f4508c)): ?>
<?php $component = $__componentOriginal71c6471fa76ce19017edc287b6f4508c; ?>
<?php unset($__componentOriginal71c6471fa76ce19017edc287b6f4508c); ?>
<?php endif; ?>
</div>
<?php endif; ?> <!--[if ENDBLOCK]><![endif]-->
</a>
<?php endif; ?> <!--[if ENDBLOCK]><![endif]-->
<?php /**PATH /var/www/html/dynaweb-starter/vendor/filament/support/src/../resources/views/components/icon-button.blade.php ENDPATH**/ ?>