admin.css: style the v0.8 inventory admin surfaces
Closes the audit's unstyled-classes item: 48 emitted-but-unstyled classes across InventoryListPanel (tm-admin-inventory__*, mirroring the tm-admin-list chrome; stock badge ok/low/out on the success/warning/ danger tokens), InventoryDetailPanel (tm-inventory-detail__* — stock hero with state-colored count, tx history table with signed deltas, danger zone) and BulkReceiveModal (tm-bulk-receive__* + the wide modal card). Class-inventory header updated per the file's own convention; verified by diffing emitted class names against stylesheet selectors (only template-literal modifier stems and the tm-meta__field-riding tm-facet-tags wrapper remain, both intentional). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -37,6 +37,15 @@
|
|||||||
* status/actions/upload-btn/remove
|
* status/actions/upload-btn/remove
|
||||||
* tm-featured, tm-featured__list/row/handle/name/type
|
* tm-featured, tm-featured__list/row/handle/name/type
|
||||||
* tm-trash, tm-trash__header/desc/list/date
|
* tm-trash, tm-trash__header/desc/list/date
|
||||||
|
* tm-admin-inventory, tm-admin-inventory__header/title/header-actions/
|
||||||
|
* new/bulk/filters/search/product-filter/low-filter/error/empty/
|
||||||
|
* table/row/cell-link/option-pill/sku/stock-badge[--ok|--low|--out]/
|
||||||
|
* stock-label
|
||||||
|
* tm-inventory-detail, tm-inventory-detail__back/header/options/
|
||||||
|
* option-pill/stock/stock-count[--ok|--low|--out]/stock-meta/
|
||||||
|
* stock-state/stock-actions/meta/error/save/history/tx-table/
|
||||||
|
* delta-pos/delta-neg/danger/delete
|
||||||
|
* tm-bulk-receive__rows/row/variant/qty/remove/add, tm-modal__card--wide
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ── Design tokens ────────────────────────────────────────────────── */
|
/* ── Design tokens ────────────────────────────────────────────────── */
|
||||||
@@ -2377,3 +2386,397 @@
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: var(--as-text-subtle);
|
color: var(--as-text-subtle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── Inventory admin (`tm-admin-inventory`, v0.8 material kinds) ──
|
||||||
|
List page at /admin/inventory. Mirrors the tm-admin-list chrome so
|
||||||
|
the two catalog surfaces read as siblings. Stock states come from
|
||||||
|
classifyStock(): out (0) / low (≤ threshold) / ok. */
|
||||||
|
.tm-admin-inventory {
|
||||||
|
background: var(--as-surface);
|
||||||
|
border: 1px solid var(--as-border);
|
||||||
|
border-radius: var(--as-radius-lg);
|
||||||
|
box-shadow: var(--as-shadow);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-admin-inventory__header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: var(--as-space-4);
|
||||||
|
padding: var(--as-space-5) var(--as-space-6);
|
||||||
|
border-bottom: 1px solid var(--as-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-admin-inventory__title {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: -0.01em;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-admin-inventory__header-actions {
|
||||||
|
display: flex;
|
||||||
|
gap: var(--as-space-3);
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-admin-inventory__new {
|
||||||
|
background: var(--as-accent) !important;
|
||||||
|
color: white !important;
|
||||||
|
border-color: var(--as-accent) !important;
|
||||||
|
font-weight: 600;
|
||||||
|
padding: 8px var(--as-space-4) !important;
|
||||||
|
}
|
||||||
|
.tm-admin-inventory__new:hover:not(:disabled) {
|
||||||
|
background: var(--as-accent-hover) !important;
|
||||||
|
border-color: var(--as-accent-hover) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-admin-inventory__bulk {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-admin-inventory__filters {
|
||||||
|
display: flex;
|
||||||
|
gap: var(--as-space-3);
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding: var(--as-space-4) var(--as-space-6);
|
||||||
|
background: var(--as-bg-subtle);
|
||||||
|
border-bottom: 1px solid var(--as-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-admin-inventory__search {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 220px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-admin-inventory__product-filter {
|
||||||
|
min-width: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-admin-inventory__low-filter {
|
||||||
|
flex-direction: row !important;
|
||||||
|
align-items: center;
|
||||||
|
gap: var(--as-space-2);
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--as-text-muted);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.tm-admin-inventory__low-filter input[type="checkbox"] {
|
||||||
|
accent-color: var(--as-accent);
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-admin-inventory__error {
|
||||||
|
margin: 0;
|
||||||
|
padding: var(--as-space-3) var(--as-space-6);
|
||||||
|
background: var(--as-danger-soft);
|
||||||
|
color: var(--as-danger);
|
||||||
|
font-size: 13px;
|
||||||
|
border-bottom: 1px solid var(--as-danger-soft);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-admin-inventory__empty {
|
||||||
|
padding: var(--as-space-7) var(--as-space-6);
|
||||||
|
text-align: center;
|
||||||
|
color: var(--as-text-muted);
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-admin-inventory__table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
.tm-admin-inventory__table thead th {
|
||||||
|
text-align: left;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: 0.04em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: var(--as-text-muted);
|
||||||
|
padding: var(--as-space-3) var(--as-space-6);
|
||||||
|
background: var(--as-bg-subtle);
|
||||||
|
border-bottom: 1px solid var(--as-border);
|
||||||
|
}
|
||||||
|
.tm-admin-inventory__table tbody td {
|
||||||
|
padding: var(--as-space-4) var(--as-space-6);
|
||||||
|
border-bottom: 1px solid var(--as-border);
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.tm-admin-inventory__table tbody tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
.tm-admin-inventory__row:hover {
|
||||||
|
background: var(--as-surface-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-admin-inventory__cell-link {
|
||||||
|
color: var(--as-text);
|
||||||
|
font-weight: 600;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.tm-admin-inventory__cell-link:hover {
|
||||||
|
color: var(--as-accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-admin-inventory__option-pill {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 2px 8px;
|
||||||
|
margin-right: var(--as-space-1);
|
||||||
|
border-radius: 999px;
|
||||||
|
background: var(--as-bg-subtle);
|
||||||
|
border: 1px solid var(--as-border);
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--as-text-muted);
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-admin-inventory__sku {
|
||||||
|
font-family: var(--as-font-mono, ui-monospace, monospace);
|
||||||
|
font-size: 12px;
|
||||||
|
color: var(--as-text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Stock badge — the at-a-glance state chip. */
|
||||||
|
.tm-admin-inventory__stock-badge {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 2px 10px;
|
||||||
|
border-radius: 999px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 700;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
}
|
||||||
|
.tm-admin-inventory__stock-badge--ok {
|
||||||
|
background: var(--as-success-soft);
|
||||||
|
color: var(--as-success);
|
||||||
|
}
|
||||||
|
.tm-admin-inventory__stock-badge--low {
|
||||||
|
background: var(--as-warning-soft);
|
||||||
|
color: var(--as-warning-text);
|
||||||
|
}
|
||||||
|
.tm-admin-inventory__stock-badge--out {
|
||||||
|
background: var(--as-danger-soft);
|
||||||
|
color: var(--as-danger);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-admin-inventory__stock-label {
|
||||||
|
margin-left: var(--as-space-2);
|
||||||
|
font-size: 12px;
|
||||||
|
color: var(--as-text-subtle);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Inventory detail (`tm-inventory-detail`) ────────────────────── */
|
||||||
|
.tm-inventory-detail {
|
||||||
|
background: var(--as-surface);
|
||||||
|
border: 1px solid var(--as-border);
|
||||||
|
border-radius: var(--as-radius-lg);
|
||||||
|
box-shadow: var(--as-shadow);
|
||||||
|
padding: var(--as-space-6);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--as-space-6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-inventory-detail__back {
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--as-text-muted);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.tm-inventory-detail__back:hover {
|
||||||
|
color: var(--as-accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-inventory-detail__header h1 {
|
||||||
|
margin: var(--as-space-2) 0 var(--as-space-1);
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: -0.01em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-inventory-detail__options {
|
||||||
|
margin: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: var(--as-space-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-inventory-detail__option-pill {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 2px 8px;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: var(--as-bg-subtle);
|
||||||
|
border: 1px solid var(--as-border);
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--as-text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Stock hero — big count + state + receive/adjust actions. */
|
||||||
|
.tm-inventory-detail__stock {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: var(--as-space-5);
|
||||||
|
padding: var(--as-space-5);
|
||||||
|
background: var(--as-bg-subtle);
|
||||||
|
border: 1px solid var(--as-border);
|
||||||
|
border-radius: var(--as-radius-lg);
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-inventory-detail__stock-count {
|
||||||
|
font-size: 40px;
|
||||||
|
font-weight: 800;
|
||||||
|
line-height: 1;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
}
|
||||||
|
.tm-inventory-detail__stock-count--ok { color: var(--as-success); }
|
||||||
|
.tm-inventory-detail__stock-count--low { color: var(--as-warning); }
|
||||||
|
.tm-inventory-detail__stock-count--out { color: var(--as-danger); }
|
||||||
|
|
||||||
|
.tm-inventory-detail__stock-meta {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 160px;
|
||||||
|
}
|
||||||
|
.tm-inventory-detail__stock-state {
|
||||||
|
margin: 0;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.tm-inventory-detail__stock-meta small {
|
||||||
|
color: var(--as-text-subtle);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-inventory-detail__stock-actions {
|
||||||
|
display: flex;
|
||||||
|
gap: var(--as-space-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-inventory-detail__meta {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--as-space-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-inventory-detail__error {
|
||||||
|
margin: 0;
|
||||||
|
padding: var(--as-space-3) var(--as-space-4);
|
||||||
|
background: var(--as-danger-soft);
|
||||||
|
color: var(--as-danger);
|
||||||
|
font-size: 13px;
|
||||||
|
border-radius: var(--as-radius);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-inventory-detail__save {
|
||||||
|
align-self: flex-start;
|
||||||
|
background: var(--as-accent) !important;
|
||||||
|
color: white !important;
|
||||||
|
border-color: var(--as-accent) !important;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.tm-inventory-detail__save:hover:not(:disabled) {
|
||||||
|
background: var(--as-accent-hover) !important;
|
||||||
|
border-color: var(--as-accent-hover) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Transaction history table. */
|
||||||
|
.tm-inventory-detail__history h2 {
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 0 0 var(--as-space-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-inventory-detail__tx-table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
.tm-inventory-detail__tx-table thead th {
|
||||||
|
text-align: left;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: 0.04em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: var(--as-text-muted);
|
||||||
|
padding: var(--as-space-2) var(--as-space-3);
|
||||||
|
background: var(--as-bg-subtle);
|
||||||
|
border-bottom: 1px solid var(--as-border);
|
||||||
|
}
|
||||||
|
.tm-inventory-detail__tx-table tbody td {
|
||||||
|
padding: var(--as-space-2) var(--as-space-3);
|
||||||
|
border-bottom: 1px solid var(--as-border);
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
}
|
||||||
|
.tm-inventory-detail__tx-table tbody tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-inventory-detail__delta-pos { color: var(--as-success); font-weight: 700; }
|
||||||
|
.tm-inventory-detail__delta-neg { color: var(--as-danger); font-weight: 700; }
|
||||||
|
|
||||||
|
/* Danger zone. */
|
||||||
|
.tm-inventory-detail__danger {
|
||||||
|
border-top: 1px solid var(--as-border);
|
||||||
|
padding-top: var(--as-space-4);
|
||||||
|
}
|
||||||
|
.tm-inventory-detail__delete {
|
||||||
|
color: var(--as-danger) !important;
|
||||||
|
border-color: var(--as-danger-soft) !important;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.tm-inventory-detail__delete:hover:not(:disabled) {
|
||||||
|
background: var(--as-danger-soft) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Bulk receive modal (`tm-bulk-receive`) ──────────────────────── */
|
||||||
|
.tm-modal__card--wide {
|
||||||
|
max-width: 560px;
|
||||||
|
width: min(560px, calc(100vw - 2 * var(--as-space-5)));
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-bulk-receive__rows {
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--as-space-2);
|
||||||
|
max-height: 320px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-bulk-receive__row {
|
||||||
|
display: flex;
|
||||||
|
gap: var(--as-space-2);
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-bulk-receive__variant {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-bulk-receive__qty {
|
||||||
|
width: 88px;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-bulk-receive__remove {
|
||||||
|
color: var(--as-danger) !important;
|
||||||
|
border: none !important;
|
||||||
|
background: none !important;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1;
|
||||||
|
padding: var(--as-space-1) !important;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tm-bulk-receive__add {
|
||||||
|
align-self: flex-start;
|
||||||
|
margin-top: var(--as-space-2);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user