/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
devtools/projects/ng-devtools/src/lib/devtools-tabs/transfer-state/transfer-state.component.scss
307 строк
6 KB
Georgi Serev
refactor(devtools): create Angie component
30 июл 2026, 18:44
Не верифицирован
30 июл 2026, 18:44
1113faf
Код
Авторство
О чём код?
@use '../../../styles/typography'; @use '@angular/material' as mat; .transfer-state-container { padding: 1rem; display: flex; flex-direction: column; height: 100%; box-sizing: border-box; .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-shrink: 0; h2 { @extend %heading-500; display: flex; align-items: center; gap: 0.5rem; margin: 0; padding: 0; mat-icon { font-size: 16px; width: 16px; height: 16px; } } } .loading { display: flex; align-items: center; justify-content: center; flex: 1; gap: 0.5rem; @extend %body-01; color: var(--secondary-contrast); .spinning { animation: spin 2s linear infinite; } } .info-card { max-width: 32rem; margin: 1rem auto 0; padding: 1.5rem; background: var(--color-foreground); border: 1px solid var(--color-separator); border-radius: 0.5rem; text-align: center; ng-angie { margin: 0 auto 0.75rem; } h3 { @extend %heading-500; margin: 0 0 0.75rem; padding: 0; } p { @extend %body-01; margin: 0.5rem 0; color: var(--secondary-contrast); code { @extend %monospaced; background: var(--color-background); padding: 0.0625rem 0.25rem; border-radius: 0.1875rem; border: 1px solid var(--color-separator); color: var(--color-text); } } .info-link { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--dynamic-blue-02); text-decoration: none; &:hover { text-decoration: underline; } .info-link-icon { font-size: 1rem; width: 1rem; height: 1rem; } } .status-note { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--color-separator); @extend %caption-text; color: var(--tertiary-contrast); } } .transfer-state-content { flex: 1; min-height: 0; display: flex; flex-direction: column; .toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; flex-shrink: 0; flex-wrap: wrap; .summary-stats { display: flex; gap: 1.5rem; .stat { display: flex; align-items: baseline; gap: 0.375rem; .stat-value { @extend %body-bold-01; padding: 0; margin: 0; color: var(--dynamic-blue-02); } .stat-label { @extend %caption-text; color: var(--secondary-contrast); text-transform: uppercase; letter-spacing: 0.03rem; } } } .filter { position: relative; min-width: 12rem; max-width: 20rem; .filter-input { display: block; width: 100%; padding-right: 1.75rem; } button { position: absolute; top: 5px; right: 7px; mat-icon { width: 18px; height: 18px; font-size: 18px; } } } } .table-container { min-height: 0; border: 1px solid var(--color-separator); border-radius: 0.25rem; overflow-y: auto; .transfer-state-table { @include mat.table-density(-2); width: 100%; background: var(--color-background); th { background: var(--color-foreground); font-weight: 600; @extend %body-01; text-transform: uppercase; letter-spacing: 0.03rem; padding: 0.5rem 0.75rem; border-bottom: 2px solid var(--color-separator); } .info-icon { font-size: 16px; height: 16px; width: 16px; color: var(--secondary-contrast); display: inline-block; vertical-align: bottom; margin-left: 0.125rem; } tr { td { padding: 0.625rem 0.75rem; } &:not(:last-of-type) { td { border-bottom: 1px solid var(--color-separator); } } } .key-cell { code { @extend %monospaced; background: var(--color-foreground); padding: 0.125rem 0.375rem; border-radius: 0.1875rem; color: var(--color-text); border: 1px solid var(--color-separator); } } .value-cell { min-width: 12.5rem; width: 100%; .value-container { display: flex; align-items: flex-start; gap: 0.5rem; .value-tree { flex: 1; min-width: 0; --ote-padding: 0; } .copy-button { flex-shrink: 0; min-width: 1.5rem; width: 1.5rem; height: 1.5rem; padding: 0; margin-top: 0.125rem; mat-icon { font-size: 0.875rem; width: 0.875rem; height: 0.875rem; } } } } .type-badge { display: inline-block; padding: 0.125rem 0.5rem; border-radius: 0.75rem; @extend %caption-text; font-weight: 500; text-transform: uppercase; background: transparent; border: 1px solid currentColor; &.type-string { color: var(--dynamic-green-01); } &.type-number { color: var(--dynamic-purple-01); } &.type-boolean { color: var(--dynamic-red-01); } &.type-object { color: var(--dynamic-blue-02); } &.type-array { color: var(--dynamic-orange-01); } &.type-null, &.type-undefined { color: var(--quaternary-contrast); } } } } } } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }