feat: примитивы Checkbox, Spinner, IconButton, Dialog, Link (0.10.0)

Набор B перекраски форм: брендовые адаптивные примитивы + иконки
arrow-up/arrow-down/swap/refresh + токен $amber-50.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Тимур Городецкий
2026-08-25 18:28:50 +05:00
parent 2958ab7320
commit fa6fe8dbe1
20 changed files with 740 additions and 1 deletions
+102
View File
@@ -0,0 +1,102 @@
@import '../tokens/tokens';
.overlay {
position: fixed;
inset: 0;
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
background: rgba(10, 27, 48, .45);
animation: tnsu-dlg-fade .15s ease-out;
}
.panel {
width: 100%;
max-width: 480px;
max-height: calc(100vh - 48px);
display: flex;
flex-direction: column;
background: $white;
border-radius: $r-lg;
box-shadow: $sh-modal;
overflow: hidden;
animation: tnsu-dlg-pop .16s ease-out;
}
.sm { max-width: 380px; }
.lg { max-width: 680px; }
.header {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 20px 22px 14px;
border-bottom: 1px solid $gray-200;
}
.titles { flex: 1; min-width: 0; }
.title {
margin: 0;
font-family: $font-serif;
font-size: $fs-form-title;
font-weight: 600;
color: $navy-900;
}
.sub {
margin: 6px 0 0;
font-size: $fs-sm;
color: $gray-500;
line-height: 1.4;
}
.close {
flex-shrink: 0;
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border: 0;
border-radius: $r-sm;
background: transparent;
color: $gray-500;
cursor: pointer;
transition: background .15s, color .15s;
&:hover { background: $gray-100; color: $navy-800; }
&:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(212, 160, 30, .25); }
}
.body {
padding: 18px 22px;
overflow-y: auto;
font-size: $fs-body;
color: $gray-900;
}
.footer {
display: flex;
justify-content: flex-end;
gap: 10px;
padding: 14px 22px 18px;
border-top: 1px solid $gray-200;
flex-wrap: wrap;
}
@keyframes tnsu-dlg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tnsu-dlg-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
// На телефоне — почти на весь экран, футер-кнопки на всю ширину.
@include below($bp-sm) {
.overlay { padding: 0; align-items: flex-end; }
.panel { max-width: 100%; max-height: 92vh; border-radius: $r-lg $r-lg 0 0; }
.footer > * { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
.overlay, .panel { animation: none; }
}