26 lines
1.8 KiB
CSS
26 lines
1.8 KiB
CSS
/* Kole UI Input 样式 — 对齐 components.css 与 input.json 契约 */
|
|
.kole-field { display: inline-flex; flex-direction: column; gap: 4px; }
|
|
|
|
.kole-input {
|
|
display: inline-flex; align-items: center; gap: 8px; height: 32px;
|
|
padding: 0 12px; background: var(--kole-color-card-bg); border: 1px solid var(--kole-color-border);
|
|
border-radius: 4px; transition: border-color .15s, box-shadow .15s; box-sizing: border-box;
|
|
}
|
|
.kole-input input { border: none; outline: none; background: transparent; font-size: 14px; color: var(--kole-color-text-body); min-width: 160px; flex: 1; font-family: var(--kole-font-family); }
|
|
.kole-input input::placeholder { color: var(--kole-color-text-placeholder); }
|
|
.kole-input:focus-within { border-color: var(--kole-color-brand); box-shadow: 0 0 0 2px rgba(47,84,235,0.2); }
|
|
.kole-input.is-error { border-color: var(--kole-color-error); }
|
|
.kole-input.is-error:focus-within { border-color: var(--kole-color-error); box-shadow: 0 0 0 2px rgba(47,84,235,0.2); }
|
|
.kole-input.is-disabled, .kole-input:disabled { background: var(--kole-color-disabled-bg); border-color: transparent; }
|
|
.kole-input.is-disabled input, .kole-input:disabled input { color: var(--kole-color-text-disabled); cursor: not-allowed; }
|
|
.kole-input .affix { display: inline-flex; flex-shrink: 0; color: var(--kole-color-text-secondary); align-items: center; }
|
|
.kole-input .action {
|
|
display: inline-flex; flex-shrink: 0; padding: 0; border: none; background: none;
|
|
cursor: pointer; color: var(--kole-color-text-secondary); align-items: center;
|
|
}
|
|
.kole-input .action:hover { color: var(--kole-color-brand); }
|
|
.kole-input-lg { height: 40px; }
|
|
.kole-input-sm { height: 24px; }
|
|
.kole-input-sm input { font-size: 12px; min-width: 120px; }
|
|
.error-text { font-size: 12px; color: var(--kole-color-error); line-height: 20px; }
|