@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,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-components-sidebar-layout
|
|
3
|
+
description: Sidebar layout component for @smartsoft001/pro-angular. Four layouts (simple, with-header, constrained-content, off-white-background); the simple and with-header layouts accept `theme: 'light' | 'brand' | 'dark'` for sidebar coloring.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Sidebar Layout Component (Pro)
|
|
8
|
+
|
|
9
|
+
Use `<smartpro-sidebar-layout>`. Pick a layout via `variant`. The component renders the **outer chrome** (page wrapper, fixed sidebar frame, optional header bar, main content area). Sidebar nav items, mobile toggle, and any header content are supplied by the consumer via `ISidebarLayoutOptions.sidebarTpl` / `headerTpl`. Page body goes via `<ng-content>`.
|
|
10
|
+
|
|
11
|
+
## Layouts
|
|
12
|
+
|
|
13
|
+
| `variant` (default `'simple'`) | Selector | Description |
|
|
14
|
+
| ------------------------------ | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `'simple'` | `smartpro-sidebar-layout-simple` | Mobile-friendly shell with optional sticky mobile header. No desktop header. Sidebar coloring is controlled by `options.theme`. |
|
|
16
|
+
| `'with-header'` | `smartpro-sidebar-layout-with-header` | Adds a sticky desktop header bar above the main content. Sidebar coloring is controlled by `options.theme`. |
|
|
17
|
+
| `'constrained-content'` | `smartpro-sidebar-layout-constrained-content` | Same shell as `with-header` but main content is constrained to `max-w-3xl`. Sidebar uses the white-with-border light look. |
|
|
18
|
+
| `'off-white-background'` | `smartpro-sidebar-layout-off-white-background` | Same shell as `simple` but the page body has an off-white (`bg-gray-50`) background. |
|
|
19
|
+
|
|
20
|
+
## Theme (simple + with-header only)
|
|
21
|
+
|
|
22
|
+
`options.theme` selects the sidebar (and, for `simple`, mobile header) coloring:
|
|
23
|
+
|
|
24
|
+
| `theme` (default `'light'`) | `simple` sidebar / mobile header | `with-header` sidebar |
|
|
25
|
+
| --------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------ |
|
|
26
|
+
| `'light'` | White sidebar with right border (dark mode → gray-900). Mobile header: white. | Gray-900 sidebar (matches the original `with-header`). |
|
|
27
|
+
| `'brand'` | Indigo sidebar and mobile header. | Indigo sidebar. |
|
|
28
|
+
| `'dark'` | Gray-900 sidebar; mobile header: gray-900 with `shadow-sm`. | Gray-900 sidebar with `ring-1 ring-white/10`. |
|
|
29
|
+
|
|
30
|
+
`constrained-content` and `off-white-background` ignore `theme` (they always use the light sidebar look).
|
|
31
|
+
|
|
32
|
+
## API
|
|
33
|
+
|
|
34
|
+
### ISidebarLayoutOptionsPro (`sidebar-layout.types.ts`, extends `ISidebarLayoutOptions`)
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
type SmartSidebarLayoutTheme = 'light' | 'brand' | 'dark';
|
|
38
|
+
|
|
39
|
+
interface ISidebarLayoutOptionsPro {
|
|
40
|
+
title?: string;
|
|
41
|
+
sidebarTpl?: TemplateRef<unknown>;
|
|
42
|
+
headerTpl?: TemplateRef<unknown>;
|
|
43
|
+
sidebarPosition?: 'left' | 'right';
|
|
44
|
+
mobileBreakpoint?: 'sm' | 'md' | 'lg';
|
|
45
|
+
condensed?: boolean;
|
|
46
|
+
/** simple + with-header only — sidebar color theme. Default `'light'`. */
|
|
47
|
+
theme?: SmartSidebarLayoutTheme;
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Wrapper Inputs
|
|
52
|
+
|
|
53
|
+
| Input | Type | Default | Description |
|
|
54
|
+
| --------- | ------------------------------------------------------------------------------ | ----------- | ------------------------- |
|
|
55
|
+
| `variant` | `'simple' \| 'with-header' \| 'constrained-content' \| 'off-white-background'` | `'simple'` | Layout family. |
|
|
56
|
+
| `options` | `ISidebarLayoutOptionsPro \| undefined` | `undefined` | Title, slots, theme, etc. |
|
|
57
|
+
| `class` | `string` | `''` | Extra CSS classes. |
|
|
58
|
+
|
|
59
|
+
## Sidebar Position
|
|
60
|
+
|
|
61
|
+
All variants support `options.sidebarPosition: 'left' | 'right'`. When `'right'`, the fixed sidebar moves to `lg:right-0` and main content padding flips from `lg:pl-72` to `lg:pr-72`.
|
|
62
|
+
|
|
63
|
+
## Tailwind Plus Elements
|
|
64
|
+
|
|
65
|
+
Each component is declared with `CUSTOM_ELEMENTS_SCHEMA`, so consumers can drop `el-dropdown` / `el-menu` / `el-popover` from `@tailwindplus/elements` directly into their `sidebarTpl` / `headerTpl`. End-user apps must load the package once.
|
|
66
|
+
|
|
67
|
+
## Usage Example
|
|
68
|
+
|
|
69
|
+
```html
|
|
70
|
+
<ng-template #sidebar>
|
|
71
|
+
<div class="smart:flex smart:flex-col smart:gap-y-5 smart:px-6 smart:py-4">
|
|
72
|
+
<span class="smart:text-base smart:font-semibold smart:text-white"
|
|
73
|
+
>Acme</span
|
|
74
|
+
>
|
|
75
|
+
<a class="smart:text-sm smart:text-gray-300">Dashboard</a>
|
|
76
|
+
<a class="smart:text-sm smart:text-gray-300">Team</a>
|
|
77
|
+
</div>
|
|
78
|
+
</ng-template>
|
|
79
|
+
|
|
80
|
+
<ng-template #header>
|
|
81
|
+
<input type="search" placeholder="Search..." class="smart:flex-1" />
|
|
82
|
+
</ng-template>
|
|
83
|
+
|
|
84
|
+
<!-- Default light theme -->
|
|
85
|
+
<smartpro-sidebar-layout
|
|
86
|
+
[options]="{ title: 'Dashboard', sidebarTpl: sidebar, headerTpl: header }"
|
|
87
|
+
>
|
|
88
|
+
<div>Page content</div>
|
|
89
|
+
</smartpro-sidebar-layout>
|
|
90
|
+
|
|
91
|
+
<!-- Brand sidebar -->
|
|
92
|
+
<smartpro-sidebar-layout
|
|
93
|
+
[options]="{ title: 'Dashboard', sidebarTpl: sidebar, theme: 'brand' }"
|
|
94
|
+
>
|
|
95
|
+
<div>Page content</div>
|
|
96
|
+
</smartpro-sidebar-layout>
|
|
97
|
+
|
|
98
|
+
<!-- Dark sidebar with header -->
|
|
99
|
+
<smartpro-sidebar-layout
|
|
100
|
+
variant="with-header"
|
|
101
|
+
[options]="{ title: 'Dashboard', sidebarTpl: sidebar, headerTpl: header, theme: 'dark' }"
|
|
102
|
+
>
|
|
103
|
+
<div>Page content</div>
|
|
104
|
+
</smartpro-sidebar-layout>
|
|
105
|
+
|
|
106
|
+
<!-- Constrained content -->
|
|
107
|
+
<smartpro-sidebar-layout
|
|
108
|
+
variant="constrained-content"
|
|
109
|
+
[options]="{ title: 'Settings', sidebarTpl: sidebar, headerTpl: header }"
|
|
110
|
+
>
|
|
111
|
+
<div>Narrow content</div>
|
|
112
|
+
</smartpro-sidebar-layout>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## File Locations
|
|
116
|
+
|
|
117
|
+
- Wrapper: `packages/shared/angular/src/lib/components/sidebar-layout/sidebar-layout.component.ts`
|
|
118
|
+
- Types: `packages/shared/angular/src/lib/components/sidebar-layout/sidebar-layout.types.ts`
|
|
119
|
+
- Layouts: `packages/shared/angular/src/lib/components/sidebar-layout/{simple,with-header,constrained-content,off-white-background}/<name>.component.ts`
|
|
120
|
+
- Shared utilities: `packages/shared/angular/src/lib/components/sidebar-layout/sidebar-layout-classes.util.ts`
|
|
121
|
+
- Stories: `packages/shared/angular/src/lib/components/sidebar-layout/sidebar-layout.component.stories.ts`
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-components-sidebar-navigation
|
|
3
|
+
description: Sidebar navigation component for @smartsoft001/pro-angular. Three layouts (default, with-expandable-sections, with-secondary-navigation). The default layout accepts `theme: 'light' | 'brand' | 'dark'` for sidebar coloring.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Sidebar Navigation Component (Pro)
|
|
8
|
+
|
|
9
|
+
Use `<smartpro-sidebar-navigation>` and pick a layout via `options.layout`. The component renders a full sidebar with logo, item groups, optional badges/initials per item, and an optional profile footer. Use `options.items` for a flat list or `options.groups[]` for multi-section navigation.
|
|
10
|
+
|
|
11
|
+
## Layouts
|
|
12
|
+
|
|
13
|
+
| `options.layout` (default `'default'`) | Selector | Description |
|
|
14
|
+
| -------------------------------------- | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `'default'` | `smartpro-sidebar-navigation-default` | Standard sidebar with theme variants. `theme: 'light'` (default) — white sidebar with right border. `theme: 'dark'` — gray-900 sidebar (replaces the legacy `dark` variant). `theme: 'brand'` — indigo sidebar (replaces the legacy `brand` variant). |
|
|
16
|
+
| `'with-expandable-sections'` | `smartpro-sidebar-navigation-with-expandable-sections` | Sidebar with collapsible/expandable item sections. |
|
|
17
|
+
| `'with-secondary-navigation'` | `smartpro-sidebar-navigation-with-secondary-navigation` | Sidebar with a secondary navigation column. |
|
|
18
|
+
|
|
19
|
+
## API
|
|
20
|
+
|
|
21
|
+
### ISidebarNavOptionsPro (`sidebar-navigation.types.ts`, omits + redefines `layout`)
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
type SmartSidebarNavigationLayoutPro =
|
|
25
|
+
| 'default'
|
|
26
|
+
| 'with-expandable-sections'
|
|
27
|
+
| 'with-secondary-navigation';
|
|
28
|
+
|
|
29
|
+
type SmartSidebarNavigationTheme = 'light' | 'brand' | 'dark';
|
|
30
|
+
|
|
31
|
+
interface ISidebarNavOptionsPro {
|
|
32
|
+
layout?: SmartSidebarNavigationLayoutPro;
|
|
33
|
+
ariaLabel?: string;
|
|
34
|
+
logo?: ISidebarNavLogo;
|
|
35
|
+
items?: ISidebarNavItem[];
|
|
36
|
+
groups?: ISidebarNavGroup[];
|
|
37
|
+
profile?: ISidebarNavProfile;
|
|
38
|
+
theme?: SmartSidebarNavigationTheme;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Wrapper Inputs
|
|
43
|
+
|
|
44
|
+
| Input | Type | Default | Description |
|
|
45
|
+
| --------- | ------------------------------------ | ----------- | ----------------------- |
|
|
46
|
+
| `options` | `ISidebarNavOptionsPro \| undefined` | `undefined` | Layout + items + theme. |
|
|
47
|
+
| `class` | `string` | `''` | Extra CSS classes. |
|
|
48
|
+
|
|
49
|
+
Outputs: `itemClick: ISidebarNavItemClick` (`{ itemId }`), `itemToggle: ISidebarNavItemToggle` (`{ itemId, expanded }`).
|
|
50
|
+
|
|
51
|
+
## Usage Example
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<!-- Default light -->
|
|
55
|
+
<smartpro-sidebar-navigation
|
|
56
|
+
[options]="{ logo, items, profile }"
|
|
57
|
+
></smartpro-sidebar-navigation>
|
|
58
|
+
|
|
59
|
+
<!-- Dark theme -->
|
|
60
|
+
<smartpro-sidebar-navigation
|
|
61
|
+
[options]="{ logo, items, profile, theme: 'dark' }"
|
|
62
|
+
></smartpro-sidebar-navigation>
|
|
63
|
+
|
|
64
|
+
<!-- Brand theme -->
|
|
65
|
+
<smartpro-sidebar-navigation
|
|
66
|
+
[options]="{ logo, items, profile, theme: 'brand' }"
|
|
67
|
+
></smartpro-sidebar-navigation>
|
|
68
|
+
|
|
69
|
+
<!-- With expandable sections -->
|
|
70
|
+
<smartpro-sidebar-navigation
|
|
71
|
+
[options]="{ layout: 'with-expandable-sections', logo, groups, profile }"
|
|
72
|
+
></smartpro-sidebar-navigation>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## File Locations
|
|
76
|
+
|
|
77
|
+
- Wrapper: `packages/shared/angular/src/lib/components/sidebar-navigation/sidebar-navigation.component.ts`
|
|
78
|
+
- Types: `packages/shared/angular/src/lib/components/sidebar-navigation/sidebar-navigation.types.ts`
|
|
79
|
+
- Variants: `packages/shared/angular/src/lib/components/sidebar-navigation/{default,with-expandable-sections,with-secondary-navigation}/<name>.component.ts`
|
|
80
|
+
- Stories: `packages/shared/angular/src/lib/components/sidebar-navigation/sidebar-navigation.component.stories.ts`
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-components-sign-in-form
|
|
3
|
+
description: Sign-in / registration form component for @smartsoft001/pro-angular. Two layouts (`simple`, `split-screen`) with optional `hideLabels?` and `cardStyle?` flags on simple. Dual sign-in / sign-up modes via the `mode` input.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Sign-In Form Component (Pro)
|
|
8
|
+
|
|
9
|
+
Use `<smartpro-sign-in-form>` and pick a layout via `options.layout`. The component renders a centered email/password form with optional remember-me checkbox, forgot-password link, social providers, and "not a member?" prompt. Toggle between sign-in and sign-up via the `mode` input. Submission emits a `(submit)` event; clicking a social provider emits `(socialClick)`.
|
|
10
|
+
|
|
11
|
+
## Layouts
|
|
12
|
+
|
|
13
|
+
| `options.layout` (default `'simple'`) | Selector | Description |
|
|
14
|
+
| ------------------------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `'simple'` | `smartpro-sign-in-form-simple` | Centered email/password form. Default uses labeled inputs in a `max-w-sm` column. `hideLabels: true` switches to a stacked input group with placeholder-only inputs and a remember-me row. `cardStyle: true` wraps the form in a rounded white card and adds a social-providers section. |
|
|
16
|
+
| `'split-screen'` | `smartpro-sign-in-form-split-screen` | Two-column layout with a tall hero image on one side and the form on the other. |
|
|
17
|
+
|
|
18
|
+
## API
|
|
19
|
+
|
|
20
|
+
### ISignInFormOptionsPro (`sign-in-form.types.ts`, omits + redefines `layout`)
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
type SmartSignInFormLayoutPro = 'simple' | 'split-screen';
|
|
24
|
+
|
|
25
|
+
interface ISignInFormOptionsPro {
|
|
26
|
+
layout?: SmartSignInFormLayoutPro;
|
|
27
|
+
ariaLabel?: string;
|
|
28
|
+
emailPlaceholder?: string;
|
|
29
|
+
passwordPlaceholder?: string;
|
|
30
|
+
submitLabel?: string;
|
|
31
|
+
forgotPasswordHref?: string;
|
|
32
|
+
signUpHref?: string;
|
|
33
|
+
signInHref?: string;
|
|
34
|
+
heroImageUrl?: string;
|
|
35
|
+
socialProviders?: ISocialProvider[];
|
|
36
|
+
extraTpl?: TemplateRef<unknown>;
|
|
37
|
+
hideLabels?: boolean;
|
|
38
|
+
cardStyle?: boolean;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Wrapper Inputs
|
|
43
|
+
|
|
44
|
+
| Input | Type | Default | Description |
|
|
45
|
+
| ---------- | ------------------------------------ | ----------- | -------------------------------------- |
|
|
46
|
+
| `mode` | `'sign-in' \| 'sign-up'` | `'sign-in'` | Switches the form copy + submit label. |
|
|
47
|
+
| `disabled` | `boolean` | `false` | Disables inputs + submit. |
|
|
48
|
+
| `options` | `ISignInFormOptionsPro \| undefined` | `undefined` | Layout, slots, flags. |
|
|
49
|
+
| `class` | `string` | `''` | Extra CSS classes. |
|
|
50
|
+
|
|
51
|
+
Outputs: `submit: ISignInFormSubmit` (`{ email, password, mode }`), `socialClick: ISignInFormSocialClick` (`{ providerId, mode }`).
|
|
52
|
+
|
|
53
|
+
## Usage Example
|
|
54
|
+
|
|
55
|
+
```html
|
|
56
|
+
<!-- Default labeled simple form -->
|
|
57
|
+
<smartpro-sign-in-form
|
|
58
|
+
[options]="{ forgotPasswordHref: '#', signUpHref: '#' }"
|
|
59
|
+
(submit)="onSubmit($event)"
|
|
60
|
+
></smartpro-sign-in-form>
|
|
61
|
+
|
|
62
|
+
<!-- Stacked no-labels form -->
|
|
63
|
+
<smartpro-sign-in-form
|
|
64
|
+
[options]="{ hideLabels: true, forgotPasswordHref: '#' }"
|
|
65
|
+
(submit)="onSubmit($event)"
|
|
66
|
+
></smartpro-sign-in-form>
|
|
67
|
+
|
|
68
|
+
<!-- Card with social providers -->
|
|
69
|
+
<smartpro-sign-in-form
|
|
70
|
+
[options]="{
|
|
71
|
+
cardStyle: true,
|
|
72
|
+
forgotPasswordHref: '#',
|
|
73
|
+
socialProviders: [{ id: 'google', label: 'Google' }, { id: 'github', label: 'GitHub' }]
|
|
74
|
+
}"
|
|
75
|
+
(submit)="onSubmit($event)"
|
|
76
|
+
(socialClick)="onSocialClick($event)"
|
|
77
|
+
></smartpro-sign-in-form>
|
|
78
|
+
|
|
79
|
+
<!-- Split-screen with hero image -->
|
|
80
|
+
<smartpro-sign-in-form
|
|
81
|
+
[options]="{ layout: 'split-screen', heroImageUrl: '...' }"
|
|
82
|
+
(submit)="onSubmit($event)"
|
|
83
|
+
></smartpro-sign-in-form>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## File Locations
|
|
87
|
+
|
|
88
|
+
- Wrapper: `packages/shared/angular/src/lib/components/sign-in-form/sign-in-form.component.ts`
|
|
89
|
+
- Types: `packages/shared/angular/src/lib/components/sign-in-form/sign-in-form.types.ts`
|
|
90
|
+
- Variants: `packages/shared/angular/src/lib/components/sign-in-form/{simple,split-screen}/<name>.component.ts`
|
|
91
|
+
- Stories: `packages/shared/angular/src/lib/components/sign-in-form/sign-in-form.component.stories.ts`
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-components-stacked-layout
|
|
3
|
+
description: Stacked layout component for @smartsoft001/pro-angular. Four variants (default, lighter, branded, two-row-navigation-with-overlap) for the page-shell chrome (nav + optional header + main); navigation, header, and content slot in via TemplateRef and `<ng-content>`.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Stacked Layout Component (Pro)
|
|
8
|
+
|
|
9
|
+
Use `<smartpro-stacked-layout>` and pick a variant via `variant`. The component renders the **outer chrome** (page wrapper, nav frame, optional header section, main content area). The actual nav contents (logo, links, profile dropdown, mobile menu) and any header contents are supplied by the consumer via `IStackedLayoutOptions.navTpl` / `headerTpl`. Page body goes via `<ng-content>`.
|
|
10
|
+
|
|
11
|
+
## Variants
|
|
12
|
+
|
|
13
|
+
| `variant` (default `'default'`) | Selector | Description |
|
|
14
|
+
| ----------------------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `'default'` | `smartpro-stacked-layout-default` | Adaptive page-shell. `headerStyle: 'overlap'` (default) — dark gray banded header with main content overlapping via `-mt-32`. `headerStyle: 'bottom-border'` — white nav with bottom border. `headerStyle: 'subtle-bg'` — white nav with bottom border on a subtle gray page. |
|
|
16
|
+
| `'lighter'` | `smartpro-stacked-layout-lighter` | Dark gray nav with a lighter (white-shadow) page header section. `compact: true` switches the header to its compact form (`py-4` instead of `py-8`). |
|
|
17
|
+
| `'branded'` | `smartpro-stacked-layout-branded` | Indigo branded nav. `headerStyle: 'lighter'` (default) — lighter page header. `headerStyle: 'compact-lighter'` — compact lighter header. `headerStyle: 'overlap'` — banded header with `-mt-32` overlap. |
|
|
18
|
+
| `'two-row-navigation-with-overlap'` | `smartpro-stacked-layout-two-row-navigation-with-overlap` | Indigo two-row navigation band with `pb-24`; main content overlaps via negative `-mt-24`. |
|
|
19
|
+
|
|
20
|
+
## API
|
|
21
|
+
|
|
22
|
+
### IStackedLayoutOptionsPro (`stacked-layout.types.ts`, extends `IStackedLayoutOptions`)
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
type SmartStackedLayoutVariantPro =
|
|
26
|
+
| 'default'
|
|
27
|
+
| 'lighter'
|
|
28
|
+
| 'branded'
|
|
29
|
+
| 'two-row-navigation-with-overlap';
|
|
30
|
+
|
|
31
|
+
type SmartStackedLayoutDefaultHeaderStyle =
|
|
32
|
+
| 'overlap'
|
|
33
|
+
| 'bottom-border'
|
|
34
|
+
| 'subtle-bg';
|
|
35
|
+
|
|
36
|
+
type SmartStackedLayoutBrandedHeaderStyle =
|
|
37
|
+
| 'lighter'
|
|
38
|
+
| 'compact-lighter'
|
|
39
|
+
| 'overlap';
|
|
40
|
+
|
|
41
|
+
interface IStackedLayoutOptionsPro {
|
|
42
|
+
title?: string;
|
|
43
|
+
navTpl?: TemplateRef<unknown>;
|
|
44
|
+
headerTpl?: TemplateRef<unknown>;
|
|
45
|
+
containerWidth?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
46
|
+
/** default + branded — selects the header treatment. */
|
|
47
|
+
headerStyle?:
|
|
48
|
+
| SmartStackedLayoutDefaultHeaderStyle
|
|
49
|
+
| SmartStackedLayoutBrandedHeaderStyle;
|
|
50
|
+
/** lighter only — switches to compact header padding. */
|
|
51
|
+
compact?: boolean;
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Wrapper Inputs
|
|
56
|
+
|
|
57
|
+
| Input | Type | Default | Description |
|
|
58
|
+
| --------- | -------------------------------------------------------------------------- | ----------- | -------------------- |
|
|
59
|
+
| `variant` | `'default' \| 'lighter' \| 'branded' \| 'two-row-navigation-with-overlap'` | `'default'` | Variant family. |
|
|
60
|
+
| `options` | `IStackedLayoutOptionsPro \| undefined` | `undefined` | Title, slots, flags. |
|
|
61
|
+
| `class` | `string` | `''` | Extra CSS classes. |
|
|
62
|
+
|
|
63
|
+
## Tailwind Plus Elements
|
|
64
|
+
|
|
65
|
+
The Tailwind UI templates rely on custom HTML elements `el-dropdown`, `el-menu`, `el-popover` from [`@tailwindplus/elements`](https://www.npmjs.com/package/@tailwindplus/elements). Each variant is declared with `CUSTOM_ELEMENTS_SCHEMA`, so consumers can drop those tags into their `navTpl` / `headerTpl` directly. End-user apps must load the package, e.g. via a script tag in `index.html`:
|
|
66
|
+
|
|
67
|
+
```html
|
|
68
|
+
<script
|
|
69
|
+
src="https://cdn.jsdelivr.net/npm/@tailwindplus/elements@1"
|
|
70
|
+
type="module"
|
|
71
|
+
></script>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
`@tailwindplus/elements` is declared as an **optional** peer dependency on `@smartsoft001/pro-angular`.
|
|
75
|
+
|
|
76
|
+
## Usage Example
|
|
77
|
+
|
|
78
|
+
```html
|
|
79
|
+
<ng-template #nav>
|
|
80
|
+
<span class="smart:text-base smart:font-semibold smart:text-white">Acme</span>
|
|
81
|
+
<a class="smart:text-sm">Dashboard</a>
|
|
82
|
+
<a class="smart:text-sm">Team</a>
|
|
83
|
+
</ng-template>
|
|
84
|
+
|
|
85
|
+
<!-- Default with overlap -->
|
|
86
|
+
<smartpro-stacked-layout [options]="{ title: 'Dashboard', navTpl: nav }">
|
|
87
|
+
<div class="smart:rounded-lg smart:bg-white smart:p-6 smart:shadow">
|
|
88
|
+
Page content goes here.
|
|
89
|
+
</div>
|
|
90
|
+
</smartpro-stacked-layout>
|
|
91
|
+
|
|
92
|
+
<!-- Bottom-border variant -->
|
|
93
|
+
<smartpro-stacked-layout
|
|
94
|
+
[options]="{ title: 'Dashboard', navTpl: nav, headerStyle: 'bottom-border' }"
|
|
95
|
+
>
|
|
96
|
+
<div>Page content</div>
|
|
97
|
+
</smartpro-stacked-layout>
|
|
98
|
+
|
|
99
|
+
<!-- Branded compact-lighter -->
|
|
100
|
+
<smartpro-stacked-layout
|
|
101
|
+
variant="branded"
|
|
102
|
+
[options]="{ title: 'Dashboard', navTpl: nav, headerStyle: 'compact-lighter' }"
|
|
103
|
+
>
|
|
104
|
+
<div>Page content</div>
|
|
105
|
+
</smartpro-stacked-layout>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## File Locations
|
|
109
|
+
|
|
110
|
+
- Wrapper: `packages/shared/angular/src/lib/components/stacked-layout/stacked-layout.component.ts`
|
|
111
|
+
- Types: `packages/shared/angular/src/lib/components/stacked-layout/stacked-layout.types.ts`
|
|
112
|
+
- Variants: `packages/shared/angular/src/lib/components/stacked-layout/{default,lighter,branded,two-row-navigation-with-overlap}/<name>.component.ts`
|
|
113
|
+
- Shared utilities: `packages/shared/angular/src/lib/components/stacked-layout/stacked-layout-classes.util.ts`
|
|
114
|
+
- Stories: `packages/shared/angular/src/lib/components/stacked-layout/stacked-layout.component.stories.ts`
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-components-stacked-list
|
|
3
|
+
description: Stacked list component for @smartsoft001/pro-angular. Three variants (simple, with-links, complex) for vertical lists of items. Width, columns, sticky-letter grouping, and per-item slots all driven by `IStackedListOptionsPro`.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Stacked List Component (Pro)
|
|
8
|
+
|
|
9
|
+
Use `<smartpro-stacked-list>` and pick a variant via `variant`. Each variant iterates `IStackedListOptionsPro.items` and renders a row per item using the per-item slots (`avatarUrl`, `iconTpl`, `title`, `description`, `meta`, `href`, `actionTpl`, `badgeTpl`).
|
|
10
|
+
|
|
11
|
+
## Variants
|
|
12
|
+
|
|
13
|
+
| `variant` (default `'simple'`) | Selector | Description |
|
|
14
|
+
| ------------------------------ | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `'simple'` | `smartpro-stacked-list-simple` | Adaptive narrow / full / constrained-full row layout. Per-item content drives the right column (meta + badge + action). `options.width: 'narrow' \| 'full' \| 'constrained-full'`. `options.stickyHeadings: true` groups items by first letter and renders in a `<nav>` with sticky group rows. `item.href` makes the entire row clickable. |
|
|
16
|
+
| `'with-links'` | `smartpro-stacked-list-with-links` | Linked-row list with explicit hover state. `options.width: 'full' \| 'card'` switches between full-width and a rounded `bg-white` card. `options.columns: 2` switches to a multi-column grid where each item renders as an icon block + title + description + action. |
|
|
17
|
+
| `'complex'` | `smartpro-stacked-list-complex` | Title with optional inline badge, description below, action area on the right. `options.inlineMeta: true` renders an inline meta dot+separator after the description (composes `description · meta`). |
|
|
18
|
+
|
|
19
|
+
## API
|
|
20
|
+
|
|
21
|
+
### IStackedListOptionsPro (`stacked-list.types.ts`, extends `IStackedListOptions`)
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
type SmartStackedListVariantPro = 'simple' | 'with-links' | 'complex';
|
|
25
|
+
|
|
26
|
+
interface IStackedListOptionsPro {
|
|
27
|
+
items?: IStackedListItem[];
|
|
28
|
+
width?: 'narrow' | 'full' | 'constrained-full' | 'card';
|
|
29
|
+
stickyHeadings?: boolean;
|
|
30
|
+
columns?: 1 | 2;
|
|
31
|
+
inlineMeta?: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface IStackedListItem {
|
|
35
|
+
id?: string;
|
|
36
|
+
title: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
meta?: string;
|
|
39
|
+
href?: string;
|
|
40
|
+
avatarUrl?: string;
|
|
41
|
+
iconTpl?: TemplateRef<unknown>;
|
|
42
|
+
actionTpl?: TemplateRef<unknown>;
|
|
43
|
+
badgeTpl?: TemplateRef<unknown>;
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Wrapper Inputs
|
|
48
|
+
|
|
49
|
+
| Input | Type | Default | Description |
|
|
50
|
+
| --------- | --------------------------------------- | ----------- | ------------------ |
|
|
51
|
+
| `variant` | `'simple' \| 'with-links' \| 'complex'` | `'simple'` | Variant family. |
|
|
52
|
+
| `options` | `IStackedListOptionsPro \| undefined` | `undefined` | Items + flags. |
|
|
53
|
+
| `class` | `string` | `''` | Extra CSS classes. |
|
|
54
|
+
|
|
55
|
+
## Usage Example
|
|
56
|
+
|
|
57
|
+
```html
|
|
58
|
+
<smartpro-stacked-list
|
|
59
|
+
[options]="{
|
|
60
|
+
items: [
|
|
61
|
+
{ id: '1', title: 'Leslie Alexander', description: 'leslie@acme.com', avatarUrl: '...' },
|
|
62
|
+
{ id: '2', title: 'Michael Foster', description: 'michael@acme.com', avatarUrl: '...' }
|
|
63
|
+
]
|
|
64
|
+
}"
|
|
65
|
+
></smartpro-stacked-list>
|
|
66
|
+
|
|
67
|
+
<smartpro-stacked-list
|
|
68
|
+
variant="with-links"
|
|
69
|
+
[options]="{ items, width: 'full' }"
|
|
70
|
+
></smartpro-stacked-list>
|
|
71
|
+
|
|
72
|
+
<smartpro-stacked-list
|
|
73
|
+
variant="with-links"
|
|
74
|
+
[options]="{ items, columns: 2 }"
|
|
75
|
+
></smartpro-stacked-list>
|
|
76
|
+
|
|
77
|
+
<smartpro-stacked-list
|
|
78
|
+
[options]="{ items, stickyHeadings: true }"
|
|
79
|
+
></smartpro-stacked-list>
|
|
80
|
+
|
|
81
|
+
<smartpro-stacked-list
|
|
82
|
+
variant="complex"
|
|
83
|
+
[options]="{ items, inlineMeta: true }"
|
|
84
|
+
></smartpro-stacked-list>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## File Locations
|
|
88
|
+
|
|
89
|
+
- Wrapper: `packages/shared/angular/src/lib/components/stacked-list/stacked-list.component.ts`
|
|
90
|
+
- Types: `packages/shared/angular/src/lib/components/stacked-list/stacked-list.types.ts`
|
|
91
|
+
- Variants: `packages/shared/angular/src/lib/components/stacked-list/{simple,with-links,complex}/<name>.component.ts`
|
|
92
|
+
- Shared utilities: `packages/shared/angular/src/lib/components/stacked-list/stacked-list-classes.util.ts`
|
|
93
|
+
- Stories: `packages/shared/angular/src/lib/components/stacked-list/stacked-list.component.stories.ts`
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-components-stats
|
|
3
|
+
description: Stats component for @smartsoft001/pro-angular. Two variants — `default` (composable flags `cardStyle`, `brandIcon`, `trending`) and `with-shared-borders`. Renders key-figure tiles from `IStatsOptionsPro.items`.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Stats Component (Pro)
|
|
8
|
+
|
|
9
|
+
Use `<smartpro-stats>` and pick a variant via `variant`. The component reads `IStatsOptionsPro.items` (each with `label`, `value`, optional `change`, `trend`, `previousValue`, `iconTpl`, `actionTpl`) and `columns` to render a responsive grid of stat tiles.
|
|
10
|
+
|
|
11
|
+
## Variants
|
|
12
|
+
|
|
13
|
+
| `variant` (default `'default'`) | Selector | Description |
|
|
14
|
+
| ------------------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `'default'` | `smartpro-stats-default` | Adaptive layout. Default renders a divider-grid of label + large value tiles. `cardStyle: true` switches to a section-titled grid of rounded shadow cards. `brandIcon: true` renders cards with an indigo brand-icon overlay and an optional footer action. `trending: true` switches to the trending grid (label + change pill + large value). |
|
|
16
|
+
| `'with-shared-borders'` | `smartpro-stats-with-shared-borders` | Tile grid with a shared border treatment between cells (legacy "with-shared-borders" pattern). |
|
|
17
|
+
|
|
18
|
+
## API
|
|
19
|
+
|
|
20
|
+
### IStatsOptionsPro (`stats.types.ts`, extends `IStatsOptions`)
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
type SmartStatsVariantPro = 'default' | 'with-shared-borders';
|
|
24
|
+
|
|
25
|
+
interface IStatsOptionsPro {
|
|
26
|
+
title?: string;
|
|
27
|
+
columns?: 1 | 2 | 3 | 4;
|
|
28
|
+
items?: IStatsItem[];
|
|
29
|
+
cardStyle?: boolean;
|
|
30
|
+
brandIcon?: boolean;
|
|
31
|
+
trending?: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface IStatsItem {
|
|
35
|
+
label: string;
|
|
36
|
+
value: string | number;
|
|
37
|
+
previousValue?: string | number;
|
|
38
|
+
change?: string;
|
|
39
|
+
trend?: 'up' | 'down' | 'neutral';
|
|
40
|
+
iconTpl?: TemplateRef<unknown>;
|
|
41
|
+
actionTpl?: TemplateRef<unknown>;
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Wrapper Inputs
|
|
46
|
+
|
|
47
|
+
| Input | Type | Default | Description |
|
|
48
|
+
| --------- | ------------------------------------ | ----------- | ---------------------- |
|
|
49
|
+
| `variant` | `'default' \| 'with-shared-borders'` | `'default'` | Variant family. |
|
|
50
|
+
| `options` | `IStatsOptionsPro \| undefined` | `undefined` | Title + items + flags. |
|
|
51
|
+
| `class` | `string` | `''` | Extra CSS classes. |
|
|
52
|
+
|
|
53
|
+
## Usage Example
|
|
54
|
+
|
|
55
|
+
```html
|
|
56
|
+
<!-- Default divider grid -->
|
|
57
|
+
<smartpro-stats [options]="{ items, columns: 4 }"></smartpro-stats>
|
|
58
|
+
|
|
59
|
+
<!-- Cards -->
|
|
60
|
+
<smartpro-stats
|
|
61
|
+
[options]="{ items, cardStyle: true, columns: 3 }"
|
|
62
|
+
></smartpro-stats>
|
|
63
|
+
|
|
64
|
+
<!-- Brand icon overlay -->
|
|
65
|
+
<smartpro-stats
|
|
66
|
+
[options]="{ items, brandIcon: true, columns: 3 }"
|
|
67
|
+
></smartpro-stats>
|
|
68
|
+
|
|
69
|
+
<!-- Trending -->
|
|
70
|
+
<smartpro-stats
|
|
71
|
+
[options]="{ items, trending: true, columns: 4 }"
|
|
72
|
+
></smartpro-stats>
|
|
73
|
+
|
|
74
|
+
<!-- Shared borders -->
|
|
75
|
+
<smartpro-stats
|
|
76
|
+
variant="with-shared-borders"
|
|
77
|
+
[options]="{ items }"
|
|
78
|
+
></smartpro-stats>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## File Locations
|
|
82
|
+
|
|
83
|
+
- Wrapper: `packages/shared/angular/src/lib/components/stats/stats.component.ts`
|
|
84
|
+
- Types: `packages/shared/angular/src/lib/components/stats/stats.types.ts`
|
|
85
|
+
- Variants: `packages/shared/angular/src/lib/components/stats/{default,with-shared-borders}/<name>.component.ts`
|
|
86
|
+
- Shared utilities: `packages/shared/angular/src/lib/components/stats/stats-classes.util.ts`
|
|
87
|
+
- Stories: `packages/shared/angular/src/lib/components/stats/stats.component.stories.ts`
|