import { Component, input } from '@angular/core'; /** Molecule: one key/value row inside a CIBG Huisstijl **Datablock** (see `data-block.component.ts`) — the row primitive of the datablock/`controlestap` data summary. Used on a `
` so the `
`'s direct child is a native element (the HTML5.1 `dl > div > dt + dd` grouping), which keeps the definition list axe-clean — a bare custom element between `
` and its `
/
` trips axe's definition-list rule regardless of `display:contents`. The host is the Bootstrap `.row`; `dt.col-md-4`/`dd.col-md-8` give the label/value widths. Wrap several in a `
` (a ``). Project custom content (e.g. a badge) into the `
` via ``. */ @Component({ selector: 'div[app-data-row]', host: { class: 'row' }, // The CIBG datablock draws a separator between entries. It ships that border on // dt/dd with a `:last-of-type` reset, but our one-row-per-
grouping (for axe) // makes every dt/dd a last-of-type — so we carry the separator on the row instead. styles: [ ` :host:not(:last-of-type) { border-block-end: var(--rhc-border-width-sm) solid var(--rhc-color-cool-grey-200); } `, ], template: `
{{ key() }}
{{ value() }}
`, }) export class DataRowComponent { key = input.required(); value = input(''); }