@besaitech/ng-design-system 0.0.64 → 0.0.66
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 +35 -0
- package/fesm2022/besaitech-ng-design-system.mjs +6092 -3
- package/fesm2022/besaitech-ng-design-system.mjs.map +1 -1
- package/index.d.ts +1272 -24
- package/package.json +6 -1
- package/themes/base.css +80 -0
package/README.md
CHANGED
|
@@ -203,6 +203,41 @@ Import names are the `Sl…` classes; the markup selectors are `sds-…`.
|
|
|
203
203
|
| `SdsTopbar` | `<sds-topbar>` | `appName`, `user`, `(logout)`; `[sdsLogo]` slot |
|
|
204
204
|
| `SdsSidebar` + `SdsNavGroup` + `SdsNavItem` | `<sds-sidebar>` … | Collapsible nav rail; collapse state via root-provided `SidebarStore`; items render `routerLink` or `<button>` |
|
|
205
205
|
|
|
206
|
+
**Charts** (D3 does the maths, Angular renders the SVG, so they are OnPush, SSR-safe and themed by tokens)
|
|
207
|
+
|
|
208
|
+
| Component | Selector | Notes |
|
|
209
|
+
| --- | --- | --- |
|
|
210
|
+
| `SdsLineChart` | `<sds-line-chart>` | Time / numeric / category x; multi-series, `area`, `stack` (stacked · percent), `curve`, log `yScale`, `annotations`, dashed forecast series, `endLabels`, crosshair tooltip |
|
|
211
|
+
| `SdsBarChart` | `<sds-bar-chart>` | `orientation`, `stack`, negatives, `showValues`, `sort`, `barColor`, `highlight`, combo `type: 'line'` series |
|
|
212
|
+
| `SdsScatterChart` | `<sds-scatter-chart>` | `x`/`y`, bubble `size`, `group`, `trendline`, log/time axes, nearest-point hover |
|
|
213
|
+
| `SdsDonutChart` | `<sds-donut-chart>` | Donut · pie · `half`; tail folds into "Autres" past `maxSlices`; centre total / hovered slice |
|
|
214
|
+
| `SdsHeatmap` | `<sds-heatmap>` | Two categorical dims × a measure; `scheme` sequential · diverging, `showValues` |
|
|
215
|
+
| `SdsTreemap` | `<sds-treemap>` | Nested `{ name, value?, children? }`; branch colours, click-to-zoom breadcrumb |
|
|
216
|
+
| `SdsSparkline` | `<sds-sparkline>` | Word-sized line · area · bar; `band`, `reference`, `showMinMax` |
|
|
217
|
+
| `SdsKpi` | `<sds-kpi>` | Stat tile: value, change vs `previous` (good/bad via `upIsGood`), optional sparkline `trend` |
|
|
218
|
+
|
|
219
|
+
Every chart reads plain rows through accessors (a property name or `(row, i) => value`), so API data
|
|
220
|
+
plots without reshaping; has an interactive legend (colour follows the series, never its rank), a
|
|
221
|
+
keyboard-navigable tooltip, a data-table twin (`tableToggle`), `loading` / empty states, and a
|
|
222
|
+
`(pointClick)` output. Colours come from the colour-blind-safe `--sds-chart-1…8` slots in `base.css`
|
|
223
|
+
(override any slot in your preset). Set app-wide defaults once:
|
|
224
|
+
|
|
225
|
+
```ts
|
|
226
|
+
providers: [provideSdsCharts({ locale: 'fr-FR' })] // or locale: () => translate.currentLang()
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
```html
|
|
230
|
+
<sds-line-chart
|
|
231
|
+
heading="Admissions"
|
|
232
|
+
[data]="rows"
|
|
233
|
+
x="date"
|
|
234
|
+
[series]="[{ key: 'urgences', label: 'Urgences' }, { key: 'programmees', label: 'Programmées' }]"
|
|
235
|
+
[annotations]="[{ type: 'line', value: 150, label: 'Capacité' }]"
|
|
236
|
+
/>
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Custom tooltip body: `<ng-template sdsChartTooltip let-tip>…</ng-template>` inside any chart.
|
|
240
|
+
|
|
206
241
|
## Theme & cross-app preferences
|
|
207
242
|
|
|
208
243
|
`SdsThemeService` holds the person's **mode** — `'system' | 'light' | 'dark'`, persisted to `localStorage`
|