@solercia/ui 0.7.0 → 0.7.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.
- package/CHANGELOG.md +526 -523
- package/README.md +1187 -114
- package/llms.txt +37 -0
- package/package.json +15 -3
package/README.md
CHANGED
|
@@ -1,49 +1,172 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
- [`
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- [
|
|
36
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/solercia-solutions/solercia-ui/main/.github/assets/solercia-mark.svg" alt="Solercia" width="48" height="92">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">@solercia/ui</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
Themeable, host-agnostic Angular 22 design system: 57 standalone components and directives,
|
|
9
|
+
multi-tenant theming through <code>--sol-*</code> tokens, a pluggable i18n contract and
|
|
10
|
+
<code>ng add</code> scaffolding for Feature-Sliced Design projects.
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="https://www.npmjs.com/package/@solercia/ui"><img src="https://img.shields.io/npm/v/@solercia/ui?color=10c1d6" alt="npm version"></a>
|
|
15
|
+
<a href="https://github.com/solercia-solutions/solercia-ui/actions/workflows/ci.yml"><img src="https://github.com/solercia-solutions/solercia-ui/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
16
|
+
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-45fdae" alt="License: Apache-2.0"></a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Highlights
|
|
22
|
+
|
|
23
|
+
- **Modern Angular only.** Standalone, `OnPush`, signal inputs and outputs. Zoneless-ready: no zone.js required.
|
|
24
|
+
- **Theme by data, not by code.** A tenant theme is a JSON `ThemeFile`; the library resolves it into
|
|
25
|
+
about 96 `--sol-*` CSS custom properties, with light and dark modes, favicon and Google Fonts.
|
|
26
|
+
- **Host-agnostic.** Theming and i18n are injected through small ports (`THEME_SOURCE`,
|
|
27
|
+
`SOL_TENANT_RESOLVER`, `SOL_I18N`). The library never calls your API or assumes an i18n engine.
|
|
28
|
+
- **Works with zero wiring.** Without any provider it renders on the bundled «Vértice» theme.
|
|
29
|
+
- **Architecture included.** `ng add @solercia/ui` scaffolds FSD layers, path aliases, theme and i18n
|
|
30
|
+
adapters, [`@solercia/eslint-config`](https://github.com/solercia-solutions/eslint-config), Husky and commitlint.
|
|
31
|
+
- **Live showcase.** Every component is demoed in [`projects/showcase`](./projects/showcase) — run `npm start`.
|
|
32
|
+
|
|
33
|
+
## Contents
|
|
34
|
+
|
|
35
|
+
- [Installation](#installation)
|
|
36
|
+
- [Quick start](#quick-start)
|
|
37
|
+
- [Theming and i18n](#theming-and-i18n)
|
|
38
|
+
- [Components at a glance](#components-at-a-glance)
|
|
39
|
+
- [Component reference](#component-reference)
|
|
40
|
+
- [Showcase](#showcase)
|
|
41
|
+
- [For AI coding agents](#for-ai-coding-agents)
|
|
42
|
+
- [Development](#development)
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
ng add @solercia/ui
|
|
48
|
+
# or, without scaffolding
|
|
49
|
+
npm install @solercia/ui @angular/cdk chart.js @dagrejs/dagre
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
| Peer dependency | Version | Used by |
|
|
53
|
+
| --- | --- | --- |
|
|
54
|
+
| `@angular/core`, `@angular/common`, `@angular/forms` | `^22.0.0` | everything |
|
|
55
|
+
| `@angular/cdk` | `^22.0.0` | kanban drag and drop |
|
|
56
|
+
| `rxjs` | `^7.8.0` | |
|
|
57
|
+
| `chart.js` | `^4.5.1` | `sol-chart` |
|
|
58
|
+
| `@dagrejs/dagre` | `^3.0.0` | `sol-flow-canvas` auto-layout (lazy chunk) |
|
|
59
|
+
|
|
60
|
+
## Quick start
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import { ApplicationConfig, provideZonelessChangeDetection } from '@angular/core';
|
|
64
|
+
import { provideRouter } from '@angular/router';
|
|
65
|
+
import { SOL_I18N, SOL_TENANT_RESOLVER, THEME_SOURCE, provideTheme } from '@solercia/ui';
|
|
66
|
+
import { routes } from './app.routes';
|
|
67
|
+
import { AppThemeSource, AppTenantResolver } from './shared/tokens';
|
|
68
|
+
import { I18nService } from './shared/i18n';
|
|
69
|
+
|
|
70
|
+
export const appConfig: ApplicationConfig = {
|
|
71
|
+
providers: [
|
|
72
|
+
provideZonelessChangeDetection(),
|
|
73
|
+
provideRouter(routes),
|
|
74
|
+
provideTheme(),
|
|
75
|
+
{ provide: THEME_SOURCE, useExisting: AppThemeSource }, // optional
|
|
76
|
+
{ provide: SOL_TENANT_RESOLVER, useExisting: AppTenantResolver }, // optional (multi-tenant)
|
|
77
|
+
{ provide: SOL_I18N, useExisting: I18nService }, // optional (identity by default)
|
|
78
|
+
],
|
|
79
|
+
};
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
// Light/dark toggle anywhere
|
|
84
|
+
readonly theme = inject(ThemeService);
|
|
85
|
+
// template: <sol-icon-button [icon]="theme.isDark() ? 'sun' : 'moon'" ariaLabel="Toggle theme" (clicked)="theme.toggleMode()" />
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
```css
|
|
89
|
+
/* styles.css — the snippet ng add appends */
|
|
90
|
+
body {
|
|
91
|
+
background: var(--sol-bg-page);
|
|
92
|
+
color: var(--sol-color-text-primary);
|
|
93
|
+
font-family: var(--sol-font-family);
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
A complete reference integration (with a JSON-catalog `SolI18n` engine for English and es-CO) lives in
|
|
98
|
+
`projects/showcase/src/app/app.config.ts` and `projects/showcase/src/app/i18n/showcase-i18n.service.ts`.
|
|
99
|
+
|
|
100
|
+
### What `ng add @solercia/ui` does
|
|
101
|
+
|
|
102
|
+
Options: `--project` (defaults to the workspace application), `--skip-install`. It:
|
|
103
|
+
|
|
104
|
+
1. Creates FSD layer stubs `src/{pages,widgets,features,entities}/index.ts`.
|
|
105
|
+
2. Scaffolds `src/shared/tokens/app-theme-source.ts` (`AppThemeSource`, returns `null`),
|
|
106
|
+
`app-tenant-resolver.ts` (`AppTenantResolver`, returns `null`) and `index.ts`.
|
|
107
|
+
3. Scaffolds `src/shared/i18n/i18n.service.ts` (`I18nService implements SolI18n`, identity) and `index.ts`.
|
|
108
|
+
4. Adds tsconfig path aliases `@app/*`, `@pages/*`, `@widgets/*`, `@features/*`, `@entities/*`, `@shared/*`.
|
|
109
|
+
5. Appends the `/* @solercia/ui — tokens base */` body snippet to `src/styles.css|scss` (idempotent).
|
|
110
|
+
6. Adds `provideTheme()` to the root providers (`app.config.ts`).
|
|
111
|
+
7. Creates `eslint.config.{js,mjs}` extending `@solercia/eslint-config` (FSD boundaries, smart/dumb rule,
|
|
112
|
+
Chart.js restriction) unless one exists.
|
|
113
|
+
8. Scaffolds Husky (`.husky/pre-commit` → `npx lint-staged`, `.husky/commit-msg` → commitlint),
|
|
114
|
+
`commitlint.config.*`, `lint-staged.config.*` and a `prepare: "husky"` script.
|
|
115
|
+
9. Adds dev dependencies `@solercia/eslint-config`, `husky`, `lint-staged`, `@commitlint/cli`,
|
|
116
|
+
`@commitlint/config-conventional` and installs them (unless `--skip-install`).
|
|
117
|
+
|
|
118
|
+
It does **not** wire `THEME_SOURCE`/`SOL_I18N` providers automatically; the scaffolded adapters say how.
|
|
119
|
+
|
|
120
|
+
### Providers, tokens and services
|
|
121
|
+
|
|
122
|
+
| Symbol | Kind | Purpose |
|
|
123
|
+
|---|---|---|
|
|
124
|
+
| `provideTheme()` | `EnvironmentProviders` | App initializer that instantiates `ThemeService` so the theme is applied before first render. |
|
|
125
|
+
| `ThemeService` | service (`providedIn: 'root'`) | Resolves the active `ThemeFile` into ~96 `--sol-*` CSS variables on `:root`; light/dark; favicon; Google Fonts. API: `activeTheme()`, `isDark()`, `logo()`, `brandName()`, `tenantFavicon()` (signals), `setDarkMode(dark)`, `toggleMode()`, `setTenantTheme(theme \| null)`. The user’s mode choice persists in `localStorage`. |
|
|
126
|
+
| `THEME_SOURCE` | `InjectionToken<ThemeSource>` | Host port: `loadTheme(tenantId): Promise<ThemeFile \| null>`. Default returns `null`. |
|
|
127
|
+
| `SOL_TENANT_RESOLVER` | `InjectionToken<SolTenantResolver>` (optional) | Host port: `activeTenantId(): number \| null`. When provided, `ThemeService` reloads the tenant theme whenever it changes. |
|
|
128
|
+
| `SOL_DEFAULT_THEME` | `InjectionToken<ThemeFile>` | Fallback theme; defaults to `SOL_BUNDLED_DEFAULT_THEME` (“Vértice”). Degradation: tenant theme → default theme → inline `:root` CSS. |
|
|
129
|
+
| `SOL_I18N` | `InjectionToken<SolI18n>` | Host i18n engine: `activeLang: Signal<string>`, `translate(key, params?)`, `t(key, params?): Signal<string>`, `tMany(keys)`. Default is an identity engine (returns the key). The library ships `projects/solercia/ui/i18n/es-CO.json` (keys under `shared.*`), **not** an English catalog and not inside the npm package. |
|
|
130
|
+
| `SOL_CHART_ENGINE` | `InjectionToken<SolChartEngineFactory>` | Chart.js factory used by `sol-chart`; override only to swap or mock the engine. |
|
|
131
|
+
| `SOL_CALENDAR_COLOR` | `InjectionToken<SolCalendarColorStrategy>` | Calendar event color strategy (`resolve(event, isDark): { bg, border, text }`). Default derives from `event.color` with `color-mix()` over tokens. |
|
|
132
|
+
| `KanbanReorderService` | service | Pure reorder helper: `reorder(columns, rawDropEvent) → { columns, moved } \| null`. Used by the board; reusable by hosts. |
|
|
133
|
+
| Helpers | functions/consts | `resolveCssVars`, `isRenderableTheme`, `isSafeBackgroundImage`, `buildGoogleFontsUrl`, `EMIT_TABLE`, `sanitizeAssetUrl`, `SOL_TABLE_VARIANTS`, `computeInitials`, `hashToPaletteIndex`, `normalizeRating`, `resolveScoreTone`, `DEFAULT_SCORE_THRESHOLDS`, `resolveTrendDirection`, `defaultTrendFormat`, timeline (`computeGlobalRange`, `positionRows`, `collectUndatedNodes`, `computeMonthAxisTicks`, `defaultStatusToken`), calendar (`buildDayColumns`, `computeEventTop`, `computeEventHeight`, `computeNowTop`, `dayKey`, `getWeekStart`, `parseEventDate`, `isSafeCssColor`, `NEUTRAL_CALENDAR_COLOR`), `computeAutoLayoutPositions` (flow canvas, dagre), `KANBAN_ADD_ACTION`, `SOL_TREE_MAX_DEPTH` (5), rich-editor serializer (`serializeElementToTcpdfHtml`, `sanitizeHtmlToTcpdf`, `TCPDF_ALLOWED_TAGS`, `TCPDF_ALLOWED_STYLE_PROPERTIES`). |
|
|
134
|
+
|
|
135
|
+
Peer dependencies: `@angular/{core,common,forms}` ^22, `@angular/cdk` ^22 (kanban drag and drop),
|
|
136
|
+
`rxjs` ^7.8, `chart.js` ^4.5.1 (`sol-chart`), `@dagrejs/dagre` ^3 (flow-canvas auto-layout, lazy chunk).
|
|
137
|
+
No zone.js required: the library works with `provideZonelessChangeDetection()` (Angular 22 default).
|
|
138
|
+
|
|
139
|
+
## Theming and i18n
|
|
140
|
+
|
|
141
|
+
- **Theming.** The host implements two optional ports: `SOL_TENANT_RESOLVER` (who the active tenant is)
|
|
142
|
+
and `THEME_SOURCE` (how to load its `ThemeFile`). Degradation, best to worst: tenant theme from
|
|
143
|
+
`THEME_SOURCE` → `SOL_DEFAULT_THEME` (bundled «Vértice») → inline `:root` CSS in the host's `styles.css`.
|
|
144
|
+
- **i18n.** `SOL_I18N` is a `SolI18n` contract (`t`, `translate`, `activeLang`, `tMany`) with an identity
|
|
145
|
+
default that returns the key, mirroring Angular Material's `*Intl` services. Bind Transloco,
|
|
146
|
+
ngx-translate or your own engine. The repository ships a Colombian Spanish catalog
|
|
147
|
+
([`projects/solercia/ui/i18n/es-CO.json`](./projects/solercia/ui/i18n/es-CO.json)) and the showcase
|
|
148
|
+
ships an English one ([`projects/showcase/src/app/i18n/en.json`](./projects/showcase/src/app/i18n/en.json)).
|
|
149
|
+
- **Hard-coded defaults.** A few inputs default to Spanish text (`searchPlaceholder`, `actionsLabel`,
|
|
150
|
+
`confirmLabel`, file upload `label`/`hint`). Set them explicitly in other languages.
|
|
151
|
+
|
|
152
|
+
In-depth guides:
|
|
153
|
+
|
|
154
|
+
| Guide | Covers |
|
|
155
|
+
| --- | --- |
|
|
156
|
+
| [`THEMING.md`](./projects/solercia/ui/docs/THEMING.md) | Ports, the full `ThemeFile` contract, degradation levels, implementing a `ThemeSource` |
|
|
157
|
+
| [`I18N.md`](./projects/solercia/ui/docs/I18N.md) | The `SOL_I18N` contract and engine adapters |
|
|
158
|
+
| [`THEME-STUDIO.md`](./projects/solercia/ui/docs/THEME-STUDIO.md) | `@solercia/ui/theme-studio`: `<sol-theme-studio>`, the `ThemeStudioStore` contract |
|
|
159
|
+
| [`MULTITENANT_SETUP.md`](./projects/solercia/ui/docs/MULTITENANT_SETUP.md) | Step-by-step wiring for new and existing projects |
|
|
37
160
|
|
|
38
161
|
### Themed sign-in (`@solercia/ui/login-appearance`)
|
|
39
162
|
|
|
40
|
-
|
|
41
|
-
|
|
163
|
+
A theme can carry a `meta.login` block (photos, motion, per-mode composition and caption). The entry
|
|
164
|
+
point paints it and ships no auth logic: the host projects its own form.
|
|
42
165
|
|
|
43
166
|
```ts
|
|
44
167
|
import { SolLoginFrameComponent, resolveLoginView } from '@solercia/ui/login-appearance';
|
|
45
168
|
|
|
46
|
-
//
|
|
169
|
+
// `null` (no photos anywhere) keeps the classic centered card.
|
|
47
170
|
readonly view = computed(() => {
|
|
48
171
|
const meta = this.themeService.activeTheme()?.meta as { login?: unknown } | undefined;
|
|
49
172
|
return resolveLoginView({ published: null, theme: meta?.login }, this.themeService.isDark());
|
|
@@ -52,120 +175,1070 @@ readonly view = computed(() => {
|
|
|
52
175
|
|
|
53
176
|
```html
|
|
54
177
|
<sol-login-frame [view]="view()" [tagline]="tagline()" [logo]="logo()" [dark]="isDark()">
|
|
55
|
-
<h1
|
|
178
|
+
<h1>Sign in</h1>
|
|
56
179
|
<app-login-form />
|
|
57
180
|
</sol-login-frame>
|
|
58
181
|
```
|
|
59
182
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
- `<sol-theme-studio [features]="{ loginAppearance: true }">` adds the «Inicio de sesión» tab with
|
|
64
|
-
`<sol-login-appearance-editor>`; photos upload through `ThemeStudioStore.uploadLogo` and the block
|
|
65
|
-
is saved with «Aplicar tema».
|
|
66
|
-
- Texts live under `sol.loginAppearance.*` (defaults in Colombian Spanish and English).
|
|
183
|
+
`normalizeLogin` bounds every value; photos must be `https://`, root-relative or `assets/` URLs of PNG,
|
|
184
|
+
JPEG, WebP or AVIF images. `<sol-theme-studio [features]="{ loginAppearance: true }">` adds the sign-in
|
|
185
|
+
tab with `<sol-login-appearance-editor>`.
|
|
67
186
|
|
|
68
|
-
##
|
|
187
|
+
## Components at a glance
|
|
69
188
|
|
|
70
|
-
|
|
189
|
+
All symbols are imported from `'@solercia/ui'` and added to the standalone component's `imports`.
|
|
190
|
+
**Req** marks a required input; **CVA** means the component implements `ControlValueAccessor`
|
|
191
|
+
(`[(ngModel)]`, `formControlName`).
|
|
71
192
|
|
|
72
|
-
|
|
73
|
-
|
|
193
|
+
| Category | Selector | Purpose |
|
|
194
|
+
| --- | --- | --- |
|
|
195
|
+
| Actions | `sol-button` | Text button with variants, sizes and a loading state. |
|
|
196
|
+
| Actions | `sol-icon-button` | Icon-only button; `ariaLabel` is mandatory. |
|
|
197
|
+
| Actions | `sol-icon` | Inline SVG from the built-in registry (~140 names: `home`, `menu`, `edit`, `trash`, `calendar`, `bell`, `sun`, `moon`, …; full list in the showcase *Icon* page). |
|
|
198
|
+
| Forms | `sol-input` | Text input with label and error message (CVA, `string`). |
|
|
199
|
+
| Forms | `sol-textarea` | Multi-line text input with label and error message (CVA, `string`). |
|
|
200
|
+
| Forms | `sol-form-field` | Label/hint/error wrapper for any projected control. |
|
|
201
|
+
| Forms | `sol-search-input` | Search box that emits the typed query. |
|
|
202
|
+
| Forms | `sol-number-input` | Stepper input with − / + buttons. |
|
|
203
|
+
| Forms | `sol-select` | Searchable single/multi select; bottom sheet below `mobileBreakpoint`. |
|
|
204
|
+
| Forms | `sol-checkbox` | Checkbox with sizes, colors, shapes and an optional link (CVA, `boolean`). |
|
|
205
|
+
| Forms | `sol-toggle` | On/off switch (CVA, `boolean`). |
|
|
206
|
+
| Forms | `sol-chip` | Single filter/choice chip. |
|
|
207
|
+
| Forms | `sol-chip-group` | Single or multiple choice as chips (CVA). |
|
|
208
|
+
| Forms | `sol-view-toggle` | Segmented control. |
|
|
209
|
+
| Forms | `sol-date-picker` | Calendar popover with day/month/year views. |
|
|
210
|
+
| Forms | `sol-day-picker` | Horizontal strip of bookable days computed by the host. |
|
|
211
|
+
| Forms | `sol-rating-input` | Interactive radiogroup of stars. |
|
|
212
|
+
| Forms | `sol-file-upload` | Drag-and-drop image picker with validation and preview. |
|
|
213
|
+
| Forms | `sol-rich-editor` | Rich text editor (headings, lists, alignment, links, tables, images, @mentions, #task links); output HTML is TCPDF-safe. |
|
|
214
|
+
| Feedback & status | `sol-badge` | Small status or count label with tones. |
|
|
215
|
+
| Feedback & status | `sol-message-status` | Delivery ticks with an accessible label. |
|
|
216
|
+
| Feedback & status | `sol-score-badge` | Numeric score colored by thresholds. |
|
|
217
|
+
| Feedback & status | `sol-trend` | Up/down/flat variation indicator. |
|
|
218
|
+
| Feedback & status | `sol-avatar` | Image or initials on a deterministic palette color. |
|
|
219
|
+
| Feedback & status | `sol-star-rating` | Read-only stars (`role="img"`). |
|
|
220
|
+
| Feedback & status | `sol-spinner` | Indeterminate loading indicator. |
|
|
221
|
+
| Feedback & status | `sol-skeleton` | Placeholder shapes while content loads. |
|
|
222
|
+
| Feedback & status | `sol-progress-bar` | Continuous or segmented progress with tones. |
|
|
223
|
+
| Feedback & status | `sol-empty-state` | Empty or no-results message with an optional action. |
|
|
224
|
+
| Feedback & status | `sol-tooltip` | Hover/focus hint for any element. |
|
|
225
|
+
| Feedback & status | `sol-notification-panel` | Inbox with loading / error / empty / content states, relative times and unread count. |
|
|
226
|
+
| Overlays | `sol-modal` | Host-controlled modal; Escape closes, focus trapped, body scroll locked. |
|
|
227
|
+
| Overlays | `sol-drawer` | Side panel or bottom sheet with a footer slot. |
|
|
228
|
+
| Overlays | `sol-confirm-dialog` | Confirm/cancel dialog for destructive actions. |
|
|
229
|
+
| Navigation | `sol-tabs` | Tab list only; the host renders the active panel. |
|
|
230
|
+
| Navigation | `sol-pagination` | Page navigation with page-size options. |
|
|
231
|
+
| Navigation | `sol-page-header` | Page title, subtitle and projected actions. |
|
|
232
|
+
| Navigation | `sol-stepper` | Progress through ordered steps. |
|
|
233
|
+
| Navigation | `sol-wizard` | Wizard = segmented progress bar + stepper pills + one panel per `*solWizardStep` + Back/Next/Finish footer. |
|
|
234
|
+
| Navigation | `sol-scope-switcher` | Menu to switch the active organization / workspace / tenant. |
|
|
235
|
+
| Navigation | `sol-tree` | Accessible tree (role `tree`), keyboard navigation, max depth 5. |
|
|
236
|
+
| Layout & motion | `sol-card` | Surface container with optional padding and hover elevation. |
|
|
237
|
+
| Layout & motion | `[solReveal]` | Entrance animation from the theme motion tokens; respects reduced motion. |
|
|
238
|
+
| Data | `sol-data-table` | Sorting, per-column filters, global search, pagination, edit/delete actions, row reveal and a collapsed layout below `collapseWidth`. |
|
|
239
|
+
| Data | `sol-virtual-scroll` | Windowed list with variable heights; chat-oriented (follows output, loads history at top). Requires an `<ng-template>` child (context `$implicit`, `index`) and a sized container. |
|
|
240
|
+
| Data | `sol-chart` | Chart.js wrapper themed from `--sol-*`; re-renders on light/dark. |
|
|
241
|
+
| Data | `sol-timeline` | Gantt-like hierarchy on a month axis; undated nodes listed apart. |
|
|
242
|
+
| Planning | `sol-kanban-board` | Columns with CDK drag and drop (mouse, touch, keyboard “Move to…”), optimistic mirror and `rollback()`. |
|
|
243
|
+
| Planning | `sol-kanban-column` | One column (normally rendered by the board). |
|
|
244
|
+
| Planning | `sol-kanban-card` | Draggable card rendered from a consumer template. |
|
|
245
|
+
| Planning | `sol-kanban-drag-source` | External list whose items can be dropped into a board’s columns (board emits `externalItemDropped`). |
|
|
246
|
+
| Planning | `sol-calendar` | Week/day agenda = header + grid + optional legend. |
|
|
247
|
+
| Planning | `sol-calendar-header` | Calendar toolbar: period, navigation and view switch. |
|
|
248
|
+
| Planning | `sol-calendar-grid` | Same inputs/outputs as `sol-calendar` minus `legend`. |
|
|
249
|
+
| Planning | `sol-flow-canvas` | Pan/zoom node graph: drag nodes, connect ports, keyboard moves with live announcements, “Arrange” auto-layout (dagre, lazy). |
|
|
250
|
+
|
|
251
|
+
## Component reference
|
|
252
|
+
|
|
253
|
+
### Actions
|
|
254
|
+
|
|
255
|
+
#### `sol-button` — `SolButtonComponent`
|
|
256
|
+
Text button with variants, sizes and a loading state.
|
|
257
|
+
|
|
258
|
+
| Input | Type | Default | Req |
|
|
259
|
+
|---|---|---|---|
|
|
260
|
+
| `variant` | `'primary' \| 'secondary' \| 'danger' \| 'ghost'` | `'primary'` | |
|
|
261
|
+
| `size` | `'sm' \| 'md' \| 'lg' \| 'touch'` | `'md'` | |
|
|
262
|
+
| `disabled` | `boolean` | `false` | |
|
|
263
|
+
| `type` | `string` | `'button'` | |
|
|
264
|
+
| `loading` | `boolean` | `false` | |
|
|
265
|
+
|
|
266
|
+
Outputs: `clicked: void`. Content: label (`<ng-content>`).
|
|
267
|
+
|
|
268
|
+
```html
|
|
269
|
+
<sol-button variant="danger" size="sm" [loading]="saving()" (clicked)="remove()">Delete</sol-button>
|
|
74
270
|
```
|
|
75
271
|
|
|
76
|
-
|
|
272
|
+
#### `sol-icon-button` — `SolIconButtonComponent`
|
|
273
|
+
Icon-only button; `ariaLabel` is mandatory.
|
|
77
274
|
|
|
78
|
-
|
|
79
|
-
|
|
275
|
+
| Input | Type | Default | Req |
|
|
276
|
+
|---|---|---|---|
|
|
277
|
+
| `icon` | `SolIconName` | — | yes |
|
|
278
|
+
| `ariaLabel` | `string` | — | yes |
|
|
279
|
+
| `type` | `'button' \| 'submit'` | `'button'` | |
|
|
280
|
+
| `variant` | `'default' \| 'danger' \| 'ghost' \| 'outline'` | `'default'` | |
|
|
281
|
+
| `size` | `'sm' \| 'md' \| 'lg' \| 'touch'` | `'md'` | |
|
|
282
|
+
| `disabled` | `boolean` | `false` | |
|
|
283
|
+
|
|
284
|
+
Outputs: `clicked: void`.
|
|
285
|
+
|
|
286
|
+
```html
|
|
287
|
+
<sol-icon-button icon="trash" variant="danger" ariaLabel="Delete project" (clicked)="remove()" />
|
|
80
288
|
```
|
|
81
289
|
|
|
82
|
-
|
|
290
|
+
#### `sol-icon` — `SolIconComponent`
|
|
291
|
+
Inline SVG from the built-in registry (~140 names: `home`, `menu`, `edit`, `trash`, `calendar`, `bell`, `sun`, `moon`, …; full list in the showcase *Icon* page).
|
|
83
292
|
|
|
84
|
-
|
|
293
|
+
| Input | Type | Default | Req |
|
|
294
|
+
|---|---|---|---|
|
|
295
|
+
| `name` | `SolIconName \| string` | — | yes |
|
|
296
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | |
|
|
297
|
+
| `variant` | `'outline' \| 'fill'` | `'outline'` | |
|
|
85
298
|
|
|
86
|
-
```
|
|
87
|
-
|
|
299
|
+
```html
|
|
300
|
+
<sol-icon name="star" size="lg" variant="fill" />
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
### Forms
|
|
306
|
+
|
|
307
|
+
#### `sol-input` — `SolInputComponent` (CVA, `string`)
|
|
308
|
+
| Input | Type | Default | Req |
|
|
309
|
+
|---|---|---|---|
|
|
310
|
+
| `type` | `string` | `'text'` | |
|
|
311
|
+
| `placeholder` | `string` | `''` | |
|
|
312
|
+
| `label` | `string` | `''` | |
|
|
313
|
+
| `error` | `string` | `''` | |
|
|
314
|
+
| `disabled` | `boolean` | `false` | |
|
|
315
|
+
| `autocomplete` | `string \| undefined` | `undefined` | |
|
|
316
|
+
| `min` | `string \| undefined` | `undefined` | |
|
|
317
|
+
|
|
318
|
+
```html
|
|
319
|
+
<sol-input label="Email" type="email" autocomplete="email" [(ngModel)]="email" [error]="emailError()" />
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
#### `sol-textarea` — `SolTextareaComponent` (CVA, `string`)
|
|
323
|
+
| Input | Type | Default | Req |
|
|
324
|
+
|---|---|---|---|
|
|
325
|
+
| `placeholder` | `string` | `''` | |
|
|
326
|
+
| `label` | `string` | `''` | |
|
|
327
|
+
| `error` | `string` | `''` | |
|
|
328
|
+
| `disabled` | `boolean` | `false` | |
|
|
329
|
+
| `rows` | `number` | `3` | |
|
|
330
|
+
|
|
331
|
+
```html
|
|
332
|
+
<sol-textarea label="Notes" [rows]="4" formControlName="notes" />
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
#### `sol-form-field` — `SolFormFieldComponent`
|
|
336
|
+
Label/hint/error wrapper for any projected control.
|
|
337
|
+
|
|
338
|
+
| Input | Type | Default | Req |
|
|
339
|
+
|---|---|---|---|
|
|
340
|
+
| `label` | `string` | `''` | |
|
|
341
|
+
| `error` | `string` | `''` | |
|
|
342
|
+
| `hint` | `string` | `''` | |
|
|
343
|
+
|
|
344
|
+
```html
|
|
345
|
+
<sol-form-field label="Website" hint="Include https://"><input formControlName="website" /></sol-form-field>
|
|
88
346
|
```
|
|
89
347
|
|
|
90
|
-
|
|
348
|
+
#### `sol-search-input` — `SolSearchInputComponent`
|
|
349
|
+
| Input | Type | Default | Req |
|
|
350
|
+
|---|---|---|---|
|
|
351
|
+
| `placeholder` | `string` | `'Buscar...'` | |
|
|
91
352
|
|
|
92
|
-
|
|
353
|
+
Outputs: `searchChange: string`. (Debounce behavior: not verified.)
|
|
93
354
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
(`npm view @solercia/ui versions`) — se publicaron **manualmente** (`npm publish` local,
|
|
98
|
-
usuario `camilocalderont`), no por el workflow de CI. El PROYECTO Angular se construye con
|
|
99
|
-
`ng build @solercia/ui` (NO `ng build ui`), que emite `dist/solercia/ui` (fesm2022 +
|
|
100
|
-
`index.d.ts` + schematics + `LICENSE` + `NOTICE`).
|
|
355
|
+
```html
|
|
356
|
+
<sol-search-input placeholder="Search projects…" (searchChange)="query.set($event)" />
|
|
357
|
+
```
|
|
101
358
|
|
|
102
|
-
|
|
359
|
+
#### `sol-number-input` — `SolNumberInputComponent` (CVA, `number \| null`)
|
|
360
|
+
Stepper input with − / + buttons.
|
|
103
361
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
362
|
+
| Input | Type | Default | Req |
|
|
363
|
+
|---|---|---|---|
|
|
364
|
+
| `min` | `number` | `0` | |
|
|
365
|
+
| `max` | `number` | `Number.MAX_SAFE_INTEGER` | |
|
|
366
|
+
| `step` | `number` | `1` | |
|
|
367
|
+
| `disabled` | `boolean` | `false` | |
|
|
368
|
+
| `ariaLabelKey` | `string` (i18n key) | — | yes |
|
|
369
|
+
| `decrementLabelKey` | `string` | `'shared.numberInput.decrement'` | |
|
|
370
|
+
| `incrementLabelKey` | `string` | `'shared.numberInput.increment'` | |
|
|
108
371
|
|
|
109
|
-
|
|
110
|
-
|
|
372
|
+
```html
|
|
373
|
+
<sol-number-input ariaLabelKey="pages.checkout.seats" [min]="1" [max]="20" [(ngModel)]="seats" />
|
|
374
|
+
```
|
|
111
375
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
npm publish --dry-run
|
|
115
|
-
```
|
|
376
|
+
#### `sol-select` — `SolSelectComponent` (CVA, `string`; `string[]` when `multiple`)
|
|
377
|
+
Searchable single/multi select; bottom sheet below `mobileBreakpoint`.
|
|
116
378
|
|
|
117
|
-
|
|
118
|
-
|
|
379
|
+
| Input | Type | Default | Req |
|
|
380
|
+
|---|---|---|---|
|
|
381
|
+
| `options` | `SolSelectOption[]` (`{ value: string; label: string }`) | `[]` | |
|
|
382
|
+
| `placeholder` | `string` | `'Selecciona...'` | |
|
|
383
|
+
| `label` | `string` | `''` | |
|
|
384
|
+
| `error` | `string` | `''` | |
|
|
385
|
+
| `disabled` | `boolean` | `false` | |
|
|
386
|
+
| `searchable` | `boolean` | `true` | |
|
|
387
|
+
| `multiple` | `boolean` | `false` | |
|
|
388
|
+
| `showAllOption` | `boolean` | `false` | |
|
|
389
|
+
| `allOptionLabel` | `string` | `'Todos'` | |
|
|
390
|
+
| `ariaLabel` | `string` | `''` | |
|
|
391
|
+
| `searchPlaceholder` | `string` | `'Buscar...'` | |
|
|
392
|
+
| `emptyLabel` | `string` | `'Sin resultados'` | |
|
|
393
|
+
| `value` | `string \| null \| undefined` | `undefined` | |
|
|
394
|
+
| `mobileBreakpoint` | `number` | `640` | |
|
|
119
395
|
|
|
120
|
-
|
|
121
|
-
# Versión ya bumpeada a 0.2.0 en projects/solercia/ui/package.json (PR6, T48).
|
|
122
|
-
git tag v0.2.0
|
|
123
|
-
git push origin v0.2.0 # dispara .github/workflows/publish-packages.yml (tag v*)
|
|
124
|
-
```
|
|
396
|
+
Outputs: `valueChange: string`.
|
|
125
397
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
debe:
|
|
398
|
+
```html
|
|
399
|
+
<sol-select label="Country" placeholder="Select a country" searchPlaceholder="Search…" emptyLabel="No results"
|
|
400
|
+
[options]="[{ value: 'co', label: 'Colombia' }, { value: 'mx', label: 'Mexico' }]" [(ngModel)]="country" />
|
|
401
|
+
```
|
|
131
402
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
403
|
+
#### `sol-checkbox` — `SolCheckboxComponent` (CVA, `boolean`)
|
|
404
|
+
| Input | Type | Default | Req |
|
|
405
|
+
|---|---|---|---|
|
|
406
|
+
| `label` | `string` | `''` | |
|
|
407
|
+
| `disabled` | `boolean` | `false` | |
|
|
408
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | |
|
|
409
|
+
| `color` | `'primary' \| 'secondary' \| 'success' \| 'danger' \| 'amber' \| 'teal' \| 'indigo' \| 'purple' \| 'pink'` | `'primary'` | |
|
|
410
|
+
| `shape` | `'rounded' \| 'square' \| 'circle'` | `'rounded'` | |
|
|
411
|
+
| `ripple` | `boolean` | `true` | |
|
|
412
|
+
| `icon` | `'check' \| 'minus' \| 'heart' \| 'star'` | `'check'` | |
|
|
413
|
+
| `linkText` | `string` | `''` | |
|
|
414
|
+
| `linkHref` | `string` | `''` | |
|
|
142
415
|
|
|
143
|
-
|
|
144
|
-
ver `openspec/11-a-solercia-ui/`) pueden volver a un rango semver normal
|
|
145
|
-
(`"@solercia/ui": "^0.2.0"`) contra el registro público, en vez de `file:./vendor/*.tgz`.
|
|
416
|
+
Outputs: `changed: boolean`.
|
|
146
417
|
|
|
147
|
-
|
|
418
|
+
```html
|
|
419
|
+
<sol-checkbox label="I accept the" linkText="terms" linkHref="/terms" formControlName="terms" />
|
|
420
|
+
```
|
|
148
421
|
|
|
149
|
-
`
|
|
422
|
+
#### `sol-toggle` — `SolToggleComponent` (CVA, `boolean`)
|
|
423
|
+
| Input | Type | Default | Req |
|
|
424
|
+
|---|---|---|---|
|
|
425
|
+
| `label` | `string` | `''` | |
|
|
426
|
+
| `ariaLabel` | `string` | `''` | |
|
|
427
|
+
| `disabled` | `boolean` | `false` | |
|
|
428
|
+
| `size` | `'sm' \| 'md'` | `'md'` | |
|
|
429
|
+
| `onText` | `string \| undefined` | `undefined` | |
|
|
430
|
+
| `offText` | `string \| undefined` | `undefined` | |
|
|
150
431
|
|
|
151
|
-
|
|
432
|
+
```html
|
|
433
|
+
<sol-toggle label="Email alerts" [(ngModel)]="alerts" />
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
#### `sol-chip` — `SolChipComponent`
|
|
437
|
+
Single filter/choice chip.
|
|
438
|
+
|
|
439
|
+
| Input | Type | Default | Req |
|
|
440
|
+
|---|---|---|---|
|
|
441
|
+
| `value` | `string` | — | yes |
|
|
442
|
+
| `label` | `string` | — | yes |
|
|
443
|
+
| `emoji` | `string` | `''` | |
|
|
444
|
+
| `count` | `number \| null` | `null` | |
|
|
445
|
+
| `selected` | `boolean` | `false` | |
|
|
446
|
+
| `disabled` | `boolean` | `false` | |
|
|
447
|
+
| `size` | `'sm' \| 'md'` | `'md'` | |
|
|
448
|
+
| `removable` | `boolean` | `false` | |
|
|
449
|
+
| `role` | `'button' \| 'radio' \| 'checkbox'` | `'button'` | |
|
|
450
|
+
| `tabIndex` | `number` | `0` | |
|
|
451
|
+
| `removeLabelKey` | `string` | `'shared.chip.remove'` | |
|
|
452
|
+
|
|
453
|
+
Outputs: `toggled: string`, `removed: string` (both emit `value`).
|
|
454
|
+
|
|
455
|
+
```html
|
|
456
|
+
<sol-chip value="urgent" label="Urgent" emoji="🔥" [count]="3" [selected]="urgent()" (toggled)="toggle($event)" />
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
#### `sol-chip-group` — `SolChipGroupComponent` (CVA, `string` or `string[]` when `multiple`)
|
|
460
|
+
| Input | Type | Default | Req |
|
|
461
|
+
|---|---|---|---|
|
|
462
|
+
| `options` | `SolChipOption[]` (`{ value, label, emoji?, disabled?, count? }`) | — | yes |
|
|
463
|
+
| `multiple` | `boolean` | `false` | |
|
|
464
|
+
| `allowDeselect` | `boolean` | `true` | |
|
|
465
|
+
| `disabled` | `boolean` | `false` | |
|
|
466
|
+
| `size` | `'sm' \| 'md'` | `'md'` | |
|
|
467
|
+
| `removable` | `boolean` | `false` | |
|
|
468
|
+
| `ariaLabelKey` | `string` (i18n key) | — | yes |
|
|
469
|
+
| `removeLabelKey` | `string` | `'shared.chip.remove'` | |
|
|
470
|
+
|
|
471
|
+
```html
|
|
472
|
+
<sol-chip-group ariaLabelKey="pages.projects.categories" [options]="categories" [multiple]="true" [(ngModel)]="selected" />
|
|
473
|
+
```
|
|
152
474
|
|
|
153
|
-
|
|
475
|
+
#### `sol-view-toggle` — `SolViewToggleComponent`
|
|
476
|
+
Segmented control.
|
|
477
|
+
|
|
478
|
+
| Input | Type | Default | Req |
|
|
479
|
+
|---|---|---|---|
|
|
480
|
+
| `options` | `SolViewToggleOption[]` (`{ value, label, icon?: SolIconName }`) | — | yes |
|
|
481
|
+
| `value` | `string` | — | yes |
|
|
482
|
+
|
|
483
|
+
Outputs: `valueChange: string`.
|
|
484
|
+
|
|
485
|
+
```html
|
|
486
|
+
<sol-view-toggle [options]="[{ value: 'list', label: 'List', icon: 'list' }, { value: 'board', label: 'Board', icon: 'view-columns' }]"
|
|
487
|
+
[value]="view()" (valueChange)="view.set($event)" />
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
#### `sol-date-picker` — `SolDatePickerComponent` (CVA, `Date \| string \| null`; emits ISO `yyyy-mm-dd`)
|
|
491
|
+
Calendar popover with day/month/year views.
|
|
492
|
+
|
|
493
|
+
| Input | Type | Default | Req |
|
|
494
|
+
|---|---|---|---|
|
|
495
|
+
| `value` | `Date \| string \| null` | `null` (assumed) | |
|
|
496
|
+
| `min` | `Date \| string \| null` | `null` (assumed) | |
|
|
497
|
+
| `max` | `Date \| string \| null` | `null` (assumed) | |
|
|
498
|
+
| `placeholder` | `string` | `''` (falls back to `shared.datePicker.placeholder`) | |
|
|
499
|
+
| `disabled` | `boolean` | `false` | |
|
|
500
|
+
| `size` | `'sm' \| 'md'` | `'md'` | |
|
|
501
|
+
|
|
502
|
+
Outputs: `valueChange: string`.
|
|
503
|
+
|
|
504
|
+
```html
|
|
505
|
+
<sol-date-picker min="2026-11-24" max="2026-12-24" formControlName="dueDate" />
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
#### `sol-day-picker` — `SolDayPickerComponent`
|
|
509
|
+
Horizontal strip of bookable days computed by the host.
|
|
510
|
+
|
|
511
|
+
| Input | Type | Default | Req |
|
|
512
|
+
|---|---|---|---|
|
|
513
|
+
| `days` | `DayPickerItem[]` (`{ dateStr, dayName, dayNumber, isToday?, isPast }`) | — | yes |
|
|
514
|
+
| `selectedDate` | `string \| null` | `null` | |
|
|
515
|
+
|
|
516
|
+
Outputs: `dateSelected: string`.
|
|
517
|
+
|
|
518
|
+
```html
|
|
519
|
+
<sol-day-picker [days]="days()" [selectedDate]="date()" (dateSelected)="date.set($event)" />
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
#### `sol-rating-input` — `SolRatingInputComponent` (CVA, `number \| null`, 1–5)
|
|
523
|
+
Interactive radiogroup of stars.
|
|
524
|
+
|
|
525
|
+
| Input | Type | Default | Req |
|
|
526
|
+
|---|---|---|---|
|
|
527
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'lg'` | |
|
|
528
|
+
| `disabled` | `boolean` | `false` | |
|
|
529
|
+
| `readOnly` | `boolean` | `false` | |
|
|
530
|
+
| `error` | `string` | `''` | |
|
|
531
|
+
| `allowClear` | `boolean` | `false` | |
|
|
532
|
+
| `ariaLabelKey` | `string` | `'shared.ratingInput.groupLabel'` | |
|
|
533
|
+
| `optionLabelKey` | `string` | `'shared.ratingInput.option'` | |
|
|
534
|
+
| `clearLabelKey` | `string` | `'shared.ratingInput.clear'` | |
|
|
535
|
+
|
|
536
|
+
Outputs: `ratingChanged: number \| null`.
|
|
537
|
+
|
|
538
|
+
```html
|
|
539
|
+
<sol-rating-input formControlName="rating" [allowClear]="true" (ratingChanged)="save($event)" />
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
#### `sol-file-upload` — `SolFileUploadComponent`
|
|
543
|
+
Drag-and-drop image picker with validation and preview.
|
|
544
|
+
|
|
545
|
+
| Input | Type | Default | Req |
|
|
546
|
+
|---|---|---|---|
|
|
547
|
+
| `accept` | `string` | `'image/jpeg,image/png,image/webp,image/gif'` | |
|
|
548
|
+
| `maxSizeBytes` | `number` | `5 * 1024 * 1024` | |
|
|
549
|
+
| `label` | `string` | `'Arrastra o haz clic para subir'` | |
|
|
550
|
+
| `hint` | `string` | `'JPG, PNG, WEBP o GIF · máx. 5 MB'` | |
|
|
551
|
+
|
|
552
|
+
Outputs: `fileSelected: File`, `previewReady: string` (data URL), `fileError: string`, `fileRemoved: void`.
|
|
553
|
+
|
|
554
|
+
```html
|
|
555
|
+
<sol-file-upload label="Drag your logo here" hint="PNG · max. 200 KB" accept="image/png" [maxSizeBytes]="204800"
|
|
556
|
+
(fileSelected)="upload($event)" (fileError)="error.set($event)" />
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
#### `sol-rich-editor` — `SolRichEditorComponent` (CVA, HTML `string`)
|
|
560
|
+
Rich text editor (headings, lists, alignment, links, tables, images, @mentions, #task links); output HTML is TCPDF-safe.
|
|
561
|
+
|
|
562
|
+
| Input | Type | Default | Req |
|
|
563
|
+
|---|---|---|---|
|
|
564
|
+
| `placeholder` | `string` | `''` | |
|
|
565
|
+
| `minHeight` | `string` | `'12rem'` | |
|
|
566
|
+
| `maxHeight` | `string` | `''` | |
|
|
567
|
+
| `ariaLabel` | `string` | `''` | |
|
|
568
|
+
| `disabled` | `boolean` | `false` | |
|
|
569
|
+
| `imageMaxBytes` | `number` | `5 * 1024 * 1024` | |
|
|
570
|
+
| `imageUpload` | `SolRichImageUploader \| null` (`(file: File) => Promise<string>`) | `null` | |
|
|
571
|
+
| `mentionableUsers` | `MentionUser[]` (`{ id, name }`) | `[]` | |
|
|
572
|
+
| `linkableTasks` | `LinkableTask[]` (`{ key, title }`) | `[]` | |
|
|
573
|
+
|
|
574
|
+
Outputs: `valueChange: string`, `mentionsChange: string[]`, `taskLinksChange: string[]`.
|
|
575
|
+
|
|
576
|
+
```html
|
|
577
|
+
<sol-rich-editor ariaLabel="Description" [imageUpload]="upload" [mentionableUsers]="users" [(ngModel)]="html" />
|
|
578
|
+
```
|
|
579
|
+
```ts
|
|
580
|
+
upload: SolRichImageUploader = (file) => this.api.uploadImage(file); // resolves the public URL
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
---
|
|
584
|
+
|
|
585
|
+
### Feedback & status
|
|
586
|
+
|
|
587
|
+
#### `sol-badge` — `SolBadgeComponent`
|
|
588
|
+
| Input | Type | Default | Req |
|
|
589
|
+
|---|---|---|---|
|
|
590
|
+
| `variant` | `'success' \| 'warning' \| 'danger' \| 'info' \| 'neutral'` | `'neutral'` | |
|
|
591
|
+
| `size` | `'sm' \| 'md'` | `'sm'` | |
|
|
592
|
+
|
|
593
|
+
```html
|
|
594
|
+
<sol-badge variant="success">Active</sol-badge>
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
#### `sol-message-status` — `SolMessageStatusComponent`
|
|
598
|
+
Delivery ticks with an accessible label.
|
|
599
|
+
|
|
600
|
+
| Input | Type | Default | Req |
|
|
601
|
+
|---|---|---|---|
|
|
602
|
+
| `status` | `'pending' \| 'sent' \| 'delivered' \| 'read' \| 'failed'` | — | yes |
|
|
603
|
+
|
|
604
|
+
```html
|
|
605
|
+
<sol-message-status [status]="message.status" />
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
#### `sol-score-badge` — `SolScoreBadgeComponent`
|
|
609
|
+
| Input | Type | Default | Req |
|
|
610
|
+
|---|---|---|---|
|
|
611
|
+
| `value` | `number \| null` | `null` | |
|
|
612
|
+
| `max` | `number` | `100` | |
|
|
613
|
+
| `thresholds` | `readonly SolScoreThreshold[]` (`{ upTo, tone }`) | `DEFAULT_SCORE_THRESHOLDS` (≤50 danger, ≤80 warning, else success) | |
|
|
614
|
+
| `pending` | `boolean` | `false` | |
|
|
615
|
+
|
|
616
|
+
```html
|
|
617
|
+
<sol-score-badge [value]="lead.score" />
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
#### `sol-trend` — `SolTrendComponent`
|
|
621
|
+
| Input | Type | Default | Req |
|
|
622
|
+
|---|---|---|---|
|
|
623
|
+
| `current` | `number` | — | yes |
|
|
624
|
+
| `previous` | `number \| null` | `null` | |
|
|
625
|
+
| `invert` | `boolean` | `false` | |
|
|
626
|
+
| `format` | `(delta: number) => string` | `defaultTrendFormat` | |
|
|
627
|
+
|
|
628
|
+
```html
|
|
629
|
+
<sol-trend [current]="4" [previous]="6" [invert]="true" /> <!-- lower churn is good -->
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
#### `sol-avatar` — `SolAvatarComponent`
|
|
633
|
+
Image or initials on a deterministic palette color.
|
|
634
|
+
|
|
635
|
+
| Input | Type | Default | Req |
|
|
636
|
+
|---|---|---|---|
|
|
637
|
+
| `name` | `string \| null \| undefined` | — | yes |
|
|
638
|
+
| `imageUrl` | `string \| null` | `null` | |
|
|
639
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | |
|
|
640
|
+
|
|
641
|
+
```html
|
|
642
|
+
<sol-avatar [name]="user.fullName" [imageUrl]="user.photo" size="lg" />
|
|
643
|
+
```
|
|
644
|
+
|
|
645
|
+
#### `sol-star-rating` — `SolStarRatingComponent`
|
|
646
|
+
Read-only stars (`role="img"`).
|
|
647
|
+
|
|
648
|
+
| Input | Type | Default | Req |
|
|
649
|
+
|---|---|---|---|
|
|
650
|
+
| `value` | `number \| null` | `null` | |
|
|
651
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'sm'` | |
|
|
652
|
+
| `showValue` | `boolean` | `false` | |
|
|
653
|
+
|
|
654
|
+
```html
|
|
655
|
+
<sol-star-rating [value]="4.5" [showValue]="true" />
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
#### `sol-spinner` — `SolSpinnerComponent`
|
|
659
|
+
| Input | Type | Default | Req |
|
|
660
|
+
|---|---|---|---|
|
|
661
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | |
|
|
662
|
+
| `color` | `string` (CSS color) | `''` (theme primary) | |
|
|
663
|
+
|
|
664
|
+
```html
|
|
665
|
+
<sol-spinner size="lg" />
|
|
666
|
+
```
|
|
667
|
+
|
|
668
|
+
#### `sol-skeleton` — `SolSkeletonComponent`
|
|
669
|
+
| Input | Type | Default | Req |
|
|
670
|
+
|---|---|---|---|
|
|
671
|
+
| `variant` | `'text' \| 'title' \| 'stat' \| 'card' \| 'row' \| 'circle' \| 'rounded' \| 'square'` | `'rounded'` | |
|
|
672
|
+
| `width` | `string` | `''` | |
|
|
673
|
+
| `height` | `string` | `''` | |
|
|
674
|
+
| `aspectRatio` | `string` | `''` | |
|
|
675
|
+
| `count` | `number` (`numberAttribute`) | `1` | |
|
|
676
|
+
|
|
677
|
+
```html
|
|
678
|
+
<sol-skeleton variant="text" count="3" />
|
|
679
|
+
```
|
|
680
|
+
|
|
681
|
+
#### `sol-progress-bar` — `SolProgressBarComponent`
|
|
682
|
+
| Input | Type | Default | Req |
|
|
683
|
+
|---|---|---|---|
|
|
684
|
+
| `mode` | `'continuous' \| 'segmented'` | `'continuous'` | |
|
|
685
|
+
| `value` | `number` | `0` | |
|
|
686
|
+
| `max` | `number` | `100` | |
|
|
687
|
+
| `steps` | `number` | `0` | |
|
|
688
|
+
| `current` | `number` | `0` | |
|
|
689
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | |
|
|
690
|
+
| `variant` | `'primary' \| 'success' \| 'warning' \| 'danger'` | `'primary'` | |
|
|
691
|
+
| `showLabel` | `boolean` | `false` | |
|
|
692
|
+
| `label` | `string` | `''` | |
|
|
693
|
+
| `ariaLabel` | `string` | `''` | |
|
|
694
|
+
|
|
695
|
+
```html
|
|
696
|
+
<sol-progress-bar [value]="uploaded()" variant="success" [showLabel]="true" label="Upload" />
|
|
697
|
+
<sol-progress-bar mode="segmented" [steps]="5" [current]="2" />
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
#### `sol-empty-state` — `SolEmptyStateComponent`
|
|
701
|
+
| Input | Type | Default | Req |
|
|
702
|
+
|---|---|---|---|
|
|
703
|
+
| `icon` | `SolIconName` | `'list'` | |
|
|
704
|
+
| `titleKey` | `string` (i18n key) | — | yes |
|
|
705
|
+
| `descriptionKey` | `string` (i18n key) | `''` | |
|
|
706
|
+
|
|
707
|
+
Content: call-to-action (`<ng-content>`).
|
|
708
|
+
|
|
709
|
+
```html
|
|
710
|
+
<sol-empty-state icon="folder-open" titleKey="pages.projects.empty.title" descriptionKey="pages.projects.empty.description">
|
|
711
|
+
<sol-button (clicked)="create()">Create project</sol-button>
|
|
712
|
+
</sol-empty-state>
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
#### `sol-tooltip` — `SolTooltipComponent`
|
|
716
|
+
| Input | Type | Default | Req |
|
|
717
|
+
|---|---|---|---|
|
|
718
|
+
| `text` | `string` | — | yes |
|
|
719
|
+
|
|
720
|
+
```html
|
|
721
|
+
<sol-tooltip text="Edit the project"><sol-icon-button icon="edit" ariaLabel="Edit" /></sol-tooltip>
|
|
722
|
+
```
|
|
723
|
+
|
|
724
|
+
#### `sol-notification-panel` — `SolNotificationPanelComponent`
|
|
725
|
+
Inbox with loading / error / empty / content states, relative times and unread count.
|
|
726
|
+
|
|
727
|
+
| Input | Type | Default | Req |
|
|
728
|
+
|---|---|---|---|
|
|
729
|
+
| `items` | `readonly SolNotificationItem[] \| null \| undefined` (`{ id, title, body?, timestamp?, read?, typeLabel?, tone?, data? }`) | `[]` | |
|
|
730
|
+
| `loading` | `boolean` | `false` | |
|
|
731
|
+
| `error` | `boolean` | `false` | |
|
|
732
|
+
| `errorMessage` | `string` | `''` | |
|
|
733
|
+
| `emptyTitleKey` | `string` | `'shared.notificationPanel.emptyTitle'` | |
|
|
734
|
+
| `emptyDescriptionKey` | `string` | `'shared.notificationPanel.emptyDescription'` | |
|
|
735
|
+
|
|
736
|
+
Outputs: `itemSelected: T`, `markedRead: T`, `markedAllRead: void`, `retryRequested: void`, `closed: void`.
|
|
737
|
+
|
|
738
|
+
```html
|
|
739
|
+
<sol-notification-panel [items]="notifications()" [loading]="loading()" [error]="failed()"
|
|
740
|
+
(itemSelected)="open($event)" (markedRead)="markRead($event)" (markedAllRead)="markAll()" (retryRequested)="reload()" (closed)="close()" />
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
---
|
|
744
|
+
|
|
745
|
+
### Overlays
|
|
746
|
+
|
|
747
|
+
#### `sol-modal` — `SolModalComponent`
|
|
748
|
+
Host-controlled modal; Escape closes, focus trapped, body scroll locked.
|
|
749
|
+
|
|
750
|
+
| Input | Type | Default | Req |
|
|
751
|
+
|---|---|---|---|
|
|
752
|
+
| `open` | `boolean` | `false` | |
|
|
753
|
+
| `title` | `string` | `''` | |
|
|
754
|
+
| `size` | `'sm' \| 'md' \| 'lg' \| 'xl'` | `'md'` | |
|
|
755
|
+
| `closeable` | `boolean` | `true` | |
|
|
756
|
+
| `closeOnBackdrop` | `boolean` | `false` | |
|
|
757
|
+
|
|
758
|
+
Outputs: `closed: void`. Content: body (single slot; place footer buttons inside). Note: the panel has no `role="dialog"`/`aria-modal` attribute in the current template.
|
|
759
|
+
|
|
760
|
+
```html
|
|
761
|
+
<sol-modal [open]="open()" title="Invite a teammate" (closed)="open.set(false)">
|
|
762
|
+
<sol-input label="Email" [(ngModel)]="email" />
|
|
763
|
+
<sol-button (clicked)="send()">Send invite</sol-button>
|
|
764
|
+
</sol-modal>
|
|
765
|
+
```
|
|
766
|
+
|
|
767
|
+
#### `sol-drawer` — `SolDrawerComponent`
|
|
768
|
+
| Input | Type | Default | Req |
|
|
769
|
+
|---|---|---|---|
|
|
770
|
+
| `open` | `boolean` | `false` | |
|
|
771
|
+
| `title` | `string` | `''` | |
|
|
772
|
+
| `side` | `'start' \| 'end'` | `'end'` | |
|
|
773
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | |
|
|
774
|
+
| `variant` | `'panel' \| 'sheet'` | `'panel'` | |
|
|
775
|
+
| `closeable` | `boolean` | `true` | |
|
|
776
|
+
| `closeOnBackdrop` | `boolean` | `true` | |
|
|
777
|
+
|
|
778
|
+
Outputs: `closed: void`. Content: body + `[drawerFooter]` slot.
|
|
779
|
+
|
|
780
|
+
```html
|
|
781
|
+
<sol-drawer [open]="filtersOpen()" title="Filters" (closed)="filtersOpen.set(false)">
|
|
782
|
+
…
|
|
783
|
+
<div drawerFooter><sol-button (clicked)="apply()">Apply</sol-button></div>
|
|
784
|
+
</sol-drawer>
|
|
785
|
+
```
|
|
786
|
+
|
|
787
|
+
#### `sol-confirm-dialog` — `SolConfirmDialogComponent`
|
|
788
|
+
| Input | Type | Default | Req |
|
|
789
|
+
|---|---|---|---|
|
|
790
|
+
| `open` | `boolean` | `false` | |
|
|
791
|
+
| `title` | `string` | `'¿Estás seguro?'` | |
|
|
792
|
+
| `message` | `string` | `''` | |
|
|
793
|
+
| `confirmLabel` | `string` | `'Confirmar'` | |
|
|
794
|
+
| `cancelLabel` | `string` | `'Cancelar'` | |
|
|
795
|
+
| `variant` | `'danger' \| 'warning' \| 'info'` | `'danger'` | |
|
|
796
|
+
|
|
797
|
+
Outputs: `confirm: void`, `cancel: void`.
|
|
798
|
+
|
|
799
|
+
```html
|
|
800
|
+
<sol-confirm-dialog [open]="confirming()" title="Delete this project?" confirmLabel="Delete" cancelLabel="Cancel"
|
|
801
|
+
(confirm)="remove()" (cancel)="confirming.set(false)" />
|
|
802
|
+
```
|
|
803
|
+
|
|
804
|
+
---
|
|
805
|
+
|
|
806
|
+
### Navigation
|
|
807
|
+
|
|
808
|
+
#### `sol-tabs` — `SolTabsComponent`
|
|
809
|
+
Tab list only; the host renders the active panel.
|
|
810
|
+
|
|
811
|
+
| Input | Type | Default | Req |
|
|
812
|
+
|---|---|---|---|
|
|
813
|
+
| `tabs` | `SolTabItem[]` (`{ id, label, icon? }`) | — | yes |
|
|
814
|
+
| `activeTab` | `string` | `''` | |
|
|
815
|
+
|
|
816
|
+
Outputs: `tabChange: string`.
|
|
817
|
+
|
|
818
|
+
```html
|
|
819
|
+
<sol-tabs [tabs]="tabs" [activeTab]="tab()" (tabChange)="tab.set($event)" />
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
#### `sol-pagination` — `SolPaginationComponent`
|
|
823
|
+
| Input | Type | Default | Req |
|
|
824
|
+
|---|---|---|---|
|
|
825
|
+
| `totalItems` | `number` | `0` | |
|
|
826
|
+
| `pageSize` | `number` | `10` | |
|
|
827
|
+
| `currentPage` | `number` | `1` | |
|
|
828
|
+
| `pageSizeOptions` | `number[]` | `[10, 25, 50]` | |
|
|
829
|
+
|
|
830
|
+
Outputs: `pageChanged: number`, `pageSizeChanged: number`.
|
|
831
|
+
|
|
832
|
+
```html
|
|
833
|
+
<sol-pagination [totalItems]="total()" [pageSize]="size()" [currentPage]="page()" (pageChanged)="page.set($event)" (pageSizeChanged)="size.set($event)" />
|
|
834
|
+
```
|
|
835
|
+
|
|
836
|
+
#### `sol-page-header` — `SolPageHeaderComponent`
|
|
837
|
+
| Input | Type | Default | Req |
|
|
838
|
+
|---|---|---|---|
|
|
839
|
+
| `title` | `string` | — | yes |
|
|
840
|
+
| `subtitle` | `string` | `''` | |
|
|
841
|
+
|
|
842
|
+
Content: actions.
|
|
843
|
+
|
|
844
|
+
```html
|
|
845
|
+
<sol-page-header title="Projects" subtitle="Manage your portfolio"><sol-button>New project</sol-button></sol-page-header>
|
|
846
|
+
```
|
|
847
|
+
|
|
848
|
+
#### `sol-stepper` — `SolStepperComponent`
|
|
849
|
+
| Input | Type | Default | Req |
|
|
850
|
+
|---|---|---|---|
|
|
851
|
+
| `steps` | `SolStepperStep[]` (`{ id, labelKey, descriptionKey?, error? }`) | — | yes |
|
|
852
|
+
| `activeIndex` | `number` | `0` | |
|
|
853
|
+
| `furthestIndex` | `number \| null` | `null` | |
|
|
854
|
+
| `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | |
|
|
855
|
+
| `interactive` | `boolean` | `false` | |
|
|
856
|
+
| `navigation` | `'linear' \| 'free'` | `'linear'` | |
|
|
857
|
+
| `ariaLabelKey` | `string` | `'shared.stepper.aria'` | |
|
|
858
|
+
|
|
859
|
+
Outputs: `stepSelected: number`.
|
|
860
|
+
|
|
861
|
+
```html
|
|
862
|
+
<sol-stepper [steps]="steps" [activeIndex]="step()" [interactive]="true" (stepSelected)="step.set($event)" />
|
|
863
|
+
```
|
|
864
|
+
|
|
865
|
+
#### `sol-wizard` — `SolWizardComponent` + `[solWizardStep]` — `SolWizardStepDirective`
|
|
866
|
+
Wizard = segmented progress bar + stepper pills + one panel per `*solWizardStep` + Back/Next/Finish footer.
|
|
867
|
+
|
|
868
|
+
| Input | Type | Default | Req |
|
|
869
|
+
|---|---|---|---|
|
|
870
|
+
| `steps` | `SolWizardStep[]` (`{ id, label?, labelKey?, icon? }`) | — | yes |
|
|
871
|
+
| `current` | `number` (`model`, use `[(current)]`) | `0` | |
|
|
872
|
+
| `showProgressBar` | `boolean` | `true` | |
|
|
873
|
+
| `hidePreviousOnFirst` | `boolean` | `true` | |
|
|
874
|
+
| `canAdvance` | `boolean \| ((index: number) => boolean)` | `true` | |
|
|
875
|
+
| `previousLabel` / `nextLabel` / `finishLabel` | `string` | `''` (library defaults; set explicitly for English) | |
|
|
876
|
+
|
|
877
|
+
Outputs: `next: void`, `previous: void`, `stepChange: number`, `finish: void`, `currentChange: number`. The directive has no inputs (structural: `*solWizardStep`).
|
|
878
|
+
|
|
879
|
+
```html
|
|
880
|
+
<sol-wizard [steps]="steps" [(current)]="current" [canAdvance]="canAdvance" nextLabel="Next" previousLabel="Back" finishLabel="Create" (finish)="save()">
|
|
881
|
+
<ng-container *solWizardStep><sol-input label="Name" [(ngModel)]="name" /></ng-container>
|
|
882
|
+
<ng-container *solWizardStep>Summary…</ng-container>
|
|
883
|
+
</sol-wizard>
|
|
884
|
+
```
|
|
885
|
+
|
|
886
|
+
#### `sol-scope-switcher` — `SolScopeSwitcherComponent`
|
|
887
|
+
Menu to switch the active organization / workspace / tenant.
|
|
888
|
+
|
|
889
|
+
| Input | Type | Default | Req |
|
|
890
|
+
|---|---|---|---|
|
|
891
|
+
| `scopes` | `readonly SolScope[]` (`{ id, label, sublabel?, icon?, imageUrl?, data? }`) | `[]` | |
|
|
892
|
+
| `activeScopeId` | `string \| null \| undefined` | `null` | |
|
|
893
|
+
| `status` | `'idle' \| 'loading' \| 'error'` | `'idle'` | |
|
|
894
|
+
| `disabled` | `boolean` | `false` | |
|
|
895
|
+
| `align` | `'start' \| 'end'` | `'end'` | |
|
|
896
|
+
| `errorMessage` / `emptyMessage` / `loadingMessage` | `string` | `''` (i18n defaults) | |
|
|
897
|
+
| `triggerAriaLabel` / `panelAriaLabel` | `string` | `''` (i18n defaults) | |
|
|
898
|
+
|
|
899
|
+
Outputs: `scopeSelected: SolScope`, `openChange: boolean`.
|
|
900
|
+
|
|
901
|
+
```html
|
|
902
|
+
<sol-scope-switcher [scopes]="companies()" [activeScopeId]="activeId()" [status]="status()" (scopeSelected)="switchTo($event)" />
|
|
903
|
+
```
|
|
904
|
+
|
|
905
|
+
#### `sol-tree` — `SolTreeComponent` + `[solTreeNodeDef]` — `SolTreeNodeDefDirective`
|
|
906
|
+
Accessible tree (role `tree`), keyboard navigation, max depth 5.
|
|
907
|
+
|
|
908
|
+
| Input | Type | Default | Req |
|
|
909
|
+
|---|---|---|---|
|
|
910
|
+
| `nodes` | `readonly SolTreeNode[]` (`{ id, label, children?, data? }`) | — | yes |
|
|
911
|
+
| `expandedIds` | `readonly string[] \| null` (`model`, `[(expandedIds)]`) | `null` | |
|
|
912
|
+
| `defaultExpandedDepth` | `number` | `1` | |
|
|
913
|
+
| `maxDepth` | `number` | `SOL_TREE_MAX_DEPTH` (5) | |
|
|
914
|
+
| `indent` | `number` (px) | `16` | |
|
|
915
|
+
| `ariaLabel` | `string` | `''` | |
|
|
916
|
+
|
|
917
|
+
Outputs: `nodeSelected: SolTreeNode`, `nodeToggled: SolTreeToggleEvent` (`{ node, expanded, expandedIds }`), `expandedIdsChange`.
|
|
918
|
+
Template context of `solTreeNodeDef`: `$implicit`/`node`, `depth`, `expanded`, `hasChildren` (its `data` is typed `unknown`).
|
|
919
|
+
|
|
920
|
+
```html
|
|
921
|
+
<sol-tree [nodes]="tree()" [(expandedIds)]="expanded" (nodeSelected)="open($event)">
|
|
922
|
+
<ng-template solTreeNodeDef let-node let-depth="depth"><span>{{ node.label }}</span></ng-template>
|
|
923
|
+
</sol-tree>
|
|
924
|
+
```
|
|
925
|
+
|
|
926
|
+
---
|
|
927
|
+
|
|
928
|
+
### Layout & motion
|
|
929
|
+
|
|
930
|
+
#### `sol-card` — `SolCardComponent`
|
|
931
|
+
| Input | Type | Default | Req |
|
|
932
|
+
|---|---|---|---|
|
|
933
|
+
| `padding` | `boolean` | `true` | |
|
|
934
|
+
| `hoverable` | `boolean` | `false` | |
|
|
935
|
+
|
|
936
|
+
```html
|
|
937
|
+
<sol-card [hoverable]="true">…</sol-card>
|
|
938
|
+
```
|
|
939
|
+
|
|
940
|
+
#### `[solReveal]` — `SolRevealDirective`
|
|
941
|
+
Entrance animation from the theme motion tokens; respects reduced motion.
|
|
942
|
+
|
|
943
|
+
| Input | Type | Default | Req |
|
|
944
|
+
|---|---|---|---|
|
|
945
|
+
| `solRevealIndex` | `number` (stagger index) | `0` | |
|
|
946
|
+
| `solRevealReplay` | `unknown` (change to replay) | `undefined` | |
|
|
947
|
+
|
|
948
|
+
```html
|
|
949
|
+
@for (item of items(); track item.id; let i = $index) {
|
|
950
|
+
<sol-card solReveal [solRevealIndex]="i" [solRevealReplay]="filter()">{{ item.name }}</sol-card>
|
|
951
|
+
}
|
|
952
|
+
```
|
|
953
|
+
|
|
954
|
+
---
|
|
955
|
+
|
|
956
|
+
### Data
|
|
957
|
+
|
|
958
|
+
#### `sol-data-table` — `SolDataTableComponent`
|
|
959
|
+
Sorting, per-column filters, global search, pagination, edit/delete actions, row reveal and a collapsed layout below `collapseWidth`.
|
|
960
|
+
|
|
961
|
+
| Input | Type | Default | Req |
|
|
962
|
+
|---|---|---|---|
|
|
963
|
+
| `data` | `SolDataTableRow[]` (`Record<string, unknown>`) | `[]` | |
|
|
964
|
+
| `columns` | `DataTableColumn[]` (`{ key, label, sortable?, width?, badge?, filter?: 'text' \| 'select', cellTemplate? }`) | `[]` | |
|
|
965
|
+
| `loading` | `boolean` | `false` | |
|
|
966
|
+
| `searchPlaceholder` | `string` | `'Buscar...'` | |
|
|
967
|
+
| `emptyMessage` | `string` | `'No hay datos disponibles'` | |
|
|
968
|
+
| `paginated` | `boolean` | `true` | |
|
|
969
|
+
| `showToolbar` | `boolean` | `true` | |
|
|
970
|
+
| `filterPosition` | `'left' \| 'right'` | `'left'` | |
|
|
971
|
+
| `showActions` / `showEditAction` / `showDeleteAction` | `boolean` | `true` | |
|
|
972
|
+
| `trackByKey` | `string` | `'id'` | |
|
|
973
|
+
| `actionsLabel` | `string` | `'Acciones'` | |
|
|
974
|
+
| `actionsPosition` | `'start' \| 'end'` | `'end'` | |
|
|
975
|
+
| `toggleDetailsLabel` | `string` | `'Mostrar u ocultar el detalle de la fila'` | |
|
|
976
|
+
| `rowReveal` | `boolean` | `true` | |
|
|
977
|
+
| `collapseWidth` | `number` (px) | `767` | |
|
|
978
|
+
| `variant` | `'clean' \| 'zebra' \| 'bordered' \| 'emphasis-header' \| 'banded' \| null` | `null` (theme) | |
|
|
979
|
+
|
|
980
|
+
Outputs: `editClicked: SolDataTableRow`, `deleteClicked: SolDataTableRow`.
|
|
981
|
+
Content: `[tableFilters]` and `[tableActions]` slots; `<ng-template #rowActions let-row>` replaces the action buttons.
|
|
982
|
+
|
|
983
|
+
```html
|
|
984
|
+
<sol-data-table [data]="people()" [columns]="columns" searchPlaceholder="Search…" actionsLabel="Actions"
|
|
985
|
+
(editClicked)="edit($event)" (deleteClicked)="remove($event)">
|
|
986
|
+
<sol-button tableActions size="sm" (clicked)="create()">New</sol-button>
|
|
987
|
+
</sol-data-table>
|
|
988
|
+
```
|
|
989
|
+
```ts
|
|
990
|
+
columns: DataTableColumn[] = [
|
|
991
|
+
{ key: 'name', label: 'Name', sortable: true, filter: 'text' },
|
|
992
|
+
{ key: 'status', label: 'Status', badge: true, filter: 'select' },
|
|
993
|
+
];
|
|
994
|
+
```
|
|
995
|
+
|
|
996
|
+
#### `sol-virtual-scroll` — `SolVirtualScrollComponent`
|
|
997
|
+
Windowed list with variable heights; chat-oriented (follows output, loads history at top). Requires an `<ng-template>` child (context `$implicit`, `index`) and a sized container.
|
|
998
|
+
|
|
999
|
+
| Input | Type | Default | Req |
|
|
1000
|
+
|---|---|---|---|
|
|
1001
|
+
| `items` | `readonly T[]` | — | yes |
|
|
1002
|
+
| `itemKey` | `(item: T, index: number) => string \| number` | `(_, i) => i` | |
|
|
1003
|
+
| `estimatedItemHeight` | `number` | `56` | |
|
|
1004
|
+
| `bufferPx` | `number` | `240` | |
|
|
1005
|
+
| `followOutput` | `boolean` | `true` | |
|
|
1006
|
+
| `nearTopThreshold` | `number` | `120` | |
|
|
1007
|
+
|
|
1008
|
+
Outputs: `nearTop: void`, `atBottomChange: boolean`.
|
|
1009
|
+
|
|
1010
|
+
```html
|
|
1011
|
+
<sol-virtual-scroll [items]="messages()" [itemKey]="byId" [estimatedItemHeight]="64" (nearTop)="loadOlder()">
|
|
1012
|
+
<ng-template let-msg let-index="index"><app-message [message]="msg" /></ng-template>
|
|
1013
|
+
</sol-virtual-scroll>
|
|
1014
|
+
```
|
|
1015
|
+
|
|
1016
|
+
#### `sol-chart` — `SolChartComponent`
|
|
1017
|
+
Chart.js wrapper themed from `--sol-*`; re-renders on light/dark.
|
|
1018
|
+
|
|
1019
|
+
| Input | Type | Default | Req |
|
|
1020
|
+
|---|---|---|---|
|
|
1021
|
+
| `type` | `'line' \| 'bar' \| 'doughnut' \| 'sparkline'` | — | yes |
|
|
1022
|
+
| `data` | `SolChartData` (`{ labels: string[]; series: { label, data: number[], color? }[] }`) | — | yes |
|
|
1023
|
+
| `options` | `SolChartOptions` (`{ legend?, yMax? }`) | `{}` | |
|
|
1024
|
+
| `ariaLabelKey` | `string` (i18n key) | — | yes |
|
|
1025
|
+
| `height` | `string` | `'260px'` | |
|
|
1026
|
+
|
|
1027
|
+
```html
|
|
1028
|
+
<sol-chart type="line" ariaLabelKey="pages.dashboard.revenue" [data]="{ labels: months, series: [{ label: '2026', data: revenue }] }" />
|
|
1029
|
+
```
|
|
1030
|
+
|
|
1031
|
+
#### `sol-timeline` — `SolTimelineComponent`
|
|
1032
|
+
Gantt-like hierarchy on a month axis; undated nodes listed apart.
|
|
1033
|
+
|
|
1034
|
+
| Input | Type | Default | Req |
|
|
1035
|
+
|---|---|---|---|
|
|
1036
|
+
| `nodes` | `TimelineNode[]` (`{ id, label?, labelKey?, start?, end?, status?, children?, collapsed? }`) | — | yes |
|
|
1037
|
+
| `statusToken` | `SolTimelineStatusResolver \| null` (`(status) => cssColor`) | `null` (`defaultStatusToken`: done/completed/closed, active/in progress, blocked, at risk, pending) | |
|
|
1038
|
+
| `legend` | `TimelineLegendItem[]` (`{ status, labelKey }`) | `[]` | |
|
|
1039
|
+
| `collapsible` | `boolean` | `true` | |
|
|
1040
|
+
|
|
1041
|
+
Outputs: `nodeToggled: { id, collapsed }`, `nodeClicked: TimelineNode`.
|
|
1042
|
+
|
|
1043
|
+
```html
|
|
1044
|
+
<sol-timeline [nodes]="plan()" [legend]="[{ status: 'done', labelKey: 'pages.plan.done' }]" (nodeClicked)="open($event)" />
|
|
1045
|
+
```
|
|
1046
|
+
|
|
1047
|
+
---
|
|
1048
|
+
|
|
1049
|
+
### Planning
|
|
1050
|
+
|
|
1051
|
+
#### `sol-kanban-board` — `SolKanbanBoardComponent`
|
|
1052
|
+
Columns with CDK drag and drop (mouse, touch, keyboard “Move to…”), optimistic mirror and `rollback()`.
|
|
1053
|
+
|
|
1054
|
+
| Input | Type | Default | Req |
|
|
1055
|
+
|---|---|---|---|
|
|
1056
|
+
| `columns` | `KanbanColumn<T>[]` (`{ id, title?, titleKey?, items: T[], accent?, droppable?, terminalAnchor? }`) | — | yes |
|
|
1057
|
+
| `cardTemplate` | `TemplateRef<{ $implicit: T; item: T }>` | — | yes |
|
|
1058
|
+
| `headerTemplate` | `TemplateRef<{ $implicit: KanbanColumn }> \| null` | `null` | |
|
|
1059
|
+
| `anchorTemplate` | `TemplateRef<{ $implicit: KanbanColumn }> \| null` (shown when `terminalAnchor`) | `null` | |
|
|
1060
|
+
| `emptyTemplate` | `TemplateRef<unknown> \| null` | `null` | |
|
|
1061
|
+
|
|
1062
|
+
Outputs: `itemMoved: KanbanItemMoved<T>` (`{ item, fromColumnId, toColumnId, previousIndex, currentIndex }`), `columnAction: KanbanColumnAction`, `addRequested: string` (column id), `externalItemDropped: { toColumnId, data }`. Public method: `rollback()`.
|
|
1063
|
+
|
|
1064
|
+
```html
|
|
1065
|
+
<ng-template #card let-task><p>{{ task.title }}</p></ng-template>
|
|
1066
|
+
<sol-kanban-board #board [columns]="columns()" [cardTemplate]="card" (itemMoved)="persist($event, board)" (addRequested)="create($event)" />
|
|
1067
|
+
```
|
|
1068
|
+
```ts
|
|
1069
|
+
async persist(move: KanbanItemMoved<Task>, board: SolKanbanBoardComponent<Task>) {
|
|
1070
|
+
try { await this.api.move(move); } catch { board.rollback(); }
|
|
1071
|
+
}
|
|
1072
|
+
```
|
|
1073
|
+
|
|
1074
|
+
#### `sol-kanban-column` — `SolKanbanColumnComponent`
|
|
1075
|
+
One column (normally rendered by the board).
|
|
1076
|
+
|
|
1077
|
+
| Input | Type | Default | Req |
|
|
1078
|
+
|---|---|---|---|
|
|
1079
|
+
| `column` | `KanbanColumn<T>` | — | yes |
|
|
1080
|
+
| `cardTemplate` | `TemplateRef<KanbanCardTemplateContext<T>>` | — | yes |
|
|
1081
|
+
| `headerTemplate` / `anchorTemplate` / `emptyTemplate` | as board | `null` | |
|
|
1082
|
+
| `allColumns` | `KanbanColumn<T>[] \| null` (targets for keyboard moves) | `null` | |
|
|
1083
|
+
|
|
1084
|
+
Outputs: `action: KanbanColumnAction`, `dragActiveChanged: boolean`, `itemDropped: KanbanRawDropEvent`.
|
|
1085
|
+
|
|
1086
|
+
```html
|
|
1087
|
+
<sol-kanban-column [column]="{ id: 'todo', title: 'To do', items: tasks, droppable: false }" [cardTemplate]="card" />
|
|
1088
|
+
```
|
|
1089
|
+
|
|
1090
|
+
#### `sol-kanban-card` — `SolKanbanCardComponent`
|
|
1091
|
+
| Input | Type | Default | Req |
|
|
1092
|
+
|---|---|---|---|
|
|
1093
|
+
| `item` | `T extends KanbanItem` (`{ id }`) | — | yes |
|
|
1094
|
+
| `cardTemplate` | `TemplateRef<KanbanCardTemplateContext<T>>` | — | yes |
|
|
1095
|
+
|
|
1096
|
+
Outputs: `dragActiveChanged: boolean`.
|
|
1097
|
+
|
|
1098
|
+
```html
|
|
1099
|
+
<sol-kanban-card [item]="task" [cardTemplate]="card" />
|
|
1100
|
+
```
|
|
1101
|
+
|
|
1102
|
+
#### `sol-kanban-drag-source` — `SolKanbanDragSourceComponent`
|
|
1103
|
+
External list whose items can be dropped into a board’s columns (board emits `externalItemDropped`).
|
|
1104
|
+
|
|
1105
|
+
| Input | Type | Default | Req |
|
|
1106
|
+
|---|---|---|---|
|
|
1107
|
+
| `items` | `T[]` | — | yes |
|
|
1108
|
+
| `itemTemplate` | `TemplateRef<{ $implicit: T }>` | — | yes |
|
|
1109
|
+
| `connectedTo` | `string[]` (column ids) | `[]` | |
|
|
1110
|
+
| `disabledIds` | `ReadonlySet<string \| number>` | `new Set()` | |
|
|
1111
|
+
| `listId` | `string` | `'sol-kanban-drag-source'` | |
|
|
1112
|
+
|
|
1113
|
+
```html
|
|
1114
|
+
<sol-kanban-drag-source [items]="backlog()" [connectedTo]="['todo', 'doing']" [itemTemplate]="card" />
|
|
1115
|
+
```
|
|
1116
|
+
|
|
1117
|
+
#### `sol-calendar` — `SolCalendarComponent`
|
|
1118
|
+
Week/day agenda = header + grid + optional legend.
|
|
1119
|
+
|
|
1120
|
+
| Input | Type | Default | Req |
|
|
1121
|
+
|---|---|---|---|
|
|
1122
|
+
| `events` | `SolCalendarEvent[]` (`{ id, start, end, title, color?, data? }`) | — | yes |
|
|
1123
|
+
| `view` | `'week' \| 'day'` | — | yes |
|
|
1124
|
+
| `currentDate` | `Date` | — | yes |
|
|
1125
|
+
| `eventTemplate` | `TemplateRef<{ $implicit: T; event: T }> \| null` | `null` | |
|
|
1126
|
+
| `legend` | `SolCalendarLegendItem[]` (`{ color, labelKey }`) `\| null` | `null` | |
|
|
1127
|
+
|
|
1128
|
+
Outputs: `eventClicked: T`, `slotClicked: { date: Date; time: string }`. `color` accepts hex, functional colors or `var(--sol-*)`.
|
|
1129
|
+
|
|
1130
|
+
```html
|
|
1131
|
+
<sol-calendar [events]="appointments()" view="week" [currentDate]="today" (slotClicked)="book($event)" (eventClicked)="open($event)" />
|
|
1132
|
+
```
|
|
1133
|
+
|
|
1134
|
+
#### `sol-calendar-header` — `SolCalendarHeaderComponent`
|
|
1135
|
+
| Input | Type | Default | Req |
|
|
1136
|
+
|---|---|---|---|
|
|
1137
|
+
| `currentDate` | `Date` | — | yes |
|
|
1138
|
+
| `view` | `'week' \| 'day'` | — | yes |
|
|
1139
|
+
|
|
1140
|
+
Outputs: `dateChange: Date`, `viewChange: SolCalendarView`.
|
|
1141
|
+
|
|
1142
|
+
```html
|
|
1143
|
+
<sol-calendar-header [currentDate]="date()" [view]="view()" (dateChange)="date.set($event)" (viewChange)="view.set($event)" />
|
|
1144
|
+
```
|
|
1145
|
+
|
|
1146
|
+
#### `sol-calendar-grid` — `SolCalendarGridComponent`
|
|
1147
|
+
Same inputs/outputs as `sol-calendar` minus `legend`.
|
|
1148
|
+
|
|
1149
|
+
```html
|
|
1150
|
+
<sol-calendar-grid [events]="events()" view="day" [currentDate]="date()" [eventTemplate]="eventTpl" />
|
|
1151
|
+
```
|
|
1152
|
+
|
|
1153
|
+
#### `sol-flow-canvas` — `SolFlowCanvasComponent`
|
|
1154
|
+
Pan/zoom node graph: drag nodes, connect ports, keyboard moves with live announcements, “Arrange” auto-layout (dagre, lazy).
|
|
1155
|
+
|
|
1156
|
+
| Input | Type | Default | Req |
|
|
1157
|
+
|---|---|---|---|
|
|
1158
|
+
| `nodes` | `SolFlowCanvasNode[]` (`{ id, label, kind, position: { x, y }, visualState?: 'idle' \| 'running' \| 'ok' \| 'error', badges?, metadata? }`) | `[]` | |
|
|
1159
|
+
| `edges` | `SolFlowCanvasEdge[]` (`{ id, sourceId, targetId, kind: 'condition' \| 'intent' \| 'always', label?, priority? }`) | `[]` | |
|
|
1160
|
+
| `readonly` | `boolean` | `false` | |
|
|
1161
|
+
| `selectedId` | `string \| null` | `null` | |
|
|
1162
|
+
| `highlightedNodeId` | `string \| null` | `null` | |
|
|
1163
|
+
| `nodeTemplate` | `TemplateRef<{ $implicit, node, selected, highlighted }> \| null` | `null` | |
|
|
1164
|
+
|
|
1165
|
+
Outputs: `nodeMoved: { id, position }`, `nodeSelected: { id }`, `connectionCreated: { sourceId, targetId }`, `connectionRemoved: { id }`. The host owns positions and edges.
|
|
1166
|
+
|
|
1167
|
+
```html
|
|
1168
|
+
<div style="height: 400px">
|
|
1169
|
+
<sol-flow-canvas [nodes]="nodes()" [edges]="edges()" (nodeMoved)="move($event)" (connectionCreated)="connect($event)" />
|
|
1170
|
+
</div>
|
|
1171
|
+
```
|
|
1172
|
+
|
|
1173
|
+
---
|
|
1174
|
+
|
|
1175
|
+
### Secondary entry points (not demoed in the showcase)
|
|
1176
|
+
|
|
1177
|
+
- `@solercia/ui/theme-studio`: `sol-theme-studio`, `sol-theme-studio-preview`, token `THEME_STUDIO_STORE`
|
|
1178
|
+
(host store contract), catalogs `SOL_THEME_STUDIO_I18N_EN` / `SOL_THEME_STUDIO_I18N_ES_CO`, form/theme
|
|
1179
|
+
helpers (`buildThemeFile`, `mapThemeFileToForm`, `parseThemeJson`, …). See `docs/THEME-STUDIO.md`.
|
|
1180
|
+
- `@solercia/ui/login-appearance`: `sol-login-frame`, `sol-login-brand`, `sol-login-scene`, `sol-login-photos`,
|
|
1181
|
+
`sol-login-shapes`, `sol-login-panel-background`, `sol-login-preview`, `sol-login-appearance-editor`, plus
|
|
1182
|
+
`resolveLoginView`, `normalizeLogin`, `normalizeLoginAppearance`, catalogs
|
|
1183
|
+
`SOL_LOGIN_APPEARANCE_I18N_EN` / `SOL_LOGIN_APPEARANCE_I18N_ES_CO`. See [Themed sign-in](#themed-sign-in-solerciauilogin-appearance).
|
|
1184
|
+
|
|
1185
|
+
## Showcase
|
|
154
1186
|
|
|
155
1187
|
```bash
|
|
156
|
-
|
|
1188
|
+
npm ci
|
|
1189
|
+
npm start # builds the library and serves the showcase on http://localhost:4200
|
|
157
1190
|
```
|
|
158
1191
|
|
|
159
|
-
|
|
1192
|
+
The showcase is also the reference integration: zoneless bootstrap, `provideTheme()`, a `THEME_SOURCE`
|
|
1193
|
+
adapter and a JSON-catalog `SolI18n` engine with English and Spanish
|
|
1194
|
+
([`app.config.ts`](./projects/showcase/src/app/app.config.ts)). Each page shows live variants, sizes and
|
|
1195
|
+
states with a collapsible code snippet, in light and dark mode, down to 390 px.
|
|
1196
|
+
|
|
1197
|
+
## For AI coding agents
|
|
1198
|
+
|
|
1199
|
+
If you are an AI agent building UI with this library:
|
|
1200
|
+
|
|
1201
|
+
1. **Reuse before you build.** Check [Components at a glance](#components-at-a-glance) first; do not
|
|
1202
|
+
hand-roll a button, table, modal, date picker or chart that already exists.
|
|
1203
|
+
2. **Style only with tokens.** Use `var(--sol-*)` for color, typography, spacing and radius. Never
|
|
1204
|
+
hardcode colors or fonts, never use `!important` or `::ng-deep`. The
|
|
1205
|
+
[`@solercia/eslint-config`](https://github.com/solercia-solutions/eslint-config) preset enforces it.
|
|
1206
|
+
3. **Respect required inputs** (marked **Req**) and give every icon-only control an `ariaLabel`.
|
|
1207
|
+
4. **Wrap engines, don't import them.** Use `<sol-chart>` instead of Chart.js and `sol-kanban-*` instead of
|
|
1208
|
+
`@angular/cdk` drag and drop.
|
|
1209
|
+
5. **Cover every state.** Loading (`sol-skeleton`, `sol-spinner`), empty (`sol-empty-state`), error and
|
|
1210
|
+
success are part of each screen.
|
|
1211
|
+
6. Look at the matching page in `projects/showcase/src/app/pages/` for a working example.
|
|
160
1212
|
|
|
161
|
-
|
|
1213
|
+
A machine-readable summary is available in [`llms.txt`](./llms.txt).
|
|
1214
|
+
|
|
1215
|
+
## Development
|
|
162
1216
|
|
|
163
1217
|
```bash
|
|
164
|
-
|
|
1218
|
+
npm ci
|
|
1219
|
+
npm test # builds the library and schematics, then runs Vitest (zoneless)
|
|
1220
|
+
npm run build # dist/solercia/ui
|
|
1221
|
+
npm run build:showcase # library + showcase
|
|
165
1222
|
```
|
|
166
1223
|
|
|
167
|
-
|
|
1224
|
+
Text-asserting tests use the library's own catalog, `projects/solercia/ui/i18n/es-CO.json`.
|
|
1225
|
+
Rebuilding the library while `ng serve showcase` runs deletes `dist/solercia/ui`: restart the dev server.
|
|
1226
|
+
|
|
1227
|
+
### Releasing
|
|
1228
|
+
|
|
1229
|
+
1. Bump `version` in `projects/solercia/ui/package.json` and add the entry to
|
|
1230
|
+
[`CHANGELOG.md`](./projects/solercia/ui/CHANGELOG.md).
|
|
1231
|
+
2. Validate: `npm run build && cd dist/solercia/ui && npm publish --dry-run`.
|
|
1232
|
+
3. Push a tag `v<version>`. `.github/workflows/publish.yml` checks that the tag matches the version and
|
|
1233
|
+
publishes with npm Trusted Publishing (OIDC, no token) and provenance. The package's Trusted Publisher
|
|
1234
|
+
on npmjs.com is organization `solercia-solutions`, repository `solercia-ui`, workflow `publish.yml`;
|
|
1235
|
+
`ENEEDAUTH` means one of the three does not match.
|
|
1236
|
+
|
|
1237
|
+
## Related packages
|
|
1238
|
+
|
|
1239
|
+
- [`@solercia/eslint-config`](https://github.com/solercia-solutions/eslint-config) — architecture and styling lint rules.
|
|
1240
|
+
- [`@solercia/chat`](https://github.com/solercia-solutions/solercia-chat) — embeddable AI assistant chat.
|
|
168
1241
|
|
|
169
|
-
##
|
|
1242
|
+
## License
|
|
170
1243
|
|
|
171
|
-
|
|
1244
|
+
[Apache-2.0](./LICENSE) © 2026 Solercia Solutions SAS. See [`NOTICE`](./projects/solercia/ui/NOTICE).
|