Document stock visual decisions and operational UI examples
This commit is contained in:
1 parent
714447aa06
commit
08ff987edb
14 files changed
+532
-7
No files matched your search
@@ -0,0 +1,67 @@
|
||||
/* Optional operational layer; load after view.css. */
|
||||
.operations .page-title-row, .operations .table-toolbar, .operations .form-actions {
|
||||
display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
|
||||
}
|
||||
.operations .page-title-row { justify-content: space-between; margin-bottom: 16px; }
|
||||
.operations .page-title-row h2 { margin: 0; font-size: 22px; }
|
||||
.operations .table-toolbar {
|
||||
justify-content: space-between; padding: 9px 12px; background: var(--surface-2);
|
||||
border: 1px solid var(--border); border-bottom: 0; border-radius: 4px 4px 0 0;
|
||||
}
|
||||
.operations .table-toolbar + .table-wrap { border-radius: 0 0 4px 4px; }
|
||||
.operations .table-wrap { max-height: 60vh; overflow: auto; }
|
||||
.operations .data-table { border-collapse: separate; border-spacing: 0; min-width: 680px; }
|
||||
.operations .data-table th, .operations .data-table td { padding: 3px 14px; vertical-align: middle; }
|
||||
.operations .data-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); }
|
||||
.operations .data-table .child-row td { padding-top: 1px; padding-bottom: 1px; line-height: 18px; }
|
||||
.operations .data-table .child-name { padding-left: 32px; }
|
||||
.operations .number { text-align: right; font-variant-numeric: tabular-nums; }
|
||||
.operations .identifier { white-space: nowrap; }
|
||||
.operations .actions-column { width: 1%; text-align: right; white-space: nowrap; }
|
||||
.operations .row-status-warning { background: var(--warn-bg); }
|
||||
.operations .btn-primary, .operations .btn-secondary, .operations .btn-danger {
|
||||
min-height: 32px; padding: 6px 12px; border: 1px solid var(--border);
|
||||
border-radius: 4px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
|
||||
}
|
||||
.operations .btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
|
||||
.operations .btn-secondary { background: var(--surface); color: var(--ink); }
|
||||
.operations .btn-danger { background: var(--surface); color: var(--crit-fg); border-color: var(--crit-border); }
|
||||
.operations button:disabled { opacity: .55; cursor: not-allowed; }
|
||||
.operations button[aria-busy="true"] { cursor: wait; }
|
||||
.operations .icon-button {
|
||||
display: inline-grid; place-items: center; width: 24px; min-height: 24px;
|
||||
padding: 0; border: 1px solid transparent; border-radius: 4px;
|
||||
background: transparent; color: var(--muted); cursor: pointer;
|
||||
}
|
||||
.operations .icon-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
|
||||
.operations :is(button, a, input, select, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
.operations .quiet-link { color: inherit; text-decoration: none; }
|
||||
.operations .quiet-link:hover { text-decoration: underline; }
|
||||
.operations .table-filters { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 4px; }
|
||||
.operations .table-filters summary { padding: 6px 10px; background: var(--surface-2); cursor: pointer; }
|
||||
.operations .table-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
|
||||
.operations .active-filter { padding: 4px; border-left: 3px solid var(--accent); background: var(--accent-bg); }
|
||||
.operations .field { display: flex; flex-direction: column; gap: 4px; }
|
||||
.operations .field label { color: var(--muted); font-size: 12px; font-weight: 700; }
|
||||
.operations .field input, .operations .field select {
|
||||
min-width: 0; width: 100%; border: 1px solid var(--border); border-radius: 4px;
|
||||
padding: 6px 8px; font: inherit; background: var(--surface); color: var(--ink);
|
||||
}
|
||||
.operations .record-head { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
|
||||
.operations .field-short { flex: 0 1 130px; }
|
||||
.operations .field-grow { flex: 1 1 240px; }
|
||||
.operations .segmented { display: inline-flex; padding: 0; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
|
||||
.operations .segmented label { padding: 6px 10px; border-right: 1px solid var(--border); cursor: pointer; }
|
||||
.operations .segmented label:last-child { border-right: 0; }
|
||||
.operations .segmented label:has(input:checked) { background: var(--accent); color: white; }
|
||||
.operations .is-pending { outline: 1px dashed currentColor; outline-offset: 2px; }
|
||||
.operations .form-note { color: var(--muted); font-size: 12px; }
|
||||
.operations .form-actions { margin: 16px 0; }
|
||||
.operations .audit-before del { color: var(--crit-fg); }
|
||||
.operations .audit-after ins { color: var(--ok-fg); text-decoration: none; }
|
||||
.operations .prices-hidden [data-sensitive] { background: black; color: transparent; border-radius: 2px; user-select: none; }
|
||||
@media (max-width: 720px) {
|
||||
.operations .table-filter-grid { grid-template-columns: 1fr; }
|
||||
.operations .record-head { flex-direction: column; }
|
||||
.operations .field-short, .operations .field-grow { flex: auto; }
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
<!doctype html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Операционные компоненты</title>
|
||||
<link rel="stylesheet" href="view.css">
|
||||
<link rel="stylesheet" href="operations.css">
|
||||
</head>
|
||||
<body class="operations">
|
||||
<header class="page-header"><h1>Операционные компоненты</h1></header>
|
||||
<main class="page-main">
|
||||
<p>Статические примеры состояний. Кнопки действий показаны без подключения к данным.</p>
|
||||
<section class="section-card" aria-labelledby="records-title">
|
||||
<div class="page-title-row"><h2 id="records-title">Закупки</h2><button type="button" class="btn-primary">Создать закупку</button></div>
|
||||
<details class="table-filters" open>
|
||||
<summary>Фильтры · 1 активный · найдено 2 записи</summary>
|
||||
<div class="table-filter-grid">
|
||||
<div class="field active-filter"><label for="status">Статус</label><select id="status"><option selected>В пути</option><option>Все</option></select></div>
|
||||
<div class="field"><label for="query">Номер закупки</label><input id="query" type="search" placeholder="Содержит..."></div>
|
||||
</div>
|
||||
</details>
|
||||
<div class="table-toolbar"><span>Показано 1–2 из 2</span><button type="button" class="btn-secondary" disabled>Экспорт выбранного</button></div>
|
||||
<div class="table-wrap" tabindex="0" role="region" aria-label="Закупки, прокручиваемая таблица">
|
||||
<table class="data-table">
|
||||
<thead><tr><th scope="col">Закупка / позиция</th><th scope="col">Неделя</th><th scope="col" class="number">Количество</th><th scope="col">Статус</th><th scope="col" class="number">Сумма</th><th scope="col" class="actions-column" aria-label="Действия"></th></tr></thead>
|
||||
<tbody>
|
||||
<tr class="row-status-warning"><th scope="row" class="identifier">PO-DEMO-01</th><td>2026 · W40</td><td class="number">10</td><td><span class="status-badge status-warning">В пути</span></td><td class="number">$13 320</td><td class="actions-column"><button type="button" class="icon-button" title="Изменить PO-DEMO-01" aria-label="Изменить PO-DEMO-01"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="m4 16 9-9 3 3-9 9H4zm11-9 2-2 3 3-2 2"/></svg></button></td></tr>
|
||||
<tr class="child-row"><th scope="row" class="child-name">Устройство A</th><td>2026 · W40</td><td class="number">10</td><td>Ожидается</td><td class="number">$13 320</td><td></td></tr>
|
||||
<tr><th scope="row" class="identifier">PO-DEMO-02</th><td>2026 · W41</td><td class="number">0</td><td><span class="status-badge status-unknown">Дата уточняется</span></td><td class="number">$0</td><td></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section class="section-card" aria-labelledby="edit-title">
|
||||
<h2 id="edit-title">Поля редактора и состояния сохранения</h2>
|
||||
<div class="record-head">
|
||||
<div class="field field-short"><label for="code">Код</label><input id="code" value="DEMO-01" readonly></div>
|
||||
<div class="field field-grow"><label for="name">Название</label><input id="name" value="Пример проекта"></div>
|
||||
<div class="field field-short"><label for="date">Дата поставки</label><input id="date" type="date" value="2026-10-01"></div>
|
||||
</div>
|
||||
<p id="probability-label">Вероятность реализации (уровни этого примера)</p>
|
||||
<div class="segmented" role="group" aria-labelledby="probability-label">
|
||||
<label><input type="radio" name="probability" value="0"> 0%</label><label><input type="radio" name="probability" value="25"> 25%</label><label><input type="radio" name="probability" value="50" checked> 50%</label><label><input type="radio" name="probability" value="75"> 75%</label><label><input type="radio" name="probability" value="100"> 100%</label>
|
||||
</div>
|
||||
<p><span class="is-pending">На складе</span> <span class="form-note">Изменение применится при сохранении.</span></p>
|
||||
<div class="form-actions"><button type="button" class="btn-primary">Сохранить</button><button type="button" class="btn-primary" disabled aria-busy="true">Сохранение...</button><button type="button" class="btn-secondary" disabled>Нет изменений</button></div>
|
||||
<p>Пример выбора при закрытии с несохранёнными изменениями:</p>
|
||||
<div class="form-actions"><button type="button" class="btn-secondary">Продолжить редактирование</button><button type="button" class="btn-danger">Закрыть без сохранения</button></div>
|
||||
</section>
|
||||
<section class="section-card" aria-labelledby="history-title">
|
||||
<h2 id="history-title">История</h2>
|
||||
<p><time datetime="2026-10-03T10:30:00+03:00">03.10.2026 10:30</time> · operator · изменено количество: <del>8</del> → <ins>10</ins></p>
|
||||
<details><summary>Изменены 2 поля</summary><div class="table-wrap" tabindex="0" role="region" aria-label="Изменения полей"><table class="data-table"><thead><tr><th scope="col">Поле</th><th scope="col">Было</th><th scope="col">Стало</th></tr></thead><tbody><tr><th scope="row">Позиция и количество</th><td class="audit-before"><del>Устройство A — 8 шт.</del></td><td class="audit-after"><ins>Устройство A — 10 шт.</ins></td></tr><tr><th scope="row">Статус</th><td class="audit-before">В пути</td><td class="audit-after">На складе</td></tr></tbody></table></div></details>
|
||||
</section>
|
||||
<section class="section-card" aria-labelledby="privacy-title">
|
||||
<h2 id="privacy-title">Маскирование для демонстрации экрана</h2>
|
||||
<p>Обычное состояние: <span data-sensitive>$13 320</span></p>
|
||||
<p class="prices-hidden">Маскирование включено: <span data-sensitive>$13 320</span></p>
|
||||
<p class="form-note">Значение остаётся в DOM. Это не редактирование экспортов и не ограничение доступа.</p>
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user