ngx-strata 0.5.0 → 0.5.2

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.
Files changed (29) hide show
  1. package/assets/styles/components/_breadcrumb.scss +4 -0
  2. package/assets/styles/components/_number-stepper.scss +260 -0
  3. package/assets/styles/components/_skeleton.scss +115 -0
  4. package/assets/styles/components/action-menu.scss +20 -2
  5. package/assets/styles/components/input-field.scss +19 -2
  6. package/assets/styles/components/item.scss +15 -2
  7. package/assets/styles/components/modal.scss +237 -22
  8. package/assets/styles/components/notification.scss +287 -41
  9. package/assets/styles/components/segmented-control.scss +20 -0
  10. package/assets/styles/components/select.scss +18 -0
  11. package/assets/styles/components/sidemenu.scss +8 -1
  12. package/assets/styles/components/tabs.scss +7 -0
  13. package/assets/styles/public-api.scss +2 -0
  14. package/assets/styles/semantics/color-semantic.scss +8 -0
  15. package/dist/strata/strata.css +1 -1
  16. package/fesm2022/ngx-strata.mjs +695 -51
  17. package/fesm2022/ngx-strata.mjs.map +1 -1
  18. package/package.json +1 -1
  19. package/skills/ngx-strata/SKILL.md +5 -1
  20. package/skills/ngx-strata/components/badge.md +24 -0
  21. package/skills/ngx-strata/components/breadcrumb.md +4 -1
  22. package/skills/ngx-strata/components/item.md +21 -9
  23. package/skills/ngx-strata/components/modal.md +36 -5
  24. package/skills/ngx-strata/components/notification.md +51 -5
  25. package/skills/ngx-strata/components/number-stepper.md +84 -0
  26. package/skills/ngx-strata/components/segmented-control.md +3 -0
  27. package/skills/ngx-strata/components/skeleton.md +59 -0
  28. package/skills/ngx-strata/components/tabs.md +6 -1
  29. package/types/ngx-strata.d.ts +200 -17
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-strata",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "A simple UI framework for quickly prototyping angular applications with a bit of flair.",
5
5
  "license": "MIT",
