chore: initial project import
This commit is contained in:
commit
26620707a0
347 files changed
+56172
No files matched your search
@@ -0,0 +1,637 @@
|
||||
@import "./tokens.css";
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: var(--app-bg);
|
||||
color: var(--app-ink);
|
||||
font-family: var(--font-sans);
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--app-accent);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
font: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.mono {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.92em;
|
||||
}
|
||||
|
||||
.muted {
|
||||
color: var(--app-ink-muted);
|
||||
}
|
||||
|
||||
.faint {
|
||||
color: var(--app-ink-faint);
|
||||
}
|
||||
|
||||
.num {
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.row.wrap {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.grow {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.stack {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.right {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
/* ── 卡片:靠色调分层,没有描边 ── */
|
||||
.card {
|
||||
background: var(--app-card);
|
||||
border-radius: var(--r-card);
|
||||
padding: 20px 24px;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.inset {
|
||||
background: var(--app-card-inset);
|
||||
border-radius: var(--r-control);
|
||||
padding: 12px 16px;
|
||||
}
|
||||
|
||||
.divider {
|
||||
height: 1px;
|
||||
background: var(--app-outline-soft);
|
||||
border: 0;
|
||||
margin: 16px 0;
|
||||
}
|
||||
|
||||
/* ── 按钮 ── */
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
height: 36px;
|
||||
padding: 0 18px;
|
||||
border: 0;
|
||||
border-radius: var(--r-pill);
|
||||
background: var(--app-card-inset);
|
||||
color: var(--app-ink);
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
|
||||
.btn:hover:not(:disabled) {
|
||||
background: color-mix(in srgb, var(--app-card-inset), var(--app-ink) calc(var(--state-hover) * 100%));
|
||||
}
|
||||
|
||||
.btn:disabled {
|
||||
opacity: 0.45;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.btn.primary {
|
||||
background: var(--app-primary);
|
||||
color: var(--app-on-primary);
|
||||
}
|
||||
|
||||
.btn.primary:hover:not(:disabled) {
|
||||
background: color-mix(in srgb, var(--app-primary), var(--app-on-primary) calc(var(--state-hover) * 100%));
|
||||
}
|
||||
|
||||
.btn.accent {
|
||||
background: var(--app-accent);
|
||||
color: var(--app-card);
|
||||
}
|
||||
|
||||
.btn.text {
|
||||
background: transparent;
|
||||
color: var(--app-accent);
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.btn.text:hover:not(:disabled) {
|
||||
background: color-mix(in srgb, var(--app-accent), transparent calc((1 - var(--state-hover)) * 100%));
|
||||
}
|
||||
|
||||
.btn.danger {
|
||||
background: var(--app-bad-container);
|
||||
color: var(--app-bad);
|
||||
}
|
||||
|
||||
.btn.icon {
|
||||
width: 36px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.btn.small {
|
||||
height: 30px;
|
||||
padding: 0 12px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/* ── 连接式分组(M3 Expressive connected button group):组内小圆角、外角大圆角、选中段变胶囊 ── */
|
||||
.group {
|
||||
display: inline-flex;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.group > button {
|
||||
height: 36px;
|
||||
padding: 0 16px;
|
||||
border: 0;
|
||||
background: var(--app-card-inset);
|
||||
color: var(--app-ink-muted);
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
border-radius: var(--r-group-inner);
|
||||
transition:
|
||||
border-radius 0.18s,
|
||||
background 0.15s;
|
||||
}
|
||||
|
||||
.group > button:first-child {
|
||||
border-radius: var(--r-group-outer) var(--r-group-inner) var(--r-group-inner) var(--r-group-outer);
|
||||
}
|
||||
|
||||
.group > button:last-child {
|
||||
border-radius: var(--r-group-inner) var(--r-group-outer) var(--r-group-outer) var(--r-group-inner);
|
||||
}
|
||||
|
||||
.group > button:only-child {
|
||||
border-radius: var(--r-group-outer);
|
||||
}
|
||||
|
||||
.group > button:hover {
|
||||
background: color-mix(in srgb, var(--app-card-inset), var(--app-ink) calc(var(--state-hover) * 100%));
|
||||
}
|
||||
|
||||
.group > button.on {
|
||||
background: var(--app-accent-container);
|
||||
color: var(--app-on-accent-container);
|
||||
border-radius: var(--r-group-outer);
|
||||
}
|
||||
|
||||
/* ── 表单 ── */
|
||||
.field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.field > label,
|
||||
.field > .label {
|
||||
font-size: 12px;
|
||||
color: var(--app-ink-muted);
|
||||
}
|
||||
|
||||
.field .hint {
|
||||
font-size: 12px;
|
||||
color: var(--app-ink-faint);
|
||||
}
|
||||
|
||||
.input,
|
||||
.select,
|
||||
.textarea {
|
||||
width: 100%;
|
||||
min-height: 40px;
|
||||
padding: 8px 14px;
|
||||
border: 0;
|
||||
border-radius: var(--r-control);
|
||||
background: var(--app-card-inset);
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: -2px;
|
||||
transition: outline-color 0.15s;
|
||||
}
|
||||
|
||||
.textarea {
|
||||
resize: vertical;
|
||||
font-family: var(--font-mono);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.input:focus,
|
||||
.select:focus,
|
||||
.textarea:focus {
|
||||
outline-color: var(--app-accent);
|
||||
}
|
||||
|
||||
.input::placeholder {
|
||||
color: var(--app-ink-faint);
|
||||
}
|
||||
|
||||
.check {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.check input {
|
||||
accent-color: var(--app-accent);
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
/* ── 小件 ── */
|
||||
.chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
height: 24px;
|
||||
padding: 0 10px;
|
||||
border-radius: var(--r-pill);
|
||||
background: var(--app-card-inset);
|
||||
color: var(--app-ink-muted);
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.chip.ok {
|
||||
background: var(--app-ok-container);
|
||||
color: var(--app-ok);
|
||||
}
|
||||
|
||||
.chip.warn {
|
||||
background: var(--app-warn-container);
|
||||
color: var(--app-warn);
|
||||
}
|
||||
|
||||
.chip.bad {
|
||||
background: var(--app-bad-container);
|
||||
color: var(--app-bad);
|
||||
}
|
||||
|
||||
.chip.accent {
|
||||
background: var(--app-accent-container);
|
||||
color: var(--app-on-accent-container);
|
||||
}
|
||||
|
||||
.dot {
|
||||
display: inline-block;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: var(--app-idle);
|
||||
}
|
||||
|
||||
.dot.ok {
|
||||
background: var(--app-ok);
|
||||
}
|
||||
|
||||
.dot.warn {
|
||||
background: var(--app-warn);
|
||||
}
|
||||
|
||||
.dot.bad {
|
||||
background: var(--app-bad);
|
||||
}
|
||||
|
||||
/* ── 表格:细分隔线,没有边框 ── */
|
||||
.table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.table th {
|
||||
text-align: left;
|
||||
font-weight: 500;
|
||||
font-size: 12px;
|
||||
color: var(--app-ink-faint);
|
||||
padding: 8px 12px;
|
||||
border-bottom: 1px solid var(--app-outline);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.table td {
|
||||
padding: 12px;
|
||||
border-bottom: 1px solid var(--app-outline-soft);
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.table tr:last-child td {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.table.hover tbody tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.table.hover tbody tr:hover td {
|
||||
background: var(--app-card-hover);
|
||||
}
|
||||
|
||||
.table th.r,
|
||||
.table td.r {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* ── 指标块 ── */
|
||||
.stat {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.stat .k {
|
||||
font-size: 12px;
|
||||
color: var(--app-ink-faint);
|
||||
}
|
||||
|
||||
.stat .v {
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.stat .v small {
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: var(--app-ink-muted);
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.stat .v.ok {
|
||||
color: var(--app-ok);
|
||||
}
|
||||
|
||||
.stat .v.warn {
|
||||
color: var(--app-warn);
|
||||
}
|
||||
|
||||
.stat .v.bad {
|
||||
color: var(--app-bad);
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.grid.cols-2 {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.grid.cols-3 {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.grid.cols-4 {
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.grid.stats {
|
||||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.grid.cols-2,
|
||||
.grid.cols-3,
|
||||
.grid.cols-4 {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/* ── 对话框与提示 ── */
|
||||
.scrim {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: color-mix(in srgb, var(--app-scrim), transparent 60%);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
z-index: 50;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.dialog {
|
||||
background: var(--app-card);
|
||||
border-radius: 28px;
|
||||
padding: 24px;
|
||||
width: min(560px, 100%);
|
||||
max-height: calc(100vh - 32px);
|
||||
overflow: auto;
|
||||
box-shadow: 0 8px 32px color-mix(in srgb, var(--app-shadow), transparent 80%);
|
||||
}
|
||||
|
||||
.dialog h2 {
|
||||
font-size: 20px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.dialog .actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.toasts {
|
||||
position: fixed;
|
||||
right: 24px;
|
||||
bottom: 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
z-index: 60;
|
||||
}
|
||||
|
||||
.toast {
|
||||
background: var(--app-primary);
|
||||
color: var(--app-on-primary);
|
||||
border-radius: var(--r-control);
|
||||
padding: 10px 16px;
|
||||
max-width: 420px;
|
||||
box-shadow: 0 4px 16px color-mix(in srgb, var(--app-shadow), transparent 75%);
|
||||
}
|
||||
|
||||
.toast.bad {
|
||||
background: var(--app-bad);
|
||||
color: var(--app-card);
|
||||
}
|
||||
|
||||
.empty {
|
||||
padding: 40px 16px;
|
||||
text-align: center;
|
||||
color: var(--app-ink-faint);
|
||||
}
|
||||
|
||||
.notice {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
align-items: flex-start;
|
||||
padding: 14px 18px;
|
||||
border-radius: var(--r-control);
|
||||
background: var(--app-accent-container);
|
||||
color: var(--app-on-accent-container);
|
||||
}
|
||||
|
||||
.notice.warn {
|
||||
background: var(--app-warn-container);
|
||||
color: var(--app-warn);
|
||||
}
|
||||
|
||||
.notice.bad {
|
||||
background: var(--app-bad-container);
|
||||
color: var(--app-bad);
|
||||
}
|
||||
|
||||
pre.code {
|
||||
margin: 0;
|
||||
padding: 12px 16px;
|
||||
border-radius: var(--r-control);
|
||||
background: var(--app-card-inset);
|
||||
font-family: var(--font-mono);
|
||||
font-size: 12.5px;
|
||||
overflow: auto;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid var(--app-outline);
|
||||
border-top-color: var(--app-accent);
|
||||
animation: spin 0.8s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
/* ── 图表 ── */
|
||||
/* 拖动选区和十字光标:uPlot 自带的颜色在暗色下几乎看不见,换成主题令牌 */
|
||||
.chart .u-select {
|
||||
background: color-mix(in srgb, var(--app-accent), transparent 72%);
|
||||
border-left: 1px solid var(--app-accent);
|
||||
border-right: 1px solid var(--app-accent);
|
||||
}
|
||||
|
||||
.chart .u-cursor-x,
|
||||
.chart .u-cursor-y {
|
||||
border-color: var(--app-ink-faint);
|
||||
}
|
||||
|
||||
.chart-wrap {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.chart-hint {
|
||||
margin-left: auto;
|
||||
color: var(--app-ink-faint);
|
||||
}
|
||||
|
||||
.chart-hint .btn {
|
||||
height: 22px;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.chart-tip {
|
||||
display: none;
|
||||
position: absolute;
|
||||
z-index: 5;
|
||||
pointer-events: none;
|
||||
padding: 6px 10px;
|
||||
border-radius: 8px;
|
||||
background: var(--app-primary);
|
||||
color: var(--app-on-primary);
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
white-space: pre;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.group > button:disabled {
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.group > button:disabled:hover {
|
||||
background: var(--app-card-inset);
|
||||
}
|
||||
|
||||
.chart {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.chart .u-legend {
|
||||
font-family: var(--font-sans);
|
||||
font-size: 12px;
|
||||
color: var(--app-ink-muted);
|
||||
}
|
||||
|
||||
.chart-legend {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px 16px;
|
||||
font-size: 12px;
|
||||
color: var(--app-ink-muted);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.chart-legend i {
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
height: 3px;
|
||||
border-radius: 2px;
|
||||
margin-right: 6px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* 「纸墨」主题令牌:暖中性纸白底、深墨主色、唯一的强调色钢笔墨水蓝、复古低饱和的状态色。
|
||||
* 颜色只在这个文件里出现;其他样式一律引用令牌(stylelint 会拦住 hex / rgb / 具名色)。
|
||||
*/
|
||||
:root {
|
||||
color-scheme: light;
|
||||
|
||||
--app-bg: #f4f2ed;
|
||||
--app-card: #fbfaf7;
|
||||
--app-card-inset: #ece9e2;
|
||||
--app-card-hover: #f0ede6;
|
||||
--app-outline: #d8d4c9;
|
||||
--app-outline-soft: #e5e1d7;
|
||||
|
||||
--app-ink: #1f1d18;
|
||||
--app-ink-muted: #5c5950;
|
||||
--app-ink-faint: #8b877b;
|
||||
|
||||
--app-primary: #2a2720;
|
||||
--app-on-primary: #f7f6f3;
|
||||
|
||||
--app-accent: #2a5da8;
|
||||
--app-accent-container: #dce6f4;
|
||||
--app-on-accent-container: #12305c;
|
||||
|
||||
--app-ok: #566f2c;
|
||||
--app-ok-container: #e3ead2;
|
||||
--app-warn: #9c6b0e;
|
||||
--app-warn-container: #f1e4c4;
|
||||
--app-bad: #a23e2c;
|
||||
--app-bad-container: #f2d9d2;
|
||||
--app-idle: #8b877b;
|
||||
|
||||
--app-scrim: #1f1d18;
|
||||
--app-shadow: #1f1d18;
|
||||
|
||||
--chart-1: #2a5da8;
|
||||
--chart-2: #b9770e;
|
||||
--chart-3: #a23e2c;
|
||||
--chart-4: #566f2c;
|
||||
--chart-5: #7a4f7a;
|
||||
--chart-6: #2f7a76;
|
||||
--chart-grid: #e1ddd2;
|
||||
--chart-axis: #7a766b;
|
||||
|
||||
--r-card: 24px;
|
||||
--r-group-outer: 28px;
|
||||
--r-group-inner: 8px;
|
||||
--r-control: 12px;
|
||||
--r-pill: 999px;
|
||||
|
||||
--state-hover: 0.08;
|
||||
--state-press: 0.12;
|
||||
|
||||
--font-sans: "Source Han Sans SC", "Noto Sans SC", "Source Han Sans CN", "Microsoft YaHei UI", "PingFang SC", sans-serif;
|
||||
--font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
|
||||
}
|
||||
|
||||
:root[data-theme="dark"] {
|
||||
color-scheme: dark;
|
||||
|
||||
--app-bg: #181714;
|
||||
--app-card: #211f1b;
|
||||
--app-card-inset: #2b2924;
|
||||
--app-card-hover: #28261f;
|
||||
--app-outline: #3b3830;
|
||||
--app-outline-soft: #2f2d27;
|
||||
|
||||
--app-ink: #ece9e1;
|
||||
--app-ink-muted: #b0ab9e;
|
||||
--app-ink-faint: #7f7b70;
|
||||
|
||||
--app-primary: #ece9e1;
|
||||
--app-on-primary: #1f1d18;
|
||||
|
||||
--app-accent: #8db0e6;
|
||||
--app-accent-container: #26364f;
|
||||
--app-on-accent-container: #cfe0f8;
|
||||
|
||||
--app-ok: #a6c06c;
|
||||
--app-ok-container: #2c3520;
|
||||
--app-warn: #dcae52;
|
||||
--app-warn-container: #3a2f16;
|
||||
--app-bad: #e3917f;
|
||||
--app-bad-container: #432720;
|
||||
--app-idle: #7f7b70;
|
||||
|
||||
--chart-1: #8db0e6;
|
||||
--chart-2: #e0a74d;
|
||||
--chart-3: #e3917f;
|
||||
--chart-4: #a6c06c;
|
||||
--chart-5: #c79ac7;
|
||||
--chart-6: #72c0bb;
|
||||
--chart-grid: #32302a;
|
||||
--chart-axis: #8f8b7f;
|
||||
}
|
||||
Reference in new issue
Block a user