@life-cockpit/angular-ui-kit 1.2.2 → 1.3.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/README.md
CHANGED
|
@@ -52,8 +52,10 @@ export class MyComponent {}
|
|
|
52
52
|
| Accordion | `lc-accordion` | Expandable/collapsible content panels |
|
|
53
53
|
| Button | `lc-button` | Primary, secondary, and text buttons |
|
|
54
54
|
| Card | `lc-card` | Content container with elevation |
|
|
55
|
+
| Chat | `lc-chat` | Conversational UI with streaming, custom message templates |
|
|
55
56
|
| Icon | `lc-icon` | SVG icon display |
|
|
56
57
|
| Logo | `lc-logo` | Life Cockpit logo |
|
|
58
|
+
| Markdown | `lc-markdown` | GFM markdown renderer with code block highlighting |
|
|
57
59
|
| Menu | `lc-menu` | Dropdown menu |
|
|
58
60
|
| Typography | `lc-typography` | Text with preset styles |
|
|
59
61
|
|
|
@@ -62,6 +64,7 @@ export class MyComponent {}
|
|
|
62
64
|
| Component | Selector | Description |
|
|
63
65
|
|-----------|----------|-------------|
|
|
64
66
|
| Checkbox | `lc-checkbox` | Checkbox input |
|
|
67
|
+
| Combobox | `lc-combobox` | Async autocomplete with single/multiple selection |
|
|
65
68
|
| Datepicker | `lc-datepicker` | Date selection |
|
|
66
69
|
| Email Input | `lc-email-input` | Email-specific input |
|
|
67
70
|
| Input | `lc-input` | Text input field |
|
|
@@ -103,6 +106,7 @@ export class MyComponent {}
|
|
|
103
106
|
| Field Group | `lc-field-group` | Grouped form fields |
|
|
104
107
|
| Filter Bar | `lc-filter-bar` | Filter controls |
|
|
105
108
|
| List | `lc-list` | List display |
|
|
109
|
+
| Log Viewer | `lc-log-viewer` | Streaming log/terminal viewer with virtualization |
|
|
106
110
|
| Metric Card | `lc-metric-card` | KPI/metric display |
|
|
107
111
|
| Skeleton | `lc-skeleton` | Loading placeholder |
|
|
108
112
|
| Spinner | `lc-spinner` | Loading indicator |
|
|
@@ -115,14 +119,22 @@ export class MyComponent {}
|
|
|
115
119
|
| Component | Selector | Description |
|
|
116
120
|
|-----------|----------|-------------|
|
|
117
121
|
| Alert | `lc-alert` | Inline alert message |
|
|
122
|
+
| Confirm Dialog | `lc-confirm-dialog` | Confirmation dialog with text-match support |
|
|
118
123
|
| Error Display | `lc-error-display` | Error state display |
|
|
119
124
|
| Modal | `lc-modal` | Dialog/modal window |
|
|
120
125
|
| Toast | `lc-toast` | Notification toast |
|
|
121
126
|
| Tooltip | `lcTooltip` | Tooltip directive |
|
|
122
127
|
|
|
128
|
+
### Services
|
|
129
|
+
|
|
130
|
+
| Service | Description |
|
|
131
|
+
|---------|-------------|
|
|
132
|
+
| `ConfirmService` | Imperative confirm/destructive/warning dialogs returning `Promise<boolean>` |
|
|
133
|
+
| `ThemeService` | Toggle light/dark theme |
|
|
134
|
+
|
|
123
135
|
## Theming
|
|
124
136
|
|
|
125
|
-
The library supports light and dark themes
|
|
137
|
+
The library supports light and dark themes:
|
|
126
138
|
|
|
127
139
|
```typescript
|
|
128
140
|
import { ThemeService } from '@life-cockpit/angular-ui-kit';
|
|
@@ -137,6 +149,38 @@ export class AppComponent {
|
|
|
137
149
|
}
|
|
138
150
|
```
|
|
139
151
|
|
|
152
|
+
## Chat with Rich Content
|
|
153
|
+
|
|
154
|
+
The Chat component supports custom message templates for embedding any component inside chat bubbles:
|
|
155
|
+
|
|
156
|
+
```typescript
|
|
157
|
+
import { ChatComponent, ChatMessage, DiffViewerComponent } from '@life-cockpit/angular-ui-kit';
|
|
158
|
+
|
|
159
|
+
@Component({
|
|
160
|
+
imports: [ChatComponent, DiffViewerComponent],
|
|
161
|
+
template: `
|
|
162
|
+
<lc-chat [messages]="messages" title="Spec Author">
|
|
163
|
+
<ng-template #messageTemplate let-msg>
|
|
164
|
+
{{ msg.content }}
|
|
165
|
+
@if (msg.data?.diff) {
|
|
166
|
+
<lc-diff-viewer
|
|
167
|
+
[oldText]="msg.data.oldText"
|
|
168
|
+
[newText]="msg.data.newText"
|
|
169
|
+
mode="inline"
|
|
170
|
+
/>
|
|
171
|
+
}
|
|
172
|
+
</ng-template>
|
|
173
|
+
</lc-chat>
|
|
174
|
+
`,
|
|
175
|
+
})
|
|
176
|
+
export class SpecAuthorComponent {
|
|
177
|
+
messages: ChatMessage[] = [
|
|
178
|
+
{ id: '1', role: 'agent', content: 'Ziel ausgefüllt:', name: 'Agent',
|
|
179
|
+
data: { diff: true, oldText: '## Ziel\n\n_TBD_', newText: '## Ziel\n\nOnboarding-Plattform' } },
|
|
180
|
+
];
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
140
184
|
## Design Tokens
|
|
141
185
|
|
|
142
186
|
Design tokens for colors, spacing, typography, elevation, and more are available as TypeScript constants:
|