iter(g33): 新增 upload 文件选择组件
This commit is contained in:
@@ -2195,3 +2195,90 @@ button.ua-step-dot:hover {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* —— 文件选择 —— */
|
||||
.ua-upload {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--ua-space-2);
|
||||
width: 100%;
|
||||
max-width: 360px;
|
||||
}
|
||||
.ua-upload-zone {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--ua-space-1);
|
||||
padding: var(--ua-space-4) var(--ua-space-3);
|
||||
border: 1px dashed var(--ua-color-border);
|
||||
border-radius: var(--ua-radius-md);
|
||||
background: var(--ua-color-surface);
|
||||
color: var(--ua-color-text-muted);
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
transition: border-color 0.15s ease, background 0.15s ease;
|
||||
}
|
||||
.ua-upload-zone:hover,
|
||||
.ua-upload-over {
|
||||
border-color: var(--ua-color-accent);
|
||||
background: color-mix(in srgb, var(--ua-color-accent) 6%, transparent);
|
||||
}
|
||||
.ua-upload-zone:focus-visible {
|
||||
box-shadow: 0 0 0 2px color-mix(in srgb, var(--ua-color-accent) 40%, transparent);
|
||||
}
|
||||
.ua-upload-disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.6;
|
||||
}
|
||||
.ua-upload-icon {
|
||||
font-size: var(--ua-font-size-lg);
|
||||
color: var(--ua-color-accent);
|
||||
}
|
||||
.ua-upload-hint {
|
||||
font-size: var(--ua-font-size-sm);
|
||||
}
|
||||
.ua-upload-input {
|
||||
display: none; /* 原生选择器只作为能力载体,界面自绘 */
|
||||
}
|
||||
.ua-upload-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--ua-space-1);
|
||||
}
|
||||
.ua-upload-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--ua-space-2);
|
||||
padding: var(--ua-space-1) var(--ua-space-2);
|
||||
border: 1px solid var(--ua-color-border);
|
||||
border-radius: var(--ua-radius-sm);
|
||||
font-size: var(--ua-font-size-sm);
|
||||
}
|
||||
.ua-upload-name {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: var(--ua-color-text);
|
||||
}
|
||||
.ua-upload-size {
|
||||
color: var(--ua-color-text-muted);
|
||||
}
|
||||
.ua-upload-remove {
|
||||
border: none;
|
||||
background: none;
|
||||
color: var(--ua-color-text-muted);
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
padding: 0 2px;
|
||||
}
|
||||
.ua-upload-remove:hover {
|
||||
color: var(--ua-color-danger);
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.ua-upload-zone {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user