added generic table-detail-row component

This commit is contained in:
2026-08-17 22:52:20 +02:00
parent 6b7a036128
commit 6eb159cc03
3 changed files with 133 additions and 0 deletions
@@ -0,0 +1,11 @@
<section class="project-panel" aria-label="Detailansicht">
<header class="project-panel__header">
<ng-content select="[table-detail-header]"></ng-content>
</header>
<mat-divider />
<div class="project-panel__content">
<ng-content select="[table-detail-body]"></ng-content>
</div>
</section>
@@ -0,0 +1,111 @@
:host {
display: block;
width: 100%;
background: var(--sg-surface-soft);
}
.project-panel {
width: 100%;
padding: 12px 16px 14px;
color: var(--sg-text);
border-top: 1px solid var(--sg-border);
&__header {
display: flex;
align-items: flex-start;
justify-content: flex-start;
gap: 12px;
}
&__content {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
gap: 10px;
}
}
// Use :host ::ng-deep to allow styles to pierce into the projected content
:host ::ng-deep {
.panel-field {
min-width: 0;
&--full {
grid-column: 1 / -1;
}
}
.panel-field__label {
color: var(--sg-text-muted);
font-size: 10px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.02em;
margin: 0;
}
.panel-field__text {
margin: 0;
font-size: 12px;
line-height: 1.5;
overflow-wrap: anywhere;
}
.project-panel__empty {
display: flex;
align-items: center;
gap: 6px;
grid-column: 1 / -1;
color: var(--sg-text-muted);
font-size: 12px;
mat-icon {
width: 16px;
height: 16px;
font-size: 16px;
}
}
.language-toggle {
display: inline-flex;
flex: 0 0 auto;
padding: 1px;
border: 1px solid var(--sg-border);
border-radius: 4px;
background: var(--sg-background);
&__button {
min-width: 27px;
padding: 2px 5px;
border: 0;
border-radius: 3px;
color: var(--sg-text-muted);
background: transparent;
font-family: inherit;
font-size: 9px;
font-weight: 700;
line-height: 1.4;
cursor: pointer;
&:hover,
&:focus-visible {
color: var(--sg-primary);
outline: none;
}
&.active {
color: var(--sg-background);
background: var(--sg-primary);
}
}
}
.language-label {
flex: 0 0 auto;
padding: 2px 5px;
border: 1px solid var(--sg-border);
border-radius: 3px;
color: var(--sg-text-muted);
background: var(--sg-background);
font-size: 9px;
font-weight: 700;
}
}
@@ -0,0 +1,11 @@
import { Component } from '@angular/core';
import { MatDividerModule } from '@angular/material/divider';
@Component({
selector: 'app-table-detail-row',
standalone: true,
imports: [MatDividerModule],
templateUrl: './table-detail-row.component.html',
styleUrls: ['./table-detail-row.component.scss'],
})
export class TableDetailRowComponent {}