@smartsoft001/pro-claude-plugins 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +26 -0
- package/README.md +56 -0
- package/package.json +14 -0
- package/plugins/flow/.claude-plugin/README.md +91 -0
- package/plugins/flow/.claude-plugin/merge-permissions.js +115 -0
- package/plugins/flow/.claude-plugin/plugin.json +5 -0
- package/plugins/flow/.claude-plugin/settings.template.json +86 -0
- package/plugins/flow/agents/angular-component-scaffolder.md +176 -0
- package/plugins/flow/agents/angular-directive-builder.md +154 -0
- package/plugins/flow/agents/angular-guard-builder.md +244 -0
- package/plugins/flow/agents/angular-jest-test-writer.md +475 -0
- package/plugins/flow/agents/angular-pipe-builder.md +170 -0
- package/plugins/flow/agents/angular-resolver-builder.md +287 -0
- package/plugins/flow/agents/angular-service-builder.md +162 -0
- package/plugins/flow/agents/angular-signal-state-builder.md +340 -0
- package/plugins/flow/agents/angular-test-diagnostician.md +279 -0
- package/plugins/flow/agents/angular-testbed-configurator.md +315 -0
- package/plugins/flow/agents/arch-scaffolder.md +278 -0
- package/plugins/flow/agents/e2e-data-testid-injector.md +195 -0
- package/plugins/flow/agents/e2e-project-scaffolder.md +194 -0
- package/plugins/flow/agents/e2e-test-writer.md +357 -0
- package/plugins/flow/agents/shared-agent-evolver.md +294 -0
- package/plugins/flow/agents/shared-build-verifier.md +160 -0
- package/plugins/flow/agents/shared-config-updater.md +310 -0
- package/plugins/flow/agents/shared-coverage-enforcer.md +184 -0
- package/plugins/flow/agents/shared-error-handler.md +217 -0
- package/plugins/flow/agents/shared-file-creator.md +344 -0
- package/plugins/flow/agents/shared-impl-orchestrator.md +312 -0
- package/plugins/flow/agents/shared-impl-reporter.md +368 -0
- package/plugins/flow/agents/shared-impl-teammate.md +201 -0
- package/plugins/flow/agents/shared-linear-subtask-iterator.md +337 -0
- package/plugins/flow/agents/shared-logic-implementer.md +244 -0
- package/plugins/flow/agents/shared-maia-api.md +26 -0
- package/plugins/flow/agents/shared-parallelization-analyzer.md +343 -0
- package/plugins/flow/agents/shared-performance-validator.md +168 -0
- package/plugins/flow/agents/shared-plan-perspective.md +271 -0
- package/plugins/flow/agents/shared-project-standardizer.md +205 -0
- package/plugins/flow/agents/shared-report-synthesizer.md +188 -0
- package/plugins/flow/agents/shared-review-teammate.md +189 -0
- package/plugins/flow/agents/shared-security-scanner.md +186 -0
- package/plugins/flow/agents/shared-style-enforcer.md +230 -0
- package/plugins/flow/agents/shared-subtask-dependency-analyzer.md +189 -0
- package/plugins/flow/agents/shared-tdd-developer.md +350 -0
- package/plugins/flow/agents/shared-team-coordinator.md +192 -0
- package/plugins/flow/agents/shared-test-fixer.md +186 -0
- package/plugins/flow/agents/shared-test-runner.md +191 -0
- package/plugins/flow/agents/shared-ui-classifier.md +263 -0
- package/plugins/flow/agents/shared-verification-orchestrator.md +194 -0
- package/plugins/flow/agents/shared-verification-runner.md +140 -0
- package/plugins/flow/agents/ui-a11y-validator.md +305 -0
- package/plugins/flow/agents/ui-screenshot-reporter.md +329 -0
- package/plugins/flow/agents/ui-web-designer.md +214 -0
- package/plugins/flow/scripts/compute-session-tokens.sh +39 -0
- package/plugins/flow/skills/a11y-audit/SKILL.md +214 -0
- package/plugins/flow/skills/angular-patterns/SKILL.md +191 -0
- package/plugins/flow/skills/browser-capture/SKILL.md +238 -0
- package/plugins/flow/skills/commit/SKILL.md +259 -0
- package/plugins/flow/skills/debug-helper/SKILL.md +375 -0
- package/plugins/flow/skills/impl/SKILL.md +992 -0
- package/plugins/flow/skills/karpathy-guidelines/SKILL.md +72 -0
- package/plugins/flow/skills/linear-suggestion/SKILL.md +132 -0
- package/plugins/flow/skills/maia-files-delete/SKILL.md +59 -0
- package/plugins/flow/skills/maia-files-upload/SKILL.md +57 -0
- package/plugins/flow/skills/nx-conventions/SKILL.md +326 -0
- package/plugins/flow/skills/plan/SKILL.md +1033 -0
- package/plugins/flow/skills/push/SKILL.md +759 -0
- package/plugins/flow/skills/review/SKILL.md +443 -0
- package/plugins/flow/skills/test-e2e/SKILL.md +164 -0
- package/plugins/flow/skills/test-unit/SKILL.md +456 -0
- package/plugins/flow-external/.claude-plugin/README.md +146 -0
- package/plugins/flow-external/.claude-plugin/merge-permissions.js +94 -0
- package/plugins/flow-external/.claude-plugin/plugin.json +5 -0
- package/plugins/flow-external/.claude-plugin/settings.template.json +78 -0
- package/plugins/flow-external/agents/angular-component-scaffolder.md +271 -0
- package/plugins/flow-external/agents/angular-directive-builder.md +134 -0
- package/plugins/flow-external/agents/angular-guard-builder.md +73 -0
- package/plugins/flow-external/agents/angular-pipe-builder.md +90 -0
- package/plugins/flow-external/agents/angular-resolver-builder.md +79 -0
- package/plugins/flow-external/agents/angular-service-builder.md +168 -0
- package/plugins/flow-external/agents/angular-state-builder.md +263 -0
- package/plugins/flow-external/agents/shared-build-verifier.md +67 -0
- package/plugins/flow-external/agents/shared-impl-orchestrator.md +90 -0
- package/plugins/flow-external/agents/shared-impl-reporter.md +135 -0
- package/plugins/flow-external/agents/shared-linear-subtask-iterator.md +70 -0
- package/plugins/flow-external/agents/shared-ui-classifier.md +38 -0
- package/plugins/flow-external/agents/ui-web-designer.md +203 -0
- package/plugins/flow-external/scripts/compute-session-tokens.sh +39 -0
- package/plugins/flow-external/skills/a11y-audit/SKILL.md +97 -0
- package/plugins/flow-external/skills/angular-cli-conventions/SKILL.md +268 -0
- package/plugins/flow-external/skills/angular-patterns/SKILL.md +182 -0
- package/plugins/flow-external/skills/browser-capture/SKILL.md +74 -0
- package/plugins/flow-external/skills/commit/SKILL.md +114 -0
- package/plugins/flow-external/skills/debug-helper/SKILL.md +135 -0
- package/plugins/flow-external/skills/impl/SKILL.md +218 -0
- package/plugins/flow-external/skills/karpathy-guidelines/SKILL.md +72 -0
- package/plugins/flow-external/skills/linear-suggestion/SKILL.md +62 -0
- package/plugins/flow-external/skills/maia-files-delete/SKILL.md +34 -0
- package/plugins/flow-external/skills/maia-files-upload/SKILL.md +41 -0
- package/plugins/flow-external/skills/plan/SKILL.md +334 -0
- package/plugins/flow-external/skills/push/SKILL.md +232 -0
- package/plugins/flow-legacy/.claude-plugin/README.md +143 -0
- package/plugins/flow-legacy/.claude-plugin/merge-permissions.js +94 -0
- package/plugins/flow-legacy/.claude-plugin/plugin.json +5 -0
- package/plugins/flow-legacy/.claude-plugin/settings.template.json +79 -0
- package/plugins/flow-legacy/agents/angular-component-scaffolder.md +327 -0
- package/plugins/flow-legacy/agents/angular-directive-builder.md +253 -0
- package/plugins/flow-legacy/agents/angular-guard-builder.md +326 -0
- package/plugins/flow-legacy/agents/angular-pipe-builder.md +238 -0
- package/plugins/flow-legacy/agents/angular-resolver-builder.md +339 -0
- package/plugins/flow-legacy/agents/angular-service-builder.md +271 -0
- package/plugins/flow-legacy/agents/angular-state-builder.md +480 -0
- package/plugins/flow-legacy/agents/shared-impl-orchestrator.md +174 -0
- package/plugins/flow-legacy/agents/shared-impl-reporter.md +232 -0
- package/plugins/flow-legacy/agents/shared-linear-subtask-iterator.md +198 -0
- package/plugins/flow-legacy/agents/shared-tdd-developer.md +307 -0
- package/plugins/flow-legacy/agents/shared-test-runner.md +133 -0
- package/plugins/flow-legacy/agents/shared-ui-classifier.md +145 -0
- package/plugins/flow-legacy/scripts/compute-session-tokens.sh +39 -0
- package/plugins/flow-legacy/skills/a11y-audit/SKILL.md +214 -0
- package/plugins/flow-legacy/skills/angular-patterns/SKILL.md +346 -0
- package/plugins/flow-legacy/skills/browser-capture/SKILL.md +238 -0
- package/plugins/flow-legacy/skills/commit/SKILL.md +215 -0
- package/plugins/flow-legacy/skills/debug-helper/SKILL.md +395 -0
- package/plugins/flow-legacy/skills/impl/SKILL.md +710 -0
- package/plugins/flow-legacy/skills/karpathy-guidelines/SKILL.md +72 -0
- package/plugins/flow-legacy/skills/linear-suggestion/SKILL.md +132 -0
- package/plugins/flow-legacy/skills/maia-files-delete/SKILL.md +59 -0
- package/plugins/flow-legacy/skills/maia-files-upload/SKILL.md +57 -0
- package/plugins/flow-legacy/skills/nx-conventions/SKILL.md +368 -0
- package/plugins/flow-legacy/skills/plan/SKILL.md +742 -0
- package/plugins/flow-legacy/skills/push/SKILL.md +645 -0
- package/plugins/flow-legacy/skills/test-unit/SKILL.md +500 -0
- package/plugins/smart-pro/.claude-plugin/README.md +115 -0
- package/plugins/smart-pro/.claude-plugin/merge-permissions.js +129 -0
- package/plugins/smart-pro/.claude-plugin/plugin.json +5 -0
- package/plugins/smart-pro/.claude-plugin/settings.template.json +94 -0
- package/plugins/smart-pro/agents/angular-components/AGENT.md +214 -0
- package/plugins/smart-pro/hooks/CONFIG.md +198 -0
- package/plugins/smart-pro/hooks/README.md +139 -0
- package/plugins/smart-pro/hooks/audit_logger.py +107 -0
- package/plugins/smart-pro/hooks/auto_format.sh +11 -0
- package/plugins/smart-pro/hooks/hooks.json +79 -0
- package/plugins/smart-pro/hooks/safety_validator.py +129 -0
- package/plugins/smart-pro/hooks/sensitive_file_blocker.py +58 -0
- package/plugins/smart-pro/hooks/skill_validator.py +220 -0
- package/plugins/smart-pro/skills/angular-components-action-panel/SKILL.md +159 -0
- package/plugins/smart-pro/skills/angular-components-avatar/SKILL.md +142 -0
- package/plugins/smart-pro/skills/angular-components-badge/SKILL.md +110 -0
- package/plugins/smart-pro/skills/angular-components-breadcrumbs/SKILL.md +91 -0
- package/plugins/smart-pro/skills/angular-components-button/SKILL.md +146 -0
- package/plugins/smart-pro/skills/angular-components-button-group/SKILL.md +121 -0
- package/plugins/smart-pro/skills/angular-components-calendar/SKILL.md +78 -0
- package/plugins/smart-pro/skills/angular-components-card/SKILL.md +110 -0
- package/plugins/smart-pro/skills/angular-components-card-heading/SKILL.md +105 -0
- package/plugins/smart-pro/skills/angular-components-command-palette/SKILL.md +168 -0
- package/plugins/smart-pro/skills/angular-components-container/SKILL.md +93 -0
- package/plugins/smart-pro/skills/angular-components-description-list/SKILL.md +102 -0
- package/plugins/smart-pro/skills/angular-components-details/SKILL.md +70 -0
- package/plugins/smart-pro/skills/angular-components-divider/SKILL.md +110 -0
- package/plugins/smart-pro/skills/angular-components-drawer/SKILL.md +136 -0
- package/plugins/smart-pro/skills/angular-components-dropdown/SKILL.md +131 -0
- package/plugins/smart-pro/skills/angular-components-empty-state/SKILL.md +103 -0
- package/plugins/smart-pro/skills/angular-components-feed/SKILL.md +110 -0
- package/plugins/smart-pro/skills/angular-components-form/SKILL.md +77 -0
- package/plugins/smart-pro/skills/angular-components-grid-list/SKILL.md +91 -0
- package/plugins/smart-pro/skills/angular-components-input/SKILL.md +118 -0
- package/plugins/smart-pro/skills/angular-components-list/SKILL.md +75 -0
- package/plugins/smart-pro/skills/angular-components-list-container/SKILL.md +106 -0
- package/plugins/smart-pro/skills/angular-components-media-object/SKILL.md +133 -0
- package/plugins/smart-pro/skills/angular-components-modal/SKILL.md +159 -0
- package/plugins/smart-pro/skills/angular-components-multi-column-layout/SKILL.md +84 -0
- package/plugins/smart-pro/skills/angular-components-navbar/SKILL.md +93 -0
- package/plugins/smart-pro/skills/angular-components-notification/SKILL.md +147 -0
- package/plugins/smart-pro/skills/angular-components-page/SKILL.md +162 -0
- package/plugins/smart-pro/skills/angular-components-page-heading/SKILL.md +96 -0
- package/plugins/smart-pro/skills/angular-components-paging/SKILL.md +86 -0
- package/plugins/smart-pro/skills/angular-components-progress-bars/SKILL.md +94 -0
- package/plugins/smart-pro/skills/angular-components-searchbar/SKILL.md +113 -0
- package/plugins/smart-pro/skills/angular-components-section-heading/SKILL.md +156 -0
- package/plugins/smart-pro/skills/angular-components-select-menu/SKILL.md +101 -0
- package/plugins/smart-pro/skills/angular-components-sidebar-layout/SKILL.md +121 -0
- package/plugins/smart-pro/skills/angular-components-sidebar-navigation/SKILL.md +80 -0
- package/plugins/smart-pro/skills/angular-components-sign-in-form/SKILL.md +91 -0
- package/plugins/smart-pro/skills/angular-components-stacked-layout/SKILL.md +114 -0
- package/plugins/smart-pro/skills/angular-components-stacked-list/SKILL.md +93 -0
- package/plugins/smart-pro/skills/angular-components-stats/SKILL.md +87 -0
- package/plugins/smart-pro/skills/angular-components-table/SKILL.md +98 -0
- package/plugins/smart-pro/skills/angular-components-tabs/SKILL.md +99 -0
- package/plugins/smart-pro/skills/angular-components-textarea/SKILL.md +111 -0
- package/plugins/smart-pro/skills/angular-components-toggle/SKILL.md +109 -0
- package/plugins/smart-pro/skills/angular-components-vertical-navigation/SKILL.md +139 -0
- package/plugins/smart-pro/skills/audit-log/SKILL.md +82 -0
- package/plugins/smart-pro/skills/format-code/SKILL.md +46 -0
- package/plugins/smart-pro/skills/project-conventions/SKILL.md +90 -0
- package/plugins/smart-pro/skills/safety-check/SKILL.md +0 -0
- package/src/index.d.ts +6 -0
- package/src/index.js +7 -0
- package/src/index.js.map +1 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-components-multi-column-layout
|
|
3
|
+
description: Multi-column layout component for @smartsoft001/pro-angular. Three variants (constrained, full-width, narrow-sidebar) with composable flags (`sticky`, `secondaryRight`, `hasHeader`).
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Multi-Column Layout Component (Pro)
|
|
8
|
+
|
|
9
|
+
Use `<smartpro-multi-column-layout>` and pick a variant via `variant`. Each variant renders a three-column page shell — a primary navigation column on the left, a main content area, and an optional secondary aside. Slots come from `IMultiColumnLayoutOptionsPro.navTpl` / `secondaryTpl` / `headerTpl`. Page body goes via `<ng-content>`.
|
|
10
|
+
|
|
11
|
+
## Variants
|
|
12
|
+
|
|
13
|
+
| `variant` (default `'constrained'`) | Selector | Description |
|
|
14
|
+
| ----------------------------------- | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `'constrained'` | `smartpro-multi-column-layout-constrained` | Constrained `max-w-7xl` row with primary nav, main, and secondary aside. Default uses an `xl` breakpoint with a left-bordered secondary aside. `sticky: true` switches to `lg` breakpoint with sticky `top-8` primary nav and sticky aside (no border). |
|
|
16
|
+
| `'full-width'` | `smartpro-multi-column-layout-full-width` | Full-width shell with a fixed primary nav column on the left and a fixed secondary aside. Default places the aside on the left (next to the nav, with `xl:pl-96` main offset). `secondaryRight: true` puts the aside on the right (with `xl:pr-96` main offset and a left border). |
|
|
17
|
+
| `'narrow-sidebar'` | `smartpro-multi-column-layout-narrow-sidebar` | Narrow (`w-20`) dark rail nav on the left + secondary aside + main. `hasHeader: true` adds a sticky `headerTpl` row on top and offsets the rail and aside below it. |
|
|
18
|
+
|
|
19
|
+
## API
|
|
20
|
+
|
|
21
|
+
### IMultiColumnLayoutOptionsPro (`multi-column-layout.types.ts`, extends `IMultiColumnLayoutOptions`)
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
type SmartMultiColumnLayoutVariantPro =
|
|
25
|
+
| 'constrained'
|
|
26
|
+
| 'full-width'
|
|
27
|
+
| 'narrow-sidebar';
|
|
28
|
+
|
|
29
|
+
interface IMultiColumnLayoutOptionsPro {
|
|
30
|
+
title?: string;
|
|
31
|
+
navTpl?: TemplateRef<unknown>;
|
|
32
|
+
secondaryTpl?: TemplateRef<unknown>;
|
|
33
|
+
headerTpl?: TemplateRef<unknown>;
|
|
34
|
+
sticky?: boolean;
|
|
35
|
+
secondaryRight?: boolean;
|
|
36
|
+
hasHeader?: boolean;
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Wrapper Inputs
|
|
41
|
+
|
|
42
|
+
| Input | Type | Default | Description |
|
|
43
|
+
| --------- | --------------------------------------------------- | --------------- | -------------------- |
|
|
44
|
+
| `variant` | `'constrained' \| 'full-width' \| 'narrow-sidebar'` | `'constrained'` | Variant family. |
|
|
45
|
+
| `options` | `IMultiColumnLayoutOptionsPro \| undefined` | `undefined` | Title, slots, flags. |
|
|
46
|
+
| `class` | `string` | `''` | Extra CSS classes. |
|
|
47
|
+
|
|
48
|
+
## Usage Example
|
|
49
|
+
|
|
50
|
+
```html
|
|
51
|
+
<ng-template #nav><nav>…</nav></ng-template>
|
|
52
|
+
<ng-template #secondary><aside>…</aside></ng-template>
|
|
53
|
+
<ng-template #header><div>…</div></ng-template>
|
|
54
|
+
|
|
55
|
+
<!-- Constrained, sticky -->
|
|
56
|
+
<smartpro-multi-column-layout
|
|
57
|
+
[options]="{ navTpl: nav, secondaryTpl: secondary, sticky: true }"
|
|
58
|
+
>
|
|
59
|
+
<div>Page content</div>
|
|
60
|
+
</smartpro-multi-column-layout>
|
|
61
|
+
|
|
62
|
+
<!-- Full-width with secondary on the right -->
|
|
63
|
+
<smartpro-multi-column-layout
|
|
64
|
+
variant="full-width"
|
|
65
|
+
[options]="{ navTpl: nav, secondaryTpl: secondary, secondaryRight: true }"
|
|
66
|
+
>
|
|
67
|
+
<div>Page content</div>
|
|
68
|
+
</smartpro-multi-column-layout>
|
|
69
|
+
|
|
70
|
+
<!-- Narrow sidebar with header -->
|
|
71
|
+
<smartpro-multi-column-layout
|
|
72
|
+
variant="narrow-sidebar"
|
|
73
|
+
[options]="{ navTpl: nav, secondaryTpl: secondary, headerTpl: header, hasHeader: true }"
|
|
74
|
+
>
|
|
75
|
+
<div>Page content</div>
|
|
76
|
+
</smartpro-multi-column-layout>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## File Locations
|
|
80
|
+
|
|
81
|
+
- Wrapper: `packages/shared/angular/src/lib/components/multi-column-layout/multi-column-layout.component.ts`
|
|
82
|
+
- Types: `packages/shared/angular/src/lib/components/multi-column-layout/multi-column-layout.types.ts`
|
|
83
|
+
- Variants: `packages/shared/angular/src/lib/components/multi-column-layout/{constrained,full-width,narrow-sidebar}/<name>.component.ts`
|
|
84
|
+
- Stories: `packages/shared/angular/src/lib/components/multi-column-layout/multi-column-layout.component.stories.ts`
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-components-navbar
|
|
3
|
+
description: Navbar component for @smartsoft001/pro-angular. Five layouts (simple, with-search, with-quick-action, with-secondary-links, with-column-layout) with composable flags `menuPosition`, `searchAlignment`, and `dark`.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Navbar Component (Pro)
|
|
8
|
+
|
|
9
|
+
Use `<smartpro-navbar>` and pick a layout via `options.layout`. The component renders a top-of-page navigation bar with logo, items, optional notification + user menu slots, and a mobile-menu toggle. Each layout supports a `dark` flag for dark-themed surfaces.
|
|
10
|
+
|
|
11
|
+
## Layouts
|
|
12
|
+
|
|
13
|
+
| `options.layout` (default `'simple'`) | Selector | Description |
|
|
14
|
+
| ------------------------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `'simple'` | `smartpro-navbar-simple` | Logo + horizontal items + notification/user-menu slots. `menuPosition: 'left'` switches to the menu-on-left layout (logo and items grouped on the left, user menu on the right) — replaces the legacy `simple-with-menu-on-left` variant. |
|
|
16
|
+
| `'with-search'` | `smartpro-navbar-with-search` | Logo + items + search box + notification/user-menu. Default puts the search box on the right (`searchAlignment: 'left'`). `searchAlignment: 'centered'` switches to a centered search box with `secondaryItems` on the right — replaces the legacy `with-centered-search` variant. |
|
|
17
|
+
| `'with-quick-action'` | `smartpro-navbar-with-quick-action` | Logo + items + a primary CTA button slot. |
|
|
18
|
+
| `'with-secondary-links'` | `smartpro-navbar-with-secondary-links` | Logo + items + a row of secondary text links and the user menu. |
|
|
19
|
+
| `'with-column-layout'` | `smartpro-navbar-with-column-layout` | Logo + multi-column dropdown menus + user menu. |
|
|
20
|
+
|
|
21
|
+
## API
|
|
22
|
+
|
|
23
|
+
### INavbarOptionsPro (`navbar.types.ts`, omits + redefines `layout`)
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
type SmartNavbarLayoutPro =
|
|
27
|
+
| 'simple'
|
|
28
|
+
| 'with-search'
|
|
29
|
+
| 'with-quick-action'
|
|
30
|
+
| 'with-secondary-links'
|
|
31
|
+
| 'with-column-layout';
|
|
32
|
+
|
|
33
|
+
interface INavbarOptionsPro {
|
|
34
|
+
layout?: SmartNavbarLayoutPro;
|
|
35
|
+
dark?: boolean;
|
|
36
|
+
logoUrl?: string;
|
|
37
|
+
logoAlt?: string;
|
|
38
|
+
logoHref?: string;
|
|
39
|
+
logoTpl?: TemplateRef<unknown>;
|
|
40
|
+
items?: INavbarItem[];
|
|
41
|
+
secondaryItems?: INavbarItem[];
|
|
42
|
+
searchTpl?: TemplateRef<unknown>;
|
|
43
|
+
notificationTpl?: TemplateRef<unknown>;
|
|
44
|
+
userMenuTpl?: TemplateRef<unknown>;
|
|
45
|
+
menuPosition?: 'right' | 'left';
|
|
46
|
+
searchAlignment?: 'left' | 'centered';
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Wrapper Inputs
|
|
51
|
+
|
|
52
|
+
| Input | Type | Default | Description |
|
|
53
|
+
| ---------------- | -------------------------------- | ----------- | -------------------------------- |
|
|
54
|
+
| `options` | `INavbarOptionsPro \| undefined` | `undefined` | Layout + items + slots + flags. |
|
|
55
|
+
| `mobileMenuOpen` | `boolean` (model) | `false` | Two-way bound mobile menu state. |
|
|
56
|
+
| `class` | `string` | `''` | Extra CSS classes. |
|
|
57
|
+
|
|
58
|
+
Output: `itemClick: INavbarItemClick` (`{ itemId }`).
|
|
59
|
+
|
|
60
|
+
## Usage Example
|
|
61
|
+
|
|
62
|
+
```html
|
|
63
|
+
<!-- Default simple navbar -->
|
|
64
|
+
<smartpro-navbar [options]="{ logoUrl: '...', items }"></smartpro-navbar>
|
|
65
|
+
|
|
66
|
+
<!-- Menu on left -->
|
|
67
|
+
<smartpro-navbar
|
|
68
|
+
[options]="{ logoUrl: '...', items, menuPosition: 'left' }"
|
|
69
|
+
></smartpro-navbar>
|
|
70
|
+
|
|
71
|
+
<!-- With search on the right -->
|
|
72
|
+
<smartpro-navbar
|
|
73
|
+
[options]="{ layout: 'with-search', logoUrl: '...', items, searchTpl: search }"
|
|
74
|
+
></smartpro-navbar>
|
|
75
|
+
|
|
76
|
+
<!-- With centered search and secondary items -->
|
|
77
|
+
<smartpro-navbar
|
|
78
|
+
[options]="{
|
|
79
|
+
layout: 'with-search',
|
|
80
|
+
searchAlignment: 'centered',
|
|
81
|
+
logoUrl: '...',
|
|
82
|
+
secondaryItems,
|
|
83
|
+
searchTpl: search
|
|
84
|
+
}"
|
|
85
|
+
></smartpro-navbar>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## File Locations
|
|
89
|
+
|
|
90
|
+
- Wrapper: `packages/shared/angular/src/lib/components/navbar/navbar.component.ts`
|
|
91
|
+
- Types: `packages/shared/angular/src/lib/components/navbar/navbar.types.ts`
|
|
92
|
+
- Variants: `packages/shared/angular/src/lib/components/navbar/{simple,with-search,with-quick-action,with-secondary-links,with-column-layout}/<name>.component.ts`
|
|
93
|
+
- Stories: `packages/shared/angular/src/lib/components/navbar/navbar.component.stories.ts`
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-components-notification
|
|
3
|
+
description: Notification (toast / inline alert) for @smartsoft001/pro-angular. Two layouts (simple, condensed), 6 source variants via composable options (iconStyle, actionsPosition, withAvatar).
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Notification Component (Pro)
|
|
8
|
+
|
|
9
|
+
Use `<smartpro-notification>`. The wrapper picks one of two child layouts based on `layout` input or `options.condensed`.
|
|
10
|
+
|
|
11
|
+
## Layouts
|
|
12
|
+
|
|
13
|
+
| `layout` (auto-detected) | Selector | Description |
|
|
14
|
+
| ------------------------ | --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `'simple'` (default) | `smartpro-notification-simple` | Full toast — icon/avatar + title + description + actions (inline / below / split) + close. Covers Simple, With actions below, With avatar, With split buttons, With buttons below source variants. |
|
|
16
|
+
| `'condensed'` | `smartpro-notification-condensed` | Single-line variant — title + inline actions + close. No description, no icon. Triggered by `options.condensed: true`. |
|
|
17
|
+
|
|
18
|
+
## Source variant mapping
|
|
19
|
+
|
|
20
|
+
| Tailwind UI variant | Pro options |
|
|
21
|
+
| ------------------- | -------------------------------------------------------------- |
|
|
22
|
+
| Simple | `iconStyle: 'success' \| 'error' \| 'info' \| 'warning'` |
|
|
23
|
+
| Condensed | `condensed: true` |
|
|
24
|
+
| With actions below | `actionsPosition: 'below'` |
|
|
25
|
+
| With avatar | `avatarUrl: '...'` (or `withAvatar: true` for a reserved slot) |
|
|
26
|
+
| With split buttons | `actionsPosition: 'split'` |
|
|
27
|
+
| With buttons below | `actionsPosition: 'below'` |
|
|
28
|
+
|
|
29
|
+
## API
|
|
30
|
+
|
|
31
|
+
### Types (`notification.types.ts`)
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
type SmartNotificationLayoutPro = 'simple' | 'condensed';
|
|
35
|
+
type SmartNotificationActionsPosition = 'inline' | 'below' | 'split';
|
|
36
|
+
type SmartNotificationIconStyle =
|
|
37
|
+
| 'none'
|
|
38
|
+
| 'success'
|
|
39
|
+
| 'error'
|
|
40
|
+
| 'info'
|
|
41
|
+
| 'warning';
|
|
42
|
+
|
|
43
|
+
interface INotificationOptionsPro extends INotificationOptions {
|
|
44
|
+
layout?: SmartNotificationLayoutPro;
|
|
45
|
+
condensed?: boolean;
|
|
46
|
+
actionsPosition?: SmartNotificationActionsPosition;
|
|
47
|
+
withAvatar?: boolean;
|
|
48
|
+
iconStyle?: SmartNotificationIconStyle;
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`INotificationOptions` (re-exported from `@smartsoft001/angular`) provides `ariaLive: 'polite' | 'assertive'`.
|
|
53
|
+
|
|
54
|
+
### Wrapper inputs
|
|
55
|
+
|
|
56
|
+
| Input | Type | Default | Description |
|
|
57
|
+
| ------------- | -------------------------------------- | ----------- | -------------------------------------------------------------------------------- |
|
|
58
|
+
| `title` | `string` (required) | — | Notification heading. |
|
|
59
|
+
| `description` | `string \| undefined` | `undefined` | Optional muted paragraph (simple layout only). |
|
|
60
|
+
| `iconName` | `string \| undefined` | `undefined` | SVG path `d` for a custom leading icon. Used with `iconStyle`. |
|
|
61
|
+
| `avatarUrl` | `string \| undefined` | `undefined` | Avatar image URL; auto-promotes the leading slot to avatar mode. |
|
|
62
|
+
| `actions` | `INotificationAction[]` | `[]` | Action buttons. Click emits `actionClick`. |
|
|
63
|
+
| `dismissible` | `boolean` | `false` | When true, renders an `×` close button that emits `dismissed`. |
|
|
64
|
+
| `layout` | `'simple' \| 'condensed' \| undefined` | `undefined` | Force a layout; otherwise auto-detected from `options.condensed`. |
|
|
65
|
+
| `options` | `INotificationOptionsPro \| undefined` | `undefined` | All pro options. |
|
|
66
|
+
| `class` | `string` | `''` | Forwarded to the host of the chosen layout (lands on the `[role="status"]` div). |
|
|
67
|
+
|
|
68
|
+
### Outputs
|
|
69
|
+
|
|
70
|
+
| Output | Payload | When |
|
|
71
|
+
| ------------- | ---------------------- | ---------------------- |
|
|
72
|
+
| `dismissed` | `void` | Close button clicked. |
|
|
73
|
+
| `actionClick` | `{ actionId: string }` | Action button clicked. |
|
|
74
|
+
|
|
75
|
+
## Usage examples
|
|
76
|
+
|
|
77
|
+
```html
|
|
78
|
+
<!-- Simple success toast -->
|
|
79
|
+
<smartpro-notification
|
|
80
|
+
title="Successfully saved!"
|
|
81
|
+
description="Anyone with a link can now view this file."
|
|
82
|
+
[dismissible]="true"
|
|
83
|
+
[options]="{ iconStyle: 'success' }"
|
|
84
|
+
/>
|
|
85
|
+
|
|
86
|
+
<!-- Condensed -->
|
|
87
|
+
<smartpro-notification
|
|
88
|
+
title="Discussion archived"
|
|
89
|
+
[actions]="[
|
|
90
|
+
{ id: 'undo', label: 'Undo', variant: 'primary' },
|
|
91
|
+
{ id: 'dismiss', label: 'Dismiss', variant: 'secondary' }
|
|
92
|
+
]"
|
|
93
|
+
[dismissible]="true"
|
|
94
|
+
[options]="{ condensed: true }"
|
|
95
|
+
/>
|
|
96
|
+
|
|
97
|
+
<!-- With avatar + reply action -->
|
|
98
|
+
<smartpro-notification
|
|
99
|
+
title="Emilia Birch"
|
|
100
|
+
description="Mentioned you in Front End Workflow."
|
|
101
|
+
avatarUrl="/img/avatar.png"
|
|
102
|
+
[actions]="[{ id: 'reply', label: 'Reply', variant: 'primary' }]"
|
|
103
|
+
[dismissible]="true"
|
|
104
|
+
/>
|
|
105
|
+
|
|
106
|
+
<!-- Actions below description -->
|
|
107
|
+
<smartpro-notification
|
|
108
|
+
title="Discussion moved"
|
|
109
|
+
description="…"
|
|
110
|
+
[actions]="[
|
|
111
|
+
{ id: 'undo', label: 'Undo', variant: 'primary' },
|
|
112
|
+
{ id: 'dismiss', label: 'Dismiss', variant: 'secondary' }
|
|
113
|
+
]"
|
|
114
|
+
[options]="{ iconStyle: 'info', actionsPosition: 'below' }"
|
|
115
|
+
/>
|
|
116
|
+
|
|
117
|
+
<!-- Split buttons (two side-by-side at the bottom) -->
|
|
118
|
+
<smartpro-notification
|
|
119
|
+
title="New software update available"
|
|
120
|
+
description="…"
|
|
121
|
+
[actions]="[
|
|
122
|
+
{ id: 'update', label: 'Update', variant: 'primary' },
|
|
123
|
+
{ id: 'later', label: 'Later', variant: 'secondary' }
|
|
124
|
+
]"
|
|
125
|
+
[options]="{ actionsPosition: 'split', iconStyle: 'info' }"
|
|
126
|
+
/>
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Accessibility
|
|
130
|
+
|
|
131
|
+
- `role="status"` on the outer container; `aria-live` driven by `options.ariaLive` (`'polite'` default, `'assertive'` for urgent).
|
|
132
|
+
- Close button has `aria-label="Close"`.
|
|
133
|
+
- Icon SVGs use `aria-hidden="true"`; meaning is carried by the title text.
|
|
134
|
+
|
|
135
|
+
## File Locations
|
|
136
|
+
|
|
137
|
+
- Wrapper: `packages/shared/angular/src/lib/components/notification/notification.component.ts`
|
|
138
|
+
- Types: `packages/shared/angular/src/lib/components/notification/notification.types.ts`
|
|
139
|
+
- Classes utility: `packages/shared/angular/src/lib/components/notification/notification-classes.util.ts`
|
|
140
|
+
- Layouts: `packages/shared/angular/src/lib/components/notification/{simple,condensed}/<name>.component.ts`
|
|
141
|
+
- Stories: `packages/shared/angular/src/lib/components/notification/notification.component.stories.ts`
|
|
142
|
+
- Module entry: `packages/shared/angular/src/lib/components/components.module.ts` (`NOTIFICATION_COMPONENTS`)
|
|
143
|
+
|
|
144
|
+
## Peer dependency
|
|
145
|
+
|
|
146
|
+
- `@smartsoft001/angular@^2.123.0` — provides `NotificationBaseComponent`, `INotificationAction`, `INotificationOptions`.
|
|
147
|
+
- No `@tailwindplus/elements` dep required.
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-components-page
|
|
3
|
+
description: Page layout variants for @smartsoft001/pro-angular — 26 Tailwind UI templates pluggable into the fork's <smartpro-page> via PAGE_VARIANT_COMPONENTS_TOKEN
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Page Variants (pro)
|
|
8
|
+
|
|
9
|
+
This package provides twenty-six standalone page variants derived from Tailwind UI, organised into three groups (Page Header, Stacked Layouts, Sidebar Layouts). Each variant extends `PageBaseComponent` from `@smartsoft001/angular` and is registered through the `PAGE_VARIANT_COMPONENTS_TOKEN` map so the fork's `<smartpro-page>` wrapper can resolve it by its `variant` slug.
|
|
10
|
+
|
|
11
|
+
## When to Use This Skill
|
|
12
|
+
|
|
13
|
+
- Developer wants a specific page layout → pick the matching variant and register it via the DI token map (or rely on `SmartProComponentsModule` which registers all 26)
|
|
14
|
+
- Developer asks which variants exist → show the three group tables below
|
|
15
|
+
- Developer wants to see all variants → open the `Components / Page` Storybook entry (26 stories + `All variants` gallery, dark/light toggle via global theme toolbar)
|
|
16
|
+
|
|
17
|
+
## Available Variants
|
|
18
|
+
|
|
19
|
+
### Page Header (9)
|
|
20
|
+
|
|
21
|
+
| Component | Selector | When to pick it |
|
|
22
|
+
| -------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- |
|
|
23
|
+
| `PageWithActionsComponent` | `smartpro-page-with-actions` | Title + action buttons |
|
|
24
|
+
| `PageWithActionsAndBreadcrumbsComponent` | `smartpro-page-with-actions-and-breadcrumbs` | Title + actions, with breadcrumbs row above |
|
|
25
|
+
| `PageWithMetaAndActionsComponent` | `smartpro-page-with-meta-and-actions` | Title + meta info line + actions |
|
|
26
|
+
| `PageWithBannerImageComponent` | `smartpro-page-with-banner-image` | Hero banner image, title overlayed below |
|
|
27
|
+
| `PageWithAvatarAndActionsComponent` | `smartpro-page-with-avatar-and-actions` | Avatar on the left of the title + actions |
|
|
28
|
+
| `PageCardWithAvatarAndStatsComponent` | `smartpro-page-card-with-avatar-and-stats` | Card-style header: avatar + title + stats row |
|
|
29
|
+
| `PageWithMetaActionsAndBreadcrumbsComponent` | `smartpro-page-with-meta-actions-and-breadcrumbs` | Breadcrumbs + title + meta + actions (everything) |
|
|
30
|
+
| `PageWithFiltersAndActionComponent` | `smartpro-page-with-filters-and-action` | Title + filter controls row + action |
|
|
31
|
+
| `PageWithLogoMetaAndActionsComponent` | `smartpro-page-with-logo-meta-and-actions` | Logo block + meta details + actions |
|
|
32
|
+
|
|
33
|
+
### Stacked Layouts (9)
|
|
34
|
+
|
|
35
|
+
| Component | Selector | When to pick it |
|
|
36
|
+
| ---------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------------- |
|
|
37
|
+
| `PageWithBottomBorderComponent` | `smartpro-page-with-bottom-border` | Top nav + page header with bottom border |
|
|
38
|
+
| `PageOnSubtleBackgroundComponent` | `smartpro-page-on-subtle-background` | Subtle gray background with top nav |
|
|
39
|
+
| `PageWithLighterPageHeaderComponent` | `smartpro-page-with-lighter-page-header` | Top nav + lighter-toned page header |
|
|
40
|
+
| `PageBrandedNavCompactLighterHeaderComponent` | `smartpro-page-branded-nav-compact-lighter-header` | Branded dense nav + compact lighter header |
|
|
41
|
+
| `PageWithOverlapComponent` | `smartpro-page-with-overlap` | Overlap header over main content card |
|
|
42
|
+
| `PageBrandNavWithOverlapComponent` | `smartpro-page-brand-nav-with-overlap` | Branded nav with overlap header |
|
|
43
|
+
| `PageBrandedNavWithLighterPageHeaderComponent` | `smartpro-page-branded-nav-with-lighter-page-header` | Branded nav paired with a lighter page header |
|
|
44
|
+
| `PageWithCompactLighterPageHeaderComponent` | `smartpro-page-with-compact-lighter-page-header` | Compact lighter header, dense top nav |
|
|
45
|
+
| `PageTwoRowNavigationWithOverlapComponent` | `smartpro-page-two-row-navigation-with-overlap` | Two-row navigation (primary + secondary) with overlap card |
|
|
46
|
+
|
|
47
|
+
### Sidebar Layouts (8)
|
|
48
|
+
|
|
49
|
+
| Component | Selector | When to pick it |
|
|
50
|
+
| ----------------------------------------- | --------------------------------------------- | ------------------------------------------- |
|
|
51
|
+
| `PageSimpleSidebarComponent` | `smartpro-page-simple-sidebar` | Light sidebar + plain content area |
|
|
52
|
+
| `PageSimpleDarkSidebarComponent` | `smartpro-page-simple-dark-sidebar` | Dark sidebar + plain content area |
|
|
53
|
+
| `PageSidebarWithHeaderComponent` | `smartpro-page-sidebar-with-header` | Light sidebar + top header bar |
|
|
54
|
+
| `PageDarkSidebarWithHeaderComponent` | `smartpro-page-dark-sidebar-with-header` | Dark sidebar + top header bar |
|
|
55
|
+
| `PageWithConstrainedContentAreaComponent` | `smartpro-page-with-constrained-content-area` | Sidebar + centered max-width content column |
|
|
56
|
+
| `PageWithOffWhiteBackgroundComponent` | `smartpro-page-with-off-white-background` | Sidebar + off-white content background |
|
|
57
|
+
| `PageSimpleBrandSidebarComponent` | `smartpro-page-simple-brand-sidebar` | Branded-colour sidebar + plain content |
|
|
58
|
+
| `PageBrandSidebarWithHeaderComponent` | `smartpro-page-brand-sidebar-with-header` | Branded-colour sidebar + top header bar |
|
|
59
|
+
|
|
60
|
+
## Registration
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
import { ApplicationConfig, Type } from '@angular/core';
|
|
64
|
+
import {
|
|
65
|
+
PageBaseComponent,
|
|
66
|
+
PAGE_VARIANT_COMPONENTS_TOKEN,
|
|
67
|
+
SmartPageVariant,
|
|
68
|
+
} from '@smartsoft001/angular';
|
|
69
|
+
import {
|
|
70
|
+
PageWithActionsComponent,
|
|
71
|
+
PageSimpleSidebarComponent,
|
|
72
|
+
// ... other variants you need
|
|
73
|
+
} from '@smartsoft001/pro-angular';
|
|
74
|
+
|
|
75
|
+
export const appConfig: ApplicationConfig = {
|
|
76
|
+
providers: [
|
|
77
|
+
{
|
|
78
|
+
provide: PAGE_VARIANT_COMPONENTS_TOKEN,
|
|
79
|
+
useValue: {
|
|
80
|
+
'with-actions': PageWithActionsComponent,
|
|
81
|
+
'simple-sidebar': PageSimpleSidebarComponent,
|
|
82
|
+
// ...
|
|
83
|
+
} satisfies Partial<Record<SmartPageVariant, Type<PageBaseComponent>>>,
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
};
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Pro's `SmartProComponentsModule` already registers the full 26-entry map under `PAGE_VARIANT_COMPONENTS_TOKEN`. Apps that import this module get every variant automatically, so most consumers do not need to register variants manually — just set `options.variant` to the slug you want. Manual registration is only needed when cherry-picking a subset or when replacing individual entries.
|
|
90
|
+
|
|
91
|
+
## Consumer API (`IPageOptions`, inherited from fork)
|
|
92
|
+
|
|
93
|
+
| Field | Type | Required | Description |
|
|
94
|
+
| ---------------- | ---------------------------------------------------- | -------- | ------------------------------------------------------------------------- |
|
|
95
|
+
| `title` | `string` | yes | Page title |
|
|
96
|
+
| `variant` | `SmartPageVariant` | no | Variant slug — picks which component renders |
|
|
97
|
+
| `hideHeader` | `boolean` | no | Hide the header region entirely |
|
|
98
|
+
| `showBackButton` | `boolean` | no | Render a back button |
|
|
99
|
+
| `endButtons` | `Array<IIconButtonOptions>` | no | Action buttons on the right of the header |
|
|
100
|
+
| `search` | `{ text: Signal<string>; set: (t: string) => void }` | no | Inline search control |
|
|
101
|
+
| `bodyTpl` | `TemplateRef<unknown>` | no | Main content template (defaults to projected `<ng-content>`) |
|
|
102
|
+
| `breadcrumbsTpl` | `TemplateRef<unknown>` | no | Breadcrumbs slot |
|
|
103
|
+
| `metaTpl` | `TemplateRef<unknown>` | no | Meta row slot |
|
|
104
|
+
| `avatarTpl` | `TemplateRef<unknown>` | no | Avatar slot |
|
|
105
|
+
| `bannerTpl` | `TemplateRef<unknown>` | no | Banner image slot |
|
|
106
|
+
| `filtersTpl` | `TemplateRef<unknown>` | no | Filters row slot |
|
|
107
|
+
| `logoTpl` | `TemplateRef<unknown>` | no | Logo slot |
|
|
108
|
+
| `statsTpl` | `TemplateRef<unknown>` | no | Stats row slot |
|
|
109
|
+
| `subtitleTpl` | `TemplateRef<unknown>` | no | Subtitle slot |
|
|
110
|
+
| `navTpl` | `TemplateRef<unknown>` | no | Top nav slot (stacked layouts) / header bar (sidebar layouts with header) |
|
|
111
|
+
| `sidebarTpl` | `TemplateRef<unknown>` | no | Side rail slot (sidebar layouts) |
|
|
112
|
+
|
|
113
|
+
## Slot Usage by Variant Family
|
|
114
|
+
|
|
115
|
+
- **Page Header group** — always uses `bodyTpl`. Additional slots vary by variant: `breadcrumbsTpl`, `metaTpl`, `avatarTpl`, `bannerTpl`, `filtersTpl`, `logoTpl`, `statsTpl`, `subtitleTpl` are pulled in as the variant's name suggests (e.g. `with-banner-image` uses `bannerTpl`, `with-meta-actions-and-breadcrumbs` uses `breadcrumbsTpl` + `metaTpl`).
|
|
116
|
+
- **Stacked Layouts group** — uses `navTpl` for the top navigation bar and `bodyTpl` for the main content. `two-row-navigation-with-overlap` additionally uses `filtersTpl` for the secondary nav row.
|
|
117
|
+
- **Sidebar Layouts group** — uses `sidebarTpl` for the side rail and `bodyTpl` for the main content area. Variants whose name contains `with-header` also use `navTpl` for the top header bar.
|
|
118
|
+
|
|
119
|
+
## Usage Example
|
|
120
|
+
|
|
121
|
+
Page Header — simplest case (`with-actions`):
|
|
122
|
+
|
|
123
|
+
```html
|
|
124
|
+
<smartpro-page
|
|
125
|
+
[options]="{ title: 'Projects', variant: 'with-actions', endButtons: actions }"
|
|
126
|
+
>
|
|
127
|
+
<p>Main content goes here (flows into bodyTpl automatically).</p>
|
|
128
|
+
</smartpro-page>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Sidebar layout (`simple-sidebar`) with explicit sidebar + body:
|
|
132
|
+
|
|
133
|
+
```html
|
|
134
|
+
<ng-template #sidebar>
|
|
135
|
+
<nav class="...">...sidebar items...</nav>
|
|
136
|
+
</ng-template>
|
|
137
|
+
|
|
138
|
+
<ng-template #body>
|
|
139
|
+
<section class="...">...main content...</section>
|
|
140
|
+
</ng-template>
|
|
141
|
+
|
|
142
|
+
<smartpro-page
|
|
143
|
+
[options]="{
|
|
144
|
+
title: 'Dashboard',
|
|
145
|
+
variant: 'simple-sidebar',
|
|
146
|
+
sidebarTpl: sidebar,
|
|
147
|
+
bodyTpl: body
|
|
148
|
+
}"
|
|
149
|
+
></smartpro-page>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Dark/Light Mode
|
|
153
|
+
|
|
154
|
+
Every variant uses the `smart:` Tailwind prefix with paired `smart:dark:*` classes. Storybook exposes a global theme toolbar (`light` / `dark`) defined in `.storybook/preview.ts` — stories render in whichever mode the toolbar is set to.
|
|
155
|
+
|
|
156
|
+
## File Locations
|
|
157
|
+
|
|
158
|
+
- Variants: `packages/shared/angular/src/lib/components/page/<slug>/`
|
|
159
|
+
- Barrel: `packages/shared/angular/src/lib/components/page/index.ts` — exports all 26 components
|
|
160
|
+
- Stories: `packages/shared/angular/src/lib/components/page/page.component.stories.ts` (26 stories + `All variants`)
|
|
161
|
+
- Module registration: `packages/shared/angular/src/lib/components/components.module.ts` (full 26-entry `PAGE_VARIANT_COMPONENTS_TOKEN` map)
|
|
162
|
+
- Base class + `PAGE_VARIANT_COMPONENTS_TOKEN` + `SmartPageVariant` + `IPageOptions`: re-exported from `@smartsoft001/angular`
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-components-page-heading
|
|
3
|
+
description: Page heading component for @smartsoft001/pro-angular. Three variants (default, with-avatar, with-banner-image) that adapt to the slots provided in `IPageHeadingOptionsPro` (breadcrumbs / meta / filters / avatar / logo / banner / stats / actions).
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Page Heading Component (Pro)
|
|
8
|
+
|
|
9
|
+
Use `<smartpro-page-heading>` and pick a variant via `variant`. The component reads `IPageHeadingOptionsPro` for title, subtitle, and a set of optional `TemplateRef` slots; the rendered layout adapts based on which slots are populated and which flags are set. Each variant is declared with `CUSTOM_ELEMENTS_SCHEMA` so consumers can drop `el-dropdown` / `el-menu` from `@tailwindplus/elements` directly into action templates.
|
|
10
|
+
|
|
11
|
+
## Variants
|
|
12
|
+
|
|
13
|
+
| `variant` (default `'default'`) | Selector | Description |
|
|
14
|
+
| ------------------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `'default'` | `smartpro-page-heading-default` | Adaptive title-and-actions header. Setting `filtersTpl` switches to a single-row layout with filters in line and actions on the right. Setting `breadcrumbsTpl` adds a breadcrumb row above the title. Setting `metaTpl` switches the breakpoint and stacks the meta row beneath the title. |
|
|
16
|
+
| `'with-avatar'` | `smartpro-page-heading-with-avatar` | Avatar / logo / card-style header. Default renders a large avatar + title + subtitle. `options.logo: true` switches to the smaller logo + meta + title layout. `options.cardStyle: true` wraps the heading in a rounded white card and renders `statsTpl` (if set) as the card footer row. |
|
|
17
|
+
| `'with-banner-image'` | `smartpro-page-heading-with-banner-image` | Banner-image-led header with avatar overlap and title row beneath the banner. |
|
|
18
|
+
|
|
19
|
+
## API
|
|
20
|
+
|
|
21
|
+
### IPageHeadingOptionsPro (`page-heading.types.ts`, extends `IPageHeadingOptions`)
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
type SmartPageHeadingVariantPro =
|
|
25
|
+
| 'default'
|
|
26
|
+
| 'with-avatar'
|
|
27
|
+
| 'with-banner-image';
|
|
28
|
+
|
|
29
|
+
interface IPageHeadingOptionsPro {
|
|
30
|
+
title?: string;
|
|
31
|
+
subtitle?: string;
|
|
32
|
+
breadcrumbsTpl?: TemplateRef<unknown>;
|
|
33
|
+
metaTpl?: TemplateRef<unknown>;
|
|
34
|
+
avatarTpl?: TemplateRef<unknown>;
|
|
35
|
+
bannerTpl?: TemplateRef<unknown>;
|
|
36
|
+
actionsTpl?: TemplateRef<unknown>;
|
|
37
|
+
statsTpl?: TemplateRef<unknown>;
|
|
38
|
+
logoTpl?: TemplateRef<unknown>;
|
|
39
|
+
filtersTpl?: TemplateRef<unknown>;
|
|
40
|
+
/** with-avatar only — switches to the smaller logo + meta + title layout. */
|
|
41
|
+
logo?: boolean;
|
|
42
|
+
/** with-avatar only — wraps the heading in a rounded white card; `statsTpl` (if set) renders as the card footer row. */
|
|
43
|
+
cardStyle?: boolean;
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Wrapper Inputs
|
|
48
|
+
|
|
49
|
+
| Input | Type | Default | Description |
|
|
50
|
+
| --------- | --------------------------------------------------- | ----------- | -------------------- |
|
|
51
|
+
| `variant` | `'default' \| 'with-avatar' \| 'with-banner-image'` | `'default'` | Variant family. |
|
|
52
|
+
| `options` | `IPageHeadingOptionsPro \| undefined` | `undefined` | Title, slots, flags. |
|
|
53
|
+
| `class` | `string` | `''` | Extra CSS classes. |
|
|
54
|
+
|
|
55
|
+
## Usage Example
|
|
56
|
+
|
|
57
|
+
```html
|
|
58
|
+
<ng-template #actions>
|
|
59
|
+
<button
|
|
60
|
+
class="smart:rounded-md smart:bg-indigo-600 smart:px-3 smart:py-2 smart:text-white"
|
|
61
|
+
>
|
|
62
|
+
Publish
|
|
63
|
+
</button>
|
|
64
|
+
</ng-template>
|
|
65
|
+
|
|
66
|
+
<!-- Default with breadcrumbs and actions -->
|
|
67
|
+
<smartpro-page-heading
|
|
68
|
+
[options]="{ title: 'Back End Developer', breadcrumbsTpl: crumbs, actionsTpl: actions }"
|
|
69
|
+
></smartpro-page-heading>
|
|
70
|
+
|
|
71
|
+
<!-- Card with avatar and stats -->
|
|
72
|
+
<smartpro-page-heading
|
|
73
|
+
variant="with-avatar"
|
|
74
|
+
[options]="{
|
|
75
|
+
title: 'Back End Developer',
|
|
76
|
+
cardStyle: true,
|
|
77
|
+
avatarTpl: avatar,
|
|
78
|
+
actionsTpl: actions,
|
|
79
|
+
statsTpl: stats
|
|
80
|
+
}"
|
|
81
|
+
></smartpro-page-heading>
|
|
82
|
+
|
|
83
|
+
<!-- Banner image -->
|
|
84
|
+
<smartpro-page-heading
|
|
85
|
+
variant="with-banner-image"
|
|
86
|
+
[options]="{ title: 'Back End Developer', bannerTpl: banner, avatarTpl: avatar, actionsTpl: actions }"
|
|
87
|
+
></smartpro-page-heading>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## File Locations
|
|
91
|
+
|
|
92
|
+
- Wrapper: `packages/shared/angular/src/lib/components/page-heading/page-heading.component.ts`
|
|
93
|
+
- Types: `packages/shared/angular/src/lib/components/page-heading/page-heading.types.ts`
|
|
94
|
+
- Variants: `packages/shared/angular/src/lib/components/page-heading/{default,with-avatar,with-banner-image}/<name>.component.ts`
|
|
95
|
+
- Shared utilities: `packages/shared/angular/src/lib/components/page-heading/page-heading-classes.util.ts`
|
|
96
|
+
- Stories: `packages/shared/angular/src/lib/components/page-heading/page-heading.component.stories.ts`
|