@props([ 'name', 'size' => null, 'stroke' => null, 'title' => null, ]) @php $aliases = [ 'fa-home' => 'home', 'fa-chart-bar' => 'dashboard', 'fa-briefcase' => 'portfolio', 'fa-building' => 'building', 'fa-user-tie' => 'user', 'fa-handshake' => 'wallet', 'fa-exchange-alt' => 'arrow-right', 'fa-chart-line' => 'chart', 'fa-coins' => 'coins', 'fa-table' => 'grid', 'fa-cog' => 'settings', 'fa-search' => 'search', 'fa-plus' => 'plus', 'fa-times' => 'x', 'fa-external-link-alt' => 'external', 'fa-file-excel' => 'spreadsheet', 'fa-chevron-down' => 'chevron-down', 'fa-chevron-left' => 'chevron-left', 'fa-sliders-h' => 'settings', 'fa-database' => 'layers', 'fa-sign-out-alt' => 'arrow-right', 'fa-eye' => 'eye', 'fa-edit' => 'edit', 'fa-trash-alt' => 'trash', 'fa-trash' => 'trash', 'fa-filter' => 'filter', 'fa-grip-vertical' => 'grip-vertical', 'fa-sort' => 'sort', 'fa-sort-up' => 'chevron-up', 'fa-sort-down' => 'chevron-down', 'fa-check' => 'check', 'fa-minus' => 'minus', 'fa-info' => 'info', ]; $icons = [ 'home' => '', 'dashboard' => '', 'portfolio' => '', 'fund' => '', 'chart' => '', 'document' => '', 'spreadsheet' => '', 'download' => '', 'upload' => '', 'filter' => '', 'search' => '', 'user' => '', 'settings' => '', 'plus' => '', 'minus' => '', 'check' => '', 'x' => '', 'edit' => '', 'trash' => '', 'external' => '', 'arrow-right' => '', 'arrow-left' => '', 'chevron-up' => '', 'chevron-down' => '', 'chevron-left' => '', 'chevron-right' => '', 'trend-up' => '', 'trend-down' => '', 'euro' => '', 'wallet' => '', 'coins' => '', 'transfer' => '', 'users' => '', 'capital' => '', 'investment' => '', 'status' => '', 'info' => '', 'alert' => '', 'eye' => '', 'grid' => '', 'layers' => '', 'building' => '', 'sort' => '', 'grip-vertical' => '', ]; $resolvedName = $aliases[$name] ?? $name; $path = $icons[$resolvedName] ?? $icons['external']; $sizeValue = is_numeric($size) ? $size.'px' : ($size ?: '1em'); $strokeValue = $stroke ?: '1.75'; @endphp class('kv-icon')->merge([ 'viewBox' => '0 0 24 24', 'width' => $sizeValue, 'height' => $sizeValue, 'fill' => 'none', 'stroke' => 'currentColor', 'stroke-width' => $strokeValue, 'stroke-linecap' => 'round', 'stroke-linejoin' => 'round', 'aria-hidden' => $title ? null : 'true', 'role' => $title ? 'img' : null, 'style' => '--kv-icon-size: '.$sizeValue, ]) }} > @if ($title) {{ $title }} @endif {!! $path !!}