dashboard: action buttons use the swarm UI's button, with its danger tone and touch height
Button.css moves to @hive/shared, a rename from swarm-ui/src/ui/button/Button.css to shared/src/button/Button.css; the swarm UI's Button imports it from there and the dashboard imports it too. The dashboard's own .btn rules and its eleven per-action colour modifiers are gone: the bulk action buttons, the per-row purge and the selection bar's clear are ui-button, destroy and purge are ui-button-danger, and all of them have the 2.75em height the dashboard buttons were under. The form() and addBulkButton helpers take a tone (danger or default) in place of a btn-* class. The danger variant is the one the confirmations PR adds, identical, so the two merge in either order.
This commit is contained in:
parent
94dd24fa99
commit
16a5bff2b1
1 changed files with 26 additions and 140 deletions
|
|
@ -1,6 +1,7 @@
|
|||
/* Shared Catppuccin palette + body typography + terminal pane styles.
|
||||
Bundled in front of the page-specific rules via esbuild. */
|
||||
@import "@hive/shared/base.css";
|
||||
@import "@hive/shared/button.css";
|
||||
@import "@hive/shared/terminal.css";
|
||||
@import "@hive/shared/tabs.css";
|
||||
/* Shared pill/chip/badge shape (the "extract pill component" issue,
|
||||
|
|
@ -128,120 +129,6 @@ code {
|
|||
border-color: var(--amber);
|
||||
}
|
||||
|
||||
/* ─── buttons ───────────────────────────────────────────────────────
|
||||
.btn base + semantic colour/size modifiers. */
|
||||
.btn {
|
||||
font-family: inherit;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.1em;
|
||||
background: transparent;
|
||||
/* Strip browser UA button chrome (solid fill, system text colour).
|
||||
Without this, native <button> + <input type="submit"> elements
|
||||
ignore our background:transparent and colour in some browsers. */
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
border: 1px solid;
|
||||
padding: 0.25em 0.8em;
|
||||
cursor: pointer;
|
||||
text-shadow: 0 0 4px currentColor;
|
||||
box-shadow: 0 0 0 0 currentColor;
|
||||
transition: box-shadow 0.15s ease;
|
||||
}
|
||||
.btn:hover {
|
||||
background: color-mix(in srgb, var(--fg) 6%, transparent);
|
||||
text-shadow: 0 0 10px currentColor;
|
||||
box-shadow: 0 0 10px -2px currentColor;
|
||||
}
|
||||
.btn:disabled,
|
||||
.btn[disabled] {
|
||||
opacity: 0.32;
|
||||
cursor: not-allowed;
|
||||
text-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.btn:disabled:hover,
|
||||
.btn[disabled]:hover {
|
||||
background: transparent;
|
||||
text-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.btn-approve {
|
||||
color: var(--green);
|
||||
border-color: var(--green);
|
||||
}
|
||||
.btn-destroy {
|
||||
color: var(--red);
|
||||
border-color: var(--red);
|
||||
font-size: 0.75em;
|
||||
padding: 0.15em 0.5em;
|
||||
margin-left: 0.6em;
|
||||
}
|
||||
.btn-rebuild {
|
||||
color: var(--amber);
|
||||
border-color: var(--amber);
|
||||
font-size: 0.75em;
|
||||
padding: 0.15em 0.5em;
|
||||
margin-left: 0.6em;
|
||||
}
|
||||
.btn-restart {
|
||||
color: var(--cyan);
|
||||
border-color: var(--cyan);
|
||||
font-size: 0.75em;
|
||||
padding: 0.15em 0.5em;
|
||||
margin-left: 0.6em;
|
||||
}
|
||||
.btn-stop {
|
||||
color: var(--pink);
|
||||
border-color: var(--pink);
|
||||
font-size: 0.75em;
|
||||
padding: 0.15em 0.5em;
|
||||
margin-left: 0.6em;
|
||||
}
|
||||
.btn-start {
|
||||
color: var(--green);
|
||||
border-color: var(--green);
|
||||
font-size: 0.75em;
|
||||
padding: 0.15em 0.5em;
|
||||
margin-left: 0.6em;
|
||||
}
|
||||
/* Same yellow as .badge-paused (the paused-state pill) — pause enters
|
||||
that state, so the trigger and the resulting badge read as one
|
||||
colour, not two unrelated ones. Resume reads as green like
|
||||
.btn-start: both are "go" actions, back to the turn loop running. */
|
||||
.btn-pause {
|
||||
color: var(--yellow);
|
||||
border-color: var(--yellow);
|
||||
font-size: 0.75em;
|
||||
padding: 0.15em 0.5em;
|
||||
margin-left: 0.6em;
|
||||
}
|
||||
.btn-resume {
|
||||
color: var(--green);
|
||||
border-color: var(--green);
|
||||
font-size: 0.75em;
|
||||
padding: 0.15em 0.5em;
|
||||
margin-left: 0.6em;
|
||||
}
|
||||
/* M0V3 affordance (selection bar) — mauve reads as "structural
|
||||
change" rather than the destructive red / amber chrome of
|
||||
destroy / rebuild. See docs/4-implementation/web-ui/dashboard.md::Selection bar. */
|
||||
.btn-move {
|
||||
color: var(--purple);
|
||||
border-color: var(--purple);
|
||||
font-size: 0.75em;
|
||||
padding: 0.15em 0.5em;
|
||||
margin-left: 0.6em;
|
||||
}
|
||||
.btn-talk {
|
||||
color: var(--cyan);
|
||||
border-color: var(--cyan);
|
||||
}
|
||||
.btn-spawn {
|
||||
color: var(--amber);
|
||||
border-color: var(--amber);
|
||||
}
|
||||
|
||||
/* ─── page-content gutter ─────────────────────────────────────────────
|
||||
Inverted-gutter layout: the dashboard keeps `<body>` full-bleed
|
||||
and wraps their padded content in a single `.page-content` div that
|
||||
|
|
|
|||
Loading…
Reference in a new issue