{% comment %} Icon Component - SVG Icon Wrapper A component for rendering SVG icons consistently. Provides a library of common icons and supports custom SVG content. Replaces Font Awesome with inline SVGs for better customization and smaller bundle size. Usage Examples: Named icon: {% include 'components/ui/icon.html' with name='search' %} With size: {% include 'components/ui/icon.html' with name='menu' size='lg' %} With custom class: {% include 'components/ui/icon.html' with name='user' class='text-primary' %} Custom SVG content: {% include 'components/ui/icon.html' with svg='' %} Parameters: - name: Icon name from the built-in library - size: 'xs', 'sm', 'md', 'lg', 'xl' (default: 'md') - class: Additional CSS classes - svg: Custom SVG path content (for icons not in the library) - stroke_width: SVG stroke width (default: 2) - aria_label: Accessibility label (required for meaningful icons) - aria_hidden: Set to 'false' for meaningful icons (default: 'true' for decorative) Available Icons: Navigation: menu, close, chevron-down, chevron-up, chevron-left, chevron-right, arrow-left, arrow-right, arrow-up, arrow-down, external-link Actions: search, plus, minus, edit, trash, download, upload, copy, share, refresh User: user, users, settings, logout, login Status: check, x, info, warning, error, question Media: image, video, music, file, folder Communication: mail, phone, message, bell, send Social: heart, star, bookmark, thumbs-up, thumbs-down Misc: home, calendar, clock, map-pin, globe, sun, moon, eye, eye-off, lock, unlock {% endcomment %} {% with icon_size=size|default:'md' %} {% if svg %} {{ svg|safe }} {% elif name == 'search' %} {% elif name == 'menu' %} {% elif name == 'close' or name == 'x' %} {% elif name == 'chevron-down' %} {% elif name == 'chevron-up' %} {% elif name == 'chevron-left' %} {% elif name == 'chevron-right' %} {% elif name == 'arrow-left' %} {% elif name == 'arrow-right' %} {% elif name == 'arrow-up' %} {% elif name == 'arrow-down' %} {% elif name == 'external-link' %} {% elif name == 'plus' %} {% elif name == 'minus' %} {% elif name == 'edit' or name == 'pencil' %} {% elif name == 'trash' or name == 'delete' %} {% elif name == 'download' %} {% elif name == 'upload' %} {% elif name == 'copy' %} {% elif name == 'share' %} {% elif name == 'refresh' %} {% elif name == 'user' %} {% elif name == 'users' %} {% elif name == 'settings' or name == 'cog' %} {% elif name == 'logout' or name == 'sign-out' %} {% elif name == 'login' or name == 'sign-in' %} {% elif name == 'check' %} {% elif name == 'info' %} {% elif name == 'warning' or name == 'alert-triangle' %} {% elif name == 'error' or name == 'alert-circle' %} {% elif name == 'question' or name == 'help-circle' %} {% elif name == 'image' %} {% elif name == 'file' %} {% elif name == 'folder' %} {% elif name == 'mail' or name == 'email' %} {% elif name == 'phone' %} {% elif name == 'message' or name == 'chat' %} {% elif name == 'bell' %} {% elif name == 'send' %} {% elif name == 'heart' %} {% elif name == 'star' %} {% elif name == 'bookmark' %} {% elif name == 'thumbs-up' %} {% elif name == 'thumbs-down' %} {% elif name == 'home' %} {% elif name == 'calendar' %} {% elif name == 'clock' %} {% elif name == 'map-pin' or name == 'location' %} {% elif name == 'globe' %} {% elif name == 'sun' %} {% elif name == 'moon' %} {% elif name == 'eye' %} {% elif name == 'eye-off' %} {% elif name == 'lock' %} {% elif name == 'unlock' %} {% elif name == 'filter' %} {% elif name == 'sort' %} {% elif name == 'grid' %} {% elif name == 'list' %} {% elif name == 'more-horizontal' or name == 'dots' %} {% elif name == 'more-vertical' %} {% elif name == 'loader' or name == 'spinner' %} {% else %} {# Default: question mark icon for unknown names #} {% endif %} {% endwith %}