mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
378 lines
8.9 KiB
SCSS
378 lines
8.9 KiB
SCSS
// Generic page & panel layout utilities — reusable across all pages
|
|
// Uses MD3 CSS custom properties from var(--mat-sys-*)
|
|
|
|
// ─── Full-height page: sticky header + scrollable body ─────────────────────
|
|
|
|
.page {
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
background: var(--mat-sys-surface);
|
|
|
|
&__header {
|
|
flex-shrink: 0;
|
|
padding: 20px 24px;
|
|
background: var(--mat-sys-surface-container);
|
|
border-bottom: 1px solid var(--mat-sys-outline-variant);
|
|
}
|
|
|
|
&__title {
|
|
margin: 0 0 4px;
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
color: var(--mat-sys-primary);
|
|
}
|
|
|
|
&__subtitle {
|
|
margin: 0;
|
|
font-size: 13px;
|
|
color: var(--mat-sys-on-surface-variant);
|
|
}
|
|
|
|
&__body {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 16px;
|
|
}
|
|
|
|
&__body--grid2 {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 16px;
|
|
align-content: start;
|
|
}
|
|
|
|
&__body--grid3 {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr 1fr;
|
|
gap: 16px;
|
|
align-content: start;
|
|
}
|
|
}
|
|
|
|
// ─── Workspace: toolbar + side panels + status bar ─────────────────────────
|
|
|
|
.workspace {
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: var(--mat-sys-surface);
|
|
|
|
&__body {
|
|
flex: 1;
|
|
display: flex;
|
|
overflow: hidden;
|
|
}
|
|
}
|
|
|
|
// ─── Toolbar ───────────────────────────────────────────────────────────────
|
|
|
|
.toolbar {
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 12px 24px;
|
|
background: var(--mat-sys-surface-container);
|
|
border-bottom: 1px solid var(--mat-sys-outline-variant);
|
|
|
|
&__title {
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
color: var(--mat-sys-primary);
|
|
}
|
|
|
|
&__actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
}
|
|
|
|
// ─── Side panel (left or right) ─────────────────────────────────────────────
|
|
|
|
.side-panel {
|
|
flex-shrink: 0;
|
|
width: 256px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
background: var(--mat-sys-surface-container);
|
|
border-right: 1px solid var(--mat-sys-outline-variant);
|
|
|
|
&--right {
|
|
border-right: none;
|
|
border-left: 1px solid var(--mat-sys-outline-variant);
|
|
width: 320px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
&__header {
|
|
flex-shrink: 0;
|
|
padding: 12px 16px;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: var(--mat-sys-on-surface);
|
|
border-bottom: 1px solid var(--mat-sys-outline-variant);
|
|
}
|
|
|
|
&__title {
|
|
margin: 0;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: var(--mat-sys-on-surface);
|
|
}
|
|
|
|
&__subtitle {
|
|
margin: 4px 0 0;
|
|
font-size: 12px;
|
|
color: var(--mat-sys-on-surface-variant);
|
|
}
|
|
|
|
&__body {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 8px;
|
|
}
|
|
}
|
|
|
|
// ─── Main (center) panel ───────────────────────────────────────────────────
|
|
|
|
.main-panel {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
background: var(--mat-sys-surface);
|
|
}
|
|
|
|
// ─── Fill: make a child fill its parent panel ──────────────────────────────
|
|
|
|
.panel-fill {
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
// ─── Status bar ─────────────────────────────────────────────────────────────
|
|
|
|
.status-bar {
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 6px 16px;
|
|
font-size: 12px;
|
|
background: var(--mat-sys-surface-container);
|
|
border-top: 1px solid var(--mat-sys-outline-variant);
|
|
color: var(--mat-sys-on-surface-variant);
|
|
|
|
&__info {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
}
|
|
|
|
&__warning {
|
|
color: #d97706;
|
|
font-weight: 500;
|
|
}
|
|
}
|
|
|
|
// ─── Field group (label + value, for detail/properties panels) ──────────────
|
|
|
|
.field-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
|
|
&__label {
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
color: var(--mat-sys-on-surface-variant);
|
|
}
|
|
|
|
&__value {
|
|
padding: 4px 8px;
|
|
background: var(--mat-sys-surface-variant);
|
|
border-radius: 4px;
|
|
font-size: 12px;
|
|
font-family: monospace;
|
|
color: var(--mat-sys-on-surface);
|
|
}
|
|
}
|
|
|
|
// ─── Empty state ────────────────────────────────────────────────────────────
|
|
|
|
.empty-state {
|
|
padding: 24px 16px;
|
|
font-size: 13px;
|
|
color: var(--mat-sys-on-surface-variant);
|
|
text-align: center;
|
|
|
|
&__title {
|
|
margin: 0;
|
|
font-size: 16px;
|
|
font-weight: 500;
|
|
color: var(--mat-sys-on-surface);
|
|
}
|
|
|
|
&__subtitle {
|
|
margin: 0;
|
|
font-size: 13px;
|
|
color: var(--mat-sys-on-surface-variant);
|
|
}
|
|
}
|
|
|
|
// ─── Canvas with drop zone ──────────────────────────────────────────────────
|
|
|
|
.canvas {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 32px;
|
|
|
|
&__surface {
|
|
min-height: 100%;
|
|
background: var(--mat-sys-surface-container);
|
|
border: 1px solid var(--mat-sys-outline-variant);
|
|
border-radius: 8px;
|
|
padding: 32px;
|
|
}
|
|
|
|
&__drop-zone {
|
|
height: 320px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
border: 2px dashed var(--mat-sys-outline-variant);
|
|
border-radius: 8px;
|
|
|
|
&--active {
|
|
border-color: var(--mat-sys-primary);
|
|
background: color-mix(in srgb, var(--mat-sys-primary) 5%, transparent);
|
|
}
|
|
}
|
|
}
|
|
|
|
// ─── Bordered content card (for grid layouts) ────────────────────────────────
|
|
|
|
.content-card {
|
|
background: var(--mat-sys-surface-container);
|
|
border: 1px solid var(--mat-sys-outline-variant);
|
|
border-radius: 8px;
|
|
padding: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
|
|
&--full {
|
|
grid-column: 1 / -1;
|
|
}
|
|
|
|
&__title {
|
|
margin: 0;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: var(--mat-sys-on-surface);
|
|
}
|
|
|
|
&__desc {
|
|
margin: 0;
|
|
font-size: 12px;
|
|
color: var(--mat-sys-on-surface-variant);
|
|
}
|
|
}
|
|
|
|
// ─── List rows ──────────────────────────────────────────────────────────────
|
|
|
|
.list-rows {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
|
|
.list-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 8px 10px;
|
|
background: var(--mat-sys-surface);
|
|
border: 1px solid var(--mat-sys-outline-variant);
|
|
border-radius: 6px;
|
|
|
|
&__info {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
}
|
|
|
|
&__name {
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: var(--mat-sys-on-surface);
|
|
}
|
|
|
|
&__sub {
|
|
font-size: 11px;
|
|
color: var(--mat-sys-on-surface-variant);
|
|
}
|
|
}
|
|
|
|
// ─── Inline pill badge ──────────────────────────────────────────────────────
|
|
|
|
.badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
padding: 2px 8px;
|
|
border-radius: 12px;
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
background: color-mix(in srgb, var(--mat-sys-primary) 12%, transparent);
|
|
color: var(--mat-sys-primary);
|
|
|
|
&--error {
|
|
background: color-mix(in srgb, var(--mat-sys-error) 12%, transparent);
|
|
color: var(--mat-sys-error);
|
|
}
|
|
|
|
&--success {
|
|
background: color-mix(in srgb, #16a34a 12%, transparent);
|
|
color: #16a34a;
|
|
}
|
|
|
|
&--neutral {
|
|
background: color-mix(in srgb, var(--mat-sys-on-surface-variant) 12%, transparent);
|
|
color: var(--mat-sys-on-surface-variant);
|
|
}
|
|
}
|
|
|
|
// ─── Category label ─────────────────────────────────────────────────────────
|
|
|
|
.category-label {
|
|
margin: 0 0 6px 4px;
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.08em;
|
|
color: var(--mat-sys-on-surface-variant);
|
|
}
|
|
|
|
// ─── Numbered/bulleted step list ────────────────────────────────────────────
|
|
|
|
.step-list {
|
|
margin: 0;
|
|
padding: 0 0 0 20px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
|
|
&__item {
|
|
font-size: 13px;
|
|
color: var(--mat-sys-on-surface);
|
|
line-height: 1.5;
|
|
}
|
|
}
|