206 lines
11 KiB
PHP
206 lines
11 KiB
PHP
<?php $iconTrailing = $iconTrailing ??= $attributes->pluck('icon:trailing'); ?>
|
|
<?php $iconVariant = $iconVariant ??= $attributes->pluck('icon:variant'); ?>
|
|
|
|
<?php foreach (([ 'variant' ]) as $__key => $__value) {
|
|
$__consumeVariable = is_string($__key) ? $__key : $__value;
|
|
$$__consumeVariable = is_string($__key) ? $__env->getConsumableComponentData($__key, $__value) : $__env->getConsumableComponentData($__value);
|
|
} ?>
|
|
|
|
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
|
|
|
$__newAttributes = [];
|
|
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([
|
|
'iconVariant' => 'outline',
|
|
'iconTrailing' => null,
|
|
'badgeColor' => null,
|
|
'variant' => null,
|
|
'iconDot' => null,
|
|
'accent' => true,
|
|
'badge' => null,
|
|
'icon' => null,
|
|
]));
|
|
|
|
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(([
|
|
'iconVariant' => 'outline',
|
|
'iconTrailing' => null,
|
|
'badgeColor' => null,
|
|
'variant' => null,
|
|
'iconDot' => null,
|
|
'accent' => true,
|
|
'badge' => null,
|
|
'icon' => null,
|
|
]), '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); ?>
|
|
|
|
<?php
|
|
// Button should be a square if it has no text contents...
|
|
$square ??= $slot->isEmpty();
|
|
|
|
// Size-up icons in square/icon-only buttons...
|
|
$iconClasses = Flux::classes($square ? 'size-5!' : 'size-4!');
|
|
|
|
$classes = Flux::classes()
|
|
->add('h-10 lg:h-8 relative flex items-center gap-3 rounded-lg')
|
|
->add($square ? 'px-2.5!' : '')
|
|
->add('py-0 text-start w-full px-3 my-px')
|
|
->add('text-zinc-500 dark:text-white/80')
|
|
->add(match ($variant) {
|
|
'outline' => match ($accent) {
|
|
true => [
|
|
'data-current:text-(--color-accent-content) hover:data-current:text-(--color-accent-content)',
|
|
'data-current:bg-white dark:data-current:bg-white/[7%] data-current:border data-current:border-zinc-200 dark:data-current:border-transparent',
|
|
'hover:text-zinc-800 dark:hover:text-white dark:hover:bg-white/[7%] hover:bg-zinc-800/5 ',
|
|
'border border-transparent',
|
|
],
|
|
false => [
|
|
'data-current:text-zinc-800 dark:data-current:text-zinc-100 data-current:border-zinc-200',
|
|
'data-current:bg-white dark:data-current:bg-white/10 data-current:border data-current:border-zinc-200 dark:data-current:border-white/10 data-current:shadow-xs',
|
|
'hover:text-zinc-800 dark:hover:text-white',
|
|
],
|
|
},
|
|
default => match ($accent) {
|
|
true => [
|
|
'data-current:text-(--color-accent-content) hover:data-current:text-(--color-accent-content)',
|
|
'data-current:bg-zinc-800/[4%] dark:data-current:bg-white/[7%]',
|
|
'hover:text-zinc-800 dark:hover:text-white hover:bg-zinc-800/[4%] dark:hover:bg-white/[7%]',
|
|
],
|
|
false => [
|
|
'data-current:text-zinc-800 dark:data-current:text-zinc-100',
|
|
'data-current:bg-zinc-800/[4%] dark:data-current:bg-white/10',
|
|
'hover:text-zinc-800 dark:hover:text-white hover:bg-zinc-800/[4%] dark:hover:bg-white/10',
|
|
],
|
|
},
|
|
})
|
|
;
|
|
?>
|
|
|
|
<?php if (isset($component)) { $__componentOriginal41290c80ee95fab383f81660ba8bf860 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginal41290c80ee95fab383f81660ba8bf860 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::button-or-link','data' => ['attributes' => $attributes->class($classes),'dataFluxNavlistItem' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
|
<?php $component->withName('flux::button-or-link'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['attributes' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($attributes->class($classes)),'data-flux-navlist-item' => true]); ?>
|
|
<?php if ($icon): ?>
|
|
<div class="relative">
|
|
<?php if (is_string($icon) && $icon !== ''): ?>
|
|
<?php if (isset($component)) { $__componentOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::icon.index','data' => ['icon' => $icon,'variant' => $iconVariant,'class' => ''.$iconClasses.'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
|
<?php $component->withName('flux::icon'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['icon' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($icon),'variant' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconVariant),'class' => ''.$iconClasses.'']); ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2)): ?>
|
|
<?php $attributes = $__attributesOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2; ?>
|
|
<?php unset($__attributesOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2)): ?>
|
|
<?php $component = $__componentOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2; ?>
|
|
<?php unset($__componentOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2); ?>
|
|
<?php endif; ?>
|
|
<?php else: ?>
|
|
<?php echo e($icon); ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php if ($iconDot): ?>
|
|
<div class="absolute top-[-2px] end-[-2px]">
|
|
<div class="size-[6px] rounded-full bg-zinc-500 dark:bg-zinc-400"></div>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($slot->isNotEmpty()): ?>
|
|
<div class="flex-1 text-sm font-medium leading-none whitespace-nowrap [[data-nav-footer]_&]:hidden [[data-nav-sidebar]_[data-nav-footer]_&]:block" data-content><?php echo e($slot); ?></div>
|
|
<?php endif; ?>
|
|
|
|
<?php if (is_string($iconTrailing) && $iconTrailing !== ''): ?>
|
|
<?php if (isset($component)) { $__componentOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::icon.index','data' => ['icon' => $iconTrailing,'variant' => $iconVariant,'class' => 'size-4!']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
|
<?php $component->withName('flux::icon'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['icon' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconTrailing),'variant' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($iconVariant),'class' => 'size-4!']); ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2)): ?>
|
|
<?php $attributes = $__attributesOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2; ?>
|
|
<?php unset($__attributesOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2)): ?>
|
|
<?php $component = $__componentOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2; ?>
|
|
<?php unset($__componentOriginalc7d5f44bf2a2d803ed0b55f72f1f82e2); ?>
|
|
<?php endif; ?>
|
|
<?php elseif ($iconTrailing): ?>
|
|
<?php echo e($iconTrailing); ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php if ($badge): ?>
|
|
<?php if (isset($component)) { $__componentOriginaledebcd5c8007c849df3a15805a9c8af1 = $component; } ?>
|
|
<?php if (isset($attributes)) { $__attributesOriginaledebcd5c8007c849df3a15805a9c8af1 = $attributes; } ?>
|
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'e60dd9d2c3a62d619c9acb38f20d5aa5::navlist.badge','data' => ['color' => $badgeColor]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
|
<?php $component->withName('flux::navlist.badge'); ?>
|
|
<?php if ($component->shouldRender()): ?>
|
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
|
<?php endif; ?>
|
|
<?php $component->withAttributes(['color' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($badgeColor)]); ?><?php echo e($badge); ?> <?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginaledebcd5c8007c849df3a15805a9c8af1)): ?>
|
|
<?php $attributes = $__attributesOriginaledebcd5c8007c849df3a15805a9c8af1; ?>
|
|
<?php unset($__attributesOriginaledebcd5c8007c849df3a15805a9c8af1); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginaledebcd5c8007c849df3a15805a9c8af1)): ?>
|
|
<?php $component = $__componentOriginaledebcd5c8007c849df3a15805a9c8af1; ?>
|
|
<?php unset($__componentOriginaledebcd5c8007c849df3a15805a9c8af1); ?>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
<?php echo $__env->renderComponent(); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__attributesOriginal41290c80ee95fab383f81660ba8bf860)): ?>
|
|
<?php $attributes = $__attributesOriginal41290c80ee95fab383f81660ba8bf860; ?>
|
|
<?php unset($__attributesOriginal41290c80ee95fab383f81660ba8bf860); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($__componentOriginal41290c80ee95fab383f81660ba8bf860)): ?>
|
|
<?php $component = $__componentOriginal41290c80ee95fab383f81660ba8bf860; ?>
|
|
<?php unset($__componentOriginal41290c80ee95fab383f81660ba8bf860); ?>
|
|
<?php endif; ?>
|
|
<?php /**PATH E:\!PROJECT\dfood-website\vendor\livewire\flux\src/../stubs/resources/views/flux/navlist/item.blade.php ENDPATH**/ ?>
|