/
webru
/
prisma-ui
Обзор
Документация
Войти
/
webru
/
prisma-ui
Код
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ops-patterns.css
430 строк
9 KB
webru
Add Ops narrative patterns, node detail demo, and UI conventions.
14 июн 2026, 14:28
14 июн 2026, 14:28
47b1546
Код
Авторство
О чём код?
/** * Prisma UI — Patterns: tabs, pagination, empty, loading, progress, breadcrumbs */ /* ── Breadcrumbs ────────────────────────────────────────────────── */ .ops-breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 10px; font-size: 0.72rem; } .ops-breadcrumbs__item { color: var(--muted); text-decoration: none; } .ops-breadcrumbs__item:hover { color: var(--text); text-decoration: none; } .ops-breadcrumbs__item.is-current { color: var(--text); pointer-events: none; } .ops-breadcrumbs__sep { color: var(--muted); opacity: 0.6; } /* ── Tabs ───────────────────────────────────────────────────────── */ [data-ops-tabs] { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--panel); overflow: hidden; } .ops-tabs { display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; border: none; border-bottom: 1px solid var(--border); border-radius: 0; background: var(--panel-2); } .ops-tabs__tab { position: relative; margin: 0; padding: 8px 14px; border: none; border-right: 1px solid var(--border-subtle); border-radius: 0; background: transparent; color: var(--muted); font-family: inherit; font-size: 0.76rem; font-weight: 500; cursor: pointer; transition: color 0.12s ease, background 0.12s ease; } .ops-tabs__tab:last-child { border-right: none; } .ops-tabs__tab:hover:not(.is-active) { color: var(--text); background: rgba(59, 130, 246, 0.05); } .ops-tabs__tab.is-active { color: var(--text); font-weight: 600; background: var(--panel); box-shadow: inset 0 2px 0 var(--accent); } .ops-tabs__tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--panel); z-index: 1; } .ops-tabs__panel { display: none; padding: 12px 14px; background: var(--panel); } .ops-tabs__panel.is-active { display: block; } /* Контент внутри вкладки — без второй рамки */ .ops-tabs__panel > .ops-panel:only-child { padding: 0; border: none; border-radius: 0; background: transparent; } .ops-tabs__panel:has(> .ops-chart) { padding: 0; } .ops-tabs__panel > .ops-chart { border: none; border-radius: 0; } /* ── Timeline (entity history) ──────────────────────────────────── */ .ops-timeline { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--panel); overflow: hidden; } .ops-timeline__item { display: grid; grid-template-columns: 11rem 1fr auto; gap: 8px 12px; align-items: baseline; padding: 8px 12px; border-bottom: 1px solid var(--border-subtle); font-size: 0.76rem; } .ops-timeline__item:last-child { border-bottom: none; } .ops-timeline__ts { flex-shrink: 0; font-size: 0.72rem; } .ops-timeline__label { color: var(--text); min-width: 0; } .ops-timeline__meta { font-size: 0.72rem; color: var(--muted); text-align: right; } @media (max-width: 640px) { .ops-timeline__item { grid-template-columns: 1fr; gap: 2px; } .ops-timeline__meta { text-align: left; } } /* ── Pagination ─────────────────────────────────────────────────── */ .ops-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--panel); font-size: 0.74rem; } .ops-pagination__info { color: var(--muted); } .ops-pagination__info .ops-mono { font-size: inherit; } .ops-pagination__nav { display: flex; align-items: center; gap: 4px; } .ops-pagination__btn { min-width: 28px; min-height: 26px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-control); color: var(--muted); font-family: inherit; font-size: 0.72rem; cursor: pointer; } .ops-pagination__btn:hover:not(:disabled) { color: var(--text); border-color: var(--accent); } .ops-pagination__btn.is-active { color: var(--text); border-color: rgba(59, 130, 246, 0.5); background: rgba(59, 130, 246, 0.1); } .ops-pagination__btn:disabled { opacity: 0.4; cursor: not-allowed; } /* ── Empty state ────────────────────────────────────────────────── */ .ops-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 160px; padding: 24px 16px; border: 1px dashed var(--border); border-radius: var(--radius-md); background: var(--panel); text-align: center; } .ops-empty__icon { font-size: 1.5rem; color: var(--muted); opacity: 0.6; } .ops-empty__title { margin: 0; font-size: 0.88rem; font-weight: 600; } .ops-empty__hint { margin: 0; max-width: 36ch; font-size: 0.76rem; color: var(--muted); line-height: 1.4; } /* ── Loading ────────────────────────────────────────────────────── */ .ops-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 120px; padding: 20px; color: var(--muted); font-size: 0.76rem; } .ops-spinner { width: 22px; height: 22px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: ops-spin 0.7s linear infinite; } @keyframes ops-spin { to { transform: rotate(360deg); } } .ops-skeleton { height: 12px; border-radius: var(--radius-sm); background: linear-gradient( 90deg, var(--panel-2) 25%, var(--border-subtle) 50%, var(--panel-2) 75% ); background-size: 200% 100%; animation: ops-skeleton 1.2s ease-in-out infinite; } @keyframes ops-skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } } .ops-skeleton--sm { height: 8px; } .ops-skeleton--lg { height: 18px; } /* ── Progress ───────────────────────────────────────────────────── */ .ops-progress { margin-bottom: 8px; } .ops-progress__label { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 0.72rem; color: var(--muted); } .ops-progress__track { height: 6px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--border-subtle); overflow: hidden; } .ops-progress__bar { height: 100%; border-radius: 2px; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); transition: width 0.2s ease; } .ops-progress__bar--warn { background: var(--warn); box-shadow: 0 0 8px var(--warn-glow); } .ops-progress__bar--ok { background: var(--ok); box-shadow: 0 0 8px var(--ok-glow); } /* ── Segmented control ──────────────────────────────────────────── */ .ops-segmented { display: inline-flex; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--panel); } .ops-segmented__btn { padding: 5px 10px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font-family: inherit; font-size: 0.72rem; cursor: pointer; } .ops-segmented__btn.is-active { color: var(--text); border-color: rgba(59, 130, 246, 0.4); background: rgba(59, 130, 246, 0.1); } /* ── Icon button ────────────────────────────────────────────────── */ .ops-btn--icon { min-width: 28px; padding: 0; font-size: 0.85rem; } /* ── Badge (count / label) ──────────────────────────────────────── */ .ops-badge { display: inline-flex; align-items: center; min-height: 18px; padding: 0 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-control); font-size: 0.64rem; font-weight: 600; color: var(--muted); } .ops-badge--accent { color: var(--accent-soft-text); border-color: rgba(59, 130, 246, 0.35); }