20260812221200
This commit is contained in:
1 parent
87b2d3c482
commit
4bd730f649
47 files changed
+6286
-1881
No files matched your search
@@ -0,0 +1,313 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
/* ===== Design Tokens ===== */
|
||||
@theme {
|
||||
/* 统一品牌主色(与 JSX 中的 blue-600 保持一致,消除 blue-500/blue-600 混用) */
|
||||
--color-primary: #2563eb; /* blue-600 */
|
||||
--color-primary-hover: #1d4ed8; /* blue-700 */
|
||||
--color-accent: #2563eb;
|
||||
}
|
||||
|
||||
/* ===== Base ===== */
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
height: 100%;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
background: #f8fafc;
|
||||
color: #334155;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
|
||||
"Hiragino Sans GB", "Microsoft YaHei", sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
/* ===== Card ===== */
|
||||
.card {
|
||||
background: #fff;
|
||||
border: 1px solid #f1f5f9;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
|
||||
}
|
||||
|
||||
/* ===== Segmented control(复用组件,三处切换统一) ===== */
|
||||
.seg {
|
||||
display: flex;
|
||||
gap: 3px;
|
||||
padding: 3px;
|
||||
background: #f1f5f9; /* slate-100 */
|
||||
border-radius: 6px;
|
||||
}
|
||||
.seg-btn {
|
||||
flex: 1;
|
||||
padding: 6px 10px;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
background: transparent;
|
||||
color: #64748b; /* slate-500 */
|
||||
cursor: pointer;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.seg-btn:hover {
|
||||
color: #334155; /* slate-700 */
|
||||
}
|
||||
.seg-btn.active {
|
||||
background: #fff;
|
||||
color: var(--color-primary);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
/* ===== Buttons ===== */
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 6px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
padding: 6px 12px;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.btn-primary {
|
||||
background: var(--color-primary);
|
||||
color: #fff;
|
||||
}
|
||||
.btn-primary:hover {
|
||||
background: var(--color-primary-hover);
|
||||
}
|
||||
.btn-outline {
|
||||
border-color: #e2e8f0; /* slate-200 */
|
||||
background: #fff;
|
||||
color: #475569; /* slate-600 */
|
||||
}
|
||||
.btn-outline:hover {
|
||||
border-color: #cbd5e1;
|
||||
background: #f8fafc;
|
||||
}
|
||||
.btn-ghost {
|
||||
background: transparent;
|
||||
color: #64748b;
|
||||
}
|
||||
.btn-ghost:hover {
|
||||
background: #f1f5f9;
|
||||
color: #334155;
|
||||
}
|
||||
|
||||
/* ===== Inputs ===== */
|
||||
.input,
|
||||
.input-sm,
|
||||
.select-sm {
|
||||
width: 100%;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 6px;
|
||||
padding: 7px 10px;
|
||||
font-size: 13px;
|
||||
color: #334155;
|
||||
background: #fff;
|
||||
outline: none;
|
||||
transition: border-color 0.15s, box-shadow 0.15s;
|
||||
}
|
||||
.input:focus,
|
||||
.input-sm:focus,
|
||||
.select-sm:focus {
|
||||
border-color: var(--color-primary);
|
||||
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
|
||||
}
|
||||
.input-sm {
|
||||
padding: 5px 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* ===== Toggle switch(div 实现,旋钮用 ::after;.on 表示开启) ===== */
|
||||
.toggle {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
flex-shrink: 0;
|
||||
width: 40px;
|
||||
height: 22px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: 9999px;
|
||||
background: #cbd5e1; /* slate-300 */
|
||||
cursor: default;
|
||||
pointer-events: none;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
.toggle::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
left: 2px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: #fff;
|
||||
border-radius: 9999px;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
.toggle.on {
|
||||
background: var(--color-primary);
|
||||
}
|
||||
.toggle.on::after {
|
||||
transform: translateX(18px);
|
||||
}
|
||||
|
||||
/* ===== Thin scrollbar ===== */
|
||||
.thin-scroll::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
.thin-scroll::-webkit-scrollbar-thumb {
|
||||
background: #e2e8f0;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.thin-scroll::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* ===== Drawer ===== */
|
||||
.drawer-mask {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 50;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
background: rgba(15, 23, 42, 0.45);
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: opacity 0.25s, visibility 0.25s;
|
||||
}
|
||||
.drawer-mask.open {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
.drawer {
|
||||
width: 100%;
|
||||
max-width: 520px;
|
||||
margin: 0 12px;
|
||||
padding: 18px;
|
||||
background: #fff;
|
||||
border-radius: 16px 16px 0 0;
|
||||
transform: translateY(100%);
|
||||
transition: transform 0.25s;
|
||||
}
|
||||
.drawer-mask.open .drawer {
|
||||
transform: translateY(0);
|
||||
}
|
||||
.drawer-head {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.drawer-close {
|
||||
border: none;
|
||||
background: transparent;
|
||||
font-size: 22px;
|
||||
line-height: 1;
|
||||
color: #94a3b8;
|
||||
cursor: pointer;
|
||||
}
|
||||
.drawer-body {
|
||||
max-height: 60vh;
|
||||
padding: 12px 0;
|
||||
overflow: auto;
|
||||
}
|
||||
.drawer-foot {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
padding-top: 12px;
|
||||
border-top: 1px solid #f1f5f9;
|
||||
}
|
||||
.form-row {
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
.form-row label {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
font-size: 11px;
|
||||
color: #94a3b8;
|
||||
}
|
||||
|
||||
/* ===== Field list & preview overlays ===== */
|
||||
.field-row {
|
||||
border-left: 3px solid transparent;
|
||||
cursor: pointer;
|
||||
transition: background 0.1s, border-color 0.1s;
|
||||
}
|
||||
.field-row:hover {
|
||||
background: #f8fafc;
|
||||
}
|
||||
.field-row.active {
|
||||
background: #eff6ff; /* blue-50 */
|
||||
border-left-color: var(--color-primary);
|
||||
}
|
||||
.drag-handle {
|
||||
cursor: grab;
|
||||
opacity: 0;
|
||||
flex-shrink: 0;
|
||||
transition: opacity 0.1s;
|
||||
}
|
||||
.field-row:hover .drag-handle,
|
||||
.field-row.active .drag-handle {
|
||||
opacity: 1;
|
||||
}
|
||||
.drag-handle:active {
|
||||
cursor: grabbing;
|
||||
}
|
||||
.preview-field {
|
||||
position: relative;
|
||||
border-radius: 8px;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.preview-field.highlight {
|
||||
background: #eff6ff;
|
||||
}
|
||||
.preview-field.highlight::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: -8px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 3px;
|
||||
border-radius: 2px;
|
||||
background: var(--color-primary);
|
||||
}
|
||||
.group-block {
|
||||
border: 1px dashed #e2e8f0;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 12px;
|
||||
transition: border-color 0.15s, background 0.15s;
|
||||
}
|
||||
.group-block:hover {
|
||||
border-color: #cbd5e1;
|
||||
}
|
||||
.group-block.highlight-group {
|
||||
border-color: var(--color-primary);
|
||||
background: #fafbff;
|
||||
}
|
||||
.col-resize-handle {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 5px;
|
||||
cursor: col-resize;
|
||||
z-index: 10;
|
||||
}
|
||||
.col-resize-handle:hover,
|
||||
.col-resize-handle.active {
|
||||
background: var(--color-primary);
|
||||
}
|
||||
Reference in new issue
Block a user