mirror of
https://github.com/rustfs/console.git
synced 2026-11-30 09:37:18 +08:00
424 lines
9.2 KiB
CSS
424 lines
9.2 KiB
CSS
/* Product-level overrides keep the upstream UI primitives reusable. */
|
|
.console-ui {
|
|
font-size: 0.875rem;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.console-ui :where(h1, h2, h3) {
|
|
text-wrap: pretty;
|
|
}
|
|
|
|
.console-ui :where(h1, h2, .font-heading) {
|
|
font-stretch: 112%;
|
|
}
|
|
|
|
.console-ui :lang(zh) :where(h1, h2, h3, .font-heading) {
|
|
letter-spacing: 0;
|
|
}
|
|
|
|
.console-ui [data-slot="card"] {
|
|
--card-spacing: 1.5rem;
|
|
border: 1px solid var(--border);
|
|
box-shadow: none;
|
|
}
|
|
|
|
.console-ui [data-slot="card-title"] {
|
|
font-family: var(--font-sans);
|
|
font-size: 0.875rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.console-ui
|
|
:where(
|
|
[data-slot="input"],
|
|
[data-slot="input-group"],
|
|
[data-slot="select-trigger"],
|
|
[data-slot="native-select"],
|
|
[data-slot="input-group-control"]
|
|
) {
|
|
min-height: 2.5rem;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.console-ui [data-slot="input-group"] input {
|
|
min-height: 0;
|
|
}
|
|
|
|
.console-ui [class~="group/button"] {
|
|
min-height: 2.5rem;
|
|
font-size: 0.875rem;
|
|
transition-property: color, background-color, border-color, box-shadow, transform;
|
|
transition-duration: var(--duration-fast);
|
|
}
|
|
|
|
/* The class survives Base UI render composition; trigger data-slot values do not. */
|
|
.console-ui [class~="group/button"]:is(.h-6, .size-6) {
|
|
min-height: 1.5rem;
|
|
}
|
|
|
|
.console-ui [class~="group/button"]:is(.h-7, .size-7) {
|
|
min-height: 2rem;
|
|
}
|
|
|
|
.console-ui [class~="group/button"]:is(.h-9, .size-9) {
|
|
min-height: 2.75rem;
|
|
}
|
|
|
|
.console-ui [class~="group/button"].size-6 {
|
|
width: 1.5rem;
|
|
height: 1.5rem;
|
|
}
|
|
.console-ui [class~="group/button"].size-7 {
|
|
width: 2rem;
|
|
height: 2rem;
|
|
}
|
|
.console-ui [class~="group/button"].size-8 {
|
|
width: 2.5rem;
|
|
height: 2.5rem;
|
|
}
|
|
.console-ui [class~="group/button"].size-9 {
|
|
width: 2.75rem;
|
|
height: 2.75rem;
|
|
}
|
|
|
|
.console-ui
|
|
:where([data-slot="dialog-footer"], [data-slot="alert-dialog-footer"], .page-actions, .table-toolbar)
|
|
[class~="group/button"] {
|
|
min-height: 2.5rem;
|
|
height: 2.5rem;
|
|
}
|
|
|
|
.console-ui :where([class~="group/button"], [data-slot="input"], [data-slot="select-trigger"]):focus-visible {
|
|
outline: 2px solid var(--ring);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.console-ui :where([data-sidebar="menu-button"], [data-sidebar="menu-sub-button"])[data-active] {
|
|
background: var(--selection);
|
|
color: var(--link);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.console-ui [data-slot="badge"] {
|
|
font-family: var(--font-mono);
|
|
font-size: 0.6875rem;
|
|
font-weight: 500;
|
|
letter-spacing: 0.04em;
|
|
}
|
|
|
|
.console-ui
|
|
:where(
|
|
[data-slot="dialog-content"],
|
|
[data-slot="alert-dialog-content"],
|
|
[data-slot="popover-content"],
|
|
[data-slot="dropdown-menu-content"]
|
|
) {
|
|
box-shadow: var(--shadow-overlay);
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
.console-ui :where([data-slot="input"], [data-slot="input-group"], [data-slot="select-trigger"]) {
|
|
min-height: 2.75rem;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.console-ui :where([data-slot="dialog-footer"], [data-slot="alert-dialog-footer"]) [class~="group/button"] {
|
|
min-height: 2.75rem;
|
|
}
|
|
}
|
|
|
|
.console-ui [class~="group/button"]:where(.h-8) {
|
|
min-height: 2.5rem;
|
|
padding-inline: 1rem;
|
|
}
|
|
|
|
.console-ui [data-slot="input-group"] [class~="group/button"]:is([data-size="icon-xs"], [data-size="icon-sm"]) {
|
|
min-height: 2rem;
|
|
width: 2rem;
|
|
height: 2rem;
|
|
padding: 0;
|
|
}
|
|
|
|
.console-ui :where(a.text-primary, [class~="group/button"].text-primary) {
|
|
color: var(--link);
|
|
}
|
|
|
|
.console-ui [data-slot="table-head"] {
|
|
height: 2.5rem;
|
|
background: var(--muted);
|
|
font-family: var(--font-mono);
|
|
font-size: 0.6875rem;
|
|
font-weight: 500;
|
|
letter-spacing: 0.08em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.console-ui [data-slot="table-cell"] {
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.console-ui [data-slot="tabs-list"] {
|
|
height: auto;
|
|
min-height: 2.5rem;
|
|
}
|
|
|
|
.console-ui [data-slot="tabs-trigger"] {
|
|
min-height: 2.5rem;
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
.console-ui [class~="group/button"] {
|
|
min-height: 2.75rem;
|
|
}
|
|
|
|
.console-ui [data-slot="tabs-list"],
|
|
.console-ui [data-slot="tabs-trigger"] {
|
|
min-height: 2.75rem;
|
|
}
|
|
}
|
|
|
|
.console-ui [data-slot="table-head"] button {
|
|
min-height: 2rem;
|
|
font: inherit;
|
|
letter-spacing: inherit;
|
|
text-transform: inherit;
|
|
}
|
|
|
|
/* Table names are actions too, even when they render as plain buttons. */
|
|
.console-ui [data-slot="table-cell"] button:not([class~="group/button"]):not([role="checkbox"]):not([role="switch"]) {
|
|
min-height: 2rem;
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
.console-ui
|
|
:where([data-slot="table-head"], [data-slot="table-cell"])
|
|
button:not([role="checkbox"]):not([role="switch"]),
|
|
.console-ui [data-slot="native-select"] {
|
|
min-height: 2.75rem;
|
|
}
|
|
}
|
|
|
|
.console-ui
|
|
:where(
|
|
[data-slot="switch"],
|
|
[data-slot="switch-thumb"],
|
|
[data-slot="radio-group-item"],
|
|
[data-slot="radio-group-indicator"] > span
|
|
) {
|
|
border-radius: 0;
|
|
}
|
|
|
|
.console-ui :where([data-slot$="-overlay"], .backdrop-blur, .backdrop-blur-xs) {
|
|
backdrop-filter: none;
|
|
}
|
|
|
|
.console-ui [data-slot$="-overlay"] {
|
|
background-color: color-mix(in srgb, var(--color-neutral-950) 40%, transparent);
|
|
}
|
|
|
|
.page-heading :where(h1) {
|
|
font-family: var(--font-heading);
|
|
font-size: 2rem;
|
|
font-weight: 650;
|
|
line-height: 1.12;
|
|
letter-spacing: -0.04em;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.page-heading :where(h2) {
|
|
font-family: var(--font-heading);
|
|
font-size: 1.25rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
.console-ui [class~="group/button"]:is(.h-6, .h-7, .h-8, .h-9, .size-6, .size-7, .size-8, .size-9),
|
|
.console-ui
|
|
:where([data-slot="dialog-footer"], [data-slot="alert-dialog-footer"], .page-actions, .table-toolbar)
|
|
[class~="group/button"] {
|
|
min-height: 2.75rem;
|
|
height: 2.75rem;
|
|
}
|
|
|
|
.console-ui [class~="group/button"]:is(.size-6, .size-7, .size-8, .size-9) {
|
|
width: 2.75rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
.console-ui [data-slot="input-group"] [class~="group/button"]:is([data-size="icon-xs"], [data-size="icon-sm"]) {
|
|
min-height: 2.75rem;
|
|
width: 2.75rem;
|
|
height: 2.75rem;
|
|
}
|
|
}
|
|
|
|
.console-dialog [data-slot="dialog-close"] {
|
|
inset-block-start: 1rem;
|
|
inset-inline-end: 1rem;
|
|
width: 2rem;
|
|
height: 2rem;
|
|
}
|
|
|
|
.console-dialog [data-slot="dialog-description"] {
|
|
font-size: 0.875rem;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.dialog-section:first-child {
|
|
border-block-start: 0;
|
|
padding-block-start: 0;
|
|
}
|
|
|
|
.console-confirmation [data-slot="alert-dialog-header"] {
|
|
justify-items: start;
|
|
gap: 1rem;
|
|
text-align: start;
|
|
}
|
|
|
|
.console-confirmation [data-slot="alert-dialog-title"] {
|
|
font-size: 1.25rem;
|
|
line-height: 1.3;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.console-confirmation [data-slot="alert-dialog-description"] {
|
|
font-size: 0.875rem;
|
|
line-height: 1.6;
|
|
text-wrap: pretty;
|
|
}
|
|
|
|
.table-toolbar > [data-slot="input-group"] {
|
|
width: min(100%, 24rem);
|
|
background: var(--background);
|
|
}
|
|
|
|
.workspace-navigation [data-sidebar="group-label"] {
|
|
height: 1.5rem;
|
|
padding-inline: 0.75rem;
|
|
color: var(--muted-foreground);
|
|
font-size: 0.6875rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.workspace-navigation [data-sidebar="menu-button"] {
|
|
position: relative;
|
|
min-height: 2rem;
|
|
padding-inline: 0.75rem;
|
|
font-size: 0.875rem;
|
|
transition:
|
|
background-color var(--duration-fast),
|
|
color var(--duration-fast);
|
|
}
|
|
|
|
.workspace-navigation [data-sidebar="menu-button"][data-active]::before {
|
|
position: absolute;
|
|
inset-block: 0.5rem;
|
|
inset-inline-start: 0;
|
|
width: 2px;
|
|
background: var(--brand);
|
|
content: "";
|
|
}
|
|
|
|
.workspace-table [data-slot="table-head"] {
|
|
height: 2.75rem;
|
|
padding-inline: 1rem;
|
|
background: var(--card);
|
|
}
|
|
|
|
.workspace-table [data-slot="table-cell"] {
|
|
height: 3.5rem;
|
|
padding-inline: 1rem;
|
|
}
|
|
|
|
.workspace-table [data-slot="table-row"][data-state="selected"] {
|
|
background: var(--selection);
|
|
}
|
|
|
|
.workspace-table [data-slot="table-row"]:focus-within {
|
|
background: var(--accent);
|
|
}
|
|
|
|
.console-ui .capacity-panel {
|
|
border-block-start: 2px solid var(--brand);
|
|
}
|
|
.status-summary[data-health="attention"] {
|
|
border-inline-start-color: var(--destructive);
|
|
}
|
|
.status-summary[data-health="healthy"] {
|
|
border-inline-start-color: var(--color-success);
|
|
}
|
|
|
|
.section-navigation a[aria-current="location"] {
|
|
border-inline-start-color: var(--brand);
|
|
background: var(--selection);
|
|
color: var(--link);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.auth-data-field {
|
|
animation: workspace-enter 500ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
|
|
}
|
|
|
|
.console-ui .configuration-panel {
|
|
border: 0;
|
|
padding-block: 0;
|
|
background: transparent;
|
|
}
|
|
|
|
.configuration-panel > :where([data-slot="card-header"], [data-slot="card-content"]) {
|
|
padding-inline: 0;
|
|
}
|
|
|
|
.configuration-panel + .configuration-panel {
|
|
border-block-start: 1px solid var(--border);
|
|
padding-block-start: 2rem;
|
|
}
|
|
|
|
.console-ui [class~="group/button"]:active:not(:disabled) {
|
|
transform: translateY(1px);
|
|
}
|
|
|
|
.console-page {
|
|
animation: workspace-enter 240ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
|
|
}
|
|
|
|
@keyframes workspace-enter {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 1024px) {
|
|
.page-heading :where(h1) {
|
|
font-size: 2.25rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
.page-actions {
|
|
width: 100%;
|
|
}
|
|
.page-actions [class~="group/button"] {
|
|
min-height: 2.75rem;
|
|
}
|
|
.table-toolbar > [data-slot="input-group"] {
|
|
width: 100%;
|
|
}
|
|
.workspace-navigation [data-sidebar="menu-button"] {
|
|
min-height: 2.75rem;
|
|
}
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.console-page {
|
|
animation: none;
|
|
}
|
|
.console-ui [class~="group/button"]:active:not(:disabled) {
|
|
transform: none;
|
|
}
|
|
}
|