@smartsoft001/claude-plugins 2.125.0 → 2.127.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/package.json +1 -1
- package/plugins/smart/.claude-plugin/plugin.json +1 -1
- package/plugins/smart/skills/angular-components-accordion/SKILL.md +38 -0
- package/plugins/smart/skills/angular-components-action-panel/SKILL.md +49 -0
- package/plugins/smart/skills/angular-components-avatar/SKILL.md +8 -0
- package/plugins/smart/skills/angular-components-badge/SKILL.md +47 -3
- package/plugins/smart/skills/angular-components-breadcrumbs/SKILL.md +9 -0
- package/plugins/smart/skills/angular-components-button/SKILL.md +18 -0
- package/plugins/smart/skills/angular-components-button-group/SKILL.md +11 -0
- package/plugins/smart/skills/angular-components-calendar/SKILL.md +7 -0
- package/plugins/smart/skills/angular-components-card/SKILL.md +20 -0
- package/plugins/smart/skills/angular-components-card-heading/SKILL.md +59 -0
- package/plugins/smart/skills/angular-components-command-palette/SKILL.md +47 -0
- package/plugins/smart/skills/angular-components-container/SKILL.md +31 -0
- package/plugins/smart/skills/angular-components-date-edit/SKILL.md +26 -0
- package/plugins/smart/skills/angular-components-date-range/SKILL.md +34 -0
- package/plugins/smart/skills/angular-components-description-list/SKILL.md +22 -0
- package/plugins/smart/skills/angular-components-detail/SKILL.md +49 -0
- package/plugins/smart/skills/angular-components-divider/SKILL.md +23 -0
- package/plugins/smart/skills/angular-components-drawer/SKILL.md +10 -0
- package/plugins/smart/skills/angular-components-dropdown/SKILL.md +8 -0
- package/plugins/smart/skills/angular-components-empty-state/SKILL.md +5 -0
- package/plugins/smart/skills/angular-components-feed/SKILL.md +9 -0
- package/plugins/smart/skills/angular-components-form/SKILL.md +28 -0
- package/plugins/smart/skills/angular-components-grid-list/SKILL.md +33 -0
- package/plugins/smart/skills/angular-components-icon/SKILL.md +131 -0
- package/plugins/smart/skills/angular-components-info/SKILL.md +8 -0
- package/plugins/smart/skills/angular-components-input/SKILL.md +56 -0
- package/plugins/smart/skills/angular-components-list/SKILL.md +50 -0
- package/plugins/smart/skills/angular-components-media-object/SKILL.md +53 -0
- package/plugins/smart/skills/angular-components-modal/SKILL.md +11 -0
- package/plugins/smart/skills/angular-components-multi-column-layout/SKILL.md +44 -0
- package/plugins/smart/skills/angular-components-navbar/SKILL.md +21 -0
- package/plugins/smart/skills/angular-components-notification/SKILL.md +16 -1
- package/plugins/smart/skills/angular-components-page/SKILL.md +58 -0
- package/plugins/smart/skills/angular-components-page-heading/SKILL.md +78 -0
- package/plugins/smart/skills/angular-components-paging/SKILL.md +50 -0
- package/plugins/smart/skills/angular-components-progress-bars/SKILL.md +13 -0
- package/plugins/smart/skills/angular-components-section-heading/SKILL.md +36 -0
- package/plugins/smart/skills/angular-components-sidebar-layout/SKILL.md +45 -0
- package/plugins/smart/skills/angular-components-sign-in-form/SKILL.md +39 -0
- package/plugins/smart/skills/angular-components-stacked-layout/SKILL.md +41 -0
- package/plugins/smart/skills/angular-components-stats/SKILL.md +43 -0
- package/plugins/smart/skills/angular-components-tabs/SKILL.md +43 -0
- package/plugins/smart/skills/angular-components-toggle/SKILL.md +42 -0
- package/plugins/smart/skills/angular-components-vertical-navigation/SKILL.md +5 -0
- package/plugins/smart/skills/smart-crud/SKILL.md +212 -0
|
@@ -23,6 +23,14 @@ Main wrapper component. Renders `ModalStandardComponent` by default. When `MODAL
|
|
|
23
23
|
|
|
24
24
|
Barebones placeholder concrete implementation. Renders a native `<dialog [open] role="dialog" aria-modal="true">` containing an optional `<h2 id="smart-modal-title">`, an optional `<p>` description, an `<ng-content>` slot for arbitrary body content, an optional dismiss `<button>` (when `options.withDismiss` is `true`), and a `<footer>` with one `<button data-variant>` per action. It does not include Tailwind UI styling — it exists solely as the default structural placeholder until a custom implementation is registered through the token.
|
|
25
25
|
|
|
26
|
+
### ModalPresetComponent (`<smart-modal-preset>`)
|
|
27
|
+
|
|
28
|
+
Styled variation that extends `ModalBaseComponent` and is a drop-in replacement for `ModalStandardComponent`. Register it via `MODAL_STANDARD_COMPONENT_TOKEN` to restyle every `<smart-modal>`, or use the `<smart-modal-preset>` selector directly. It renders a translated Preline overlay — a full-screen scrollable backdrop hosting a `rounded-xl` card with a header (`title` + optional dismiss `×`), a body (`description` + projected content), and a footer of action buttons. The look is selected through `options.variant` (default `'centered'`): `centered`/`alert` are vertically centered (`alert` is narrower), `wide` is a top-aligned large dialog, and `left-aligned-buttons` left-aligns the footer. `options.footerStyle: 'gray'` tints the footer, and action buttons are styled by their `variant` (`primary`/`secondary`/`danger`). All classes are `smart:`-prefixed Tailwind with explicit `dark:` variants. The class recipes live in `preset/preset-classes.util.ts`.
|
|
29
|
+
|
|
30
|
+
> **Preline JS is NOT used.** Open/close is driven entirely by the existing `open` model signal + `@if` (no `HSOverlay`, no `data-hs-*`). The component binds its own dismiss UX: clicking the backdrop and pressing `Escape` both call `close()` (which sets `open` to `false` and emits `closed`). The dialog ARIA contract is preserved (`role="dialog"`, `aria-modal="true"`, `aria-labelledby` when `title` is set, else `aria-label` from `options.ariaLabel`). The header dismiss `×` button is only shown when `options.withDismiss` is `true`.
|
|
31
|
+
>
|
|
32
|
+
> Because `ModalComponent` renders injected components via `NgComponentOutlet` (which passes inputs by canonical name), `ModalPresetComponent` overrides `cssClass` as `input<string>('')` **without** the `class` alias (applied to the centering wrapper). Bind it as `[cssClass]` when using the `<smart-modal-preset>` selector directly, or just pass `class` on `<smart-modal>` (the wrapper forwards it).
|
|
33
|
+
|
|
26
34
|
### ModalBaseComponent (abstract)
|
|
27
35
|
|
|
28
36
|
Abstract base directive for extending custom modal implementations. Exposes `open` as a two-way `ModelSignal<boolean>`, `title` / `description` as optional `InputSignal<string | undefined>`, `actions` as `InputSignal<IModalAction[]>` (default `[]`), `options` as `InputSignal<IModalOptions | undefined>`, `cssClass` as `InputSignal<string>` (with alias `class`), `actionClick` and `closed` outputs, plus `invokeAction(actionId)` (emits `actionClick`) and `close()` (sets `open` to `false` and emits `closed`).
|
|
@@ -170,6 +178,9 @@ When extending the base directly, remember to:
|
|
|
170
178
|
|
|
171
179
|
- Wrapper: `packages/shared/angular/src/lib/components/modal/modal.component.ts`
|
|
172
180
|
- Standard: `packages/shared/angular/src/lib/components/modal/standard/standard.component.ts`
|
|
181
|
+
- Preset variation: `packages/shared/angular/src/lib/components/modal/preset/preset.component.ts`
|
|
182
|
+
- Preset class recipes: `packages/shared/angular/src/lib/components/modal/preset/preset-classes.util.ts`
|
|
173
183
|
- Base class: `packages/shared/angular/src/lib/components/modal/base/base.component.ts`
|
|
184
|
+
- Stories: `packages/shared/angular/src/lib/components/modal/modal.component.stories.ts`
|
|
174
185
|
- Token: `packages/shared/angular/src/lib/shared.inectors.ts` (`MODAL_STANDARD_COMPONENT_TOKEN`)
|
|
175
186
|
- Interfaces: `packages/shared/angular/src/lib/models/interfaces.ts` (`IModalAction`, `IModalOptions`)
|
|
@@ -172,3 +172,47 @@ export class MyCustomMultiColumnLayoutComponent extends MultiColumnLayoutBaseCom
|
|
|
172
172
|
- Base class: `packages/shared/angular/src/lib/components/multi-column-layout/base/base.component.ts`
|
|
173
173
|
- Token: `packages/shared/angular/src/lib/shared.inectors.ts` (`MULTI_COLUMN_LAYOUT_STANDARD_COMPONENT_TOKEN`)
|
|
174
174
|
- Interface: `packages/shared/angular/src/lib/models/interfaces.ts` (`IMultiColumnLayoutOptions`)
|
|
175
|
+
|
|
176
|
+
## Preset
|
|
177
|
+
|
|
178
|
+
`MultiColumnLayoutPresetComponent` (`<smart-multi-column-layout-preset>`) is a fully styled drop-in replacement for the barebones standard component. It extends `MultiColumnLayoutStandardComponent` and renders a Tailwind app-shell scaffold with explicit light/dark classes (every utility is `smart:`-prefixed).
|
|
179
|
+
|
|
180
|
+
### Structure
|
|
181
|
+
|
|
182
|
+
- **root** (`data-role="root"`) — full-height gray page (`smart:min-h-full smart:bg-gray-50 smart:dark:bg-gray-900`); merges the external `cssClass`.
|
|
183
|
+
- **header** (`data-role="header"`) — rendered only when `options.headerTpl` or `options.title` is set. White surface with a bottom border, matching the stacked-layout/sidebar-layout preset headers. Renders `headerTpl`, falling back to a `title` `<h1>` (`data-role="title"`).
|
|
184
|
+
- flex row containing:
|
|
185
|
+
- **nav** (`data-role="nav"`, `<aside>`) — rendered only when `options.navTpl` is set. White surface, `smart:w-64 smart:shrink-0 smart:border-e`, mirroring the sidebar-layout preset nav.
|
|
186
|
+
- **content** (`data-role="content"`, `<main>`) — gray page surface with `smart:py-8`; projects `<ng-content>` inside an inner container whose horizontal rhythm follows `options.width`.
|
|
187
|
+
- **secondary** (`data-role="secondary"`, `<aside>`) — rendered only when `options.secondaryTpl` is set. White surface on the trailing edge (`smart:border-s`); width follows `options.secondaryWidth`.
|
|
188
|
+
|
|
189
|
+
### Options consumed
|
|
190
|
+
|
|
191
|
+
The preset consumes the full `IMultiColumnLayoutOptions` surface (the standard component only reads the templates):
|
|
192
|
+
|
|
193
|
+
- `width` — `'constrained'` centers the main content container at `max-w-7xl`; `'full'` (default) uses full width. Both keep `px-4 sm:px-6 lg:px-8`.
|
|
194
|
+
- `secondaryWidth` — `'sm'` → `w-64` (default), `'md'` → `w-80`, `'lg'` → `w-96`.
|
|
195
|
+
- `headerTpl` / `title`, `navTpl`, `secondaryTpl` — as above.
|
|
196
|
+
|
|
197
|
+
Class recipes live in `preset/preset-classes.util.ts` (`getMultiColumnLayout…Classes`, including the width/secondaryWidth maps).
|
|
198
|
+
|
|
199
|
+
### Token registration
|
|
200
|
+
|
|
201
|
+
```typescript
|
|
202
|
+
import { MULTI_COLUMN_LAYOUT_STANDARD_COMPONENT_TOKEN } from '@smartsoft001/angular';
|
|
203
|
+
import { MultiColumnLayoutPresetComponent } from '@smartsoft001/angular';
|
|
204
|
+
|
|
205
|
+
providers: [
|
|
206
|
+
{
|
|
207
|
+
provide: MULTI_COLUMN_LAYOUT_STANDARD_COMPONENT_TOKEN,
|
|
208
|
+
useValue: MultiColumnLayoutPresetComponent,
|
|
209
|
+
},
|
|
210
|
+
];
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
When registered through the token, the wrapper passes inputs by canonical name via `NgComponentOutlet`, so the preset overrides `cssClass` as `input<string>('')` (dropping the `class` alias).
|
|
214
|
+
|
|
215
|
+
### Gaps
|
|
216
|
+
|
|
217
|
+
- The nav and secondary asides render on the flex row at all viewport sizes — there is no built-in mobile collapse/drawer behavior.
|
|
218
|
+
- Files: `preset/preset.component.ts`, `preset/preset.component.html`, `preset/preset-classes.util.ts`; story `Preset` in `multi-column-layout.component.stories.ts`.
|
|
@@ -23,6 +23,26 @@ Main wrapper. Delegates to `NavbarStandardComponent` by default. When `NAVBAR_ST
|
|
|
23
23
|
|
|
24
24
|
Barebones placeholder using native HTML. Renders an outer wrapper with `cssClass`, a `<nav class="navbar">` containing a mobile menu toggle button, optional logo (`logoTpl` or `<img>` from `logoUrl`/`logoAlt`, wrapped in `<a>` when `logoHref` provided), a primary `<ul>` of items (each rendered as `<a class="item-link">` when `href` is provided, otherwise `<button class="item-button">` emitting `itemClick`; gets `current` class when `item.current === true`), and template-ref slots `searchTpl` / `actionTpl` / `notificationTpl` / `userMenuTpl`. Optionally renders a `<nav class="navbar-secondary">` row when `options.secondaryItems` is non-empty, and a `.mobile-menu` panel when `mobileMenuOpen()` is `true`.
|
|
25
25
|
|
|
26
|
+
### NavbarPresetComponent (`<smart-navbar-preset>`)
|
|
27
|
+
|
|
28
|
+
Fully-styled, drop-in concrete implementation extending `NavbarBaseComponent`, translating the Preline collapsible navbar look to `smart:`-prefixed Tailwind classes with explicit `dark:` variants. Renders a `<header>` with a brand/logo slot (`logoTpl`, or `<img>` from `logoUrl`/`logoAlt`, wrapped in `<a>` when `logoHref` is set), a responsive primary link row (anchors for items with `href`, otherwise buttons emitting `itemClick`; `current` items get the active/`aria-current="page"` styling), the `searchTpl` / `actionTpl` / `notificationTpl` / `userMenuTpl` slots, an optional secondary link row from `secondaryItems`, and a mobile menu toggle. The mobile collapse is driven entirely by the two-way `mobileMenuOpen` signal (`@if` + `(click)`), so no Preline JS runtime is needed. `options.dark` switches to the solid dark color variant and `options.menuButtonOnLeft` moves the toggle ahead of the brand.
|
|
29
|
+
|
|
30
|
+
Register it via `NAVBAR_STANDARD_COMPONENT_TOKEN` to restyle every `<smart-navbar>`, or use the `<smart-navbar-preset>` selector directly. Because `NavbarComponent` projects inputs through `NgComponentOutlet`, the preset overrides `cssClass` as a plain `input<string>('')` (canonical name, no `class` alias) so external classes bind correctly.
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
import {
|
|
34
|
+
NavbarPresetComponent,
|
|
35
|
+
NAVBAR_STANDARD_COMPONENT_TOKEN,
|
|
36
|
+
} from '@smartsoft001/angular';
|
|
37
|
+
|
|
38
|
+
providers: [
|
|
39
|
+
{
|
|
40
|
+
provide: NAVBAR_STANDARD_COMPONENT_TOKEN,
|
|
41
|
+
useValue: NavbarPresetComponent,
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
```
|
|
45
|
+
|
|
26
46
|
### NavbarBaseComponent (abstract)
|
|
27
47
|
|
|
28
48
|
Abstract base directive. Exposes:
|
|
@@ -187,6 +207,7 @@ export class MyCustomNavbarComponent extends NavbarBaseComponent {
|
|
|
187
207
|
|
|
188
208
|
- Wrapper: `packages/shared/angular/src/lib/components/navbar/navbar.component.ts`
|
|
189
209
|
- Standard: `packages/shared/angular/src/lib/components/navbar/standard/standard.component.ts`
|
|
210
|
+
- Preset: `packages/shared/angular/src/lib/components/navbar/preset/preset.component.ts`
|
|
190
211
|
- Base class: `packages/shared/angular/src/lib/components/navbar/base/base.component.ts`
|
|
191
212
|
- Token: `packages/shared/angular/src/lib/shared.inectors.ts` (`NAVBAR_STANDARD_COMPONENT_TOKEN`)
|
|
192
213
|
- Interfaces: `packages/shared/angular/src/lib/models/interfaces.ts` (`INavbarOptions`, `INavbarItem`, `SmartNavbarLayout`)
|
|
@@ -23,6 +23,19 @@ Main wrapper component. Renders `NotificationStandardComponent` by default. When
|
|
|
23
23
|
|
|
24
24
|
Barebones placeholder concrete implementation. Renders a `<div role="status">` with `aria-live` (defaulting to `polite`, overridable via `options.ariaLive`), an `<h3>` for the title, an optional `<p>` for the description, an optional close button when `dismissible` is `true`, and one `<button>` per action with a `data-variant` attribute. It does not include Tailwind UI styling — it exists solely as the default structural placeholder until a custom implementation is registered through the token.
|
|
25
25
|
|
|
26
|
+
### NotificationPresetComponent (`<smart-notification-preset>`)
|
|
27
|
+
|
|
28
|
+
Styled toast variation that extends `NotificationBaseComponent` and is a drop-in replacement for `NotificationStandardComponent`. Register it via `NOTIFICATION_STANDARD_COMPONENT_TOKEN` to restyle every `<smart-notification>`, or use the `<smart-notification-preset>` selector directly. It renders the translated Preline toast looks as a card (`bg-white`/`dark:bg-gray-800`, border, `rounded-xl`, `shadow-lg`), with the layout selected through `options.variant` (default `'simple'`):
|
|
29
|
+
|
|
30
|
+
- `simple` — leading icon glyph (when `iconName` is set) plus the `title` message and optional `description`.
|
|
31
|
+
- `condensed` — inline single-row message with the action links and close button pushed to the end (`ms-auto`).
|
|
32
|
+
- `with-actions-below` / `with-avatar` — icon (or avatar image for `with-avatar`) + heading + description, with text-link styled actions below; the close button is absolutely positioned.
|
|
33
|
+
- `with-buttons-below` / `with-split-buttons` — same layout but actions render as solid/bordered buttons (per `action.variant`); `with-split-buttons` makes each button `grow` to fill the row.
|
|
34
|
+
|
|
35
|
+
`dismissible` renders a close button that calls `dismiss()`; each action calls `invokeAction(action.id)`. Open/close visibility is Angular-driven via the `dismissed` output — no Preline JS runtime is used. All classes are `smart:`-prefixed Tailwind with explicit `dark:` variants. The class recipes live in `preset/preset-classes.util.ts` (kept out of the public barrel; e.g. `getNotificationContainerClasses`, `getNotificationActionClasses`).
|
|
36
|
+
|
|
37
|
+
> Because `NotificationComponent` renders injected components via `NgComponentOutlet` (which passes inputs by canonical name), `NotificationPresetComponent` overrides `cssClass` as `input<string>('')` **without** the `class` alias. Bind it as `[cssClass]` when using the `<smart-notification-preset>` selector directly, or just pass `class` on `<smart-notification>` (the wrapper forwards it).
|
|
38
|
+
|
|
26
39
|
### NotificationBaseComponent (abstract)
|
|
27
40
|
|
|
28
41
|
Abstract base directive for extending custom notification implementations. Exposes the inputs/outputs listed below and provides `dismiss()` (emits `dismissed`) and `invokeAction(actionId)` (emits `actionClick` with `{ actionId }`) helper methods.
|
|
@@ -78,7 +91,7 @@ interface INotificationOptions {
|
|
|
78
91
|
}
|
|
79
92
|
```
|
|
80
93
|
|
|
81
|
-
The standard component only consumes `ariaLive` (placeholder behavior — applied directly as the `aria-live` attribute on the `role="status"` container; defaults to `'polite'`). The `variant` property is
|
|
94
|
+
The standard component only consumes `ariaLive` (placeholder behavior — applied directly as the `aria-live` attribute on the `role="status"` container; defaults to `'polite'`). The `variant` property is ignored by `NotificationStandardComponent` but **fully consumed by `NotificationPresetComponent`** (default `'simple'`) to pick the toast layout.
|
|
82
95
|
|
|
83
96
|
## NOTIFICATION_STANDARD_COMPONENT_TOKEN
|
|
84
97
|
|
|
@@ -214,6 +227,8 @@ When extending the base directly, remember to:
|
|
|
214
227
|
|
|
215
228
|
- Wrapper: `packages/shared/angular/src/lib/components/notification/notification.component.ts`
|
|
216
229
|
- Standard: `packages/shared/angular/src/lib/components/notification/standard/standard.component.ts`
|
|
230
|
+
- Preset variation: `packages/shared/angular/src/lib/components/notification/preset/preset.component.ts`
|
|
231
|
+
- Preset class recipes: `packages/shared/angular/src/lib/components/notification/preset/preset-classes.util.ts`
|
|
217
232
|
- Base class: `packages/shared/angular/src/lib/components/notification/base/base.component.ts`
|
|
218
233
|
- Token: `packages/shared/angular/src/lib/shared.inectors.ts` (`NOTIFICATION_STANDARD_COMPONENT_TOKEN`)
|
|
219
234
|
- Interfaces: `packages/shared/angular/src/lib/models/interfaces.ts` (`INotificationAction`, `INotificationOptions`, `SmartNotificationVariant`)
|
|
@@ -221,10 +221,68 @@ export class MyCustomPageComponent extends PageBaseComponent {
|
|
|
221
221
|
</smart-page>
|
|
222
222
|
```
|
|
223
223
|
|
|
224
|
+
## Preset
|
|
225
|
+
|
|
226
|
+
`PagePresetComponent` (`<smart-page-preset>`) is a styled `'preset'` variant that extends `PageStandardComponent`. It renders a full application-shell layout instead of the plain standard header: a bordered `<header>`, a gray page body and a content card. Every utility is `smart:`-prefixed with explicit `smart:dark:*` twins.
|
|
227
|
+
|
|
228
|
+
### Registration
|
|
229
|
+
|
|
230
|
+
The preset is dispatched by map key `'preset'` — the built-in `'standard'` variant is untouched. Register the ready-made map for `PAGE_VARIANT_COMPONENTS_TOKEN`:
|
|
231
|
+
|
|
232
|
+
```typescript
|
|
233
|
+
import {
|
|
234
|
+
PAGE_VARIANT_COMPONENTS_TOKEN,
|
|
235
|
+
PAGE_PRESET_VARIANT_COMPONENTS, // { preset: PagePresetComponent }
|
|
236
|
+
} from '@smartsoft001/angular';
|
|
237
|
+
|
|
238
|
+
providers: [
|
|
239
|
+
{
|
|
240
|
+
provide: PAGE_VARIANT_COMPONENTS_TOKEN,
|
|
241
|
+
useValue: PAGE_PRESET_VARIANT_COMPONENTS,
|
|
242
|
+
},
|
|
243
|
+
];
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Then set `variant: 'preset'` on `IPageOptions`:
|
|
247
|
+
|
|
248
|
+
```html
|
|
249
|
+
<smart-page [options]="{ title: 'Alice', variant: 'preset' }">
|
|
250
|
+
<p>Body rendered inside the content card.</p>
|
|
251
|
+
</smart-page>
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Zones (all keyed by `data-role`)
|
|
255
|
+
|
|
256
|
+
| `data-role` | Source | Notes |
|
|
257
|
+
| ------------- | ---------------------------- | --------------------------------------------------------- |
|
|
258
|
+
| `page` | outer wrapper | `bg-gray-50 dark:bg-gray-900`; picks up `cssClass`. |
|
|
259
|
+
| `banner` | `bannerTpl` | Full-width strip above the header. |
|
|
260
|
+
| `header` | header shell | Skipped entirely when `hideHeader` is true. |
|
|
261
|
+
| `breadcrumbs` | `breadcrumbsTpl` | Row at the top of the header container. |
|
|
262
|
+
| `title` | `title` (h1) + `subtitleTpl` | Title row also holds back button, avatar/logo, actions. |
|
|
263
|
+
| `actions` | `search` + `endButtons` | Right side of the title row; hidden when both are absent. |
|
|
264
|
+
| `meta` | `metaTpl` + `statsTpl` | Row under the title; hidden when both are absent. |
|
|
265
|
+
| `filters` | `filtersTpl` | Bar under the header. |
|
|
266
|
+
| `sidebar` | `sidebarTpl` | Rendered as `<aside>` in a flex row (`lg:` and up). |
|
|
267
|
+
| `body` | `bodyTpl` / `<ng-content>` | Rendered inside a bordered content card. |
|
|
268
|
+
|
|
269
|
+
The back button (`button[data-role="back"]`) appears only when `showBackButton` is true and calls the inherited `back()`. A hamburger `button[data-role="menu-button"]` renders unless `hideMenuButton` is true.
|
|
270
|
+
|
|
271
|
+
### cssClass
|
|
272
|
+
|
|
273
|
+
Registered through the token, the wrapper forwards inputs canonically via `NgComponentOutlet` (`{ options, cssClass }`), so the preset does `override cssClass = input<string>('')` (drops the `class` alias). External classes land on the `data-role="page"` wrapper.
|
|
274
|
+
|
|
275
|
+
### Documented gaps
|
|
276
|
+
|
|
277
|
+
- `hideMenuButton` only toggles a decorative hamburger button; there is no menu panel wired to it.
|
|
278
|
+
- Unused slots (`bannerTpl`, `breadcrumbsTpl`, `metaTpl`, `statsTpl`, `filtersTpl`, `sidebarTpl`, `avatarTpl`, `logoTpl`, `subtitleTpl`) simply render nothing when omitted; `navTpl` is not consumed by this preset.
|
|
279
|
+
|
|
224
280
|
## File Locations
|
|
225
281
|
|
|
226
282
|
- Wrapper: `packages/shared/angular/src/lib/components/page/page.component.ts`
|
|
227
283
|
- Standard: `packages/shared/angular/src/lib/components/page/standard/standard.component.ts`
|
|
284
|
+
- Preset: `packages/shared/angular/src/lib/components/page/preset/preset.component.ts`
|
|
285
|
+
- Preset variant map: `packages/shared/angular/src/lib/components/page/preset-variants.ts` (`PAGE_PRESET_VARIANT_COMPONENTS`)
|
|
228
286
|
- Base class: `packages/shared/angular/src/lib/components/page/base/base.component.ts`
|
|
229
287
|
- Token: `packages/shared/angular/src/lib/shared.inectors.ts` (`PAGE_VARIANT_COMPONENTS_TOKEN`)
|
|
230
288
|
- Interface: `packages/shared/angular/src/lib/models/interfaces.ts` (`IPageOptions`, `SmartPageVariant`, `IIconButtonOptions`)
|
|
@@ -174,9 +174,87 @@ export class MyCustomPageHeadingComponent extends PageHeadingBaseComponent {
|
|
|
174
174
|
/>
|
|
175
175
|
```
|
|
176
176
|
|
|
177
|
+
## HyperUI preset
|
|
178
|
+
|
|
179
|
+
`PageHeadingPresetComponent` (`smart-page-heading-preset`) is a HyperUI-styled
|
|
180
|
+
variation. Unlike the standard page-heading (a page title block), this preset
|
|
181
|
+
**intentionally renders a NAVBAR look**: a sticky-ready `<header>` bar with a
|
|
182
|
+
logo/brand zone, a responsive desktop nav zone, a CTA/actions zone (or a user
|
|
183
|
+
avatar zone), and a mobile hamburger that toggles a collapsible panel. The
|
|
184
|
+
collapse is driven by a local `menuOpened` signal — no external JS runtime.
|
|
185
|
+
|
|
186
|
+
Register it through `PAGE_HEADING_STANDARD_COMPONENT_TOKEN` to restyle every
|
|
187
|
+
`<smart-page-heading>`, or use `<smart-page-heading-preset>` directly.
|
|
188
|
+
|
|
189
|
+
### Layouts (`presentation.layout`)
|
|
190
|
+
|
|
191
|
+
| Layout | Arrangement |
|
|
192
|
+
| -------------- | ------------------------------------------------------------- |
|
|
193
|
+
| `links-left` | Logo, then nav directly after it, CTAs pushed right (default) |
|
|
194
|
+
| `links-center` | Logo left, nav centered, CTAs right |
|
|
195
|
+
| `links-right` | Logo left (flex-1), nav + CTAs grouped on the right |
|
|
196
|
+
| `user` | Like `links-right`, but an `avatarTpl` zone instead of CTAs |
|
|
197
|
+
|
|
198
|
+
### New `IPageHeadingOptions` fields
|
|
199
|
+
|
|
200
|
+
- `navTpl?: TemplateRef<unknown>` — desktop nav content (hidden below `md`,
|
|
201
|
+
repeated inside the mobile panel when open). Preset-only.
|
|
202
|
+
- `presentation?: { layout?: 'links-left' | 'links-center' | 'links-right' | 'user' }`
|
|
203
|
+
— selects the navbar arrangement (default `links-left`). Preset-only.
|
|
204
|
+
|
|
205
|
+
Existing `logoTpl` (with a `title` string fallback), `actionsTpl`, and
|
|
206
|
+
`avatarTpl` (used by the `user` layout) are reused for the brand, CTA, and user
|
|
207
|
+
zones respectively.
|
|
208
|
+
|
|
209
|
+
### Token registration
|
|
210
|
+
|
|
211
|
+
```ts
|
|
212
|
+
import { PageHeadingPresetComponent } from '@smartsoft001/angular';
|
|
213
|
+
import { PAGE_HEADING_STANDARD_COMPONENT_TOKEN } from '@smartsoft001/angular';
|
|
214
|
+
|
|
215
|
+
providers: [
|
|
216
|
+
{
|
|
217
|
+
provide: PAGE_HEADING_STANDARD_COMPONENT_TOKEN,
|
|
218
|
+
useValue: PageHeadingPresetComponent,
|
|
219
|
+
},
|
|
220
|
+
];
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Example nav recipe
|
|
224
|
+
|
|
225
|
+
The preset renders only the nav **zone** wrapper; supply the list via `navTpl`:
|
|
226
|
+
|
|
227
|
+
```html
|
|
228
|
+
<ng-template #nav>
|
|
229
|
+
<ul class="smart:flex smart:items-center smart:gap-6 smart:text-sm">
|
|
230
|
+
<li>
|
|
231
|
+
<a
|
|
232
|
+
class="smart:text-gray-500 smart:transition smart:hover:text-gray-500/75 smart:dark:text-white smart:dark:hover:text-white/75"
|
|
233
|
+
href="#"
|
|
234
|
+
>About</a
|
|
235
|
+
>
|
|
236
|
+
</li>
|
|
237
|
+
<li>
|
|
238
|
+
<a
|
|
239
|
+
class="smart:text-gray-500 smart:transition smart:hover:text-gray-500/75 smart:dark:text-white smart:dark:hover:text-white/75"
|
|
240
|
+
href="#"
|
|
241
|
+
>Careers</a
|
|
242
|
+
>
|
|
243
|
+
</li>
|
|
244
|
+
</ul>
|
|
245
|
+
</ng-template>
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Accents stay teal-600 (light) / teal-300 (dark) per the source template.
|
|
249
|
+
|
|
250
|
+
**Out of scope:** avatar dropdown open/close logic — the user supplies the full
|
|
251
|
+
interactive avatar/menu markup via `avatarTpl`; the preset only renders the zone
|
|
252
|
+
(`hidden md:relative md:block`).
|
|
253
|
+
|
|
177
254
|
## File Locations
|
|
178
255
|
|
|
179
256
|
- Wrapper: `packages/shared/angular/src/lib/components/page-heading/page-heading.component.ts`
|
|
257
|
+
- Preset: `packages/shared/angular/src/lib/components/page-heading/preset/preset.component.ts`
|
|
180
258
|
- Standard: `packages/shared/angular/src/lib/components/page-heading/standard/standard.component.ts`
|
|
181
259
|
- Base class: `packages/shared/angular/src/lib/components/page-heading/base/base.component.ts`
|
|
182
260
|
- Token: `packages/shared/angular/src/lib/shared.inectors.ts` (`PAGE_HEADING_STANDARD_COMPONENT_TOKEN`)
|
|
@@ -23,6 +23,20 @@ Main wrapper component. Renders `PagingStandardComponent` by default. When `PAGI
|
|
|
23
23
|
|
|
24
24
|
Default concrete implementation. Simple Tailwind-styled pagination placeholder with prev/next buttons, numeric page buttons (with ellipsis handling) and `aria-current` for the active page. Supports dark mode and disabled states.
|
|
25
25
|
|
|
26
|
+
### PagingPresetComponent (`<smart-paging-preset>`)
|
|
27
|
+
|
|
28
|
+
Styled variation that extends `PagingBaseComponent` and is a drop-in replacement for `PagingStandardComponent`. Register it via `PAGING_STANDARD_COMPONENT_TOKEN` to restyle every `<smart-paging>`, or use the `<smart-paging-preset>` selector directly. Translates the Preline pagination examples into `smart:`-prefixed vanilla Tailwind classes with explicit `dark:` variants. It drives page state purely through the inherited signals/methods (`pages`, `canGoBack`, `canGoForward`, `goToPage`, `nextPage`, `previousPage`) — no Preline JS runtime is required. The `variant` input selects the layout:
|
|
29
|
+
|
|
30
|
+
- `card-footer` — a "Showing X to Y of Z results" summary (built from `showingFrom`/`showingTo`/`totalItems`) alongside the nav, justified between on `sm`+ screens;
|
|
31
|
+
- `centered` — the nav centered horizontally;
|
|
32
|
+
- `simple` — the bare nav.
|
|
33
|
+
|
|
34
|
+
The per-variant class recipes live in `preset/preset-classes.util.ts` (`getPagingContainerClasses`, `getPagingNavClasses`, `getPagingPageClasses`, plus the `PAGING_*` const class strings); they are kept out of the public barrel and prefixed with the component name.
|
|
35
|
+
|
|
36
|
+
> Unlike most preset components, `PagingPresetComponent` keeps the inherited `cssClass` **with** its `class` alias. `PagingComponent` instantiates the injected component with `ViewContainerRef.createComponent` and forwards inputs via `setInput('class', …)` (the public alias) — not `NgComponentOutlet` — so dropping the alias would break the forwarded class binding. Bind `class` on either `<smart-paging>` or `<smart-paging-preset>`.
|
|
37
|
+
>
|
|
38
|
+
> Note: `PagingComponent` does **not** forward the `variant` input, so selecting a variant requires using the `<smart-paging-preset>` selector directly (or another wrapper that forwards `variant`).
|
|
39
|
+
|
|
26
40
|
### PagingBaseComponent (abstract)
|
|
27
41
|
|
|
28
42
|
Abstract base directive for extending custom paging implementations. Provides signal-based state (`currentPage`, `totalPages`, `pageSize`, `totalItems`, `variant`, `cssClass`), computed helpers (`showingFrom`, `showingTo`, `canGoBack`, `canGoForward`, `pages`) and navigation methods (`goToPage`, `nextPage`, `previousPage`).
|
|
@@ -124,9 +138,45 @@ export class MyCustomPagingComponent extends PagingBaseComponent {}
|
|
|
124
138
|
></smart-paging>
|
|
125
139
|
```
|
|
126
140
|
|
|
141
|
+
### Using the preset variation
|
|
142
|
+
|
|
143
|
+
```typescript
|
|
144
|
+
// Register globally (or in a feature's providers) to restyle every <smart-paging>:
|
|
145
|
+
import {
|
|
146
|
+
PAGING_STANDARD_COMPONENT_TOKEN,
|
|
147
|
+
PagingPresetComponent,
|
|
148
|
+
} from '@smartsoft001/angular';
|
|
149
|
+
|
|
150
|
+
providers: [
|
|
151
|
+
{ provide: PAGING_STANDARD_COMPONENT_TOKEN, useValue: PagingPresetComponent },
|
|
152
|
+
];
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
```html
|
|
156
|
+
<!-- Use the variation selector directly to pick a variant -->
|
|
157
|
+
<smart-paging-preset
|
|
158
|
+
variant="card-footer"
|
|
159
|
+
[currentPage]="page()"
|
|
160
|
+
[totalPages]="totalPages()"
|
|
161
|
+
[pageSize]="25"
|
|
162
|
+
[totalItems]="248"
|
|
163
|
+
(pageChange)="onPageChange($event)"
|
|
164
|
+
></smart-paging-preset>
|
|
165
|
+
|
|
166
|
+
<smart-paging-preset
|
|
167
|
+
variant="centered"
|
|
168
|
+
[currentPage]="page()"
|
|
169
|
+
[totalPages]="totalPages()"
|
|
170
|
+
(pageChange)="onPageChange($event)"
|
|
171
|
+
></smart-paging-preset>
|
|
172
|
+
```
|
|
173
|
+
|
|
127
174
|
## File Locations
|
|
128
175
|
|
|
129
176
|
- Wrapper: `packages/shared/angular/src/lib/components/paging/paging.component.ts`
|
|
130
177
|
- Standard: `packages/shared/angular/src/lib/components/paging/standard/standard.component.ts`
|
|
178
|
+
- Preset variation: `packages/shared/angular/src/lib/components/paging/preset/preset.component.ts`
|
|
179
|
+
- Preset class recipes: `packages/shared/angular/src/lib/components/paging/preset/preset-classes.util.ts`
|
|
131
180
|
- Base class: `packages/shared/angular/src/lib/components/paging/base/base.component.ts`
|
|
181
|
+
- Stories: `packages/shared/angular/src/lib/components/paging/paging.component.stories.ts`
|
|
132
182
|
- Token: `packages/shared/angular/src/lib/shared.inectors.ts` (`PAGING_STANDARD_COMPONENT_TOKEN`)
|
|
@@ -29,6 +29,17 @@ Renders `<nav class="progress-bars">` (with `aria-label` from `options.ariaLabel
|
|
|
29
29
|
**Bar mode (layout `progress-bar`):**
|
|
30
30
|
Renders `<div class="progress-bars-bar-wrapper">` with optional `<h4 class="sr-only">` (from `srOnlyTitle`), optional `<p class="progress-bars-title">` (from `title`), a track + `<div class="progress-bars-fill" role="progressbar">` (width = clamped `value` 0–100), and optional `<div class="progress-bars-columns">` row of column labels (each with `active` class when `column.active === true`).
|
|
31
31
|
|
|
32
|
+
### ProgressBarsPresetComponent (`<smart-progress-bars-preset>`)
|
|
33
|
+
|
|
34
|
+
Fully-styled variation that extends `ProgressBarsBaseComponent` and is a drop-in replacement for `ProgressBarsStandardComponent`. Register it via `PROGRESS_BARS_STANDARD_COMPONENT_TOKEN` to restyle every `<smart-progress-bars>`, or use the `<smart-progress-bars-preset>` selector directly. It renders both modes off the shared `IProgressBarsOptions` API:
|
|
35
|
+
|
|
36
|
+
- **Percentage bar** (`layout: 'progress-bar'`): a rounded track + animated `bg-blue-600` fill sized to the clamped `value` (0–100). Shows a title header with a `value%` label when `title` is set, an `sr-only` `<h4>` from `srOnlyTitle`, and a grid of column captions from `columns` (active columns rendered semibold).
|
|
37
|
+
- **Stepper** (all other layouts): a `<nav>`/`<ol>` of steps. Markers adapt to the layout — numbered/check circles for `circles`, `circles-with-text`, `panels`, `panels-with-border`; small dots for `bullets`, `bullets-and-text`; a colored top border (no marker) for `simple`. `bullets-and-text` and `circles-with-text` lay out vertically; the other step layouts lay out horizontally, with connector lines between markers for `circles`/`bullets`. Completed circle steps show a check SVG; current/upcoming circle steps show `step.index` (falling back to the 1-based position). Each step renders an `<a>` when `step.href` is set, otherwise a `<button>` that emits `stepClick`. Names/markers tint by `status` (`complete`/`current`/`upcoming`).
|
|
38
|
+
|
|
39
|
+
All classes are `smart:`-prefixed Tailwind with explicit `dark:` variants. The class recipes live in `preset/preset-classes.util.ts` (kept out of the public barrel; every export is `ProgressBars`-prefixed).
|
|
40
|
+
|
|
41
|
+
> Because `ProgressBarsComponent` renders injected components via `NgComponentOutlet` (which passes inputs by canonical name), `ProgressBarsPresetComponent` overrides `cssClass` as `input<string>('')` **without** the `class` alias. Bind it as `[cssClass]` when using the `<smart-progress-bars-preset>` selector directly, or just pass `class` on `<smart-progress-bars>` (the wrapper forwards it).
|
|
42
|
+
|
|
32
43
|
### ProgressBarsBaseComponent (abstract)
|
|
33
44
|
|
|
34
45
|
Abstract base directive. Exposes:
|
|
@@ -182,6 +193,8 @@ export class MyCustomProgressBarsComponent extends ProgressBarsBaseComponent {
|
|
|
182
193
|
|
|
183
194
|
- Wrapper: `packages/shared/angular/src/lib/components/progress-bars/progress-bars.component.ts`
|
|
184
195
|
- Standard: `packages/shared/angular/src/lib/components/progress-bars/standard/standard.component.ts`
|
|
196
|
+
- Preset variation: `packages/shared/angular/src/lib/components/progress-bars/preset/preset.component.ts`
|
|
197
|
+
- Preset class recipes: `packages/shared/angular/src/lib/components/progress-bars/preset/preset-classes.util.ts`
|
|
185
198
|
- Base class: `packages/shared/angular/src/lib/components/progress-bars/base/base.component.ts`
|
|
186
199
|
- Token: `packages/shared/angular/src/lib/shared.inectors.ts` (`PROGRESS_BARS_STANDARD_COMPONENT_TOKEN`)
|
|
187
200
|
- Interfaces: `packages/shared/angular/src/lib/models/interfaces.ts` (`IProgressBarsOptions`, `IProgressStep`, `IProgressBarColumn`, `SmartProgressBarsLayout`, `SmartProgressStepStatus`)
|
|
@@ -175,3 +175,39 @@ export class MyCustomSectionHeadingComponent extends SectionHeadingBaseComponent
|
|
|
175
175
|
- Base class: `packages/shared/angular/src/lib/components/section-heading/base/base.component.ts`
|
|
176
176
|
- Token: `packages/shared/angular/src/lib/shared.inectors.ts` (`SECTION_HEADING_STANDARD_COMPONENT_TOKEN`)
|
|
177
177
|
- Interface: `packages/shared/angular/src/lib/models/interfaces.ts` (`ISectionHeadingOptions`)
|
|
178
|
+
|
|
179
|
+
## HyperUI preset
|
|
180
|
+
|
|
181
|
+
`SectionHeadingPresetComponent` (`smart-section-heading-preset`) is a HyperUI-styled "content with image" variation. It renders an eyebrow row (label + `badgeTpl`), an `<h2>` title, a description `<p>`, `actionsTpl` below the text, and an optional image column fed by `imageTpl`. Vanilla Tailwind classes are prefixed with `smart:` and ship explicit `smart:dark:*` variants (gray-900 ↔ white for the title, gray-700 ↔ gray-300 for text). Every zone exposes a `data-role` hook: `section`, `grid`, `text`, `image`, `eyebrow`, `actions`.
|
|
182
|
+
|
|
183
|
+
### New `ISectionHeadingOptions` fields
|
|
184
|
+
|
|
185
|
+
- `imageTpl?: TemplateRef<unknown>` — the image column. The zone is only rendered when this is provided (`@if`); the template owns the `<img>` and its classes.
|
|
186
|
+
- `presentation?: { layout?: 'half' | 'narrow' | 'wide' | 'vertical' }` — layout selector (default `half`). Consumed only by the preset; the standard component ignores it.
|
|
187
|
+
|
|
188
|
+
| Layout | Grid | Notes |
|
|
189
|
+
| ---------- | --------------------------------------- | ----------------------------------- |
|
|
190
|
+
| `half` | `md:grid-cols-2`, text \| image | Default. Balanced two-column split. |
|
|
191
|
+
| `narrow` | `md:grid-cols-4`, text (1) \| image (3) | Narrow copy, wide image. |
|
|
192
|
+
| `wide` | `md:grid-cols-4`, image (3) \| text (1) | Image rendered **first**. |
|
|
193
|
+
| `vertical` | `space-y-*` stack (no grid) | Copy on top, image underneath. |
|
|
194
|
+
|
|
195
|
+
### Register the preset
|
|
196
|
+
|
|
197
|
+
```ts
|
|
198
|
+
import { SectionHeadingPresetComponent } from '@smartsoft001/angular';
|
|
199
|
+
import { SECTION_HEADING_STANDARD_COMPONENT_TOKEN } from '@smartsoft001/angular';
|
|
200
|
+
|
|
201
|
+
providers: [
|
|
202
|
+
{
|
|
203
|
+
provide: SECTION_HEADING_STANDARD_COMPONENT_TOKEN,
|
|
204
|
+
useValue: SectionHeadingPresetComponent,
|
|
205
|
+
},
|
|
206
|
+
];
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Registering the token restyles every `<smart-section-heading>`; alternatively use `<smart-section-heading-preset>` directly.
|
|
210
|
+
|
|
211
|
+
### Gaps
|
|
212
|
+
|
|
213
|
+
`tabsTpl` and `inputGroupTpl` are **not** styled by this preset (they are only rendered by the standard component). Use the standard component when those slots are needed.
|
|
@@ -174,3 +174,48 @@ When extending the base directly, remember to:
|
|
|
174
174
|
- Base class: `packages/shared/angular/src/lib/components/sidebar-layout/base/base.component.ts`
|
|
175
175
|
- Token: `packages/shared/angular/src/lib/shared.inectors.ts` (`SIDEBAR_LAYOUT_STANDARD_COMPONENT_TOKEN`)
|
|
176
176
|
- Interface: `packages/shared/angular/src/lib/models/interfaces.ts` (`ISidebarLayoutOptions`)
|
|
177
|
+
|
|
178
|
+
## Preset
|
|
179
|
+
|
|
180
|
+
`SidebarLayoutPresetComponent` (`smart-sidebar-layout-preset`) is a styled,
|
|
181
|
+
drop-in replacement for `SidebarLayoutStandardComponent`. It extends the
|
|
182
|
+
standard component (reusing `isRightSidebar`) and applies a Tailwind shell where
|
|
183
|
+
every utility is `smart:`-prefixed with explicit `smart:dark:*` variants.
|
|
184
|
+
|
|
185
|
+
Structure:
|
|
186
|
+
|
|
187
|
+
- Root: full-height gray page (`smart:min-h-full smart:bg-gray-50
|
|
188
|
+
smart:dark:bg-gray-900`); `cssClass` is merged onto it.
|
|
189
|
+
- Optional header zone (`data-role="header"`): rendered only when
|
|
190
|
+
`options.headerTpl` or `options.title` is set. Styled like the stacked-layout
|
|
191
|
+
preset header (white bg, `smart:border-b`, dark `gray-800`). Falls back to an
|
|
192
|
+
`<h1>` (`data-role="title"`) when only `title` is given.
|
|
193
|
+
- Row (`data-role="row"`): a flex container. `sidebarPosition: 'right'` adds
|
|
194
|
+
`smart:flex-row-reverse`.
|
|
195
|
+
- Sidebar `<aside>` (`data-role="sidebar"`): white, `smart:shrink-0`,
|
|
196
|
+
`smart:w-64` (or `smart:w-16` when `options.condensed`). Border is
|
|
197
|
+
`smart:border-e` (left sidebar) or `smart:border-s` (right sidebar).
|
|
198
|
+
- Content `<main>` (`data-role="content"`): gray page surface with padding;
|
|
199
|
+
projects `<ng-content>`.
|
|
200
|
+
|
|
201
|
+
No new `ISidebarLayoutOptions` fields — the preset consumes the existing
|
|
202
|
+
`title`, `headerTpl`, `sidebarTpl`, `sidebarPosition`, and `condensed`.
|
|
203
|
+
|
|
204
|
+
Because the wrapper forwards inputs canonically through `NgComponentOutlet`, the
|
|
205
|
+
preset does `override cssClass = input<string>('')` (drops the inherited `class`
|
|
206
|
+
alias).
|
|
207
|
+
|
|
208
|
+
Class recipes live in `preset/preset-classes.util.ts`
|
|
209
|
+
(`getSidebarLayout*Classes`); it is intentionally NOT barrel-exported.
|
|
210
|
+
|
|
211
|
+
Register it to restyle every `<smart-sidebar-layout>`:
|
|
212
|
+
|
|
213
|
+
```typescript
|
|
214
|
+
{
|
|
215
|
+
provide: SIDEBAR_LAYOUT_STANDARD_COMPONENT_TOKEN,
|
|
216
|
+
useValue: SidebarLayoutPresetComponent,
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Documented gap: `options.mobileBreakpoint` is not consumed — the standard
|
|
221
|
+
component the preset extends does not act on it either.
|
|
@@ -193,10 +193,49 @@ export class MyCustomSignInFormComponent extends SignInFormBaseComponent {
|
|
|
193
193
|
<smart-sign-in-form [disabled]="loading()" (submit)="onSignIn($event)" />
|
|
194
194
|
```
|
|
195
195
|
|
|
196
|
+
## Preset
|
|
197
|
+
|
|
198
|
+
`SignInFormPresetComponent` (`<smart-sign-in-form-preset>`) is a styled drop-in
|
|
199
|
+
replacement that `extends SignInFormStandardComponent`, so it inherits all form
|
|
200
|
+
logic unchanged (email/password signals, `onSubmit` with the disabled guard,
|
|
201
|
+
`onSocialClick`, and mode reactivity for labels/links). It realizes the four
|
|
202
|
+
`options.layout` values with Tailwind (`smart:`-prefixed, explicit
|
|
203
|
+
`smart:dark:*` twins) and consistent field styling (`rounded-lg`, gray borders,
|
|
204
|
+
blue focus ring; solid blue submit; outline social buttons; blue text links).
|
|
205
|
+
|
|
206
|
+
| `options.layout` | Look |
|
|
207
|
+
| ------------------ | ----------------------------------------------------------------------- |
|
|
208
|
+
| `simple` (default) | Single column, `max-w-sm mx-auto`, labeled fields |
|
|
209
|
+
| `simple-no-labels` | Single column, placeholders only (labels off unless `showLabels: true`) |
|
|
210
|
+
| `card` | `simple` wrapped in a bordered, rounded, shadowed white/dark card |
|
|
211
|
+
| `split-screen` | `grid lg:grid-cols-2`: `heroImageUrl` cover image column + form column |
|
|
212
|
+
|
|
213
|
+
`data-role` hooks for testing/styling: `container`, `form`, `email`, `password`,
|
|
214
|
+
`submit`, `social`, `forgot`, `alt-link`, `hero`, `extra`, `card`.
|
|
215
|
+
|
|
216
|
+
Register it via the token so `<smart-sign-in-form>` renders the preset:
|
|
217
|
+
|
|
218
|
+
```typescript
|
|
219
|
+
import { SIGN_IN_FORM_STANDARD_COMPONENT_TOKEN } from '@smartsoft001/angular';
|
|
220
|
+
import { SignInFormPresetComponent } from '@smartsoft001/angular';
|
|
221
|
+
|
|
222
|
+
providers: [
|
|
223
|
+
{
|
|
224
|
+
provide: SIGN_IN_FORM_STANDARD_COMPONENT_TOKEN,
|
|
225
|
+
useValue: SignInFormPresetComponent,
|
|
226
|
+
},
|
|
227
|
+
];
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Gaps: `heroImageUrl` renders as a `smart:lg:block` cover image (hidden below the
|
|
231
|
+
`lg` breakpoint); `submitLabel`, `emailPlaceholder`, `passwordPlaceholder`, and
|
|
232
|
+
the `extraTpl` slot are all honored.
|
|
233
|
+
|
|
196
234
|
## File Locations
|
|
197
235
|
|
|
198
236
|
- Wrapper: `packages/shared/angular/src/lib/components/sign-in-form/sign-in-form.component.ts`
|
|
199
237
|
- Standard: `packages/shared/angular/src/lib/components/sign-in-form/standard/standard.component.ts`
|
|
238
|
+
- Preset: `packages/shared/angular/src/lib/components/sign-in-form/preset/preset.component.ts` (classes in `preset/preset-classes.util.ts`)
|
|
200
239
|
- Base class: `packages/shared/angular/src/lib/components/sign-in-form/base/base.component.ts`
|
|
201
240
|
- Token: `packages/shared/angular/src/lib/shared.inectors.ts` (`SIGN_IN_FORM_STANDARD_COMPONENT_TOKEN`)
|
|
202
241
|
- Interfaces: `packages/shared/angular/src/lib/models/interfaces.ts` (`ISignInFormOptions`, `ISocialProvider`, `ISignInFormSubmit`, `ISignInFormSocialClick`, `SmartSignInFormMode`, `SmartSignInFormLayout`)
|
|
@@ -167,3 +167,44 @@ When extending the base directly, remember to:
|
|
|
167
167
|
- Base class: `packages/shared/angular/src/lib/components/stacked-layout/base/base.component.ts`
|
|
168
168
|
- Token: `packages/shared/angular/src/lib/shared.inectors.ts` (`STACKED_LAYOUT_STANDARD_COMPONENT_TOKEN`)
|
|
169
169
|
- Interface: `packages/shared/angular/src/lib/models/interfaces.ts` (`IStackedLayoutOptions`)
|
|
170
|
+
|
|
171
|
+
## HyperUI preset
|
|
172
|
+
|
|
173
|
+
`StackedLayoutPresetComponent` (`<smart-stacked-layout-preset>`) is the HyperUI-styled drop-in for `StackedLayoutStandardComponent`. It uses the same `IStackedLayoutOptions` API — no interface changes, no new options fields — and delivers the page scaffold in the HyperUI container rhythm:
|
|
174
|
+
|
|
175
|
+
- **Page root** (`data-role="root"`): full-height gray surface — `smart:min-h-full smart:bg-gray-50 smart:dark:bg-gray-900`. The external `cssClass` is merged here.
|
|
176
|
+
- **Header zone**: white bar (`smart:bg-white smart:shadow-sm smart:dark:bg-gray-800 smart:dark:border-b smart:dark:border-gray-700`) whose inner container (`data-role="header"`, `smart:py-4`) renders `navTpl` (`data-role="nav"`), then `headerTpl` if present, else `title` as an `<h1 data-role="title">` fallback.
|
|
177
|
+
- **Main content** (`data-role="content"`, `smart:py-8`): the container wraps a bordered content card (`smart:rounded-lg smart:border smart:bg-white smart:p-4 smart:shadow-sm smart:sm:p-6 smart:dark:bg-gray-800`) that projects `<ng-content>` — identical projection semantics to the standard component.
|
|
178
|
+
|
|
179
|
+
### containerWidth mapping
|
|
180
|
+
|
|
181
|
+
Both the header and content containers share the base `smart:mx-auto smart:px-4 smart:sm:px-6 smart:lg:px-8` plus a max-width from `options.containerWidth`:
|
|
182
|
+
|
|
183
|
+
| containerWidth | max-width class |
|
|
184
|
+
| -------------------- | ------------------ |
|
|
185
|
+
| `sm` | `smart:max-w-3xl` |
|
|
186
|
+
| `md` | `smart:max-w-5xl` |
|
|
187
|
+
| `lg` | `smart:max-w-6xl` |
|
|
188
|
+
| `xl` (default/unset) | `smart:max-w-7xl` |
|
|
189
|
+
| `full` | `smart:max-w-none` |
|
|
190
|
+
|
|
191
|
+
### Token registration
|
|
192
|
+
|
|
193
|
+
```typescript
|
|
194
|
+
import { STACKED_LAYOUT_STANDARD_COMPONENT_TOKEN } from '@smartsoft001/angular';
|
|
195
|
+
import { StackedLayoutPresetComponent } from '@smartsoft001/angular';
|
|
196
|
+
|
|
197
|
+
providers: [
|
|
198
|
+
{
|
|
199
|
+
provide: STACKED_LAYOUT_STANDARD_COMPONENT_TOKEN,
|
|
200
|
+
useValue: StackedLayoutPresetComponent,
|
|
201
|
+
},
|
|
202
|
+
];
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Documented gaps
|
|
206
|
+
|
|
207
|
+
The preset delivers the PAGE SCAFFOLD only. The grid "content + image" section variants from the shared FRA-206 task description are provided by the section-heading preset — use both together (section-heading blocks projected into the stacked-layout content region).
|
|
208
|
+
|
|
209
|
+
- Preset: `packages/shared/angular/src/lib/components/stacked-layout/preset/preset.component.ts`
|
|
210
|
+
- Class recipes: `packages/shared/angular/src/lib/components/stacked-layout/preset/preset-classes.util.ts`
|