Galactic Tournament’s shared component library lives entirely underDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/HectorDNC/galactic-tournament-front/llms.txt
Use this file to discover all available pages before exploring further.
src/app/shared/. Every component is standalone — each declares its own imports array rather than belonging to a shared NgModule. This makes them individually tree-shakeable and easy to pull into both eager and lazy-loaded contexts. The sections below group components by their role in the application.
Layout Components
The layout components form the persistent shell that surrounds every in-app page. They are composed insideAppLayoutComponent, which is the root shell mounted by the router.
AppLayoutComponent
Selector:
app-layoutPath: shared/layout/app-layout/Root shell component. Renders AppSidebarComponent, AppHeaderComponent, BackdropComponent, and AlertToastComponent around a <router-outlet>. Injects SidebarService and exposes isExpanded$, isHovered$, and isMobileOpen$ to the template so the content area can shift its left margin between xl:ml-[290px] (expanded) and xl:ml-[90px] (collapsed) with a CSS transition.AppSidebarComponent
Selector:
app-sidebarPath: shared/layout/app-sidebar/Primary navigation sidebar. Declares a navItems array with four entries — Dashboard (/), Especies (/species), Combates (/battles), and Ranking (/battle-statistics/ranking) — each carrying an inline SVG icon string rendered through SafeHtmlPipe. Supports nested sub-items with animated height transitions via subMenuHeights. Reacts to SidebarService streams for expanded, mobile-open, and hovered states, and subscribes to Router.events to highlight the active route.AppHeaderComponent
Selector:
app-headerPath: shared/layout/app-header/Top navigation bar. Embeds ThemeToggleButtonComponent, NotificationDropdownComponent, and UserDropdownComponent. The hamburger/toggle button calls SidebarService.toggleExpanded() on desktop (window.innerWidth >= 1280) and SidebarService.toggleMobileOpen() on smaller viewports.SidebarWidgetComponent
Selector:
app-sidebar-widgetPath: shared/layout/app-sidebar/Optional widget slot rendered at the bottom of the sidebar. Use it to embed quick-action cards or upgrade prompts without modifying the sidebar’s navigation list.UI Components
Primitive building blocks used throughout feature modules and pages.BadgeComponent
Selector: Color tokens in
app-badgePath: shared/components/ui/badge/Inline status chip that accepts three inputs — color, variant, and size — and optionally renders startIcon / endIcon HTML strings via SafeHtmlPipe.light variant:color | Background | Text |
|---|---|---|
primary | bg-brand-50 | text-brand-500 |
success | bg-success-50 | text-success-600 |
error | bg-error-50 | text-error-600 |
warning | bg-warning-50 | text-warning-600 |
info | bg-blue-light-50 | text-blue-light-500 |
light | bg-gray-100 | text-gray-700 |
dark | bg-gray-500 | text-white |
ModalComponent
Selector: Setting
app-modalPath: shared/components/ui/modal/Generic overlay modal. Controlled externally via @Input() isOpen: boolean and emits @Output() close: EventEmitter<void> when the user clicks the backdrop or presses Escape.isFullscreen = true disables backdrop-click dismissal. The component manages document.body.style.overflow to prevent scroll bleed while the modal is open.AlertToastComponent
Selector:
app-alert-toastPath: shared/components/common/alert-toast/Renders the live queue of notifications emitted by AlertService. On ngOnInit it subscribes to AlertService.alerts$ and stores the array in alerts: Alert[]. The template iterates over that array, maps each Alert.type to a border/background colour class, and plays a slideIn CSS animation when a new toast appears.Calling dismiss(id) delegates to AlertService.dismiss(id), which removes the alert from the BehaviorSubject and causes the component to re-render automatically.ButtonComponent
Selector: The
app-buttonPath: shared/components/ui/button/Styled button primitive wrapping a native <button> element with design-system classes.primary variant renders a filled brand-coloured button; outline renders a white/gray outlined button. When disabled is true, the btnClick event is suppressed and an opacity-50 cursor-not-allowed style is applied.DropdownComponent
Selector:
app-dropdownPath: shared/components/ui/dropdown/Generic dropdown wrapper controlled externally via @Input() isOpen. Emits a close event when a click outside the dropdown panel is detected, allowing the parent to update its state. Pair it with app-dropdown-item children to build context menus or action menus.AvatarComponent / AvatarTextComponent
Selectors:
app-avatar, app-avatar-textPath: shared/components/ui/avatar/Two complementary avatar primitives. AvatarComponent renders an image-based circular avatar, while AvatarTextComponent renders an initials-based fallback. Both are used inside UserDropdownComponent in the header.Form Components
Reusable form controls live inshared/components/form/. Each wraps a native HTML input or select with consistent labelling, validation state styling, and accessibility attributes.
InputFieldComponent
Path:
shared/components/form/input/Standard single-line text input with label, hint, and error-state support.TextAreaComponent
Path:
shared/components/form/form-elements/text-area-input/Multi-line text input with matching label and validation state styling.SelectComponent
Path:
shared/components/form/select/Native <select> wrapper with design-system styling.MultiSelectComponent
Path:
shared/components/form/multi-select/Custom multi-select control for choosing multiple options from a list.CheckboxComponent
Path:
shared/components/form/form-elements/checkbox-components/Styled checkbox with an accessible label.RadioComponent
Path:
shared/components/form/form-elements/radio-buttons/Styled radio button group.SwitchComponent
Path:
shared/components/form/form-elements/toggle-switch/Toggle switch (boolean on/off control).Chart Components
Chart components live inshared/components/charts/ and integrate the ng-apexcharts library. Both components encapsulate their own ApexCharts configuration and data internally — they expose no @Input() properties and are used as self-contained display elements dropped into a page template.
BarChartOneComponent
Path:
shared/components/charts/bar/bar-chart-one/Renders a vertical bar chart using ng-apexcharts. Internally configures series, axes, colours, and tooltip formatting. Embed with <app-bar-chart-one> — no inputs required.LineChartOneComponent
Path:
shared/components/charts/line/line-chart-one/Renders a multi-series line chart using ng-apexcharts. Internally configures series, stroke, fill, and grid settings. Embed with <app-line-chart-one> — no inputs required.Utility Pipe
SafeHtmlPipe
Path:shared/pipe/safe-html.pipe.ts
Pipe name: safeHtml
A thin wrapper around Angular’s DomSanitizer.bypassSecurityTrustHtml(). It is used wherever inline SVG strings stored in component data need to be rendered safely into the DOM — most notably for the icon strings in AppSidebarComponent and the icon inputs of BadgeComponent.
Only pass trusted, application-controlled strings to
safeHtml. Never pipe user-supplied content through this pipe, as it bypasses Angular’s built-in XSS sanitisation.