/
guselnikov
/
inst
Обзор
Документация
Войти
/
guselnikov
/
inst
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
admin/src/components/ui/Select.module.css
189 строк
3 KB
Viktor Guselnikov
first_commit
07 июл 2026, 11:54
07 июл 2026, 11:54
098126a
Код
Авторство
О чём код?
.field { display: flex; flex-direction: column; gap: 6px; } .label { font-size: 12px; font-weight: 500; letter-spacing: 0.02em; color: var(--text-muted); text-transform: uppercase; } .hint { margin: -2px 0 0; font-size: 12px; color: var(--text-faint); line-height: 1.4; } .trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 0 14px; border: none; border-radius: var(--radius-sm); background: var(--bg-muted); box-shadow: var(--shadow-inset); color: var(--text-primary); font-size: 14px; font-weight: 500; cursor: pointer; transition: background var(--transition), box-shadow var(--transition), transform 120ms var(--ease); } .trigger:hover:not(:disabled) { background: var(--bg-elevated); } .trigger:active:not(:disabled) { transform: scale(0.995); } .triggerOpen { background: var(--bg-elevated); box-shadow: var(--shadow-inset), 0 0 0 1px var(--border-focus); } .trigger:disabled { opacity: 0.45; cursor: not-allowed; } .triggerValue { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .triggerPlaceholder { color: var(--text-faint); font-weight: 400; } .chevron { color: var(--text-muted); transition: transform var(--transition); flex-shrink: 0; } .chevronOpen { transform: rotate(180deg); } .menu { z-index: 1100; min-width: var(--select-width, 200px); max-height: 280px; overflow-y: auto; padding: 6px; border-radius: var(--radius-md); background: var(--bg-elevated); box-shadow: var(--shadow-md); border: 1px solid var(--border); animation: menuIn 180ms var(--ease); } .option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: none; border-radius: var(--radius-xs); background: transparent; color: var(--text-secondary); font-size: 14px; text-align: left; cursor: pointer; transition: background var(--transition), color var(--transition); } .option:hover, .optionFocused { background: var(--bg-hover); color: var(--text-primary); } .optionSelected { color: var(--text-primary); background: var(--accent-soft); } .optionBody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .optionLabel { font-weight: 500; } .optionDescription { font-size: 12px; color: var(--text-muted); line-height: 1.35; } .optionSelected .optionDescription { color: var(--text-secondary); } .optionDisabled { opacity: 0.4; cursor: not-allowed; } .empty { margin: 0; padding: 16px 12px; font-size: 13px; color: var(--text-muted); text-align: center; } .check { color: var(--accent); opacity: 0; flex-shrink: 0; } .optionSelected .check { opacity: 1; } @keyframes menuIn { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } } @media (prefers-reduced-motion: reduce) { .menu { animation: none; } }