mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
515 lines
9.1 KiB
CSS
515 lines
9.1 KiB
CSS
/* Datasets manager — two-pane body inside the modal shell (spec §05 → Layout). */
|
|
|
|
.manager {
|
|
display: grid;
|
|
grid-template-columns: 260px 1fr;
|
|
min-height: 0;
|
|
height: 100%;
|
|
}
|
|
|
|
/* --- List pane --- */
|
|
.listPane {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 0;
|
|
border-right: var(--border-width) solid var(--border);
|
|
}
|
|
|
|
.newButton {
|
|
flex: 0 0 auto;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--space-2);
|
|
margin: var(--space-4);
|
|
height: 40px;
|
|
padding: 0 var(--space-5);
|
|
border: var(--border-width) solid transparent;
|
|
border-radius: var(--radius);
|
|
background: var(--accent);
|
|
color: var(--accent-contrast);
|
|
font: inherit;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: background var(--dur-fast) var(--ease);
|
|
}
|
|
|
|
.newButton:hover {
|
|
background: var(--accent-hover);
|
|
}
|
|
|
|
.list {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
flex: 1 1 auto;
|
|
min-height: 0;
|
|
overflow: auto;
|
|
border-top: var(--border-width) solid var(--border);
|
|
}
|
|
|
|
.empty {
|
|
color: var(--text-secondary);
|
|
font-size: 13px;
|
|
line-height: 1.4;
|
|
padding: var(--space-5) var(--space-4);
|
|
}
|
|
|
|
.item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-3);
|
|
padding: 0 var(--space-4);
|
|
border-left: 2px solid transparent;
|
|
transition: background var(--dur-fast) var(--ease);
|
|
}
|
|
|
|
.item + .item {
|
|
border-top: var(--border-width) solid var(--border);
|
|
}
|
|
|
|
.item:hover {
|
|
background: var(--layer-01);
|
|
}
|
|
|
|
.itemActive {
|
|
background: var(--layer-01);
|
|
border-left-color: var(--accent);
|
|
}
|
|
|
|
.itemMain {
|
|
flex: 1 1 auto;
|
|
min-width: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-1);
|
|
appearance: none;
|
|
border: none;
|
|
background: none;
|
|
padding: var(--space-3) 0;
|
|
font: inherit;
|
|
color: inherit;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.itemName {
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.itemMeta {
|
|
font-size: 11px;
|
|
color: var(--text-secondary);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
/* Usage badge — count of referencing snippets (spec §05 → List item). */
|
|
.badge {
|
|
flex: 0 0 auto;
|
|
min-width: 18px;
|
|
height: 18px;
|
|
padding: 0 var(--space-2);
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: var(--text-secondary);
|
|
background: var(--layer-02);
|
|
border-radius: var(--radius);
|
|
}
|
|
|
|
/* --- Detail pane --- */
|
|
.detailPane {
|
|
min-height: 0;
|
|
overflow: auto;
|
|
}
|
|
|
|
.detailEmpty {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100%;
|
|
color: var(--text-secondary);
|
|
font-size: 14px;
|
|
padding: var(--space-6);
|
|
text-align: center;
|
|
}
|
|
|
|
.detail,
|
|
.form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-5);
|
|
padding: var(--space-5);
|
|
}
|
|
|
|
.detailHead {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: var(--space-4);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.detailName {
|
|
margin: 0;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
word-break: break-word;
|
|
}
|
|
|
|
.detailActions,
|
|
.formActions {
|
|
display: flex;
|
|
gap: var(--space-3);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.formActions {
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.action {
|
|
height: 32px;
|
|
padding: 0 var(--space-4);
|
|
border: var(--border-width) solid var(--border-strong);
|
|
border-radius: var(--radius);
|
|
background: transparent;
|
|
color: var(--text);
|
|
font: inherit;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: background var(--dur-fast) var(--ease);
|
|
}
|
|
|
|
.action:hover:not(:disabled) {
|
|
background: var(--layer-01);
|
|
}
|
|
|
|
.action:disabled {
|
|
color: var(--text-placeholder);
|
|
border-color: var(--border);
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.action:focus-visible {
|
|
outline: 2px solid var(--focus);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.primary {
|
|
background: var(--accent);
|
|
border-color: transparent;
|
|
color: var(--accent-contrast);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.primary:hover:not(:disabled) {
|
|
background: var(--accent-hover);
|
|
}
|
|
|
|
.danger {
|
|
border-color: var(--border-strong);
|
|
color: var(--support-error);
|
|
}
|
|
|
|
.danger:hover:not(:disabled) {
|
|
background: var(--support-error);
|
|
color: var(--on-status);
|
|
border-color: transparent;
|
|
}
|
|
|
|
.comment {
|
|
margin: 0;
|
|
font-size: 13px;
|
|
line-height: 1.4;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* URL dataset provenance: the source address + last-fetched time (spec §05). */
|
|
.sourceMeta {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: baseline;
|
|
gap: var(--space-2) var(--space-4);
|
|
margin: 0;
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.sourceLink {
|
|
color: var(--accent);
|
|
text-decoration: none;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.sourceLink:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.sourceLink:focus-visible {
|
|
outline: 2px solid var(--focus);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-3);
|
|
}
|
|
|
|
.sectionTitle {
|
|
margin: 0;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
letter-spacing: 0.04em;
|
|
text-transform: uppercase;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.stats {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
|
|
gap: var(--space-4);
|
|
margin: 0;
|
|
}
|
|
|
|
.stats div {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-1);
|
|
}
|
|
|
|
.stats dt {
|
|
font-size: 11px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.stats dd {
|
|
margin: 0;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
color: var(--text);
|
|
}
|
|
|
|
.columns {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
border: var(--border-width) solid var(--border);
|
|
}
|
|
|
|
.column {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--space-3);
|
|
padding: var(--space-2) var(--space-3);
|
|
}
|
|
|
|
.column + .column {
|
|
border-top: var(--border-width) solid var(--border);
|
|
}
|
|
|
|
.columnName {
|
|
font-size: 13px;
|
|
font-family: var(--font-mono);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.columnType {
|
|
flex: 0 0 auto;
|
|
font-size: 11px;
|
|
color: var(--text-secondary);
|
|
background: var(--layer-01);
|
|
padding: var(--space-1) var(--space-2);
|
|
border-radius: var(--radius);
|
|
}
|
|
|
|
.timestamps {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: var(--space-4);
|
|
font-size: 11px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.preview {
|
|
margin: 0;
|
|
max-height: 220px;
|
|
overflow: auto;
|
|
padding: var(--space-3);
|
|
background: var(--layer-01);
|
|
border: var(--border-width) solid var(--border);
|
|
border-radius: var(--radius);
|
|
font-family: var(--font-mono);
|
|
font-size: 12px;
|
|
line-height: 1.5;
|
|
white-space: pre;
|
|
}
|
|
|
|
/* Tabular preview — a scrollable grid with a sticky header (spec §05 → Preview). */
|
|
.previewTableWrap {
|
|
max-height: 260px;
|
|
overflow: auto;
|
|
border: var(--border-width) solid var(--border);
|
|
border-radius: var(--radius);
|
|
}
|
|
|
|
.previewTable {
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
font-family: var(--font-mono);
|
|
font-size: 12px;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.previewTable th,
|
|
.previewTable td {
|
|
text-align: left;
|
|
padding: var(--space-2) var(--space-3);
|
|
border-bottom: var(--border-width) solid var(--border);
|
|
white-space: nowrap;
|
|
max-width: 240px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.previewTable thead th {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 1;
|
|
background: var(--layer-01);
|
|
font-weight: 600;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.previewTable tbody tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.muted {
|
|
margin: 0;
|
|
font-size: 13px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.linked {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-2);
|
|
}
|
|
|
|
.linkButton {
|
|
appearance: none;
|
|
border: none;
|
|
background: none;
|
|
padding: 0;
|
|
font: inherit;
|
|
font-size: 13px;
|
|
color: var(--accent);
|
|
cursor: pointer;
|
|
text-align: left;
|
|
}
|
|
|
|
.linkButton:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.linkButton:focus-visible {
|
|
outline: 2px solid var(--focus);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* --- Create / edit form --- */
|
|
.field {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-2);
|
|
}
|
|
|
|
.label {
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.input,
|
|
.textarea {
|
|
width: 100%;
|
|
padding: var(--space-3);
|
|
border: var(--border-width) solid var(--border-strong);
|
|
border-radius: var(--radius);
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font: inherit;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.textarea {
|
|
font-family: var(--font-mono);
|
|
resize: vertical;
|
|
min-height: 160px;
|
|
}
|
|
|
|
.input:focus-visible,
|
|
.textarea:focus-visible {
|
|
outline: 2px solid var(--focus);
|
|
outline-offset: -1px;
|
|
}
|
|
|
|
.input::placeholder,
|
|
.textarea::placeholder {
|
|
color: var(--text-placeholder);
|
|
}
|
|
|
|
.detected {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-3);
|
|
margin-top: calc(-1 * var(--space-2));
|
|
}
|
|
|
|
.detectedBadge {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
background: var(--layer-02);
|
|
padding: var(--space-1) var(--space-3);
|
|
border-radius: var(--radius);
|
|
}
|
|
|
|
.detectedHint {
|
|
font-size: 11px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.formError {
|
|
margin: 0;
|
|
font-size: 13px;
|
|
color: var(--support-error);
|
|
}
|
|
|
|
/* The inline-fallback recovery under a failed URL fetch — left-aligned, not
|
|
stretched, so it reads as a secondary recovery beneath the error message. */
|
|
.fallback {
|
|
align-self: flex-start;
|
|
margin-top: calc(-1 * var(--space-2));
|
|
}
|