@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,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-components-drawer
|
|
3
|
+
description: Drawer (slide-out panel) for @smartsoft001/pro-angular. Two layouts (empty, with-chrome), 10 source variants composed via options. Uses @tailwindplus/elements <el-dialog>.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Drawer Component (Pro)
|
|
8
|
+
|
|
9
|
+
Use `<smartpro-drawer>`. Slot content via `<ng-content>`. The wrapper picks one of two child layouts based on `layout` or the shape of `options`.
|
|
10
|
+
|
|
11
|
+
## Layouts
|
|
12
|
+
|
|
13
|
+
| `layout` value (auto-detected) | Selector | Description |
|
|
14
|
+
| ------------------------------ | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `'empty'` (default) | `smartpro-drawer-empty` | Bare slide-out panel — just the `<aside>` with optional overlay and optional outside close button. Consumer projects all content via `<ng-content>`. |
|
|
16
|
+
| `'with-chrome'` | `smartpro-drawer-with-chrome` | Header (title + subtitle + inside close) + body slot + optional sticky footer template. Triggered by `title`, `subtitle`, `headerStyle`, `stickyFooter`, `footerTpl`. |
|
|
17
|
+
|
|
18
|
+
## Source variant mapping
|
|
19
|
+
|
|
20
|
+
| Tailwind UI variant | Pro options |
|
|
21
|
+
| -------------------- | ------------------------------------------------------------------------- |
|
|
22
|
+
| Empty | (defaults) |
|
|
23
|
+
| Wide empty | `wide: true` |
|
|
24
|
+
| Background overlay | `withOverlay: true` (default — opaque scrim) |
|
|
25
|
+
| Close button outside | `closePosition: 'outside'` |
|
|
26
|
+
| Branded header | `headerStyle: 'branded'` (or fork's `brandedHeader: true`) |
|
|
27
|
+
| Sticky footer | `stickyFooter: true`, `footerTpl: TemplateRef` |
|
|
28
|
+
| Create project form | `with-chrome` + form content via `<ng-content>` + `footerTpl` for actions |
|
|
29
|
+
| User profile | `with-chrome` + profile DL via `<ng-content>` |
|
|
30
|
+
| Contact list | `with-chrome` + list via `<ng-content>` |
|
|
31
|
+
| File details | `with-chrome` + details via `<ng-content>` + `subtitle` for metadata |
|
|
32
|
+
|
|
33
|
+
## API
|
|
34
|
+
|
|
35
|
+
### Types (`drawer.types.ts`)
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
type SmartDrawerLayoutPro = 'empty' | 'with-chrome';
|
|
39
|
+
type SmartDrawerClosePosition = 'inside' | 'outside';
|
|
40
|
+
type SmartDrawerHeaderStyle = 'default' | 'branded';
|
|
41
|
+
|
|
42
|
+
interface IDrawerOptionsPro extends IDrawerOptions {
|
|
43
|
+
layout?: SmartDrawerLayoutPro;
|
|
44
|
+
closePosition?: SmartDrawerClosePosition;
|
|
45
|
+
headerStyle?: SmartDrawerHeaderStyle;
|
|
46
|
+
subtitle?: string;
|
|
47
|
+
footerTpl?: TemplateRef<unknown>;
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`IDrawerOptions` (re-exported from `@smartsoft001/angular`) provides `position: 'left' | 'right'`, `wide`, `withOverlay`, `brandedHeader`, `stickyFooter`, `ariaLabel`. The pro `headerStyle: 'branded'` is equivalent to `brandedHeader: true`.
|
|
52
|
+
|
|
53
|
+
### Wrapper inputs
|
|
54
|
+
|
|
55
|
+
| Input | Type | Default | Description |
|
|
56
|
+
| --------- | ----------------------------------- | ----------- | -------------------------------------------------------------------- |
|
|
57
|
+
| `open` | `boolean` (model — two-way) | `false` | Bind with `[(open)]`. When `false`, the layouts render nothing. |
|
|
58
|
+
| `title` | `string \| undefined` | `undefined` | When set, the wrapper auto-selects `with-chrome`. |
|
|
59
|
+
| `layout` | `SmartDrawerLayoutPro \| undefined` | `undefined` | Force a layout; otherwise auto-detected. |
|
|
60
|
+
| `options` | `IDrawerOptionsPro \| undefined` | `undefined` | All pro options. |
|
|
61
|
+
| `class` | `string` | `''` | Forwarded to the host of the chosen layout (lands on `<el-dialog>`). |
|
|
62
|
+
|
|
63
|
+
### Outputs
|
|
64
|
+
|
|
65
|
+
| Output | Payload | When |
|
|
66
|
+
| -------- | ------- | ---------------------------------------------------------- |
|
|
67
|
+
| `closed` | `void` | Emitted when the close button is clicked (inside/outside). |
|
|
68
|
+
|
|
69
|
+
### Slots
|
|
70
|
+
|
|
71
|
+
`<ng-content>` projects the panel body. With `with-chrome`, content lands between the header and the footer.
|
|
72
|
+
|
|
73
|
+
## Usage examples
|
|
74
|
+
|
|
75
|
+
```html
|
|
76
|
+
<!-- Bare empty drawer -->
|
|
77
|
+
<smartpro-drawer [(open)]="open">
|
|
78
|
+
<div class="smart:p-6">Custom content</div>
|
|
79
|
+
</smartpro-drawer>
|
|
80
|
+
|
|
81
|
+
<!-- With chrome + sticky footer + form -->
|
|
82
|
+
<ng-template #footer>
|
|
83
|
+
<button class="…">Cancel</button>
|
|
84
|
+
<button class="…">Create</button>
|
|
85
|
+
</ng-template>
|
|
86
|
+
<smartpro-drawer
|
|
87
|
+
[(open)]="open"
|
|
88
|
+
title="Create project"
|
|
89
|
+
[options]="{ stickyFooter: true, footerTpl: footer, subtitle: 'Fill the details.' }"
|
|
90
|
+
>
|
|
91
|
+
<form><!-- fields --></form>
|
|
92
|
+
</smartpro-drawer>
|
|
93
|
+
|
|
94
|
+
<!-- Branded header -->
|
|
95
|
+
<smartpro-drawer
|
|
96
|
+
[(open)]="open"
|
|
97
|
+
title="Branded"
|
|
98
|
+
[options]="{ headerStyle: 'branded' }"
|
|
99
|
+
>
|
|
100
|
+
<p>Body</p>
|
|
101
|
+
</smartpro-drawer>
|
|
102
|
+
|
|
103
|
+
<!-- Outside close + wide -->
|
|
104
|
+
<smartpro-drawer
|
|
105
|
+
[(open)]="open"
|
|
106
|
+
[options]="{ closePosition: 'outside', wide: true }"
|
|
107
|
+
>
|
|
108
|
+
<div class="smart:p-6">Wide content</div>
|
|
109
|
+
</smartpro-drawer>
|
|
110
|
+
|
|
111
|
+
<!-- Left-anchored -->
|
|
112
|
+
<smartpro-drawer [(open)]="open" [options]="{ position: 'left' }">
|
|
113
|
+
<div class="smart:p-6">Left side</div>
|
|
114
|
+
</smartpro-drawer>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Accessibility
|
|
118
|
+
|
|
119
|
+
- `role="dialog"` + `aria-modal="true"` on the `<aside>`.
|
|
120
|
+
- `aria-labelledby` from the title (with-chrome) when present; otherwise `aria-label` from `options.ariaLabel`.
|
|
121
|
+
- `data-position` attribute (`left` / `right`) for animation hooks.
|
|
122
|
+
- Focus trap + ESC handling come from `<el-dialog>`.
|
|
123
|
+
|
|
124
|
+
## File Locations
|
|
125
|
+
|
|
126
|
+
- Wrapper: `packages/shared/angular/src/lib/components/drawer/drawer.component.ts`
|
|
127
|
+
- Types: `packages/shared/angular/src/lib/components/drawer/drawer.types.ts`
|
|
128
|
+
- Classes utility: `packages/shared/angular/src/lib/components/drawer/drawer-classes.util.ts`
|
|
129
|
+
- Layouts: `packages/shared/angular/src/lib/components/drawer/{empty,with-chrome}/<name>.component.ts`
|
|
130
|
+
- Stories: `packages/shared/angular/src/lib/components/drawer/drawer.component.stories.ts`
|
|
131
|
+
- Module entry: `packages/shared/angular/src/lib/components/components.module.ts` (`DRAWER_COMPONENTS`)
|
|
132
|
+
|
|
133
|
+
## Peer dependency
|
|
134
|
+
|
|
135
|
+
- `@smartsoft001/angular@^2.123.0` — provides `DrawerBaseComponent`, `IDrawerOptions`.
|
|
136
|
+
- `@tailwindplus/elements@^1.0.0` — runtime element bundle for `<el-dialog>`.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-components-dropdown
|
|
3
|
+
description: Dropdown menu for @smartsoft001/pro-angular. Two layouts (default, with-header), 5 source variants via composable options (showDividers, withIcons, minimal). Uses @tailwindplus/elements <el-dropdown> / <el-menu>.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Dropdown Component (Pro)
|
|
8
|
+
|
|
9
|
+
Use `<smartpro-dropdown>`. The wrapper picks one of two child layouts based on `layout` input or whether `options.headerLabel` is set.
|
|
10
|
+
|
|
11
|
+
## Layouts
|
|
12
|
+
|
|
13
|
+
| `layout` (auto-detected) | Selector | Description |
|
|
14
|
+
| ------------------------ | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `'default'` (default) | `smartpro-dropdown-default` | Trigger button + `<el-dropdown>` + `<el-menu>` with items. Covers Simple / With dividers / With icons / Minimal source variants. |
|
|
16
|
+
| `'with-header'` | `smartpro-dropdown-with-header` | Same as default plus a heading row above the items (e.g. "Signed in as …"). Triggered automatically by `options.headerLabel`. |
|
|
17
|
+
|
|
18
|
+
## Source variant mapping
|
|
19
|
+
|
|
20
|
+
| Tailwind UI variant | Pro options |
|
|
21
|
+
| ------------------- | -------------------------------------------- |
|
|
22
|
+
| Simple | (defaults) |
|
|
23
|
+
| With dividers | `showDividers: true` + `item.divider: true` |
|
|
24
|
+
| With icons | `withIcons: true` + `item.icon` (SVG path d) |
|
|
25
|
+
| Minimal | `minimal: true` (compact paddings) |
|
|
26
|
+
| With header | `headerLabel: 'Signed in as …'` |
|
|
27
|
+
|
|
28
|
+
## API
|
|
29
|
+
|
|
30
|
+
### Types (`dropdown.types.ts`)
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
type SmartDropdownLayoutPro = 'default' | 'with-header';
|
|
34
|
+
|
|
35
|
+
interface IDropdownOptionsPro extends IDropdownOptions {
|
|
36
|
+
layout?: SmartDropdownLayoutPro;
|
|
37
|
+
showDividers?: boolean;
|
|
38
|
+
withIcons?: boolean;
|
|
39
|
+
minimal?: boolean;
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`IDropdownOptions` (re-exported from `@smartsoft001/angular`): `variant?: SmartDropdownVariant`, `headerLabel?: string`.
|
|
44
|
+
|
|
45
|
+
`IDropdownItem` (re-exported): `{ id, label, icon?, href?, disabled?, divider? }`.
|
|
46
|
+
|
|
47
|
+
### Wrapper inputs
|
|
48
|
+
|
|
49
|
+
| Input | Type | Default | Description |
|
|
50
|
+
| -------------- | ------------------------------------- | ----------- | --------------------------------------------------------------------------- |
|
|
51
|
+
| `items` | `IDropdownItem[]` | `[]` | Menu items. Set `divider: true` for separator entries. |
|
|
52
|
+
| `triggerLabel` | `string \| undefined` | `undefined` | Fallback label rendered inside the trigger when no `<ng-content>` provided. |
|
|
53
|
+
| `open` | `boolean` (model — two-way) | `false` | Bind with `[(open)]`. |
|
|
54
|
+
| `layout` | `SmartDropdownLayoutPro \| undefined` | `undefined` | Force a layout; otherwise auto-detected from `options.headerLabel`. |
|
|
55
|
+
| `options` | `IDropdownOptionsPro \| undefined` | `undefined` | All pro options. |
|
|
56
|
+
| `class` | `string` | `''` | Forwarded to the host of the chosen layout (lands on `<el-dropdown>`). |
|
|
57
|
+
|
|
58
|
+
### Outputs
|
|
59
|
+
|
|
60
|
+
| Output | Payload | When |
|
|
61
|
+
| -------------- | -------------------- | ---------------------------------------------- |
|
|
62
|
+
| `selectedItem` | `{ itemId: string }` | A menu item is clicked (skips disabled items). |
|
|
63
|
+
|
|
64
|
+
### Slots
|
|
65
|
+
|
|
66
|
+
`<ng-content>` projects a custom trigger inside the trigger button. When omitted, the trigger renders `{{ triggerLabel }}` + chevron icon.
|
|
67
|
+
|
|
68
|
+
## Usage examples
|
|
69
|
+
|
|
70
|
+
```html
|
|
71
|
+
<!-- Simple -->
|
|
72
|
+
<smartpro-dropdown
|
|
73
|
+
[items]="actions"
|
|
74
|
+
triggerLabel="Options"
|
|
75
|
+
[(open)]="menuOpen"
|
|
76
|
+
/>
|
|
77
|
+
|
|
78
|
+
<!-- With dividers + icons -->
|
|
79
|
+
<smartpro-dropdown
|
|
80
|
+
[items]="actions"
|
|
81
|
+
triggerLabel="Actions"
|
|
82
|
+
[(open)]="menuOpen"
|
|
83
|
+
[options]="{ withIcons: true, showDividers: true }"
|
|
84
|
+
(selectedItem)="run($event.itemId)"
|
|
85
|
+
/>
|
|
86
|
+
|
|
87
|
+
<!-- Minimal (compact) -->
|
|
88
|
+
<smartpro-dropdown
|
|
89
|
+
[items]="sortItems"
|
|
90
|
+
triggerLabel="Sort"
|
|
91
|
+
[(open)]="sortOpen"
|
|
92
|
+
[options]="{ minimal: true }"
|
|
93
|
+
/>
|
|
94
|
+
|
|
95
|
+
<!-- With header -->
|
|
96
|
+
<smartpro-dropdown
|
|
97
|
+
[items]="accountItems"
|
|
98
|
+
triggerLabel="Account"
|
|
99
|
+
[(open)]="open"
|
|
100
|
+
[options]="{ headerLabel: 'Signed in as tom@example.com' }"
|
|
101
|
+
/>
|
|
102
|
+
|
|
103
|
+
<!-- Custom trigger via ng-content -->
|
|
104
|
+
<smartpro-dropdown [items]="items" [(open)]="open">
|
|
105
|
+
<span class="smart:flex smart:items-center smart:gap-2">
|
|
106
|
+
<img class="smart:size-6 smart:rounded-full" src="/img/me.png" alt="" />
|
|
107
|
+
Tom
|
|
108
|
+
</span>
|
|
109
|
+
</smartpro-dropdown>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Accessibility
|
|
113
|
+
|
|
114
|
+
- Trigger button has `aria-haspopup="menu"` and `aria-expanded` bound to `open`.
|
|
115
|
+
- Menu container uses `role="menu"`; items use `role="menuitem"`.
|
|
116
|
+
- Dividers use `role="separator"`.
|
|
117
|
+
- `<el-dropdown>` / `<el-menu>` from `@tailwindplus/elements` provide click-outside dismiss + keyboard navigation.
|
|
118
|
+
|
|
119
|
+
## File Locations
|
|
120
|
+
|
|
121
|
+
- Wrapper: `packages/shared/angular/src/lib/components/dropdown/dropdown.component.ts`
|
|
122
|
+
- Types: `packages/shared/angular/src/lib/components/dropdown/dropdown.types.ts`
|
|
123
|
+
- Classes utility: `packages/shared/angular/src/lib/components/dropdown/dropdown-classes.util.ts`
|
|
124
|
+
- Layouts: `packages/shared/angular/src/lib/components/dropdown/{default,with-header}/<name>.component.ts`
|
|
125
|
+
- Stories: `packages/shared/angular/src/lib/components/dropdown/dropdown.component.stories.ts`
|
|
126
|
+
- Module entry: `packages/shared/angular/src/lib/components/components.module.ts` (`DROPDOWN_COMPONENTS`)
|
|
127
|
+
|
|
128
|
+
## Peer dependency
|
|
129
|
+
|
|
130
|
+
- `@smartsoft001/angular@^2.123.0` — provides `DropdownBaseComponent`, `IDropdownItem`, `IDropdownOptions`.
|
|
131
|
+
- `@tailwindplus/elements@^1.0.0` — runtime element bundle for `<el-dropdown>` and `<el-menu>`.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-components-empty-state
|
|
3
|
+
description: Empty state component for @smartsoft001/pro-angular. Four layouts (simple, with-recommendations, with-templates, starting-points). `simple` accepts `dashedBorder?` (clickable button with dashed border); `with-recommendations` accepts `gridLayout?` (2-col grid of pill buttons).
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Empty State Component (Pro)
|
|
8
|
+
|
|
9
|
+
Use `<smartpro-empty-state>` and pick a layout via `options.layout`. The component renders a centered message with optional icon, action button(s), and an items list (for recommendations / templates / starting-points). Submission/click events fire via `(actionClick)` and `(itemClick)`.
|
|
10
|
+
|
|
11
|
+
## Layouts
|
|
12
|
+
|
|
13
|
+
| `options.layout` (default `'simple'`) | Selector | Description |
|
|
14
|
+
| ------------------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
15
|
+
| `'simple'` | `smartpro-empty-state-simple` | Centered icon + title + description + action button. `dashedBorder: true` switches to a clickable button-shaped wrapper with a dashed border (icon + title only) — clicking fires `actionClick` for the first action. |
|
|
16
|
+
| `'with-recommendations'` | `smartpro-empty-state-with-recommendations` | Centered icon + title + description + optional `formTpl` slot + an items list. Default renders the items in a divided list with row-style buttons. `gridLayout: true` switches to a 2-column grid of rounded pill buttons with plus icons. |
|
|
17
|
+
| `'with-templates'` | `smartpro-empty-state-with-templates` | Centered icon + title + description + a templates list (distinct content model with template cards). |
|
|
18
|
+
| `'starting-points'` | `smartpro-empty-state-starting-points` | Centered icon + title + description + a starting-points list (distinct content model with action card cells). |
|
|
19
|
+
|
|
20
|
+
## API
|
|
21
|
+
|
|
22
|
+
### IEmptyStateOptionsPro (`empty-state.types.ts`, omits + redefines `layout`)
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
type SmartEmptyStateLayoutPro =
|
|
26
|
+
| 'simple'
|
|
27
|
+
| 'with-recommendations'
|
|
28
|
+
| 'with-templates'
|
|
29
|
+
| 'starting-points';
|
|
30
|
+
|
|
31
|
+
interface IEmptyStateOptionsPro {
|
|
32
|
+
layout?: SmartEmptyStateLayoutPro;
|
|
33
|
+
title?: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
itemsTitle?: string;
|
|
36
|
+
iconTpl?: TemplateRef<unknown>;
|
|
37
|
+
formTpl?: TemplateRef<unknown>;
|
|
38
|
+
items?: IEmptyStateItem[];
|
|
39
|
+
actions?: IEmptyStateAction[];
|
|
40
|
+
dashedBorder?: boolean;
|
|
41
|
+
gridLayout?: boolean;
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Wrapper Inputs
|
|
46
|
+
|
|
47
|
+
| Input | Type | Default | Description |
|
|
48
|
+
| --------- | ------------------------------------ | ----------- | ----------------------- |
|
|
49
|
+
| `options` | `IEmptyStateOptionsPro \| undefined` | `undefined` | Layout, content, flags. |
|
|
50
|
+
| `class` | `string` | `''` | Extra CSS classes. |
|
|
51
|
+
|
|
52
|
+
Outputs: `actionClick: IEmptyStateActionClick` (`{ actionId }`), `itemClick: IEmptyStateItemClick` (`{ itemId }`).
|
|
53
|
+
|
|
54
|
+
## Usage Example
|
|
55
|
+
|
|
56
|
+
```html
|
|
57
|
+
<!-- Simple -->
|
|
58
|
+
<smartpro-empty-state
|
|
59
|
+
[options]="{
|
|
60
|
+
title: 'No projects',
|
|
61
|
+
description: 'Get started by creating a new project.',
|
|
62
|
+
actions: [{ id: 'new', label: 'New Project', variant: 'primary' }]
|
|
63
|
+
}"
|
|
64
|
+
(actionClick)="onAction($event)"
|
|
65
|
+
></smartpro-empty-state>
|
|
66
|
+
|
|
67
|
+
<!-- Dashed-border CTA -->
|
|
68
|
+
<smartpro-empty-state
|
|
69
|
+
[options]="{
|
|
70
|
+
title: 'Add a new file',
|
|
71
|
+
dashedBorder: true,
|
|
72
|
+
actions: [{ id: 'new', label: 'New' }]
|
|
73
|
+
}"
|
|
74
|
+
(actionClick)="onAction($event)"
|
|
75
|
+
></smartpro-empty-state>
|
|
76
|
+
|
|
77
|
+
<!-- With recommendations (list) -->
|
|
78
|
+
<smartpro-empty-state
|
|
79
|
+
[options]="{
|
|
80
|
+
layout: 'with-recommendations',
|
|
81
|
+
title: 'Add team members',
|
|
82
|
+
itemsTitle: 'Recommended',
|
|
83
|
+
items: [{ id: '1', title: 'Leslie', imageUrl: '...' }]
|
|
84
|
+
}"
|
|
85
|
+
(itemClick)="onItem($event)"
|
|
86
|
+
></smartpro-empty-state>
|
|
87
|
+
|
|
88
|
+
<!-- With recommendations (grid) -->
|
|
89
|
+
<smartpro-empty-state
|
|
90
|
+
[options]="{
|
|
91
|
+
layout: 'with-recommendations',
|
|
92
|
+
gridLayout: true,
|
|
93
|
+
items: [...]
|
|
94
|
+
}"
|
|
95
|
+
></smartpro-empty-state>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## File Locations
|
|
99
|
+
|
|
100
|
+
- Wrapper: `packages/shared/angular/src/lib/components/empty-state/empty-state.component.ts`
|
|
101
|
+
- Types: `packages/shared/angular/src/lib/components/empty-state/empty-state.types.ts`
|
|
102
|
+
- Variants: `packages/shared/angular/src/lib/components/empty-state/{simple,with-recommendations,with-templates,starting-points}/<name>.component.ts`
|
|
103
|
+
- Stories: `packages/shared/angular/src/lib/components/empty-state/empty-state.component.stories.ts`
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-components-feed
|
|
3
|
+
description: Activity feed component for @smartsoft001/pro-angular. Two layouts (icons timeline, comments stack) with per-event polymorphism — comment cards for events with avatar + 'comment' type, dot+text fallback otherwise.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Feed Component (Pro)
|
|
8
|
+
|
|
9
|
+
Use `<smartpro-feed>`. The component iterates `options.events: IFeedEvent[]` and picks rendering per event based on `options.layout` and per-event fields (`avatarUrl`, `type`, `iconTpl`).
|
|
10
|
+
|
|
11
|
+
## Layouts
|
|
12
|
+
|
|
13
|
+
| `options.layout` (default `'comments'`) | Description |
|
|
14
|
+
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
15
|
+
| `'icons'` | Vertical timeline — every event becomes a small colored icon circle. Color is picked from `event.type` (`completed` → green, `advanced` → blue, `commented` → gray, `edited` → purple, anything else → gray). Optional inner glyph via `event.iconTpl`. |
|
|
16
|
+
| `'comments'` | Stacked list. Per-event: when `event.avatarUrl` is set AND (`event.type` is undefined OR `'comment'`), render a rich comment card (avatar + title + timestamp + description). Otherwise, render a dot + text row. Pass `options.commentSubmitTpl` to render a comment-submission row beneath the list. |
|
|
17
|
+
|
|
18
|
+
## API
|
|
19
|
+
|
|
20
|
+
### IFeedOptionsPro (`feed.types.ts`, extends `IFeedOptions`)
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
type SmartFeedLayoutPro = 'icons' | 'comments';
|
|
24
|
+
|
|
25
|
+
interface IFeedOptionsPro {
|
|
26
|
+
layout?: SmartFeedLayoutPro; // 'comments' (default) | 'icons'
|
|
27
|
+
title?: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
events?: IFeedEvent[];
|
|
30
|
+
commentSubmitTpl?: TemplateRef<unknown>;
|
|
31
|
+
emptyTpl?: TemplateRef<unknown>;
|
|
32
|
+
footerTpl?: TemplateRef<unknown>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface IFeedEvent {
|
|
36
|
+
id?: string;
|
|
37
|
+
title: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
timestamp?: string;
|
|
40
|
+
iconTpl?: TemplateRef<unknown>; // glyph rendered inside the colored circle (icons layout)
|
|
41
|
+
avatarUrl?: string; // promotes the event to a comment card (comments layout)
|
|
42
|
+
href?: string; // wraps description in a link (icons layout)
|
|
43
|
+
type?: string; // 'completed' | 'advanced' | 'commented' | 'edited' | 'comment' | …
|
|
44
|
+
ariaLabel?: string;
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Wrapper Inputs / Outputs
|
|
49
|
+
|
|
50
|
+
| Input | Type | Default | Description |
|
|
51
|
+
| --------- | ------------------------------ | ----------- | ------------------------------------------------ |
|
|
52
|
+
| `options` | `IFeedOptionsPro \| undefined` | `undefined` | Layout, events, optional template slots. |
|
|
53
|
+
| `class` | `string` | `''` | Extra CSS classes appended to the outer wrapper. |
|
|
54
|
+
|
|
55
|
+
The component does not emit any outputs.
|
|
56
|
+
|
|
57
|
+
## Usage
|
|
58
|
+
|
|
59
|
+
### Icons timeline
|
|
60
|
+
|
|
61
|
+
```html
|
|
62
|
+
<smartpro-feed
|
|
63
|
+
[options]="{
|
|
64
|
+
layout: 'icons',
|
|
65
|
+
events: [
|
|
66
|
+
{ title: 'Applied to', description: 'Front End Developer', type: 'completed', timestamp: 'Sep 20' },
|
|
67
|
+
{ title: 'Advanced to phone screening by', description: 'Bethany Blake', type: 'advanced', timestamp: 'Sep 22' }
|
|
68
|
+
]
|
|
69
|
+
}"
|
|
70
|
+
/>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Comments stack
|
|
74
|
+
|
|
75
|
+
```html
|
|
76
|
+
<smartpro-feed
|
|
77
|
+
[options]="{
|
|
78
|
+
layout: 'comments',
|
|
79
|
+
events: [
|
|
80
|
+
{ title: 'Chelsea Hagon commented', description: '…', avatarUrl: '/u/chelsea.jpg', timestamp: '3d ago' },
|
|
81
|
+
{ title: 'Status update', type: 'paid', timestamp: '4d ago' }
|
|
82
|
+
],
|
|
83
|
+
commentSubmitTpl: commentForm
|
|
84
|
+
}"
|
|
85
|
+
/>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Mixed item types (selective comment cards)
|
|
89
|
+
|
|
90
|
+
```html
|
|
91
|
+
<smartpro-feed
|
|
92
|
+
[options]="{
|
|
93
|
+
layout: 'comments',
|
|
94
|
+
events: [
|
|
95
|
+
{ title: 'Status update', type: 'paid', avatarUrl: '/u/admin.jpg' },
|
|
96
|
+
{ title: 'Comment by Chelsea', type: 'comment', avatarUrl: '/u/chelsea.jpg' }
|
|
97
|
+
]
|
|
98
|
+
}"
|
|
99
|
+
/>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
In the example above, only the `type: 'comment'` event is rendered as a comment card; the `type: 'paid'` event falls back to the dot+text row.
|
|
103
|
+
|
|
104
|
+
## File Locations
|
|
105
|
+
|
|
106
|
+
- Wrapper: `packages/shared/angular/src/lib/components/feed/feed.component.ts`
|
|
107
|
+
- Types: `packages/shared/angular/src/lib/components/feed/feed.types.ts`
|
|
108
|
+
- Layout: `packages/shared/angular/src/lib/components/feed/default/default.component.ts`
|
|
109
|
+
- Helpers: `packages/shared/angular/src/lib/components/feed/feed-classes.util.ts`
|
|
110
|
+
- Stories: `packages/shared/angular/src/lib/components/feed/feed.component.stories.ts`
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-components-form
|
|
3
|
+
description: Form component for @smartsoft001/pro-angular. Two variants — `stacked` (with `labelPosition: 'top' | 'left'`) and `two-column` (with `cardStyle?` flag). Iterates fields from `IFormOptionsPro<T>.model` decorators.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Form Component (Pro)
|
|
8
|
+
|
|
9
|
+
Use `<smartpro-form>` and pick a variant via `variant`. Each variant iterates the form fields (decorator-driven from `options.model`) and renders one `<smartpro-input>` per field. Bind a reactive `UntypedFormGroup` via `[form]` and the model + flags via `[options]`.
|
|
10
|
+
|
|
11
|
+
## Variants
|
|
12
|
+
|
|
13
|
+
| `variant` (default `'stacked'`) | Selector | Description |
|
|
14
|
+
| ------------------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `'stacked'` | `smartpro-form-stacked` | Single-column stacked form. `options.labelPosition: 'left'` switches each field to a 3-col grid with the label aligned left of the input (replaces the legacy `labels-left` variant). |
|
|
16
|
+
| `'two-column'` | `smartpro-form-two-column` | Three-column page grid (description + form). `options.cardStyle: true` wraps the form column in a rounded white card with a shadow (replaces the legacy `two-column-cards` variant). |
|
|
17
|
+
|
|
18
|
+
## API
|
|
19
|
+
|
|
20
|
+
### IFormOptionsPro<T> (`form.types.ts`, extends `IFormOptions<T>`)
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
type SmartFormVariantPro = 'stacked' | 'two-column';
|
|
24
|
+
|
|
25
|
+
interface IFormOptionsPro<T> {
|
|
26
|
+
model: T;
|
|
27
|
+
show?: boolean;
|
|
28
|
+
labelPosition?: 'top' | 'left';
|
|
29
|
+
cardStyle?: boolean;
|
|
30
|
+
// …all base IFormOptions<T> fields
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Wrapper Inputs
|
|
35
|
+
|
|
36
|
+
| Input | Type | Default | Description |
|
|
37
|
+
| --------- | ------------------------------- | ----------- | -------------------- |
|
|
38
|
+
| `variant` | `'stacked' \| 'two-column'` | `'stacked'` | Variant family. |
|
|
39
|
+
| `form` | `UntypedFormGroup` (required) | — | Reactive form group. |
|
|
40
|
+
| `options` | `IFormOptionsPro<T>` (required) | — | Model + flags. |
|
|
41
|
+
| `class` | `string` | `''` | Extra CSS classes. |
|
|
42
|
+
|
|
43
|
+
Output: `invokeSubmit: unknown` — fired when submit is invoked from inside the form tree.
|
|
44
|
+
|
|
45
|
+
## Usage Example
|
|
46
|
+
|
|
47
|
+
```html
|
|
48
|
+
<!-- Default stacked form -->
|
|
49
|
+
<smartpro-form [form]="form" [options]="{ model: applicant }"></smartpro-form>
|
|
50
|
+
|
|
51
|
+
<!-- Labels-left -->
|
|
52
|
+
<smartpro-form
|
|
53
|
+
[form]="form"
|
|
54
|
+
[options]="{ model: applicant, labelPosition: 'left' }"
|
|
55
|
+
></smartpro-form>
|
|
56
|
+
|
|
57
|
+
<!-- Two-column with description column -->
|
|
58
|
+
<smartpro-form
|
|
59
|
+
variant="two-column"
|
|
60
|
+
[form]="form"
|
|
61
|
+
[options]="{ model: applicant }"
|
|
62
|
+
></smartpro-form>
|
|
63
|
+
|
|
64
|
+
<!-- Two-column with card style -->
|
|
65
|
+
<smartpro-form
|
|
66
|
+
variant="two-column"
|
|
67
|
+
[form]="form"
|
|
68
|
+
[options]="{ model: applicant, cardStyle: true }"
|
|
69
|
+
></smartpro-form>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## File Locations
|
|
73
|
+
|
|
74
|
+
- Wrapper: `packages/shared/angular/src/lib/components/form/form.component.ts`
|
|
75
|
+
- Types: `packages/shared/angular/src/lib/components/form/form.types.ts`
|
|
76
|
+
- Variants: `packages/shared/angular/src/lib/components/form/{stacked,two-column}/<name>.component.ts`
|
|
77
|
+
- Stories: `packages/shared/angular/src/lib/components/form/form.component.stories.ts`
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-components-grid-list
|
|
3
|
+
description: Grid list component for @smartsoft001/pro-angular. Four variants (cards, contacts, images-with-details, actions-with-shared-borders). The cards variant adapts to `layout: 'simple' | 'horizontal' | 'logos'`; contacts adapts to `portraitSize: 'large' | 'small'`.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Grid List Component (Pro)
|
|
8
|
+
|
|
9
|
+
Use `<smartpro-grid-list>` and pick a variant via `variant`. Each variant iterates `IGridListOptionsPro.items` and renders a responsive grid (column count via `options.columns`, gap via `options.gap`). Per-item slots include `title`, `description`, `imageUrl`, `imageAlt`, `href`, `actionTpl`.
|
|
10
|
+
|
|
11
|
+
## Variants
|
|
12
|
+
|
|
13
|
+
| `variant` (default `'cards'`) | Selector | Description |
|
|
14
|
+
| ------------------------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| `'cards'` | `smartpro-grid-list-cards` | Card grid with three sub-layouts. `layout: 'simple'` (default) renders compact title-and-description cards. `layout: 'horizontal'` renders a row with avatar + linked title + description. `layout: 'logos'` renders a card with a logo header and a description list body. |
|
|
16
|
+
| `'contacts'` | `smartpro-grid-list-contacts` | Contact-card grid. Default uses large round portraits (`size-32`) in a vertical center-aligned card. `portraitSize: 'small'` switches to a horizontal layout with a small (`size-10`) round portrait. |
|
|
17
|
+
| `'images-with-details'` | `smartpro-grid-list-images-with-details` | Image-led card grid showing a hero image plus details below. |
|
|
18
|
+
| `'actions-with-shared-borders'` | `smartpro-grid-list-actions-with-shared-borders` | Action grid with a shared border between cards (legacy "actions panel" pattern). |
|
|
19
|
+
|
|
20
|
+
## API
|
|
21
|
+
|
|
22
|
+
### IGridListOptionsPro (`grid-list.types.ts`, omits + redefines `layout`)
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
type SmartGridListVariantPro =
|
|
26
|
+
| 'cards'
|
|
27
|
+
| 'contacts'
|
|
28
|
+
| 'images-with-details'
|
|
29
|
+
| 'actions-with-shared-borders';
|
|
30
|
+
|
|
31
|
+
interface IGridListOptionsPro {
|
|
32
|
+
items?: IGridListItem[];
|
|
33
|
+
columns?: number;
|
|
34
|
+
gap?: 'sm' | 'md' | 'lg' | 'xl';
|
|
35
|
+
layout?: 'simple' | 'horizontal' | 'logos';
|
|
36
|
+
portraitSize?: 'large' | 'small';
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
interface IGridListItem {
|
|
40
|
+
id?: string;
|
|
41
|
+
title: string;
|
|
42
|
+
description?: string;
|
|
43
|
+
href?: string;
|
|
44
|
+
imageUrl?: string;
|
|
45
|
+
imageAlt?: string;
|
|
46
|
+
actionTpl?: TemplateRef<unknown>;
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Wrapper Inputs
|
|
51
|
+
|
|
52
|
+
| Input | Type | Default | Description |
|
|
53
|
+
| --------- | --------------------------------------------------------------------------------- | ----------- | ------------------ |
|
|
54
|
+
| `variant` | `'cards' \| 'contacts' \| 'images-with-details' \| 'actions-with-shared-borders'` | `'cards'` | Variant family. |
|
|
55
|
+
| `options` | `IGridListOptionsPro \| undefined` | `undefined` | Items + flags. |
|
|
56
|
+
| `class` | `string` | `''` | Extra CSS classes. |
|
|
57
|
+
|
|
58
|
+
## Usage Example
|
|
59
|
+
|
|
60
|
+
```html
|
|
61
|
+
<!-- Simple card grid -->
|
|
62
|
+
<smartpro-grid-list [options]="{ items }"></smartpro-grid-list>
|
|
63
|
+
|
|
64
|
+
<!-- Horizontal link cards -->
|
|
65
|
+
<smartpro-grid-list
|
|
66
|
+
[options]="{ items, layout: 'horizontal' }"
|
|
67
|
+
></smartpro-grid-list>
|
|
68
|
+
|
|
69
|
+
<!-- Logos cards with description list -->
|
|
70
|
+
<smartpro-grid-list [options]="{ items, layout: 'logos' }"></smartpro-grid-list>
|
|
71
|
+
|
|
72
|
+
<!-- Contacts with large portraits -->
|
|
73
|
+
<smartpro-grid-list
|
|
74
|
+
variant="contacts"
|
|
75
|
+
[options]="{ items }"
|
|
76
|
+
></smartpro-grid-list>
|
|
77
|
+
|
|
78
|
+
<!-- Contacts with small portraits -->
|
|
79
|
+
<smartpro-grid-list
|
|
80
|
+
variant="contacts"
|
|
81
|
+
[options]="{ items, portraitSize: 'small' }"
|
|
82
|
+
></smartpro-grid-list>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## File Locations
|
|
86
|
+
|
|
87
|
+
- Wrapper: `packages/shared/angular/src/lib/components/grid-list/grid-list.component.ts`
|
|
88
|
+
- Types: `packages/shared/angular/src/lib/components/grid-list/grid-list.types.ts`
|
|
89
|
+
- Variants: `packages/shared/angular/src/lib/components/grid-list/{cards,contacts,images-with-details,actions-with-shared-borders}/<name>.component.ts`
|
|
90
|
+
- Shared utilities: `packages/shared/angular/src/lib/components/grid-list/grid-list-classes.util.ts`
|
|
91
|
+
- Stories: `packages/shared/angular/src/lib/components/grid-list/grid-list.component.stories.ts`
|