iter(g188): 新增命令面板组件
This commit is contained in:
@@ -4777,3 +4777,97 @@ h5.ua-type-title { font-size: var(--ua-font-size-md); }
|
||||
.ua-vlist-item + .ua-vlist-item {
|
||||
border-top: 1px solid color-mix(in srgb, var(--ua-color-border) 60%, transparent);
|
||||
}
|
||||
|
||||
/* —— 命令面板:⌘K 唤起,遮罩 + 居中面板 —— */
|
||||
.ua-cmdk {
|
||||
display: none;
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: var(--ua-z-modal);
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
padding-top: 12vh;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
.ua-cmdk.ua-open {
|
||||
display: flex;
|
||||
animation: ua-fade var(--ua-duration-base) var(--ua-ease);
|
||||
}
|
||||
.ua-cmdk-panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: min(560px, 92vw);
|
||||
max-height: 62vh;
|
||||
border: 1px solid var(--ua-color-border);
|
||||
border-radius: var(--ua-radius-lg);
|
||||
background: var(--ua-color-surface);
|
||||
box-shadow: var(--ua-shadow-4);
|
||||
overflow: hidden;
|
||||
animation: ua-pop-in var(--ua-duration-base) var(--ua-ease);
|
||||
}
|
||||
.ua-cmdk-input {
|
||||
flex-shrink: 0;
|
||||
padding: var(--ua-space-3) var(--ua-space-4);
|
||||
border: none;
|
||||
border-bottom: 1px solid var(--ua-border-subtle);
|
||||
background: none;
|
||||
color: var(--ua-color-text);
|
||||
font-family: inherit;
|
||||
font-size: var(--ua-font-size-lg);
|
||||
outline: none;
|
||||
}
|
||||
.ua-cmdk-input::placeholder {
|
||||
color: var(--ua-color-text-muted);
|
||||
}
|
||||
.ua-cmdk-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
padding: var(--ua-space-1);
|
||||
}
|
||||
.ua-cmdk-group {
|
||||
padding: var(--ua-space-15) var(--ua-space-25) var(--ua-space-05);
|
||||
color: var(--ua-color-text-muted);
|
||||
font-size: var(--ua-font-size-xs);
|
||||
font-weight: var(--ua-weight-semibold);
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.ua-cmdk-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--ua-space-2);
|
||||
padding: var(--ua-space-15) var(--ua-space-25);
|
||||
border-radius: var(--ua-radius-sm);
|
||||
color: var(--ua-color-text);
|
||||
font-size: var(--ua-font-size-md);
|
||||
cursor: pointer;
|
||||
transition: background var(--ua-duration-fast) var(--ua-ease), color var(--ua-duration-fast) var(--ua-ease);
|
||||
}
|
||||
.ua-cmdk-item.is-active {
|
||||
background: color-mix(in srgb, var(--ua-color-accent) 12%, transparent); /* 选中态低视觉比重:淡色底不抢文字 */
|
||||
color: var(--ua-color-accent);
|
||||
}
|
||||
.ua-cmdk-label {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.ua-cmdk-hint {
|
||||
flex-shrink: 0;
|
||||
color: var(--ua-color-text-muted);
|
||||
font-size: var(--ua-font-size-xs);
|
||||
}
|
||||
.ua-cmdk-empty {
|
||||
padding: var(--ua-space-4) var(--ua-space-25);
|
||||
color: var(--ua-color-text-muted);
|
||||
font-size: var(--ua-font-size-sm);
|
||||
text-align: center;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.ua-cmdk.ua-open,
|
||||
.ua-cmdk-panel {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user