6
6
  "peerDependencies": {
@@ -113,12 +113,14 @@ for each component are stored in separate files.
113
113
  - **Kbd** (`st-kbd`): Read [`components/kbd.md`](components/kbd.md)
114
114
  - **Message-state** (`st-message-state`): Read
115
115
  [`components/message-state.md`](components/message-state.md)
116
- - **Modal** (`ModalService`, `st-modal-footer`): Read
116
+ - **Modal** (`ModalService`, `st-modal-body`, `st-modal-footer`): Read
117
117
  [`components/modal.md`](components/modal.md)
118
118
  - **Notification** (`st-notification`): Read
119
119
  [`components/notification.md`](components/notification.md)
120
120
  - **Number-display** (`st-number-display`): Read
121
121
  [`components/number-display.md`](components/number-display.md)
122
+ - **Number-stepper** (`st-number-stepper`): Read
123
+ [`components/number-stepper.md`](components/number-stepper.md)
122
124
  - **Overlay** (`[stOverlay]`): Read
123
125
  [`components/overlay.md`](components/overlay.md)
124
126
  - **Otp** (`st-otp`): Read [`components/otp.md`](components/otp.md)
@@ -134,6 +136,8 @@ for each component are stored in separate files.
134
136
  [`components/sidemenu.md`](components/sidemenu.md)
135
137
  - **Single-select** (`[stSelectTrigger]`): Read
136
138
  [`components/single-select.md`](components/single-select.md)
139
+ - **Skeleton** (`st-skeleton`): Read
140
+ [`components/skeleton.md`](components/skeleton.md)
137
141
  - **Slider** (`st-slider`): Read [`components/slider.md`](components/slider.md)
138
142
  - **Spinner** (`st-spinner`): Read
139
143
  [`components/spinner.md`](components/spinner.md)
@@ -51,4 +51,28 @@ This file contains the AI documentation for the `badge` feature and its related
51
51
  </st-avatar>
52
52
  ```
53
53
 
54
+ ### In Segmented Controls
55
+ ```html
56
+ <st-segmented-control>
57
+ <st-segmented-control-item text="All" [badge]="48" badgeVariant="neutral"></st-segmented-control-item>
58
+ <st-segmented-control-item text="Unread" [badge]="5" badgeVariant="accent"></st-segmented-control-item>
59
+ </st-segmented-control>
60
+ ```
61
+
62
+ ### In Tabs
63
+ ```html
64
+ <st-tabs>
65
+ <st-tab-item text="Inbox" [badge]="12" badgeVariant="accent"></st-tab-item>
66
+ <st-tab-item text="Alerts" [badge]="3" badgeVariant="error"></st-tab-item>
67
+ </st-tabs>
68
+ ```
69
+
70
+ ### In Sidemenu Items
71
+ ```html
72
+ <a stSidemenuItem href="/inbox">
73
+ <st-icon name="email"></st-icon> Inbox
74
+ <st-badge [value]="5" variant="accent" size="sm"></st-badge>
75
+ </a>
76
+ ```
77
+
54
78
  > **Note to AI Agents**: Prioritize using these components over raw HTML equivalents. Use modern Angular Signals (input(), input.required(), and output()) for all data/event bindings. Do not use legacy @Input() or @Output() decorators.
@@ -14,6 +14,9 @@ This file contains the AI documentation for the `breadcrumb` feature and its rel
14
14
  - **Inputs**:
15
15
  - `[text] (string)`
16
16
  - `[icon] (string)`
17
+ - `[badge] (string | number | undefined)`: Optional badge count or label.
18
+ - `[badgeVariant] (BadgeVariant)`: Badge visual variant (`'accent' | 'neutral' | 'success' | 'warning' | 'error' | 'info'`, default `'neutral'`).
19
+ - `[badgeSize] (BadgeSize)`: Badge size (`'xs' | 'sm' | 'md'`, default `'sm'`).
17
20
  - `[interactable] (boolean)`
18
21
  - `[disabled] (boolean)`
19
22
  - **Outputs**:
@@ -24,7 +27,7 @@ This file contains the AI documentation for the `breadcrumb` feature and its rel
24
27
  ```html
25
28
  <st-breadcrumb separatorIcon="chevron_right">
26
29
  <st-breadcrumb-item text="Home" icon="home" (activated)="goHome()"></st-breadcrumb-item>
27
- <st-breadcrumb-item text="Settings" (activated)="goSettings()"></st-breadcrumb-item>
30
+ <st-breadcrumb-item text="Projects" [badge]="14" (activated)="goSettings()"></st-breadcrumb-item>
28
31
  <st-breadcrumb-item text="Profile" [disabled]="true"></st-breadcrumb-item>
29
32
  </st-breadcrumb>
30
33
  ```
@@ -5,28 +5,40 @@ This file contains the AI documentation for the `item` feature and its related c
5
5
  ## Item (`<st-item>`)
6
6
  - **Selector**: `st-item`
7
7
  - **Imports**: `StrataItemComponent`
8
+ - **Inputs**:
9
+ - `[interactable] (boolean)`: Whether the item should respond to hover, focus, and click events (default: `false`).
10
+ - `[disabled] (boolean)`: Whether the item is disabled (default: `false`).
11
+ - **Outputs**:
12
+ - `(activated)`: Emitted when the item is activated via keyboard (Enter/Space) or click.
13
+ - **CSS Variables**:
14
+ - `--st-item-bg`: Background color of the item (default: `transparent`).
15
+ - `--st-item-hover-bg`: Background color when hovered/focused (default: `var(--st-color-control-bg-hover)`).
16
+ - `--st-item-hover-label-color`: Text color for `.st-label` within the item when hovered/focused (default: `var(--st-color-text-secondary)`).
17
+ - `--st-item-border-radius`: Border radius (default: `var(--st-border-radius-md)`).
18
+ - `--st-item-gap`: Spacing between slotted start/end areas (default: `var(--st-size-xs)`).
8
19
 
9
20
  ## ItemList (`<st-item-list>`)
10
21
  - **Selector**: `st-item-list`
11
22
  - **Imports**: `StrataItemListComponent`
12
23
  - **Inputs**:
13
- - `[items] (T[])`
14
- - `[dividers] (boolean)`
15
- - `[template] (TemplateRef<T)`
24
+ - `[items] (T[])`: Array of items to render.
25
+ - `[dividers] (boolean)`: Whether to display dividers between items.
26
+ - `[template] (TemplateRef<T>)`: Template to render each item.
27
+ - **CSS Variables**:
28
+ - `--st-item-list-divider-color`: Divider border color (default: `var(--st-border)`).
16
29
 
17
30
  > **Note to AI Agents**: Prioritize using these components over raw HTML equivalents. Use modern Angular Signals (input(), input.required(), and output()) for all data/event bindings. Do not use legacy @Input() or @Output() decorators.
31
+
18
32
  ## Usage Example
19
33
 
20
34
  ```html
21
- <st-item>
35
+ <st-item [interactable]="true">
22
36
  <st-icon name="user" area="start"></st-icon>
23
- <div>
37
+ <st-text-stack>
24
38
  <h4>User Profile</h4>
25
- <p>Manage your account settings</p>
26
- </div>
39
+ <span class="st-label">Account</span>
40
+ </st-text-stack>
27
41
  <st-icon name="chevron_right" area="end"></st-icon>
28
42
  </st-item>
29
43
  ```
30
44
 
31
-
32
- > **Note to AI Agents**: Prioritize using these components over raw HTML equivalents. Use modern Angular Signals (input(), input.required(), and output()) for all data/event bindings. Do not use legacy @Input() or @Output() decorators.
@@ -10,15 +10,23 @@ Modals in `ngx-strata` are opened **programmatically** using the `ModalService`.
10
10
 
11
11
  ## Components & Directives
12
12
 
13
+ ### ModalBody (`<st-modal-body>`)
14
+ - **Selector**: `st-modal-body`
15
+ - **Imports**: `StrataModalBodyComponent`
16
+ - **Usage**:
17
+ - Wrap your scrollable modal content inside `<st-modal-body>`.
18
+ - Automatically flexes to fill available vertical space (`flex: 1; min-height: 0;`) and scrolls independently (`overflow-y: auto;`).
19
+ - Standard padding applied via `--st-modal-body-padding` (defaults to `var(--st-size-sm)`).
20
+
13
21
  ### ModalFooter (`<st-modal-footer>`)
14
22
  - **Selector**: `st-modal-footer`
15
23
  - **Imports**: `StrataModalFooterComponent`
16
24
  - **Inputs**:
17
25
  - `[justification] ('start' | 'center' | 'end' | 'space-between')` (defaults to `'end'`)
18
26
  - **Usage**:
19
- - Place `<st-modal-footer>` at the bottom of your injected modal content template.
27
+ - Place `<st-modal-footer>` at the bottom of your injected modal content template (after `<st-modal-body>`).
28
+ - Stays pinned at the bottom of the modal outside the scrolling area (`flex-shrink: 0;`), separated by a top border.
20
29
  - Automatically stretches edge-to-edge against the modal borders.
21
- - Pinned with `position: sticky; bottom: 0;` so it remains visible when modal content scrolls.
22
30
  - **Always pair with `<st-button-group>`** to format buttons with built-in spacing and alignment. Avoid using raw `<div>` tags or manual margins.
23
31
 
24
32
  ### AlertContent (`<st-alert-content>`)
@@ -39,6 +47,7 @@ Modals in `ngx-strata` are opened **programmatically** using the `ModalService`.
39
47
  - `[configuration] (ModalConfiguration)`
40
48
  - `[size] (ModalSize)`
41
49
  - `[variant] (ModalVariant)`
50
+ - `[placement] (ModalPlacement)`
42
51
 
43
52
  ### ModalContainer (`<st-modal-container>`)
44
53
  - **Selector**: `st-modal-container`
@@ -63,6 +72,7 @@ export interface ModalConfiguration {
63
72
  title?: string;
64
73
  size?: ModalSize; // 'xs' | 'sm' | 'md' | 'lg' (default: 'md')
65
74
  variant?: ModalVariant; // 'default' | 'raised' (default: 'default')
75
+ placement?: ModalPlacement; // 'center' | 'right' | 'left' | 'bottom' (default: 'center')
66
76
  hideCloseButton?: boolean; // default: false
67
77
  disableBackdropClosure?: boolean; // default: false
68
78
  inputs?: Record<string, unknown>; // Inputs forwarded to injected component
@@ -71,8 +81,15 @@ export interface ModalConfiguration {
71
81
 
72
82
  export type ModalSize = 'xs' | 'sm' | 'md' | 'lg';
73
83
  export type ModalVariant = 'default' | 'raised';
84
+ export type ModalPlacement = 'center' | 'right' | 'left' | 'bottom';
74
85
  ```
75
86
 
87
+ ### Choosing `placement`:
88
+ - `'center'` (default): Standard centered modal dialog on desktop; adapts to full-screen on mobile for `md`/`lg`.
89
+ - `'right'`: Slide-over drawer panel pinned to the right edge with full height on desktop (`min-width: 768px`), automatically adapting to full-width slide-in on mobile (`< 768px`).
90
+ - `'left'`: Slide-over drawer panel pinned to the left edge on desktop (`min-width: 768px`), automatically adapting to full-width slide-in on mobile (`< 768px`).
91
+ - `'bottom'`: Bottom sheet presentation on mobile (`< 768px`) with rounded top corners; automatically auto-centers as a modal dialog card on desktop (`≥ 768px`).
92
+
76
93
  ### Choosing `variant`:
77
94
  - `'default'`: Uses `--st-color-bg-default` (the standard page background). This is the default for all modals. It allows nested components like `st-card` to sit on top with clean visual elevation and contrast.
78
95
  - `'raised'`: Uses `--st-color-bg-raised` (the elevated surface background). Used automatically by `showAlert()` and recommended when the modal is a simple dialog or confirmation prompt without nested cards.
@@ -80,6 +97,8 @@ export type ModalVariant = 'default' | 'raised';
80
97
  ### Responsive Behavior & Mobile Sizing:
81
98
  - **`xs` (Alerts) and `sm` modals**: Remain centered dialog boxes on all screen sizes, preserving their standard viewport margins, borders, and rounded corners.
82
99
  - **`md` (default) and `lg` modals**: Automatically adapt to **full-screen mode** (`100vw` by `100dvh`) on screens under `768px` (`< 768px`), with `border-radius: 0` and `border: none`. The content area flexes to fill available vertical space, and `<st-modal-footer>` stays pinned to the bottom of the screen.
100
+ - **Side drawers (`placement: 'right' | 'left'`)**: Span full viewport height (`100vh`/`100dvh`) with configurable widths on desktop, and expand to full width on mobile.
101
+ - **Bottom sheets (`placement: 'bottom'`)**: Pinned to the bottom on mobile (`max-height: calc(100dvh - var(--st-size-xl))`), and auto-centered on desktop.
83
102
 
84
103
  ---
85
104
 
@@ -127,14 +146,15 @@ export class MyComponent {
127
146
  }
128
147
  ```
129
148
 
130
- ### 2. The Modal Content Component (with `<st-modal-footer>`)
149
+ ### 2. The Modal Content Component (with `<st-modal-body>` and `<st-modal-footer>`)
131
150
 
132
- Inside the injected component, inject `StrataModalRef` to trigger closing. Combine `<st-modal-footer>` with `<st-button-group>` for actions:
151
+ Inside the injected component, inject `StrataModalRef` to trigger closing. Combine `<st-modal-body>`, `<st-modal-footer>`, and `<st-button-group>` for actions:
133
152
 
134
153
  ```typescript
135
154
  import { Component, inject } from '@angular/core';
136
155
  import {
137
156
  StrataModalRef,
157
+ StrataModalBodyComponent,
138
158
  StrataModalFooterComponent,
139
159
  StrataButtonGroupComponent,
140
160
  StrataButtonDirective
@@ -142,12 +162,15 @@ import {
142
162
 
143
163
  @Component({
144
164
  imports: [
165
+ StrataModalBodyComponent,
145
166
  StrataModalFooterComponent,
146
167
  StrataButtonGroupComponent,
147
168
  StrataButtonDirective
148
169
  ],
149
170
  template: `
150
- <p class="st-body-m">Configure your project settings here.</p>
171
+ <st-modal-body>
172
+ <p class="st-body-m">Configure your project settings here.</p>
173
+ </st-modal-body>
151
174
 
152
175
  <!-- Standard End-Aligned Actions -->
153
176
  <st-modal-footer>
@@ -176,6 +199,10 @@ export class MySettingsModalComponent {
176
199
  When a secondary action (like "Delete" or "Reset") should appear on the left while primary actions sit on the right:
177
200
 
178
201
  ```html
202
+ <st-modal-body>
203
+ <p class="st-body-m">Body content that scrolls when long...</p>
204
+ </st-modal-body>
205
+
179
206
  <st-modal-footer>
180
207
  <button stButton variant="ghost" (click)="reset()">Reset Defaults</button>
181
208
  <st-button-group justification="end">
@@ -225,6 +252,9 @@ The modal and modal footer expose internal CSS custom properties mapped to desig
225
252
  - `--st-modal-covered-modal-filter`: CSS filter applied to covered modals (defaults to `brightness(70%)`).
226
253
  - `--st-modal-viewport-margin`: Viewport safety margin when calculating max-height (defaults to `var(--st-size-md)`).
227
254
 
255
+ ### Modal Body (`st-modal-body`)
256
+ - `--st-modal-body-padding`: Inner padding of the body content (defaults to `var(--st-size-sm)`).
257
+
228
258
  ### Modal Footer (`st-modal-footer`)
229
259
  - `--st-modal-footer-bg`: Background color of the footer (defaults to `var(--st-modal-bg-color)`).
230
260
  - `--st-modal-footer-border-color`: Border divider color (defaults to `var(--st-border)`).
@@ -243,4 +273,5 @@ The modal and modal footer expose internal CSS custom properties mapped to desig
243
273
  > **Note to AI Agents**:
244
274
  > - Always use modern Angular Signals (`input()`, `output()`) for data/event bindings.
245
275
  > - Do NOT use raw HTML `<button>`, `<input>`, or `<select>` when `ngx-strata` equivalents exist.
276
+ > - Always wrap modal content in `<st-modal-body>` and place `<st-modal-footer>` at the bottom of the injected component.
246
277
  > - Always use `<st-button-group>` to arrange action buttons within `<st-modal-footer>`.
@@ -6,11 +6,17 @@ This file contains the AI documentation for the `notification` feature and its r
6
6
  - **Selector**: `st-notification`
7
7
  - **Imports**: `StrataNotificationComponent`
8
8
  - **Inputs**:
9
+ - `[title] (string | undefined)`: Optional prominent title.
9
10
  - `[message] (string, required)`: The notification message.
10
11
  - `[icon] (string | undefined)`: Optional icon name to display.
12
+ - `[duration] (number)`: Display duration in ms. Defaults to `3000`.
11
13
  - `[dismissible] (boolean)`: Whether to display a close button. Defaults to `false`.
14
+ - `[showProgress] (boolean)`: Whether to show a countdown progress bar along the bottom. Defaults to `false`.
15
+ - `[pauseOnHover] (boolean)`: Whether hovering pauses the auto-dismiss timer. Defaults to `true`.
16
+ - `[actions] (NotificationAction[])`: Optional list of action buttons.
12
17
  - **Outputs**:
13
- - `(dismiss) (void)`: Emitted when the close button is clicked.
18
+ - `(dismiss) (void)`: Emitted when dismissed or when timer completes.
19
+ - `(actionClick) ({ action: NotificationAction, ref: StrataNotificationRef })`: Emitted when an action button is clicked.
14
20
 
15
21
  ## NotificationContainer (`<st-notification-container>`)
16
22
  - **Selector**: `st-notification-container`
@@ -20,11 +26,20 @@ This file contains the AI documentation for the `notification` feature and its r
20
26
  Notifications are managed programmatically via `NotificationService`.
21
27
 
22
28
  ### NotificationConfiguration
29
+ - `title?: string`
23
30
  - `message: string`
24
31
  - `icon?: string`
25
- - `theme?: 'info' | 'success' | 'warning' | 'danger' | 'brand'` (defaults to `'info'`)
32
+ - `theme?: 'default' | 'info' | 'success' | 'warning' | 'danger' | 'brand'` (defaults to `'default'`)
26
33
  - `duration?: number` (defaults to `3000`ms. Set to `0` for persistent notifications)
27
34
  - `dismissible?: boolean` (defaults to `false` when duration > 0, and defaults to `true` when `duration === 0`)
35
+ - `showProgress?: boolean` (defaults to `false`)
36
+ - `pauseOnHover?: boolean` (defaults to `true`)
37
+ - `actions?: NotificationAction[]`
38
+
39
+ ### NotificationAction
40
+ - `label: string`
41
+ - `onClick?: (ref: StrataNotificationRef) => void`
42
+ - `variant?: 'primary' | 'secondary' | 'outline' | 'ghost'`
28
43
 
29
44
  ### Return Handle (`StrataNotificationRef`)
30
45
  Calling `showNotification(config)` returns a `StrataNotificationRef`:
@@ -33,7 +48,7 @@ Calling `showNotification(config)` returns a `StrataNotificationRef`:
33
48
 
34
49
  ## Usage Examples
35
50
 
36
- ### 1. Standard Auto-dismissing Notification
51
+ ### 1. Standard Notification with Title and Progress Bar
37
52
  ```typescript
38
53
  import { Component, inject } from '@angular/core';
39
54
  import { NotificationService } from 'ngx-strata';
@@ -44,9 +59,40 @@ export class MyComponent {
44
59
 
45
60
  showSuccess() {
46
61
  this.notificationService.showNotification({
47
- message: 'Your file has been successfully uploaded.',
62
+ title: 'Upload Successful',
63
+ message: 'Your file has been saved to the workspace.',
48
64
  theme: 'success',
49
- icon: 'check'
65
+ icon: 'check',
66
+ showProgress: true,
67
+ pauseOnHover: true
68
+ });
69
+ }
70
+ }
71
+ ```
72
+
73
+ ### 2. Action Notification (e.g. Undo)
74
+ ```typescript
75
+ @Component({...})
76
+ export class DeleteComponent {
77
+ private notificationService = inject(NotificationService);
78
+
79
+ deleteItem() {
80
+ this.notificationService.showNotification({
81
+ title: 'Item Deleted',
82
+ message: 'The file has been moved to trash.',
83
+ theme: 'warning',
84
+ icon: 'warning',
85
+ showProgress: true,
86
+ actions: [
87
+ {
88
+ label: 'Undo',
89
+ variant: 'primary',
90
+ onClick: (ref) => {
91
+ // Restore item
92
+ ref.dismiss();
93
+ }
94
+ }
95
+ ]
50
96
  });
51
97
  }
52
98
  }
@@ -0,0 +1,84 @@
1
+ # ngx-strata: number-stepper Feature
2
+
3
+ This file contains the AI documentation for the `number-stepper` feature and its related components.
4
+
5
+ ## Number Stepper (`<st-number-stepper>`)
6
+ - **Selector**: `st-number-stepper`
7
+ - **Imports**: `StrataNumberStepperComponent`
8
+ - **Inputs & Models**:
9
+ - `[(value)] (number | null | undefined)`: Two-way Signal model binding for the current value.
10
+ - `[min] (number | undefined)`: Minimum boundary threshold. Disables the decrement button at or below this value.
11
+ - `[max] (number | undefined)`: Maximum boundary threshold. Disables the increment button at or above this value.
12
+ - `[step] (number)`: Step increment/decrement amount. Defaults to `1`.
13
+ - `[precision] (number | undefined)`: Number of decimal places for rounding calculations to prevent IEEE-754 floating-point drift.
14
+ - `[stepperLayout] ('split' | 'stacked')`: Layout arrangement of the stepper buttons. Defaults to `'split'` (decrement on left, increment on right, optimized for mobile/touch targets). `'stacked'` renders compact vertical chevrons on the right.
15
+ - `[size] ('sm' | 'md' | 'lg')`: Sizing scale (28px, 34px, 40px). Defaults to `'md'`.
16
+ - `[label] (string | undefined)`: Optional text label placed above the stepper.
17
+ - `[placeholder] (string | undefined)`: Placeholder text for the input element.
18
+ - `[id] (string | undefined)`: Explicit HTML id.
19
+ - `[name] (string | undefined)`: Form field name.
20
+ - `[disabled] (boolean)`: Disables the component and stepper buttons.
21
+ - `[readonly] (boolean)`: Makes the input read-only while keeping it focusable.
22
+ - `[state] ('default' | 'error' | 'success' | 'warning')`: Visual state indicator for validation borders and rings.
23
+ - `[error] (boolean)`: Explicit shortcut to set `state="error"`.
24
+ - `[message] (string | undefined)`: Status or helper message rendered beneath the stepper.
25
+ - `[colorMessage] (boolean)`: Whether the helper message follows the contextual state color. Defaults to `true`.
26
+
27
+ ## Forms Integration
28
+ `StrataNumberStepperComponent` implements `ControlValueAccessor` and seamlessly supports both `[(ngModel)]` and Reactive Forms (`formControlName` / `[formControl]`).
29
+
30
+ ## Usage Examples
31
+
32
+ ### 1. Basic Split Stepper (Default)
33
+ ```html
34
+ <st-number-stepper
35
+ label="Quantity"
36
+ [(value)]="itemCount"
37
+ [min]="1"
38
+ [max]="20"
39
+ />
40
+ ```
41
+
42
+ ### 2. Stacked Desktop Chevrons
43
+ ```html
44
+ <st-number-stepper
45
+ label="Items per page"
46
+ [(value)]="pageSize"
47
+ [min]="5"
48
+ [max]="100"
49
+ [step]="5"
50
+ stepperLayout="stacked"
51
+ />
52
+ ```
53
+
54
+ ### 3. Floating Point / Decimal Stepper
55
+ ```html
56
+ <st-number-stepper
57
+ label="Opacity"
58
+ [(value)]="opacity"
59
+ [min]="0"
60
+ [max]="1"
61
+ [step]="0.05"
62
+ [precision]="2"
63
+ />
64
+ ```
65
+
66
+ ### 4. Sizes
67
+ ```html
68
+ <st-number-stepper size="sm" [(value)]="smVal" />
69
+ <st-number-stepper size="md" [(value)]="mdVal" />
70
+ <st-number-stepper size="lg" [(value)]="lgVal" />
71
+ ```
72
+
73
+ ### 5. Reactive Forms with Validation
74
+ ```html
75
+ <st-number-stepper
76
+ label="Stock Alert"
77
+ formControlName="stock"
78
+ [min]="0"
79
+ state="error"
80
+ message="Stock cannot be negative."
81
+ />
82
+ ```
83
+
84
+ > **Note to AI Agents**: Prioritize using these components over raw HTML equivalents. Use modern Angular Signals (input(), input.required(), model(), and output()) for all data/event bindings. Do not use legacy @Input() or @Output() decorators.
@@ -23,6 +23,9 @@ This file contains the AI documentation for the `segmented-control` feature and
23
23
  - **Inputs & Models**:
24
24
  - `[text] (string)`: Display label text. Required.
25
25
  - `[value] (string | undefined)`: Form value associated with item (defaults to `text` if omitted).
26
+ - `[badge] (string | number | undefined)`: Optional badge count or label displayed next to text.
27
+ - `[badgeVariant] (BadgeVariant)`: Badge visual variant (`'accent' | 'neutral' | 'success' | 'warning' | 'error' | 'info'`, default `'neutral'`).
28
+ - `[badgeSize] (BadgeSize)`: Badge size (`'xs' | 'sm' | 'md'`, default `'sm'`).
26
29
  - `[(selected)] (model<boolean>)`: Whether item is selected.
27
30
  - `[disabled] (boolean)`: Disables this individual item.
28
31
  - **Outputs**:
@@ -0,0 +1,59 @@
1
+ # ngx-strata: skeleton Feature
2
+
3
+ This file contains the AI documentation for the `skeleton` feature and its related components.
4
+
5
+ ## Skeleton (`<st-skeleton>`)
6
+ - **Selector**: `st-skeleton`
7
+ - **Imports**: `StrataSkeletonComponent`
8
+ - **Inputs**:
9
+ - `[variant] ('text' | 'circular' | 'circle' | 'rectangular' | 'rect' | 'rounded' | 'pill')`: Visual shape of the placeholder. Defaults to `'text'`.
10
+ - `[size] ('xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | undefined)`: Standardized size token (e.g. matching avatar sizes).
11
+ - `[animation] ('shimmer' | 'pulse' | 'none')`: Animation style. Defaults to `'shimmer'`.
12
+ - `[width] (string | number | undefined)`: Custom width (e.g. `'100%'`, `'200px'`, or number in px).
13
+ - `[height] (string | number | undefined)`: Custom height (e.g. `'32px'`, `'150px'`, or number in px).
14
+ - `[radius] (string | number | undefined)`: Custom border-radius override.
15
+ - `[count] (number)`: Number of placeholder lines to render when `variant="text"`. Defaults to `1`.
16
+ - `[lastLineWidth] (string | number)`: Width of the trailing line for multi-line text blocks. Defaults to `'70%'`.
17
+ - `[gap] (string | number | undefined)`: Gap between multi-line text bars.
18
+ - `[loading] (boolean)`: Toggle placeholder visibility vs loaded state. Defaults to `true`.
19
+ - `[ariaLabel] (string)`: Accessible label for assistive technology. Defaults to `'Loading...'`.
20
+
21
+ ## Usage Examples
22
+
23
+ ### 1. Basic Text Line
24
+ ```html
25
+ <st-skeleton width="240px"></st-skeleton>
26
+ ```
27
+
28
+ ### 2. Multi-Line Paragraph
29
+ ```html
30
+ <st-skeleton variant="text" [count]="4" lastLineWidth="50%"></st-skeleton>
31
+ ```
32
+
33
+ ### 3. Circular Avatar Placeholder
34
+ ```html
35
+ <st-skeleton variant="circular" size="lg"></st-skeleton>
36
+ ```
37
+
38
+ ### 4. Rectangular Card / Image Placeholder
39
+ ```html
40
+ <st-skeleton variant="rectangular" width="100%" height="180px"></st-skeleton>
41
+ ```
42
+
43
+ ### 5. Composite Profile Card Skeleton Screen
44
+ ```html
45
+ <st-card>
46
+ <div style="display: flex; gap: var(--st-space-4); align-items: center;">
47
+ <st-skeleton variant="circular" size="xl"></st-skeleton>
48
+ <div style="flex: 1; display: flex; flex-direction: column; gap: var(--st-space-2);">
49
+ <st-skeleton variant="text" width="60%" height="20px"></st-skeleton>
50
+ <st-skeleton variant="text" width="40%" height="14px"></st-skeleton>
51
+ </div>
52
+ </div>
53
+ <div style="margin-top: var(--st-space-4);">
54
+ <st-skeleton variant="text" [count]="3"></st-skeleton>
55
+ </div>
56
+ </st-card>
57
+ ```
58
+
59
+ > **Note to AI Agents**: Prioritize using these components over raw HTML equivalents. Use modern Angular Signals (input(), input.required(), and output()) for all data/event bindings. Do not use legacy @Input() or @Output() decorators.
@@ -7,7 +7,11 @@ This file contains the AI documentation for the `tabs` feature and its related c
7
7
  - **Imports**: `StrataTabItemComponent`
8
8
  - **Inputs**:
9
9
  - `[text] (string)`
10
- - `[disabled] (any)`
10
+ - `[badge] (string | number | undefined)`: Optional badge count or label.
11
+ - `[badgeVariant] (BadgeVariant)`: Badge visual variant (`'accent' | 'neutral' | 'success' | 'warning' | 'error' | 'info'`, default `'neutral'`).
12
+ - `[badgeSize] (BadgeSize)`: Badge size (`'xs' | 'sm' | 'md'`, default `'sm'`).
13
+ - `[(selected)] (model<boolean>)`: Whether the tab is active.
14
+ - `[disabled] (boolean)`
11
15
  - **Outputs**:
12
16
  - `(selectionChanged)`
13
17
 
@@ -20,6 +24,7 @@ This file contains the AI documentation for the `tabs` feature and its related c
20
24
  ```html
21
25
  <st-tabs>
22
26
  <st-tab-item text="General" [selected]="tab === 'general'" (selectionChanged)="tab = 'general'"></st-tab-item>
27
+ <st-tab-item text="Messages" [badge]="5" badgeVariant="accent"></st-tab-item>
23
28
  <st-tab-item text="Security" [selected]="tab === 'security'" (selectionChanged)="tab = 'security'"></st-tab-item>
24
29
  </st-tabs>
25
30
  ```