import { Component, input } from '@angular/core'; import { HeadingComponent } from '@shared/ui/heading/heading.component'; /** Molecule: CIBG Huisstijl **Datablock** (designsystem.cibg.nl/componenten/datablock) — THE way to show user/application data. A grey `.data-block` surface holds a white `.block-wrapper` panel with a `
` of projected ``s. Use `stacked` (`.data-block--stacked`) when labels/values are long and should stack. Replaces the `app-card + dl` idiom for data views (the datablock carries its own surface, so it is NOT wrapped in an `app-card` — see WP-12). When there is no visible `heading`, pass an `ariaLabel` so the definition list is announced. */ @Component({ selector: 'app-data-block', imports: [HeadingComponent], template: ` @if (heading()) { {{ heading() }} }
`, }) export class DataBlockComponent { heading = input(''); /** Heading level when `heading` is set (default h3, matching `app-card`). */ level = input<1 | 2 | 3 | 4 | 5>(3); /** Stacks label above value (`.data-block--stacked`) for long content. */ stacked = input(false); /** Accessible name for the `
` when there is no visible heading. */ ariaLabel = input(''); }