ngx-strata 0.2.0 → 0.2.1
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/components/_breadcrumb.scss +68 -0
- package/assets/styles/components/action-menu.scss +12 -1
- package/assets/styles/components/card.scss +1 -1
- package/assets/styles/components/icon.scss +5 -0
- package/assets/styles/components/item.scss +11 -1
- package/assets/styles/components/overlay.scss +4 -0
- package/assets/styles/components/segmented-control.scss +17 -2
- package/assets/styles/components/select.scss +16 -26
- package/assets/styles/components/sidemenu.scss +7 -0
- package/assets/styles/components/toggle.scss +40 -13
- package/assets/styles/public-api.scss +1 -0
- package/assets/styles/typography.scss +0 -1
- package/dist/strata/strata.css +1 -1
- package/fesm2022/ngx-strata.mjs +362 -229
- package/fesm2022/ngx-strata.mjs.map +1 -1
- package/package.json +1 -1
- package/skills/ngx-strata/SKILL.md +106 -0
- package/skills/ngx-strata/components/accordion.md +38 -0
- package/skills/ngx-strata/components/action-menu.md +36 -0
- package/skills/ngx-strata/components/alert.md +28 -0
- package/skills/ngx-strata/components/avatar.md +33 -0
- package/skills/ngx-strata/components/breadcrumb.md +32 -0
- package/skills/ngx-strata/components/button.md +34 -0
- package/skills/ngx-strata/components/card.md +24 -0
- package/skills/ngx-strata/components/checkbox.md +22 -0
- package/skills/ngx-strata/components/divider.md +19 -0
- package/skills/ngx-strata/components/icon.md +21 -0
- package/skills/ngx-strata/components/input-field.md +29 -0
- package/skills/ngx-strata/components/item.md +31 -0
- package/skills/ngx-strata/components/kbd.md +18 -0
- package/skills/ngx-strata/components/message-state.md +32 -0
- package/skills/ngx-strata/components/modal.md +86 -0
- package/skills/ngx-strata/components/notification.md +46 -0
- package/skills/ngx-strata/components/number-display.md +26 -0
- package/skills/ngx-strata/components/overlay.md +20 -0
- package/skills/ngx-strata/components/pagination.md +23 -0
- package/skills/ngx-strata/components/progress.md +46 -0
- package/skills/ngx-strata/components/radio.md +29 -0
- package/skills/ngx-strata/components/segmented-control.md +38 -0
- package/skills/ngx-strata/components/shell.md +18 -0
- package/skills/ngx-strata/components/sidemenu.md +41 -0
- package/skills/ngx-strata/components/single-select.md +45 -0
- package/skills/ngx-strata/components/slider.md +24 -0
- package/skills/ngx-strata/components/spinner.md +17 -0
- package/skills/ngx-strata/components/tabs.md +27 -0
- package/skills/ngx-strata/components/tag.md +17 -0
- package/skills/ngx-strata/components/text-stack.md +21 -0
- package/skills/ngx-strata/components/theming.md +19 -0
- package/skills/ngx-strata/components/toggle.md +22 -0
- package/types/ngx-strata.d.ts +102 -67
package/package.json
CHANGED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ngx-strata
|
|
3
|
+
description: "Instructions for using the ngx-strata UI component library"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ngx-strata Component Manual (Index)
|
|
7
|
+
|
|
8
|
+
You are working in a project that uses **ngx-strata**, a modern Angular UI component library. Use this index to locate the specific component documentation you need.
|
|
9
|
+
|
|
10
|
+
## Global Setup
|
|
11
|
+
|
|
12
|
+
### 1. Style Setup
|
|
13
|
+
Ensure the core Strata CSS is included in your global styles (e.g., \`styles.scss\` or \`angular.json\`):
|
|
14
|
+
\`\`\`scss
|
|
15
|
+
@import 'ngx-strata/strata.css';
|
|
16
|
+
\`\`\`
|
|
17
|
+
|
|
18
|
+
### 2. Provider Setup
|
|
19
|
+
The application should be configured with Strata. Use the global provider in \`app.config.ts\`:
|
|
20
|
+
|
|
21
|
+
\`\`\`typescript
|
|
22
|
+
import { provideStrata } from 'ngx-strata';
|
|
23
|
+
|
|
24
|
+
export const appConfig: ApplicationConfig = {
|
|
25
|
+
providers: [
|
|
26
|
+
provideStrata({
|
|
27
|
+
includeBaseIcons: true,
|
|
28
|
+
tooltipDelayMs: 500
|
|
29
|
+
})
|
|
30
|
+
]
|
|
31
|
+
};
|
|
32
|
+
```
|
|
33
|
+
Custom icons should be registered using the `provideIcons()` provider during bootstrap.
|
|
34
|
+
|
|
35
|
+
### 3. Application Shell
|
|
36
|
+
Wrap your root application component (usually `app.component.html`) in the Strata Shell to ensure correct layout and overlay positioning. The `st-shell` automatically includes the notification and modal containers, so you do not need to add them manually.
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<st-shell>
|
|
40
|
+
<!-- Optional Sidebar -->
|
|
41
|
+
<st-sidemenu slot="sidebar">...</st-sidemenu>
|
|
42
|
+
|
|
43
|
+
<!-- Main Content -->
|
|
44
|
+
<div slot="content">
|
|
45
|
+
<router-outlet></router-outlet>
|
|
46
|
+
</div>
|
|
47
|
+
</st-shell>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Theming & Variables
|
|
53
|
+
|
|
54
|
+
Do not hardcode colors or spacing values. Always use the built-in Strata CSS variables to ensure the app matches the active theme (light/dark mode).
|
|
55
|
+
|
|
56
|
+
**Key Color Variables:**
|
|
57
|
+
- `--st-color-bg-default`: Standard background.
|
|
58
|
+
- `--st-color-bg-raised`: Slightly elevated background (cards, modals).
|
|
59
|
+
- `--st-color-text-primary`: Standard text.
|
|
60
|
+
- `--st-color-text-secondary`: Muted/secondary text.
|
|
61
|
+
- `--st-color-text-tertiary`: Disabled/faded text.
|
|
62
|
+
- `--st-brand`: Primary brand accent color.
|
|
63
|
+
|
|
64
|
+
**Key Spacing Variables:**
|
|
65
|
+
- `--st-space-1` (4px) to `--st-space-10` (40px)
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Component Index
|
|
70
|
+
|
|
71
|
+
To save tokens and context window space, the detailed API and usage instructions for each component are stored in separate files.
|
|
72
|
+
|
|
73
|
+
**Before using a component, read its dedicated file:**
|
|
74
|
+
|
|
75
|
+
- **Accordion** (`st-accordion-group`): Read [`components/accordion.md`](components/accordion.md)
|
|
76
|
+
- **Action-menu** (`st-action-menu`): Read [`components/action-menu.md`](components/action-menu.md)
|
|
77
|
+
- **Alert** (`st-alert`): Read [`components/alert.md`](components/alert.md)
|
|
78
|
+
- **Avatar** (`st-avatar`): Read [`components/avatar.md`](components/avatar.md)
|
|
79
|
+
- **Breadcrumb** (`st-breadcrumb`): Read [`components/breadcrumb.md`](components/breadcrumb.md)
|
|
80
|
+
- **Button** (`[stButton]`): Read [`components/button.md`](components/button.md)
|
|
81
|
+
- **Card** (`st-card`): Read [`components/card.md`](components/card.md)
|
|
82
|
+
- **Checkbox** (`st-checkbox`): Read [`components/checkbox.md`](components/checkbox.md)
|
|
83
|
+
- **Divider** (`st-divider`): Read [`components/divider.md`](components/divider.md)
|
|
84
|
+
- **Icon** (`st-icon`): Read [`components/icon.md`](components/icon.md)
|
|
85
|
+
- **Input-field** (`[stAutoResize]`): Read [`components/input-field.md`](components/input-field.md)
|
|
86
|
+
- **Item** (`st-item`): Read [`components/item.md`](components/item.md)
|
|
87
|
+
- **Kbd** (`st-kbd`): Read [`components/kbd.md`](components/kbd.md)
|
|
88
|
+
- **Message-state** (`st-message-state`): Read [`components/message-state.md`](components/message-state.md)
|
|
89
|
+
- **Modal** (`st-alert-content`): Read [`components/modal.md`](components/modal.md)
|
|
90
|
+
- **Notification** (`st-notification`): Read [`components/notification.md`](components/notification.md)
|
|
91
|
+
- **Number-display** (`st-number-display`): Read [`components/number-display.md`](components/number-display.md)
|
|
92
|
+
- **Overlay** (`[stOverlay]`): Read [`components/overlay.md`](components/overlay.md)
|
|
93
|
+
- **Pagination** (`st-pagination`): Read [`components/pagination.md`](components/pagination.md)
|
|
94
|
+
- **Progress** (`st-progress-linear`): Read [`components/progress.md`](components/progress.md)
|
|
95
|
+
- **Radio** (`st-radio`): Read [`components/radio.md`](components/radio.md)
|
|
96
|
+
- **Segmented-control** (`st-segmented-control`): Read [`components/segmented-control.md`](components/segmented-control.md)
|
|
97
|
+
- **Shell** (`st-shell`): Read [`components/shell.md`](components/shell.md)
|
|
98
|
+
- **Sidemenu** (`[stSidemenuItem]`): Read [`components/sidemenu.md`](components/sidemenu.md)
|
|
99
|
+
- **Single-select** (`[stSelectTrigger]`): Read [`components/single-select.md`](components/single-select.md)
|
|
100
|
+
- **Slider** (`st-slider`): Read [`components/slider.md`](components/slider.md)
|
|
101
|
+
- **Spinner** (`st-spinner`): Read [`components/spinner.md`](components/spinner.md)
|
|
102
|
+
- **Tabs** (`st-tab-item`): Read [`components/tabs.md`](components/tabs.md)
|
|
103
|
+
- **Tag** (`st-tag`): Read [`components/tag.md`](components/tag.md)
|
|
104
|
+
- **Text-stack** (`st-text-stack`): Read [`components/text-stack.md`](components/text-stack.md)
|
|
105
|
+
- **Theming** (`[stTheme]`): Read [`components/theming.md`](components/theming.md)
|
|
106
|
+
- **Toggle** (`st-toggle`): Read [`components/toggle.md`](components/toggle.md)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# ngx-strata: accordion Feature
|
|
2
|
+
|
|
3
|
+
This file contains the AI documentation for the `accordion` feature and its related components.
|
|
4
|
+
|
|
5
|
+
## AccordionGroup (`<st-accordion-group>`)
|
|
6
|
+
- **Selector**: `st-accordion-group`
|
|
7
|
+
- **Imports**: `StrataAccordionGroupComponent`
|
|
8
|
+
- **Inputs**:
|
|
9
|
+
- `[allowMultipleOpen] (boolean)`
|
|
10
|
+
|
|
11
|
+
## AccordionItem (`<st-accordion-item>`)
|
|
12
|
+
- **Selector**: `st-accordion-item`
|
|
13
|
+
- **Imports**: `StrataAccordionItemComponent`
|
|
14
|
+
- **Inputs**:
|
|
15
|
+
- `[title] (string)`
|
|
16
|
+
- **Outputs**:
|
|
17
|
+
- `(toggled)`
|
|
18
|
+
|
|
19
|
+
## Usage Example
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<!-- Single Accordion -->
|
|
23
|
+
<st-accordion-item title="Single accordion">
|
|
24
|
+
<p>With some excellent content to be revealed</p>
|
|
25
|
+
</st-accordion-item>
|
|
26
|
+
|
|
27
|
+
<!-- Accordion Group -->
|
|
28
|
+
<st-accordion-group [allowMultipleOpen]="false">
|
|
29
|
+
<st-accordion-item title="Section 1">
|
|
30
|
+
<p>Content for section 1</p>
|
|
31
|
+
</st-accordion-item>
|
|
32
|
+
<st-accordion-item title="Section 2">
|
|
33
|
+
<p>Content for section 2</p>
|
|
34
|
+
</st-accordion-item>
|
|
35
|
+
</st-accordion-group>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
> **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.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# ngx-strata: action-menu Feature
|
|
2
|
+
|
|
3
|
+
This file contains the AI documentation for the `action-menu` feature and its related components.
|
|
4
|
+
|
|
5
|
+
## ActionMenu (`<st-action-menu>`)
|
|
6
|
+
- **Selector**: `st-action-menu`
|
|
7
|
+
- **Imports**: `StrataActionMenuComponent`
|
|
8
|
+
- **Inputs**:
|
|
9
|
+
- `[placement] (Placement)`
|
|
10
|
+
|
|
11
|
+
## ActionMenuItem (`<st-action-menu-item>`)
|
|
12
|
+
- **Selector**: `st-action-menu-item`
|
|
13
|
+
- **Imports**: `StrataActionMenuItemComponent`
|
|
14
|
+
- **Inputs**:
|
|
15
|
+
- `[closeMenuOnClick] (any)`
|
|
16
|
+
- `[active] (any)`
|
|
17
|
+
- **Outputs**:
|
|
18
|
+
- `(menuItemClicked)`
|
|
19
|
+
|
|
20
|
+
## Usage Example
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<!-- Default Icon Trigger -->
|
|
24
|
+
<st-action-menu>
|
|
25
|
+
<st-action-menu-item label="Edit" iconName="edit" (menuItemClicked)="edit()"></st-action-menu-item>
|
|
26
|
+
<st-action-menu-item label="Delete" iconName="trash" (menuItemClicked)="delete()"></st-action-menu-item>
|
|
27
|
+
</st-action-menu>
|
|
28
|
+
|
|
29
|
+
<!-- Custom Button Trigger -->
|
|
30
|
+
<st-action-menu>
|
|
31
|
+
<button stButton variant="primary" trigger>Options</button>
|
|
32
|
+
<st-action-menu-item label="Export" iconName="download" (menuItemClicked)="export()"></st-action-menu-item>
|
|
33
|
+
</st-action-menu>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
> **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.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# ngx-strata: alert Feature
|
|
2
|
+
|
|
3
|
+
This file contains the AI documentation for the `alert` feature and its related components.
|
|
4
|
+
|
|
5
|
+
## Alert (`<st-alert>`)
|
|
6
|
+
- **Selector**: `st-alert`
|
|
7
|
+
- **Imports**: `StrataAlertComponent`
|
|
8
|
+
- **Inputs**:
|
|
9
|
+
- `[header] (string | undefined)`
|
|
10
|
+
- `[message] (string)`
|
|
11
|
+
- `[iconName] (string | undefined)`
|
|
12
|
+
- `[dismissible] (boolean)`
|
|
13
|
+
- **Outputs**:
|
|
14
|
+
- `(dismiss)`
|
|
15
|
+
|
|
16
|
+
## Usage Example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<st-alert
|
|
20
|
+
header="Update Successful"
|
|
21
|
+
message="Your settings have been saved."
|
|
22
|
+
iconName="check_circle"
|
|
23
|
+
[dismissible]="true"
|
|
24
|
+
(dismiss)="hideAlert()">
|
|
25
|
+
</st-alert>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
> **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.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# ngx-strata: avatar Feature
|
|
2
|
+
|
|
3
|
+
This file contains the AI documentation for the `avatar` feature and its related components.
|
|
4
|
+
|
|
5
|
+
## Avatar (`<st-avatar>`)
|
|
6
|
+
- **Selector**: `st-avatar`
|
|
7
|
+
- **Imports**: `StrataAvatarComponent`
|
|
8
|
+
- **Inputs**:
|
|
9
|
+
- `[text] (string | null)`
|
|
10
|
+
|
|
11
|
+
## AvatarStack (`<st-avatar-stack>`)
|
|
12
|
+
- **Selector**: `st-avatar-stack`
|
|
13
|
+
- **Imports**: `StrataAvatarStackComponent`
|
|
14
|
+
- **Inputs**:
|
|
15
|
+
- `[size] (AvatarSize)`
|
|
16
|
+
- `[spacing] ('loose' | 'mid' | 'tight')`
|
|
17
|
+
- `[firstOnFront] (boolean)`
|
|
18
|
+
|
|
19
|
+
## Usage Example
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<!-- Single Avatar -->
|
|
23
|
+
<st-avatar text="John Doe"></st-avatar>
|
|
24
|
+
|
|
25
|
+
<!-- Avatar Stack -->
|
|
26
|
+
<st-avatar-stack size="md" spacing="mid" [firstOnFront]="true">
|
|
27
|
+
<st-avatar text="John Doe"></st-avatar>
|
|
28
|
+
<st-avatar text="Jane Smith"></st-avatar>
|
|
29
|
+
<st-avatar text="Bob Ross"></st-avatar>
|
|
30
|
+
</st-avatar-stack>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
> **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.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# ngx-strata: breadcrumb Feature
|
|
2
|
+
|
|
3
|
+
This file contains the AI documentation for the `breadcrumb` feature and its related components.
|
|
4
|
+
|
|
5
|
+
## Breadcrumb (`<st-breadcrumb>`)
|
|
6
|
+
- **Selector**: `st-breadcrumb`
|
|
7
|
+
- **Imports**: `StrataBreadcrumbComponent`
|
|
8
|
+
- **Inputs**:
|
|
9
|
+
- `[separatorIcon] (string)`
|
|
10
|
+
|
|
11
|
+
## BreadcrumbItem (`<st-breadcrumb-item>`)
|
|
12
|
+
- **Selector**: `st-breadcrumb-item`
|
|
13
|
+
- **Imports**: `StrataBreadcrumbItemComponent`
|
|
14
|
+
- **Inputs**:
|
|
15
|
+
- `[text] (string)`
|
|
16
|
+
- `[icon] (string)`
|
|
17
|
+
- `[interactable] (boolean)`
|
|
18
|
+
- `[disabled] (boolean)`
|
|
19
|
+
- **Outputs**:
|
|
20
|
+
- `(activated)`
|
|
21
|
+
|
|
22
|
+
## Usage Example
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<st-breadcrumb separatorIcon="chevron_right">
|
|
26
|
+
<st-breadcrumb-item text="Home" icon="home" (activated)="goHome()"></st-breadcrumb-item>
|
|
27
|
+
<st-breadcrumb-item text="Settings" (activated)="goSettings()"></st-breadcrumb-item>
|
|
28
|
+
<st-breadcrumb-item text="Profile" [disabled]="true"></st-breadcrumb-item>
|
|
29
|
+
</st-breadcrumb>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
> **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.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# ngx-strata: button Feature
|
|
2
|
+
|
|
3
|
+
This file contains the AI documentation for the `button` feature and its related components.
|
|
4
|
+
|
|
5
|
+
## Button (`[stButton]`)
|
|
6
|
+
- **Selector**: `[stButton]`
|
|
7
|
+
- **Imports**: `StrataButtonDirective`
|
|
8
|
+
- **Inputs**:
|
|
9
|
+
- `[variant] (ButtonVariant)`
|
|
10
|
+
- `[size] (ButtonSize)`
|
|
11
|
+
- `[fullWidth] (boolean)`
|
|
12
|
+
|
|
13
|
+
## ButtonGroup (`<st-button-group>`)
|
|
14
|
+
- **Selector**: `st-button-group`
|
|
15
|
+
- **Imports**: `StrataButtonGroupComponent`
|
|
16
|
+
- **Inputs**:
|
|
17
|
+
- `[justification] (ButtonGroupJustification)`
|
|
18
|
+
|
|
19
|
+
## Usage Example
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<button stButton variant="primary" size="md">Save</button>
|
|
23
|
+
<button stButton variant="secondary" size="sm">Cancel</button>
|
|
24
|
+
<button stButton variant="ghost" size="lg">Help</button>
|
|
25
|
+
<button stButton variant="danger" size="md">Delete</button>
|
|
26
|
+
|
|
27
|
+
<!-- Button Group -->
|
|
28
|
+
<st-button-group justification="center">
|
|
29
|
+
<button stButton variant="secondary">Cancel</button>
|
|
30
|
+
<button stButton variant="primary">Confirm</button>
|
|
31
|
+
</st-button-group>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
> **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.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# ngx-strata: card Feature
|
|
2
|
+
|
|
3
|
+
This file contains the AI documentation for the `card` feature and its related components.
|
|
4
|
+
|
|
5
|
+
## Card (`<st-card>`)
|
|
6
|
+
- **Selector**: `st-card`
|
|
7
|
+
- **Imports**: `StrataCardComponent`
|
|
8
|
+
- **Inputs**:
|
|
9
|
+
- `[elevated] (boolean)`
|
|
10
|
+
- `[selectable] (boolean)`
|
|
11
|
+
- `[padding] (boolean)`
|
|
12
|
+
- `[variant] (CardVariant)`
|
|
13
|
+
|
|
14
|
+
> **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.
|
|
15
|
+
## Usage Example
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<st-card [elevated]="true" [selectable]="false" [padding]="true" variant="default">
|
|
19
|
+
<h3>Card Title</h3>
|
|
20
|
+
<p>This is the content inside the card.</p>
|
|
21
|
+
</st-card>
|
|
22
|
+
```
|
|
23
|
+
|
|
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.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# ngx-strata: checkbox Feature
|
|
2
|
+
|
|
3
|
+
This file contains the AI documentation for the `checkbox` feature and its related components.
|
|
4
|
+
|
|
5
|
+
## Checkbox (`<st-checkbox>`)
|
|
6
|
+
- **Selector**: `st-checkbox`
|
|
7
|
+
- **Imports**: `StrataCheckboxComponent`
|
|
8
|
+
- **Inputs**:
|
|
9
|
+
- `[label] (string | undefined)`
|
|
10
|
+
- `[name] (string | undefined)`
|
|
11
|
+
|
|
12
|
+
## Usage Example
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<st-checkbox
|
|
16
|
+
label="I agree to the terms and conditions"
|
|
17
|
+
name="terms"
|
|
18
|
+
[(ngModel)]="acceptedTerms">
|
|
19
|
+
</st-checkbox>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
> **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.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# ngx-strata: divider Feature
|
|
2
|
+
|
|
3
|
+
This file contains the AI documentation for the `divider` feature and its related components.
|
|
4
|
+
|
|
5
|
+
## Divider (`<st-divider>`)
|
|
6
|
+
- **Selector**: `st-divider`
|
|
7
|
+
- **Imports**: `StrataDividerComponent`
|
|
8
|
+
- **Inputs**:
|
|
9
|
+
- `[label] (string)`
|
|
10
|
+
- `[margin] (any)`
|
|
11
|
+
- `[vertical] (any)`
|
|
12
|
+
|
|
13
|
+
## Usage Example
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<st-divider label="OR" [margin]="true" [vertical]="false"></st-divider>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
> **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.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# ngx-strata: icon Feature
|
|
2
|
+
|
|
3
|
+
This file contains the AI documentation for the `icon` feature and its related components.
|
|
4
|
+
|
|
5
|
+
## Icon (`<st-icon>`)
|
|
6
|
+
- **Selector**: `st-icon`
|
|
7
|
+
- **Imports**: `StrataIconComponent`
|
|
8
|
+
- **Inputs**:
|
|
9
|
+
- `[name] (string)`
|
|
10
|
+
|
|
11
|
+
## Usage Example
|
|
12
|
+
|
|
13
|
+
\`\`\`html
|
|
14
|
+
<st-icon name="search" size="md"></st-icon>
|
|
15
|
+
<st-icon name="info" size="lg"></st-icon>
|
|
16
|
+
\`\`\`
|
|
17
|
+
|
|
18
|
+
> **CRITICAL RULE FOR AI AGENTS regarding Icons:**
|
|
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
|
+
|
|
21
|
+
> **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.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# ngx-strata: input-field Feature
|
|
2
|
+
|
|
3
|
+
This file contains the AI documentation for the `input-field` feature and its related components.
|
|
4
|
+
|
|
5
|
+
## AutoResize (`[stAutoResize]`)
|
|
6
|
+
- **Selector**: `[stAutoResize]`
|
|
7
|
+
- **Imports**: `StrataAutoResizeDirective`
|
|
8
|
+
- **Inputs**:
|
|
9
|
+
- `[minimumRows] (any)`
|
|
10
|
+
- `[maximumRows] (number)`
|
|
11
|
+
|
|
12
|
+
## NativeInputRef (`input[stInput], textarea[stInput]`)
|
|
13
|
+
- **Selector**: `input[stInput], textarea[stInput]`
|
|
14
|
+
- **Imports**: `StrataNativeInputRefDirective`
|
|
15
|
+
|
|
16
|
+
## InputField (`<st-input-field>`)
|
|
17
|
+
- **Selector**: `st-input-field`
|
|
18
|
+
- **Imports**: `StrataInputFieldComponent`
|
|
19
|
+
|
|
20
|
+
> **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.
|
|
21
|
+
## Usage Example
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<st-input-field>
|
|
25
|
+
<input type="text" stInput placeholder="Enter your name" [(ngModel)]="userName" />
|
|
26
|
+
</st-input-field>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
> **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.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ngx-strata: item Feature
|
|
2
|
+
|
|
3
|
+
This file contains the AI documentation for the `item` feature and its related components.
|
|
4
|
+
|
|
5
|
+
## Item (`<st-item>`)
|
|
6
|
+
- **Selector**: `st-item`
|
|
7
|
+
- **Imports**: `StrataItemComponent`
|
|
8
|
+
|
|
9
|
+
## ItemList (`<st-item-list>`)
|
|
10
|
+
- **Selector**: `st-item-list`
|
|
11
|
+
- **Imports**: `StrataItemListComponent`
|
|
12
|
+
- **Inputs**:
|
|
13
|
+
- `[items] (T[])`
|
|
14
|
+
- `[dividers] (boolean)`
|
|
15
|
+
- `[template] (TemplateRef<T)`
|
|
16
|
+
|
|
17
|
+
> **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.
|
|
18
|
+
## Usage Example
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<st-item>
|
|
22
|
+
<st-icon name="user" slot="start"></st-icon>
|
|
23
|
+
<div slot="content">
|
|
24
|
+
<h4>User Profile</h4>
|
|
25
|
+
<p>Manage your account settings</p>
|
|
26
|
+
</div>
|
|
27
|
+
<st-icon name="chevron_right" slot="end"></st-icon>
|
|
28
|
+
</st-item>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> **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.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# ngx-strata: kbd Feature
|
|
2
|
+
|
|
3
|
+
This file contains the AI documentation for the `kbd` feature and its related components.
|
|
4
|
+
|
|
5
|
+
## Kbd (`<st-kbd>`)
|
|
6
|
+
- **Selector**: `st-kbd`
|
|
7
|
+
- **Imports**: `StrataKbdComponent`
|
|
8
|
+
- **Inputs**:
|
|
9
|
+
- `[keys] (string | string[])`
|
|
10
|
+
|
|
11
|
+
## Usage Example
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<st-kbd [keys]="['meta', 'k']"></st-kbd>
|
|
15
|
+
<st-kbd keys="enter"></st-kbd>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
> **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.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# ngx-strata: message-state Feature
|
|
2
|
+
|
|
3
|
+
This file contains the AI documentation for the `message-state` feature and its related components.
|
|
4
|
+
|
|
5
|
+
## MessageState (`<st-message-state>`)
|
|
6
|
+
- **Selector**: `st-message-state`
|
|
7
|
+
- **Imports**: `StrataMessageStateComponent`
|
|
8
|
+
- **Inputs**:
|
|
9
|
+
- `[header] (string)`
|
|
10
|
+
- `[subtitle] (string | undefined)`
|
|
11
|
+
- `[primaryActionText] (string | undefined)`
|
|
12
|
+
- `[primaryActionTheme] (Theme | undefined)`
|
|
13
|
+
- `[secondaryActionText] (string | undefined)`
|
|
14
|
+
- **Outputs**:
|
|
15
|
+
- `(primaryAction)`
|
|
16
|
+
- `(secondaryAction)`
|
|
17
|
+
|
|
18
|
+
## Usage Example
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<st-message-state
|
|
22
|
+
header="No Results Found"
|
|
23
|
+
subtitle="Try adjusting your search filters."
|
|
24
|
+
primaryActionText="Clear Filters"
|
|
25
|
+
secondaryActionText="Go Home"
|
|
26
|
+
(primaryAction)="clear()"
|
|
27
|
+
(secondaryAction)="goHome()">
|
|
28
|
+
<st-icon name="search" slot="icon" size="lg"></st-icon>
|
|
29
|
+
</st-message-state>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
> **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.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# ngx-strata: modal Feature
|
|
2
|
+
|
|
3
|
+
This file contains the AI documentation for the `modal` feature and its related components.
|
|
4
|
+
|
|
5
|
+
## AlertContent (`<st-alert-content>`)
|
|
6
|
+
- **Selector**: `st-alert-content`
|
|
7
|
+
- **Imports**: `StrataAlertContentComponent`
|
|
8
|
+
- **Inputs**:
|
|
9
|
+
- `[title] (string)`
|
|
10
|
+
- `[message] (string)`
|
|
11
|
+
- `[icon] (string | undefined)`
|
|
12
|
+
- `[theme] (Theme)`
|
|
13
|
+
- `[affirmativeButton] (string)`
|
|
14
|
+
- `[cancelButton] (string | undefined)`
|
|
15
|
+
|
|
16
|
+
## Modal (`<st-modal>`)
|
|
17
|
+
- **Selector**: `st-modal`
|
|
18
|
+
- **Imports**: `StrataModalComponent`
|
|
19
|
+
- **Inputs**:
|
|
20
|
+
- `[configuration] (ModalConfiguration)`
|
|
21
|
+
|
|
22
|
+
## ModalContainer (`<st-modal-container>`)
|
|
23
|
+
- **Selector**: `st-modal-container`
|
|
24
|
+
- **Imports**: `StrataModalContainerComponent`
|
|
25
|
+
|
|
26
|
+
## ModalHeader (`<st-modal-header>`)
|
|
27
|
+
- **Selector**: `st-modal-header`
|
|
28
|
+
- **Imports**: `StrataModalHeaderComponent`
|
|
29
|
+
- **Inputs**:
|
|
30
|
+
- `[title] (string | null | undefined)`
|
|
31
|
+
- `[showCloseButton] (boolean)`
|
|
32
|
+
|
|
33
|
+
## Usage Example
|
|
34
|
+
|
|
35
|
+
Modals in \`ngx-strata\` are opened programmatically using the \`ModalService\`. Do **NOT** use \`<st-modal>\` declaratively in your templates.
|
|
36
|
+
|
|
37
|
+
### 1. Opening a Modal (TypeScript)
|
|
38
|
+
\`\`\`typescript
|
|
39
|
+
import { Component, inject } from '@angular/core';
|
|
40
|
+
import { ModalService } from 'ngx-strata';
|
|
41
|
+
import { MyModalContentComponent } from './my-modal-content.component';
|
|
42
|
+
|
|
43
|
+
@Component({...})
|
|
44
|
+
export class MyComponent {
|
|
45
|
+
private modalService = inject(ModalService);
|
|
46
|
+
|
|
47
|
+
openSettings() {
|
|
48
|
+
this.modalService.open(MyModalContentComponent, {
|
|
49
|
+
title: 'User Settings',
|
|
50
|
+
size: 'lg'
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
\`\`\`
|
|
55
|
+
|
|
56
|
+
### 2. The Modal Content Component
|
|
57
|
+
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 \`open()\`.
|
|
58
|
+
|
|
59
|
+
\`\`\`typescript
|
|
60
|
+
import { Component, inject } from '@angular/core';
|
|
61
|
+
import { StrataModalRef } from 'ngx-strata';
|
|
62
|
+
|
|
63
|
+
@Component({
|
|
64
|
+
template: \`
|
|
65
|
+
<p>Adjust your preferences here.</p>
|
|
66
|
+
<st-button-group justification="end">
|
|
67
|
+
<button stButton variant="secondary" (click)="close()">Cancel</button>
|
|
68
|
+
<button stButton variant="primary" (click)="save()">Save</button>
|
|
69
|
+
</st-button-group>
|
|
70
|
+
\`
|
|
71
|
+
})
|
|
72
|
+
export class MyModalContentComponent {
|
|
73
|
+
private modalRef = inject(StrataModalRef);
|
|
74
|
+
|
|
75
|
+
close() {
|
|
76
|
+
this.modalRef.close();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
save() {
|
|
80
|
+
// Save logic...
|
|
81
|
+
this.modalRef.close(true); // Can pass data back
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
\`\`\`
|
|
85
|
+
|
|
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.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# ngx-strata: notification Feature
|
|
2
|
+
|
|
3
|
+
This file contains the AI documentation for the `notification` feature and its related components.
|
|
4
|
+
|
|
5
|
+
## Notification (`<st-notification>`)
|
|
6
|
+
- **Selector**: `st-notification`
|
|
7
|
+
- **Imports**: `StrataNotificationComponent`
|
|
8
|
+
|
|
9
|
+
## NotificationContainer (`<st-notification-container>`)
|
|
10
|
+
- **Selector**: `st-notification-container`
|
|
11
|
+
- **Imports**: `StrataNotificationContainerComponent`
|
|
12
|
+
|
|
13
|
+
## Usage Example
|
|
14
|
+
|
|
15
|
+
Notifications are opened programmatically using the \`NotificationService\`. Do **NOT** use \`<st-notification>\` declaratively in your templates.
|
|
16
|
+
|
|
17
|
+
### Triggering a Notification (TypeScript)
|
|
18
|
+
\`\`\`typescript
|
|
19
|
+
import { Component, inject } from '@angular/core';
|
|
20
|
+
import { NotificationService } from 'ngx-strata';
|
|
21
|
+
|
|
22
|
+
@Component({...})
|
|
23
|
+
export class MyComponent {
|
|
24
|
+
private notificationService = inject(NotificationService);
|
|
25
|
+
|
|
26
|
+
showSuccess() {
|
|
27
|
+
this.notificationService.open({
|
|
28
|
+
title: 'Upload Complete',
|
|
29
|
+
message: 'Your file has been successfully uploaded.',
|
|
30
|
+
theme: 'success',
|
|
31
|
+
icon: 'check_circle'
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
showError() {
|
|
36
|
+
this.notificationService.open({
|
|
37
|
+
title: 'Upload Failed',
|
|
38
|
+
message: 'There was a network error during upload.',
|
|
39
|
+
theme: 'danger',
|
|
40
|
+
icon: 'error'
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
\`\`\`
|
|
45
|
+
|
|
46
|
+
> **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.
|