ngx-strata 0.2.1 → 0.2.3
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/assets/styles/base.scss +4 -0
- package/assets/styles/components/action-menu.scss +2 -1
- package/assets/styles/components/card.scss +2 -1
- package/assets/styles/components/modal.scss +27 -0
- package/assets/styles/components/select.scss +17 -7
- package/assets/styles/components/tag.scss +1 -1
- package/assets/styles/shadows.scss +1 -0
- package/dist/strata/strata.css +1 -1
- package/fesm2022/ngx-strata.mjs +746 -554
- package/fesm2022/ngx-strata.mjs.map +1 -1
- package/package.json +5 -4
- package/skills/ngx-strata/SKILL.md +64 -48
- package/skills/ngx-strata/components/accordion.md +1 -1
- package/skills/ngx-strata/components/action-menu.md +1 -1
- package/skills/ngx-strata/components/alert.md +1 -1
- package/skills/ngx-strata/components/avatar.md +1 -1
- package/skills/ngx-strata/components/breadcrumb.md +1 -1
- package/skills/ngx-strata/components/button.md +1 -1
- package/skills/ngx-strata/components/card.md +8 -2
- package/skills/ngx-strata/components/checkbox.md +1 -1
- package/skills/ngx-strata/components/divider.md +1 -1
- package/skills/ngx-strata/components/icon.md +1 -1
- package/skills/ngx-strata/components/input-field.md +2 -2
- package/skills/ngx-strata/components/item.md +2 -2
- package/skills/ngx-strata/components/kbd.md +1 -1
- package/skills/ngx-strata/components/message-state.md +1 -1
- package/skills/ngx-strata/components/modal.md +16 -6
- package/skills/ngx-strata/components/notification.md +1 -1
- package/skills/ngx-strata/components/number-display.md +1 -1
- package/skills/ngx-strata/components/overlay.md +1 -1
- package/skills/ngx-strata/components/pagination.md +1 -1
- package/skills/ngx-strata/components/progress.md +2 -2
- package/skills/ngx-strata/components/radio.md +1 -1
- package/skills/ngx-strata/components/segmented-control.md +1 -1
- package/skills/ngx-strata/components/shell.md +3 -3
- package/skills/ngx-strata/components/sidemenu.md +2 -2
- package/skills/ngx-strata/components/single-select.md +1 -1
- package/skills/ngx-strata/components/slider.md +1 -1
- package/skills/ngx-strata/components/spinner.md +1 -1
- package/skills/ngx-strata/components/tabs.md +1 -1
- package/skills/ngx-strata/components/tag.md +1 -1
- package/skills/ngx-strata/components/text-stack.md +2 -2
- package/skills/ngx-strata/components/theming.md +2 -2
- package/skills/ngx-strata/components/toggle.md +1 -1
- package/types/ngx-strata.d.ts +24 -23
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-strata",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "A simple UI framework for quickly prototyping angular applications with a bit of flair.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"peerDependencies": {
|
|
7
|
-
"@angular/common": "
|
|
8
|
-
"@angular/core": "
|
|
7
|
+
"@angular/common": ">=22.0.0",
|
|
8
|
+
"@angular/core": ">=22.0.0",
|
|
9
9
|
"@floating-ui/dom": "^1.1.0"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
@@ -31,5 +31,6 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"module": "fesm2022/ngx-strata.mjs",
|
|
34
|
-
"typings": "types/ngx-strata.d.ts"
|
|
34
|
+
"typings": "types/ngx-strata.d.ts",
|
|
35
|
+
"type": "module"
|
|
35
36
|
}
|
|
@@ -5,31 +5,29 @@ description: "Instructions for using the ngx-strata UI component library"
|
|
|
5
5
|
|
|
6
6
|
# ngx-strata Component Manual (Index)
|
|
7
7
|
|
|
8
|
-
You are working in a project that uses **ngx-strata**, a modern Angular UI
|
|
8
|
+
You are working in a project that uses **ngx-strata**, a modern Angular UI
|
|
9
|
+
component library. Use this index to locate the specific component documentation
|
|
10
|
+
you need.
|
|
9
11
|
|
|
10
12
|
## Global Setup
|
|
11
13
|
|
|
12
14
|
### 1. Style Setup
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@import
|
|
16
|
-
\`\`\`
|
|
15
|
+
|
|
16
|
+
Ensure the core Strata CSS is included in your global styles (e.g.,
|
|
17
|
+
\`styles.scss\` or \`angular.json\`): \`\`\`scss @import
|
|
18
|
+
'ngx-strata/strata.css'; \`\`\`
|
|
17
19
|
|
|
18
20
|
### 2. Provider Setup
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
})
|
|
30
|
-
]
|
|
31
|
-
};
|
|
32
|
-
```
|
|
21
|
+
|
|
22
|
+
The application should be configured with Strata. Use the global provider in
|
|
23
|
+
\`app.config.ts\`:
|
|
24
|
+
|
|
25
|
+
\`\`\`typescript import { provideStrata } from 'ngx-strata';
|
|
26
|
+
|
|
27
|
+
export const appConfig: ApplicationConfig = { providers: [ provideStrata({
|
|
28
|
+
includeBaseIcons: true, tooltipDelayMs: 500 }) ] };
|
|
29
|
+
|
|
30
|
+
````
|
|
33
31
|
Custom icons should be registered using the `provideIcons()` provider during bootstrap.
|
|
34
32
|
|
|
35
33
|
### 3. Application Shell
|
|
@@ -37,70 +35,88 @@ Wrap your root application component (usually `app.component.html`) in the Strat
|
|
|
37
35
|
|
|
38
36
|
```html
|
|
39
37
|
<st-shell>
|
|
40
|
-
<!-- Optional Sidebar -->
|
|
41
|
-
<st-sidemenu slot="sidebar">...</st-sidemenu>
|
|
42
|
-
|
|
43
38
|
<!-- Main Content -->
|
|
44
|
-
<
|
|
45
|
-
<router-outlet></router-outlet>
|
|
46
|
-
</div>
|
|
39
|
+
<router-outlet></router-outlet>
|
|
47
40
|
</st-shell>
|
|
48
|
-
|
|
41
|
+
````
|
|
49
42
|
|
|
50
43
|
---
|
|
51
44
|
|
|
52
45
|
## Theming & Variables
|
|
53
46
|
|
|
54
|
-
Do not hardcode colors or spacing values. Always use the built-in Strata CSS
|
|
47
|
+
Do not hardcode colors or spacing values. Always use the built-in Strata CSS
|
|
48
|
+
variables to ensure the app matches the active theme (light/dark mode).
|
|
55
49
|
|
|
56
50
|
**Key Color Variables:**
|
|
51
|
+
|
|
57
52
|
- `--st-color-bg-default`: Standard background.
|
|
58
53
|
- `--st-color-bg-raised`: Slightly elevated background (cards, modals).
|
|
59
54
|
- `--st-color-text-primary`: Standard text.
|
|
60
55
|
- `--st-color-text-secondary`: Muted/secondary text.
|
|
61
56
|
- `--st-color-text-tertiary`: Disabled/faded text.
|
|
62
|
-
- `--st-
|
|
57
|
+
- `--st-color-accent-default`: Primary brand accent color.
|
|
63
58
|
|
|
64
59
|
**Key Spacing Variables:**
|
|
60
|
+
|
|
65
61
|
- `--st-space-1` (4px) to `--st-space-10` (40px)
|
|
66
62
|
|
|
67
63
|
---
|
|
68
64
|
|
|
69
65
|
## Component Index
|
|
70
66
|
|
|
71
|
-
To save tokens and context window space, the detailed API and usage instructions
|
|
67
|
+
To save tokens and context window space, the detailed API and usage instructions
|
|
68
|
+
for each component are stored in separate files.
|
|
72
69
|
|
|
73
70
|
**Before using a component, read its dedicated file:**
|
|
74
71
|
|
|
75
|
-
- **Accordion** (`st-accordion-group`): Read
|
|
76
|
-
|
|
72
|
+
- **Accordion** (`st-accordion-group`): Read
|
|
73
|
+
[`components/accordion.md`](components/accordion.md)
|
|
74
|
+
- **Action-menu** (`st-action-menu`): Read
|
|
75
|
+
[`components/action-menu.md`](components/action-menu.md)
|
|
77
76
|
- **Alert** (`st-alert`): Read [`components/alert.md`](components/alert.md)
|
|
78
77
|
- **Avatar** (`st-avatar`): Read [`components/avatar.md`](components/avatar.md)
|
|
79
|
-
- **Breadcrumb** (`st-breadcrumb`): Read
|
|
78
|
+
- **Breadcrumb** (`st-breadcrumb`): Read
|
|
79
|
+
[`components/breadcrumb.md`](components/breadcrumb.md)
|
|
80
80
|
- **Button** (`[stButton]`): Read [`components/button.md`](components/button.md)
|
|
81
81
|
- **Card** (`st-card`): Read [`components/card.md`](components/card.md)
|
|
82
|
-
- **Checkbox** (`st-checkbox`): Read
|
|
83
|
-
|
|
82
|
+
- **Checkbox** (`st-checkbox`): Read
|
|
83
|
+
[`components/checkbox.md`](components/checkbox.md)
|
|
84
|
+
- **Divider** (`st-divider`): Read
|
|
85
|
+
[`components/divider.md`](components/divider.md)
|
|
84
86
|
- **Icon** (`st-icon`): Read [`components/icon.md`](components/icon.md)
|
|
85
|
-
- **Input-field** (`[stAutoResize]`): Read
|
|
87
|
+
- **Input-field** (`[stAutoResize]`): Read
|
|
88
|
+
[`components/input-field.md`](components/input-field.md)
|
|
86
89
|
- **Item** (`st-item`): Read [`components/item.md`](components/item.md)
|
|
87
90
|
- **Kbd** (`st-kbd`): Read [`components/kbd.md`](components/kbd.md)
|
|
88
|
-
- **Message-state** (`st-message-state`): Read
|
|
89
|
-
|
|
90
|
-
- **
|
|
91
|
-
|
|
92
|
-
- **
|
|
93
|
-
|
|
94
|
-
- **
|
|
91
|
+
- **Message-state** (`st-message-state`): Read
|
|
92
|
+
[`components/message-state.md`](components/message-state.md)
|
|
93
|
+
- **Modal** (`st-alert-content`): Read
|
|
94
|
+
[`components/modal.md`](components/modal.md)
|
|
95
|
+
- **Notification** (`st-notification`): Read
|
|
96
|
+
[`components/notification.md`](components/notification.md)
|
|
97
|
+
- **Number-display** (`st-number-display`): Read
|
|
98
|
+
[`components/number-display.md`](components/number-display.md)
|
|
99
|
+
- **Overlay** (`[stOverlay]`): Read
|
|
100
|
+
[`components/overlay.md`](components/overlay.md)
|
|
101
|
+
- **Pagination** (`st-pagination`): Read
|
|
102
|
+
[`components/pagination.md`](components/pagination.md)
|
|
103
|
+
- **Progress** (`st-progress-linear`): Read
|
|
104
|
+
[`components/progress.md`](components/progress.md)
|
|
95
105
|
- **Radio** (`st-radio`): Read [`components/radio.md`](components/radio.md)
|
|
96
|
-
- **Segmented-control** (`st-segmented-control`): Read
|
|
106
|
+
- **Segmented-control** (`st-segmented-control`): Read
|
|
107
|
+
[`components/segmented-control.md`](components/segmented-control.md)
|
|
97
108
|
- **Shell** (`st-shell`): Read [`components/shell.md`](components/shell.md)
|
|
98
|
-
- **Sidemenu** (`[stSidemenuItem]`): Read
|
|
99
|
-
|
|
109
|
+
- **Sidemenu** (`[stSidemenuItem]`): Read
|
|
110
|
+
[`components/sidemenu.md`](components/sidemenu.md)
|
|
111
|
+
- **Single-select** (`[stSelectTrigger]`): Read
|
|
112
|
+
[`components/single-select.md`](components/single-select.md)
|
|
100
113
|
- **Slider** (`st-slider`): Read [`components/slider.md`](components/slider.md)
|
|
101
|
-
- **Spinner** (`st-spinner`): Read
|
|
114
|
+
- **Spinner** (`st-spinner`): Read
|
|
115
|
+
[`components/spinner.md`](components/spinner.md)
|
|
102
116
|
- **Tabs** (`st-tab-item`): Read [`components/tabs.md`](components/tabs.md)
|
|
103
117
|
- **Tag** (`st-tag`): Read [`components/tag.md`](components/tag.md)
|
|
104
|
-
- **Text-stack** (`st-text-stack`): Read
|
|
105
|
-
|
|
118
|
+
- **Text-stack** (`st-text-stack`): Read
|
|
119
|
+
[`components/text-stack.md`](components/text-stack.md)
|
|
120
|
+
- **Theming** (`[stTheme]`): Read
|
|
121
|
+
[`components/theming.md`](components/theming.md)
|
|
106
122
|
- **Toggle** (`st-toggle`): Read [`components/toggle.md`](components/toggle.md)
|
|
@@ -35,4 +35,4 @@ This file contains the AI documentation for the `accordion` feature and its rela
|
|
|
35
35
|
</st-accordion-group>
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
38
|
+
> **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.
|
|
@@ -33,4 +33,4 @@ This file contains the AI documentation for the `action-menu` feature and its re
|
|
|
33
33
|
</st-action-menu>
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
36
|
+
> **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.
|
|
@@ -25,4 +25,4 @@ This file contains the AI documentation for the `alert` feature and its related
|
|
|
25
25
|
</st-alert>
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
28
|
+
> **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.
|
|
@@ -30,4 +30,4 @@ This file contains the AI documentation for the `avatar` feature and its related
|
|
|
30
30
|
</st-avatar-stack>
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
33
|
+
> **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.
|
|
@@ -29,4 +29,4 @@ This file contains the AI documentation for the `breadcrumb` feature and its rel
|
|
|
29
29
|
</st-breadcrumb>
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
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.
|
|
@@ -31,4 +31,4 @@ This file contains the AI documentation for the `button` feature and its related
|
|
|
31
31
|
</st-button-group>
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
34
|
+
> **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.
|
|
@@ -11,7 +11,14 @@ This file contains the AI documentation for the `card` feature and its related c
|
|
|
11
11
|
- `[padding] (boolean)`
|
|
12
12
|
- `[variant] (CardVariant)`
|
|
13
13
|
|
|
14
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
14
|
+
> **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.
|
|
15
|
+
|
|
16
|
+
## CSS Custom Properties
|
|
17
|
+
Every component exposes internal CSS custom properties for visual styling overrides:
|
|
18
|
+
- `--st-card-shadow`: Box-shadow of the elevated card (defaults to `var(--st-shadow-1)`).
|
|
19
|
+
- `--st-card-padding`: Inner padding of the card (defaults to `var(--st-size-xs)`).
|
|
20
|
+
- `--st-card-background-color`: Background color of the card (defaults to `var(--st-color-bg-subtle)`).
|
|
21
|
+
|
|
15
22
|
## Usage Example
|
|
16
23
|
|
|
17
24
|
```html
|
|
@@ -21,4 +28,3 @@ This file contains the AI documentation for the `card` feature and its related c
|
|
|
21
28
|
</st-card>
|
|
22
29
|
```
|
|
23
30
|
|
|
24
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents. Ensure data binding uses modern Angular Signals if the host project allows it.
|
|
@@ -19,4 +19,4 @@ This file contains the AI documentation for the `checkbox` feature and its relat
|
|
|
19
19
|
</st-checkbox>
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
22
|
+
> **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.
|
|
@@ -16,4 +16,4 @@ This file contains the AI documentation for the `divider` feature and its relate
|
|
|
16
16
|
<st-divider label="OR" [margin]="true" [vertical]="false"></st-divider>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
19
|
+
> **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.
|
|
@@ -18,4 +18,4 @@ This file contains the AI documentation for the `icon` feature and its related c
|
|
|
18
18
|
> **CRITICAL RULE FOR AI AGENTS regarding Icons:**
|
|
19
19
|
> NEVER guess an icon name. Before using an \`<st-icon>\`, you MUST verify that the icon is registered in the host application (usually located in \`src/app/shared/icon.config.ts\`). Alternatively, you may use one of the **ngx-strata Base Icons**: <!-- BASE_ICONS_START -->`question`, `arrow-right`, `arrow-left`, `arrow-up`, `arrow-down`, `close`, `expand-up-down`, `clipboard`, or `more`<!-- BASE_ICONS_END -->. If the icon you want to use is NOT registered, you must STOP and ask the user to add it.
|
|
20
20
|
|
|
21
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
21
|
+
> **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.
|
|
@@ -17,7 +17,7 @@ This file contains the AI documentation for the `input-field` feature and its re
|
|
|
17
17
|
- **Selector**: `st-input-field`
|
|
18
18
|
- **Imports**: `StrataInputFieldComponent`
|
|
19
19
|
|
|
20
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
20
|
+
> **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.
|
|
21
21
|
## Usage Example
|
|
22
22
|
|
|
23
23
|
```html
|
|
@@ -26,4 +26,4 @@ This file contains the AI documentation for the `input-field` feature and its re
|
|
|
26
26
|
</st-input-field>
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
29
|
+
> **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,7 +14,7 @@ This file contains the AI documentation for the `item` feature and its related c
|
|
|
14
14
|
- `[dividers] (boolean)`
|
|
15
15
|
- `[template] (TemplateRef<T)`
|
|
16
16
|
|
|
17
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
17
|
+
> **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.
|
|
18
18
|
## Usage Example
|
|
19
19
|
|
|
20
20
|
```html
|
|
@@ -28,4 +28,4 @@ This file contains the AI documentation for the `item` feature and its related c
|
|
|
28
28
|
</st-item>
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
31
|
+
> **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.
|
|
@@ -15,4 +15,4 @@ This file contains the AI documentation for the `kbd` feature and its related co
|
|
|
15
15
|
<st-kbd keys="enter"></st-kbd>
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
18
|
+
> **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.
|
|
@@ -29,4 +29,4 @@ This file contains the AI documentation for the `message-state` feature and its
|
|
|
29
29
|
</st-message-state>
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
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.
|
|
@@ -45,18 +45,19 @@ export class MyComponent {
|
|
|
45
45
|
private modalService = inject(ModalService);
|
|
46
46
|
|
|
47
47
|
openSettings() {
|
|
48
|
-
this.modalService.
|
|
48
|
+
this.modalService.showModal({
|
|
49
|
+
component: MyModalContentComponent,
|
|
49
50
|
title: 'User Settings',
|
|
50
51
|
size: 'lg'
|
|
51
52
|
});
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
|
-
|
|
55
|
+
```
|
|
55
56
|
|
|
56
57
|
### 2. The Modal Content Component
|
|
57
|
-
Inside your modal content component, inject
|
|
58
|
+
Inside your modal content component, inject `StrataModalRef` to close it. The modal's header and close button are automatically handled by the wrapper based on the configuration passed to `showModal()`.
|
|
58
59
|
|
|
59
|
-
|
|
60
|
+
```typescript
|
|
60
61
|
import { Component, inject } from '@angular/core';
|
|
61
62
|
import { StrataModalRef } from 'ngx-strata';
|
|
62
63
|
|
|
@@ -81,6 +82,15 @@ export class MyModalContentComponent {
|
|
|
81
82
|
this.modalRef.close(true); // Can pass data back
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
|
-
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## CSS Custom Properties
|
|
88
|
+
The modal component exposes internal CSS custom properties for styling and layout overrides:
|
|
89
|
+
- `--st-modal-bg-color`: Background color of the modal (defaults to `var(--st-color-bg-raised)`).
|
|
90
|
+
- `--st-modal-border-radius`: Border radius of the modal (defaults to `var(--st-border-radius-sm)`).
|
|
91
|
+
- `--st-modal-padding`: Inner padding of the modal (defaults to `var(--st-size-md)`).
|
|
92
|
+
- `--st-modal-covered-modal-filter`: CSS filter applied to covered modals (defaults to `brightness(70%)`).
|
|
93
|
+
- `--st-modal-viewport-margin`: Viewport safety margin when calculating max-height (defaults to `var(--st-size-md)`).
|
|
94
|
+
|
|
95
|
+
> **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.
|
|
85
96
|
|
|
86
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents. Ensure data binding uses modern Angular Signals if the host project allows it.
|
|
@@ -43,4 +43,4 @@ export class MyComponent {
|
|
|
43
43
|
}
|
|
44
44
|
\`\`\`
|
|
45
45
|
|
|
46
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
46
|
+
> **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.
|
|
@@ -23,4 +23,4 @@ This file contains the AI documentation for the `number-display` feature and its
|
|
|
23
23
|
</st-number-display>
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
26
|
+
> **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.
|
|
@@ -17,4 +17,4 @@ This file contains the AI documentation for the `overlay` feature and its relate
|
|
|
17
17
|
<st-overlay></st-overlay>
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
20
|
+
> **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.
|
|
@@ -20,4 +20,4 @@ This file contains the AI documentation for the `pagination` feature and its rel
|
|
|
20
20
|
</st-pagination>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
23
|
+
> **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.
|
|
@@ -25,7 +25,7 @@ This file contains the AI documentation for the `progress` feature and its relat
|
|
|
25
25
|
- `[size] (any)`
|
|
26
26
|
- `[strokeWidth] (any)`
|
|
27
27
|
|
|
28
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
28
|
+
> **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.
|
|
29
29
|
## Usage Example
|
|
30
30
|
|
|
31
31
|
```html
|
|
@@ -43,4 +43,4 @@ This file contains the AI documentation for the `progress` feature and its relat
|
|
|
43
43
|
</st-progress-radial>
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
46
|
+
> **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.
|
|
@@ -26,4 +26,4 @@ This file contains the AI documentation for the `radio` feature and its related
|
|
|
26
26
|
</st-radio-group>
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
29
|
+
> **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.
|
|
@@ -35,4 +35,4 @@ This file contains the AI documentation for the `segmented-control` feature and
|
|
|
35
35
|
</st-segmented-control>
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
38
|
+
> **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,9 +10,9 @@ This file contains the AI documentation for the `shell` feature and its related
|
|
|
10
10
|
|
|
11
11
|
```html
|
|
12
12
|
<st-shell>
|
|
13
|
-
|
|
14
|
-
<
|
|
13
|
+
<!-- Main App Content -->
|
|
14
|
+
<router-outlet></router-outlet>
|
|
15
15
|
</st-shell>
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
18
|
+
> **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.
|
|
@@ -24,7 +24,7 @@ This file contains the AI documentation for the `sidemenu` feature and its relat
|
|
|
24
24
|
- **Inputs**:
|
|
25
25
|
- `[label] (string)`
|
|
26
26
|
|
|
27
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
27
|
+
> **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.
|
|
28
28
|
## Usage Example
|
|
29
29
|
|
|
30
30
|
```html
|
|
@@ -38,4 +38,4 @@ This file contains the AI documentation for the `sidemenu` feature and its relat
|
|
|
38
38
|
</st-sidemenu>
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
41
|
+
> **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.
|
|
@@ -42,4 +42,4 @@ This file contains the AI documentation for the `single-select` feature and its
|
|
|
42
42
|
</st-single-select>
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
45
|
+
> **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.
|
|
@@ -21,4 +21,4 @@ This file contains the AI documentation for the `slider` feature and its related
|
|
|
21
21
|
</st-slider>
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
24
|
+
> **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,4 +14,4 @@ This file contains the AI documentation for the `spinner` feature and its relate
|
|
|
14
14
|
<st-spinner size="md"></st-spinner>
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
17
|
+
> **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.
|
|
@@ -24,4 +24,4 @@ This file contains the AI documentation for the `tabs` feature and its related c
|
|
|
24
24
|
</st-tabs>
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
27
|
+
> **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,4 +14,4 @@ This file contains the AI documentation for the `tag` feature and its related co
|
|
|
14
14
|
<st-tag size="md">New Feature</st-tag>
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
17
|
+
> **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.
|
|
@@ -8,7 +8,7 @@ This file contains the AI documentation for the `text-stack` feature and its rel
|
|
|
8
8
|
- **Inputs**:
|
|
9
9
|
- `[overflow] (TextStackOverflow)`
|
|
10
10
|
|
|
11
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
11
|
+
> **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.
|
|
12
12
|
## Usage Example
|
|
13
13
|
|
|
14
14
|
```html
|
|
@@ -18,4 +18,4 @@ This file contains the AI documentation for the `text-stack` feature and its rel
|
|
|
18
18
|
</st-text-stack>
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
21
|
+
> **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.
|
|
@@ -8,7 +8,7 @@ This file contains the AI documentation for the `theming` feature and its relate
|
|
|
8
8
|
- **Inputs**:
|
|
9
9
|
- `[stTheme] (Theme)`
|
|
10
10
|
|
|
11
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
11
|
+
> **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.
|
|
12
12
|
## Usage Example
|
|
13
13
|
|
|
14
14
|
```html
|
|
@@ -16,4 +16,4 @@ This file contains the AI documentation for the `theming` feature and its relate
|
|
|
16
16
|
<div class="st-bg-raised st-text-primary">Content</div>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
19
|
+
> **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.
|
|
@@ -19,4 +19,4 @@ This file contains the AI documentation for the `toggle` feature and its related
|
|
|
19
19
|
</st-toggle>
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
> **Note to AI Agents**: Prioritize using these components over raw HTML equivalents.
|
|
22
|
+
> **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.
|