DataGrid - initial commit

This commit is contained in:
2026-06-11 18:21:15 +02:00
parent fdab7cd362
commit 2fc4648515
27 changed files with 1813 additions and 648 deletions

View File

@@ -607,3 +607,335 @@
transition: none;
}
}
/* Reusable dismissible page alerts */
.alert-dismissible {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
position: sticky;
top: 10px;
z-index: 30;
box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}
.alert-dismissible .alert-message {
min-width: 0;
flex: 1 1 auto;
}
.alert-dismiss {
border: 0;
background: transparent;
color: currentColor;
opacity: 0.78;
cursor: pointer;
line-height: 1;
padding: 2px;
border-radius: 999px;
flex: 0 0 auto;
}
.alert-dismiss:hover,
.alert-dismiss:focus-visible {
opacity: 1;
background: rgba(255, 255, 255, 0.45);
}
/* Reusable data grid */
.data-grid-shell {
width: 100%;
min-width: 0;
overflow: auto;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--surface);
scrollbar-gutter: stable;
}
.card-body > .data-grid-shell:only-child {
margin: -22px -24px;
width: calc(100% + 48px);
border-left: 0;
border-right: 0;
border-radius: 0;
}
.data-grid-container {
height: 100%;
}
.data-grid {
display: grid;
align-items: stretch;
}
.data-grid-has-flex {
width: 100%;
min-width: max-content;
}
.data-grid-fixed-only {
width: 100%;
min-width: max-content;
}
.data-grid-container .data-grid {
min-height: 100%;
}
.data-grid-cell {
min-width: 0;
padding: 11px 12px;
border-right: 1px solid rgba(189, 184, 176, 0.32);
border-bottom: 1px solid var(--border-soft, var(--line));
background: var(--surface);
display: flex;
align-items: center;
gap: 8px;
}
.data-grid-cell:last-child {
border-right: 0;
}
.data-grid-header-cell {
position: sticky;
top: 0;
z-index: 4;
background: var(--bar);
border-bottom: 1px solid var(--line-dark);
color: #625f5a;
font-size: 12px;
font-weight: 800;
letter-spacing: .04em;
text-transform: uppercase;
box-shadow: none;
}
.data-grid-body-cell {
color: var(--text);
}
.data-grid-body-cell.data-grid-row-odd {
background: #fbfaf8;
}
.data-grid-body-cell.data-grid-row-even {
background: var(--surface);
}
.data-grid-body-cell.align-center,
.data-grid-header-cell.align-center {
justify-content: center;
text-align: center;
}
.data-grid-body-cell.align-right,
.data-grid-header-cell.align-right {
justify-content: flex-end;
text-align: right;
}
.data-grid-header-button {
all: unset;
display: inline-flex;
align-items: center;
justify-content: space-between;
gap: 7px;
flex: 1 1 auto;
min-width: 0;
color: inherit;
cursor: default;
}
.data-grid-header-button span {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.data-grid-header-cell.is-sortable .data-grid-header-button {
cursor: pointer;
}
.data-grid-header-cell.is-sorted .data-grid-header-button {
color: var(--text-strong);
}
.data-grid-resize-handle,
.data-grid-filter-trigger {
border: 0;
background: transparent;
color: rgba(98, 95, 90, .68);
padding: 0;
display: inline-flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
border-radius: 999px;
}
.data-grid-resize-handle {
cursor: col-resize;
width: 16px;
align-self: stretch;
}
.data-grid-filter-trigger {
width: 24px;
height: 24px;
cursor: pointer;
}
.data-grid-filter-trigger:hover,
.data-grid-filter-trigger:focus-visible,
.data-grid-filter-trigger.is-open {
color: var(--text-strong);
background: rgba(255, 255, 255, .45);
outline: none;
}
.data-grid-filter-trigger.has-filter {
color: var(--text-strong);
background: rgba(255, 255, 255, .62);
box-shadow: inset 0 0 0 1px rgba(98, 95, 90, .24);
}
.data-grid-filter-popover {
position: fixed;
z-index: 12000;
border: 1px solid var(--line-dark);
border-radius: var(--radius-sm);
background: var(--surface);
box-shadow: var(--shadow-menu);
padding: 12px;
color: var(--text);
}
.data-grid-filter-popover-header {
display: flex;
align-items: center;
gap: 12px;
justify-content: space-between;
margin-bottom: 10px;
color: var(--text-strong);
}
.data-grid-filter-popover-header strong {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.data-grid-filter-popover-header button,
.data-grid-filter-input-wrap button {
border: 0;
background: transparent;
color: var(--muted);
cursor: pointer;
border-radius: 999px;
display: inline-flex;
align-items: center;
justify-content: center;
}
.data-grid-filter-popover-header button:hover,
.data-grid-filter-input-wrap button:hover,
.data-grid-filter-popover-header button:focus-visible,
.data-grid-filter-input-wrap button:focus-visible {
color: var(--text-strong);
background: var(--panel-soft);
outline: none;
}
.data-grid-filter-stack {
display: grid;
gap: 10px;
}
.data-grid-filter-field {
display: grid;
gap: 5px;
font-size: 12px;
color: var(--muted);
font-weight: 700;
}
.data-grid-filter-field input,
.data-grid-filter-field select {
width: 100%;
border: 1px solid var(--line);
border-radius: var(--radius-sm);
background: #fff;
color: var(--text);
font: inherit;
font-weight: 500;
padding: 8px 10px;
}
.data-grid-filter-field input:focus,
.data-grid-filter-field select:focus {
outline: none;
box-shadow: var(--focus-ring);
border-color: var(--blue);
}
.data-grid-filter-input-wrap {
position: relative;
}
.data-grid-filter-input-wrap input {
padding-right: 32px;
}
.data-grid-filter-input-wrap button {
position: absolute;
right: 6px;
top: 50%;
transform: translateY(-50%);
width: 22px;
height: 22px;
}
.data-grid-empty {
grid-column: 1 / -1;
padding: 20px;
color: var(--muted);
background: var(--surface);
border-bottom: 1px solid var(--line);
}
.data-grid-cell.is-sticky-start,
.data-grid-cell.is-sticky-end {
position: sticky;
z-index: 2;
background-clip: padding-box;
}
.data-grid-cell.is-sticky-start {
border-right: 1px solid var(--line-dark);
box-shadow: 8px 0 14px -14px rgba(45, 43, 40, .6);
}
.data-grid-cell.is-sticky-end {
border-left: 1px solid var(--line-dark);
box-shadow: -8px 0 14px -14px rgba(45, 43, 40, .6);
}
.data-grid-header-cell.is-sticky-start,
.data-grid-header-cell.is-sticky-end {
z-index: 5;
border-bottom: 1px solid var(--line-dark);
background: var(--bar);
}
.data-grid-body-cell.current-version-row,
.data-grid-body-cell.current-recipient-row,
.data-grid-body-cell.current-row {
font-weight: 700;
}