import { Component, inject } from '@angular/core';
import { RouterLink } from '@angular/router';
import { AfricaniesIconComponent } from '@africanies/africanies-icons';
import { ModeColorService } from '@africanies/africanies-theme';
import { ButtonComponent } from '@africanies/africanies-ui';
interface CatalogCard {
path: string;
title: string;
blurb: string;
icon:
| 'adjust'
| 'info-circle'
| 'ellipsis-v'
| 'warning'
| 'modal'
| 'accordion-menu'
| 'align-justify'
| 'warehouse'
| 'panel'
| 'abacus'
| 'palette'
| 'code'
| 'globe'
| 'filter'
| 'tags'
| 'book'
| 'truck'
| 'key';
group: string;
}
/**
* Playground landing — brand-forward overview of the SDK catalog.
*/
@Component({
selector: 'app-home-page',
standalone: true,
imports: [RouterLink, ButtonComponent, AfricaniesIconComponent],
template: `
African Import Export Solutions
The shared UI toolkit for Import & Export apps.
Owned by AFRICANIES for every product surface we ship. One Angular SDK —
components, icons, tokens, and API wiring — with Import (STN) and
Export (SFN) modes built in so accents and behavior match production.
- Packages
- 6
- Icons
- 638
- API services
- 6
Catalog
Jump into a surface
`,
})
export class HomePage {
protected readonly modeColor = inject(ModeColorService);
protected readonly cards: CatalogCard[] = [
{
path: '/components/button',
title: 'Button',
blurb: 'Primary, secondary, ghost, and danger actions — mode-colored primary.',
icon: 'adjust',
group: 'Components',
},
{
path: '/components/alert',
title: 'Alert',
blurb: 'Inline page notices the user can dismiss — not fetch errors.',
icon: 'info-circle',
group: 'Components',
},
{
path: '/components/chip',
title: 'Chip',
blurb: 'Status and category labels for tables, filters, and tags.',
icon: 'tags',
group: 'Components',
},
{
path: '/components/action-menu',
title: 'Action menu',
blurb: 'Overflow (…) menu for row and toolbar actions.',
icon: 'ellipsis-v',
group: 'Components',
},
{
path: '/components/feedback',
title: 'Feedback states',
blurb: 'Loading, error, empty, and AsyncState for query-driven regions.',
icon: 'warning',
group: 'Components',
},
{
path: '/components/overlays',
title: 'Overlays',
blurb: 'Modal, drawer, and confirm via service APIs.',
icon: 'modal',
group: 'Components',
},
{
path: '/components/forms',
title: 'Form controls',
blurb: 'Shared inputs with label, hint, error, and form binding.',
icon: 'accordion-menu',
group: 'Components',
},
{
path: '/components/filters',
title: 'Filters',
blurb: 'Schema-driven list filter drawer and URL/HTTP serialize.',
icon: 'filter',
group: 'Components',
},
{
path: '/components/tooltip',
title: 'Tooltip',
blurb: 'Short help beside dense labels and controls.',
icon: 'info-circle',
group: 'Components',
},
{
path: '/components/toast',
title: 'Toast',
blurb: 'Corner messages after actions — timed, sticky errors, HTTP tags.',
icon: 'warning',
group: 'Components',
},
{
path: '/components/navigation/overview',
title: 'Navigation',
blurb: 'App shell, side nav, breadcrumbs, tabs, and segments.',
icon: 'panel',
group: 'Components',
},
{
path: '/components/table',
title: 'Table & pagination',
blurb: 'Presentational grid with template cells and server paging.',
icon: 'align-justify',
group: 'Components',
},
{
path: '/components/stepper',
title: 'Stepper',
blurb: 'Multi-step wizards — linear or free navigation.',
icon: 'warehouse',
group: 'Components',
},
{
path: '/usecases/shipment',
title: 'Back button and Breadcrumbs',
blurb: 'App-shell Back and breadcrumbs, plus a list that restores filters and page from the URL.',
icon: 'truck',
group: 'Use cases',
},
{
path: '/usecases/onboarding/login',
title: 'Forgot password',
blurb: 'Email-only reset link from login. First-login default password is a separate screen.',
icon: 'key',
group: 'Use cases',
},
{
path: '/icons',
title: 'Icon gallery',
blurb: 'Browse and copy every IconName from the sprite.',
icon: 'abacus',
group: 'Foundation',
},
{
path: '/tokens',
title: 'Design tokens',
blurb: 'Colors, type, and Import/Export accents from the theme.',
icon: 'palette',
group: 'Foundation',
},
// {
// path: '/models',
// title: 'Shared models',
// blurb: 'Field shapes from @africanies/africanies-models — types only.',
// icon: 'code',
// group: 'Foundation',
// },
// {
// path: '/api',
// title: 'SDK API',
// blurb: 'How to call services — ResourceId, paths, and usage snippets.',
// icon: 'globe',
// group: 'Foundation',
// },
{
path: '/lecture',
title: 'Lecture',
blurb: 'Angular & RxJS concepts linked from Show code panels.',
icon: 'book',
group: 'Learn',
},
];
}