pluck('icon:variant'); ?> pluck('icon:trailing'); ?> 'micro', 'iconTrailing' => null, 'initials' => null, 'chevron' => true, 'circle' => null, 'avatar' => null, 'name' => 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' => 'micro', 'iconTrailing' => null, 'initials' => null, 'chevron' => true, 'circle' => null, 'avatar' => null, 'name' => 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); ?> map(fn($part) => Str::substr($part, 0, 1)) ->filter() ->only([0, count(explode(' ', $name ?? '')) - 1]) ->implode(''); // When using the outline icon variant, we need to size it down to match the default icon sizes... $iconClasses = Flux::classes('text-zinc-400 dark:text-white/80 group-hover:text-zinc-800 dark:group-hover:text-white') ->add($iconVariant === 'outline' ? 'size-4' : ''); $classes = Flux::classes() ->add('group flex items-center') ->add('rounded-lg has-data-[circle=true]:rounded-full') ->add('[ui-dropdown>&]:w-full') // Without this, the "name" won't get truncated in a sidebar dropdown... ->add('p-1 hover:bg-zinc-800/5 dark:hover:bg-white/10') ; ?>