Polish toasts and add searchable select and copy input

This commit is contained in:
SantaSpeen committed 2026-12-01 14:01:28 +03:00
1 parent 36f526aa02
commit 8e4e8e6ef0
28 files changed
+671 -17

No files matched your search

+203 -14
View File
@@ -231,8 +231,8 @@ small {
min-height: 32px;
}
.avatar {
width: 30px;
height: 30px;
width: 32px;
height: 32px;
border-radius: 50%;
background: var(--color-text);
color: var(--color-bg);
@@ -982,16 +982,17 @@ dialog > p {
bottom: 24px;
left: 50%;
transform: translateX(-50%);
width: min(420px, calc(100% - 32px));
width: min(380px, calc(100% - 32px));
max-width: calc(100% - 32px);
background: var(--color-surface);
color: var(--color-text);
border: 1px solid
color-mix(in srgb, var(--toast-tone) 30%, var(--color-border));
border-left: 3px solid var(--toast-tone);
color-mix(in srgb, var(--toast-tone) 18%, var(--color-border));
border-radius: var(--radius-control);
box-shadow: 0 8px 32px #0003;
padding: 14px;
box-shadow:
0 10px 28px #07181f30,
0 2px 6px #07181f18;
padding: 14px 16px;
font-size: 13px;
z-index: 100;
display: none;
@@ -1007,32 +1008,35 @@ dialog > p {
}
:is(#toast, .anidev-toast):popover-open {
display: flex;
align-items: flex-start;
align-items: center;
gap: 12px;
animation: toast-enter 180ms ease-out;
animation: toast-enter 140ms ease-out;
}
.toast-symbol {
display: grid;
place-items: center;
flex-shrink: 0;
width: 30px;
height: 30px;
width: 32px;
height: 32px;
border-radius: 50%;
background: color-mix(in srgb, var(--toast-tone) 12%, var(--color-surface));
color: var(--toast-tone);
}
.toast-content {
display: grid;
gap: 4px;
gap: 2px;
flex: 1;
min-width: 0;
}
.toast-title {
font-weight: 600;
font-size: 14px;
line-height: 20px;
}
.toast-message {
line-height: 1.5;
color: var(--color-muted);
font-weight: 400;
line-height: 20px;
overflow-wrap: anywhere;
}
:is(#toast, .anidev-toast) .toast-dismiss {
@@ -1050,7 +1054,7 @@ dialog > p {
@keyframes toast-enter {
from {
opacity: 0;
translate: 0 6px;
translate: 0 4px;
}
to {
opacity: 1;
@@ -2928,3 +2932,188 @@ body[data-concept="dock"].dock-open
border-left: 0;
border-top: 1px solid var(--color-border);
}
.search-select-example {
margin-top: 20px;
}
.search-select {
max-width: 320px;
min-width: 0;
}
.search-select-label {
display: block;
margin-bottom: 6px;
font-size: 14px;
}
.search-select-trigger {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
width: 100%;
height: calc(var(--size-control) + 8px);
padding: 8px 10px;
text-align: left;
}
.search-select-trigger > span {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.search-select-trigger > svg {
flex-shrink: 0;
color: var(--color-muted);
transition: transform 140ms ease;
}
.search-select-trigger[aria-expanded="true"] > svg {
transform: rotate(180deg);
}
.search-select-popup {
position: fixed;
inset: auto;
margin: 0;
padding: 0;
max-height: 360px;
background: var(--color-surface);
color: var(--color-text);
border: 1px solid var(--color-border);
border-radius: 12px;
box-shadow: 0 10px 30px #07181f30;
overflow: hidden;
}
.search-select-popup:popover-open {
display: flex;
flex-direction: column;
animation: search-select-enter 140ms ease-out;
}
.search-select-search {
position: relative;
padding: 10px;
border-bottom: 1px solid var(--color-border);
flex-shrink: 0;
}
.search-select-search > svg {
position: absolute;
left: 21px;
top: 50%;
translate: 0 -50%;
color: var(--color-muted);
pointer-events: none;
}
.search-select-search input {
width: 100%;
height: 38px;
min-height: 38px;
padding: 7px 10px 7px 34px;
font-size: 13px;
}
.search-select-search input:focus-visible {
outline: 2px solid var(--color-accent);
outline-offset: 0;
}
.search-select-options {
min-height: 0;
overflow-y: auto;
padding: 4px;
scrollbar-gutter: stable;
}
.search-select-option {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 9px 10px;
min-height: 38px;
border-radius: 6px;
font-size: 13px;
line-height: 20px;
cursor: pointer;
}
.search-select-option > span:first-child {
min-width: 0;
overflow-wrap: anywhere;
}
.search-select-option[aria-selected="true"] {
color: var(--color-accent);
font-weight: 600;
}
.search-select-option.is-active {
background: var(--color-row-hover);
}
.search-select-option[aria-disabled="true"] {
opacity: 0.45;
cursor: not-allowed;
}
.search-select-mark {
display: flex;
align-items: center;
flex-shrink: 0;
width: 16px;
}
.search-select-empty {
padding: 24px 14px;
text-align: center;
font-size: 13px;
color: var(--color-muted);
}
.search-select-empty[hidden] {
display: none;
}
.search-select-count {
padding: 7px 14px;
border-top: 1px solid var(--color-border);
font-size: 11px;
color: var(--color-muted);
flex-shrink: 0;
}
@keyframes search-select-enter {
from {
opacity: 0;
translate: 0 -3px;
}
to {
opacity: 1;
translate: 0 0;
}
}
.copy-field-example {
margin-top: 20px;
}
.copy-input {
position: relative;
min-width: 0;
}
.copy-input > input {
width: 100%;
height: calc(var(--size-control) + 8px);
padding-left: 44px;
}
.copy-input .input-copy-action {
position: absolute;
left: 6px;
top: 0;
bottom: 0;
margin-block: auto;
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
min-height: 30px;
padding: 7px;
border: 0;
background: transparent;
color: var(--color-muted);
}
.copy-input .input-copy-action:hover {
background: var(--color-row-hover);
color: var(--color-text);
}
.copy-input .input-copy-action:focus-visible {
outline: 2px solid var(--color-accent);
outline-offset: 0;
}
body[data-concept="dock"] .copy-input .input-copy-action:active {
transform: none;
}