null, 'badgeColor' => 'primary', 'badgeSize' => 'xs', 'color' => 'primary', 'disabled' => false, 'form' => null, 'formId' => null, 'href' => null, 'icon' => null, 'iconAlias' => null, 'iconPosition' => IconPosition::Before, 'iconSize' => null, 'keyBindings' => null, 'labelSrOnly' => false, 'loadingIndicator' => true, 'size' => ActionSize::Medium, 'spaMode' => null, 'tag' => 'a', 'target' => null, 'tooltip' => null, 'type' => 'button', 'weight' => FontWeight::SemiBold, ])); 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' => 'xs', 'color' => 'primary', 'disabled' => false, 'form' => null, 'formId' => null, 'href' => null, 'icon' => null, 'iconAlias' => null, 'iconPosition' => IconPosition::Before, 'iconSize' => null, 'keyBindings' => null, 'labelSrOnly' => false, 'loadingIndicator' => true, 'size' => ActionSize::Medium, 'spaMode' => null, 'tag' => 'a', 'target' => null, 'tooltip' => null, 'type' => 'button', 'weight' => FontWeight::SemiBold, ]), '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); ?> IconSize::Small, default => IconSize::Medium, }; if (! $iconSize instanceof IconSize) { $iconSize = filled($iconSize) ? (IconSize::tryFrom($iconSize) ?? $iconSize) : null; } $linkClasses = \Illuminate\Support\Arr::toCssClasses([ 'fi-link group/link relative inline-flex items-center justify-center outline-none', 'pointer-events-none opacity-70' => $disabled, ($size instanceof ActionSize) ? "fi-size-{$size->value}" : null, // @deprecated `fi-link-size-*` has been replaced by `fi-size-*`. ($size instanceof ActionSize) ? "fi-link-size-{$size->value}" : null, match ($size) { ActionSize::ExtraSmall => 'gap-1', ActionSize::Small => 'gap-1', ActionSize::Medium => 'gap-1.5', ActionSize::Large => 'gap-1.5', ActionSize::ExtraLarge => 'gap-1.5', default => $size, }, match ($color) { 'gray' => null, default => 'fi-color-custom', }, is_string($color) ? "fi-color-{$color}" : null, ]); if (! $labelSrOnly) { $labelClasses = \Illuminate\Support\Arr::toCssClasses([ match ($weight) { FontWeight::Thin, 'thin' => 'font-thin', FontWeight::ExtraLight, 'extralight' => 'font-extralight', FontWeight::Light, 'light' => 'font-light', FontWeight::Medium, 'medium' => 'font-medium', FontWeight::Normal, 'normal' => 'font-normal', FontWeight::SemiBold, 'semibold' => 'font-semibold', FontWeight::Bold, 'bold' => 'font-bold', FontWeight::ExtraBold, 'extrabold' => 'font-extrabold', FontWeight::Black, 'black' => 'font-black', default => $weight, }, match ($size) { ActionSize::ExtraSmall => 'text-xs', ActionSize::Small => 'text-sm', ActionSize::Medium => 'text-sm', ActionSize::Large => 'text-sm', ActionSize::ExtraLarge => 'text-sm', default => null, }, match ($color) { 'gray' => 'text-gray-700 dark:text-gray-200', default => 'text-custom-600 dark:text-custom-400', }, 'group-hover/link:underline group-focus-visible/link:underline', ]); } else { $labelClasses = 'sr-only'; } $labelStyles = \Illuminate\Support\Arr::toCssStyles([ \Filament\Support\get_color_css_variables( $color, shades: [400, 600], alias: 'link.label', ) => $color !== 'gray', ]); $iconClasses = \Illuminate\Support\Arr::toCssClasses([ 'fi-link-icon', match ($iconSize) { IconSize::Small => 'h-4 w-4', IconSize::Medium => 'h-5 w-5', IconSize::Large => 'h-6 w-6', default => $iconSize, }, match ($color) { 'gray' => 'text-gray-400 dark:text-gray-500', default => 'text-custom-600 dark:text-custom-400', }, ]); $iconStyles = \Illuminate\Support\Arr::toCssStyles([ \Filament\Support\get_color_css_variables( $color, shades: [400, 600], alias: 'link.icon', ) => $color !== 'gray', ]); $badgeContainerClasses = 'fi-link-badge-ctn absolute start-full top-0 z-[1] w-max -translate-x-1/4 -translate-y-3/4 rounded-md bg-white dark:bg-gray-900 rtl:translate-x-1/4'; $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); ?> x-data="{}" 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, }" class([$linkClasses])); ?> > 'filament::components.icon','data' => ['alias' => $iconAlias,'icon' => $icon,'class' => $iconClasses,'style' => $iconStyles]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> withName('filament::icon'); ?> shouldRender()): ?> startComponent($component->resolveView(), $component->data()); ?> except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?> withAttributes(['alias' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconAlias),'icon' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($icon),'class' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconClasses),'style' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconStyles)]); ?> renderComponent(); ?> 'filament::components.icon','data' => ['alias' => $iconAlias,'icon' => $icon,'class' => $iconClasses,'style' => $iconStyles]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> withName('filament::icon'); ?> shouldRender()): ?> startComponent($component->resolveView(), $component->data()); ?> except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?> withAttributes(['alias' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconAlias),'icon' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($icon),'class' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconClasses),'style' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconStyles)]); ?> renderComponent(); ?>
'filament::components.badge','data' => ['color' => $badgeColor,'size' => $badgeSize]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> withName('filament::badge'); ?> shouldRender()): ?> startComponent($component->resolveView(), $component->data()); ?> except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?> withAttributes(['color' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($badgeColor),'size' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($badgeSize)]); ?> renderComponent(); ?>
x-data="{}" 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, }" class([$linkClasses])); ?> > 'filament::components.icon','data' => ['alias' => $iconAlias,'icon' => $icon,'class' => $iconClasses,'style' => $iconStyles]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> withName('filament::icon'); ?> shouldRender()): ?> startComponent($component->resolveView(), $component->data()); ?> except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?> withAttributes(['alias' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconAlias),'icon' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($icon),'class' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconClasses),'style' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconStyles)]); ?> renderComponent(); ?> 'filament::components.icon','data' => ['alias' => $iconAlias,'icon' => $icon,'class' => $iconClasses,'style' => $iconStyles]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> withName('filament::icon'); ?> shouldRender()): ?> startComponent($component->resolveView(), $component->data()); ?> except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?> withAttributes(['alias' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconAlias),'icon' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($icon),'class' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconClasses),'style' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconStyles)]); ?> renderComponent(); ?>
'filament::components.badge','data' => ['color' => $badgeColor,'size' => $badgeSize]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?> withName('filament::badge'); ?> shouldRender()): ?> startComponent($component->resolveView(), $component->data()); ?> except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?> withAttributes(['color' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($badgeColor),'size' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($badgeSize)]); ?> renderComponent(); ?>