style(ux): refine registry-backed command palette
This commit is contained in:
@@ -1 +1,373 @@
|
||||
.ux-nav-history{display:flex;align-items:center;gap:4px;margin-inline:4px 8px}.ux-nav-history-button{inline-size:34px;block-size:34px;display:grid;place-items:center;border:1px solid var(--vd-border-subtle,var(--border-color,#d9d3cc));border-radius:10px;background:var(--vd-surface,var(--surface,#fff));color:var(--vd-text,var(--text-color,#26221f));font:600 18px/1 system-ui;cursor:pointer;transition:transform .16s ease,border-color .16s ease,background .16s ease}.ux-nav-history-button:hover:not(:disabled){transform:translateY(-1px);border-color:var(--vd-accent,var(--primary,#d95c34));background:var(--vd-surface-raised,var(--surface-hover,#faf7f4))}.ux-nav-history-button:disabled{opacity:.38;cursor:not-allowed}.ux-global-search{position:fixed;inset:0;z-index:5000;display:grid;place-items:start center;padding:clamp(70px,12vh,140px) 18px 18px;background:color-mix(in srgb,#15110f 55%,transparent);backdrop-filter:blur(8px)}.ux-global-search.hidden{display:none}.ux-global-search-panel{inline-size:min(680px,100%);max-block-size:min(680px,calc(100vh - 100px));display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--vd-border-subtle,var(--border-color,#ded7d1));border-radius:18px;background:var(--vd-surface,var(--surface,#fff));box-shadow:0 28px 90px rgba(30,20,15,.25)}.ux-global-search-header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px 10px}.ux-global-search-header h2{margin:0;font-size:1rem}.ux-global-search-close{inline-size:34px;block-size:34px;border:0;border-radius:9px;background:transparent;color:inherit;font-size:24px;cursor:pointer}.ux-global-search-input-wrap{display:flex;align-items:center;gap:12px;margin:0 16px 12px;padding:0 14px;border:1px solid var(--vd-border-strong,var(--border-color,#cfc7c0));border-radius:12px;background:var(--vd-surface-raised,var(--surface-hover,#faf8f6))}.ux-global-search-input{flex:1;min-inline-size:0;padding:14px 0;border:0;outline:0;background:transparent;color:inherit;font:inherit;font-size:1rem}.ux-global-search-input-wrap kbd,.ux-global-search-footer{color:var(--vd-text-muted,var(--muted,#716a64));font-size:.78rem}.ux-global-search-results{overflow:auto;padding:4px 10px 12px}.ux-global-search-result{inline-size:100%;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;border:0;border-radius:11px;background:transparent;color:inherit;text-align:left;cursor:pointer}.ux-global-search-result[aria-selected=true]{background:var(--vd-accent-soft,var(--primary-soft,#f7e4dc))}.ux-global-search-result-copy{display:grid;gap:3px}.ux-global-search-result-copy strong{font-size:.93rem}.ux-global-search-result-copy small,.ux-global-search-result-action{color:var(--vd-text-muted,var(--muted,#716a64));font-size:.78rem}.ux-global-search-empty{display:grid;gap:6px;padding:28px 18px;text-align:center}.ux-global-search-empty span{color:var(--vd-text-muted,var(--muted,#716a64));font-size:.86rem}.ux-global-search-footer{padding:12px 18px;border-top:1px solid var(--vd-border-subtle,var(--border-color,#ded7d1));text-align:center}.ux-search-open{overflow:hidden}.ux-nav-history-button:focus-visible,.ux-global-search-close:focus-visible,.ux-global-search-result:focus-visible,.ux-global-search-input:focus-visible{outline:3px solid color-mix(in srgb,var(--vd-accent,var(--primary,#d95c34)) 36%,transparent);outline-offset:2px}@media(max-width:900px){.ux-nav-history{order:2}.topbar-context-icon{display:none}.ux-nav-history-button{inline-size:32px;block-size:32px}.ux-global-search{padding-top:72px}}@media(max-width:620px){.ux-nav-history{margin-inline:0 4px}.ux-nav-history-button{inline-size:30px;block-size:30px;border-radius:8px}.ux-global-search{padding:10px;place-items:end center}.ux-global-search-panel{max-block-size:88vh;border-radius:16px}.ux-global-search-result-action{display:none}.ux-global-search-footer{font-size:.72rem}}@media(prefers-reduced-motion:reduce){.ux-nav-history-button{transition:none}.ux-global-search{backdrop-filter:none}}
|
||||
.ux-nav-history {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
margin-inline: 4px 8px;
|
||||
}
|
||||
|
||||
.ux-nav-history-button {
|
||||
align-items: center;
|
||||
background: var(--vd-surface, var(--surface, #fff));
|
||||
block-size: 34px;
|
||||
border: 1px solid var(--vd-border-subtle, var(--border-color, #d9d3cc));
|
||||
border-radius: 10px;
|
||||
color: var(--vd-text, var(--text-color, #26221f));
|
||||
cursor: pointer;
|
||||
display: inline-flex;
|
||||
font: 600 18px/1 system-ui;
|
||||
inline-size: 34px;
|
||||
justify-content: center;
|
||||
transition: transform .16s ease, border-color .16s ease, background .16s ease;
|
||||
}
|
||||
|
||||
.ux-nav-history-button:hover:not(:disabled) {
|
||||
background: var(--vd-surface-raised, var(--surface-hover, #faf7f4));
|
||||
border-color: var(--vd-accent, var(--primary, #d95c34));
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.ux-nav-history-button:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: .38;
|
||||
}
|
||||
|
||||
.ux-global-search {
|
||||
backdrop-filter: blur(8px);
|
||||
background: color-mix(in srgb, #15110f 55%, transparent);
|
||||
display: grid;
|
||||
inset: 0;
|
||||
padding: clamp(70px, 12vh, 140px) 18px 18px;
|
||||
place-items: start center;
|
||||
position: fixed;
|
||||
z-index: 5000;
|
||||
}
|
||||
|
||||
.ux-global-search.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ux-global-search-panel {
|
||||
background: var(--vd-surface, var(--surface, #fff));
|
||||
border: 1px solid var(--vd-border-subtle, var(--border-color, #ded7d1));
|
||||
border-radius: 18px;
|
||||
box-shadow: 0 28px 90px rgba(30, 20, 15, .25);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
inline-size: min(760px, 100%);
|
||||
max-block-size: min(720px, calc(100vh - 100px));
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ux-global-search-header {
|
||||
align-items: flex-start;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 18px 20px 10px;
|
||||
}
|
||||
|
||||
.ux-global-search-heading {
|
||||
display: grid;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.ux-global-search-header h2,
|
||||
.ux-global-search-header p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.ux-global-search-header h2 {
|
||||
color: var(--vd-text, var(--text-color, #26221f));
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.ux-global-search-header p {
|
||||
color: var(--vd-text-muted, var(--muted, #716a64));
|
||||
font-size: .8rem;
|
||||
}
|
||||
|
||||
.ux-global-search-close {
|
||||
background: transparent;
|
||||
block-size: 34px;
|
||||
border: 0;
|
||||
border-radius: 9px;
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
font-size: 24px;
|
||||
inline-size: 34px;
|
||||
}
|
||||
|
||||
.ux-global-search-close:hover {
|
||||
background: var(--vd-surface-raised, var(--surface-hover, #faf8f6));
|
||||
}
|
||||
|
||||
.ux-global-search-input-wrap {
|
||||
align-items: center;
|
||||
background: var(--vd-surface-raised, var(--surface-hover, #faf8f6));
|
||||
border: 1px solid var(--vd-border-strong, var(--border-color, #cfc7c0));
|
||||
border-radius: 12px;
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
margin: 0 16px 8px;
|
||||
padding: 0 14px;
|
||||
}
|
||||
|
||||
.ux-global-search-input-wrap:focus-within {
|
||||
border-color: var(--vd-accent, var(--primary, #d95c34));
|
||||
box-shadow: 0 0 0 3px color-mix(in srgb, var(--vd-accent, var(--primary, #d95c34)) 16%, transparent);
|
||||
}
|
||||
|
||||
.ux-global-search-input {
|
||||
background: transparent;
|
||||
border: 0;
|
||||
color: inherit;
|
||||
flex: 1;
|
||||
font: inherit;
|
||||
font-size: 1rem;
|
||||
min-inline-size: 0;
|
||||
outline: 0;
|
||||
padding: 14px 0;
|
||||
}
|
||||
|
||||
.ux-global-search-input-wrap kbd,
|
||||
.ux-global-search-footer,
|
||||
.ux-global-search-status {
|
||||
color: var(--vd-text-muted, var(--muted, #716a64));
|
||||
font-size: .78rem;
|
||||
}
|
||||
|
||||
.ux-global-search-input-wrap kbd,
|
||||
.ux-global-search-result-meta kbd {
|
||||
background: var(--vd-surface, var(--surface, #fff));
|
||||
border: 1px solid var(--vd-border-subtle, var(--border-color, #ded7d1));
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 1px 0 color-mix(in srgb, var(--vd-border-strong, #cfc7c0) 60%, transparent);
|
||||
font-family: inherit;
|
||||
padding: 3px 6px;
|
||||
}
|
||||
|
||||
.ux-global-search-status {
|
||||
min-block-size: 22px;
|
||||
padding: 0 20px 4px;
|
||||
}
|
||||
|
||||
.ux-global-search-results {
|
||||
overflow: auto;
|
||||
overscroll-behavior: contain;
|
||||
padding: 2px 10px 12px;
|
||||
scroll-padding-block: 34px 10px;
|
||||
}
|
||||
|
||||
.ux-global-search-section {
|
||||
color: var(--vd-text-muted, var(--muted, #716a64));
|
||||
font-size: .7rem;
|
||||
font-weight: 750;
|
||||
letter-spacing: .06em;
|
||||
padding: 12px 12px 5px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.ux-global-search-result {
|
||||
align-items: center;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
border-radius: 11px;
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
grid-template-columns: 36px minmax(0, 1fr) auto;
|
||||
inline-size: 100%;
|
||||
padding: 11px 12px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.ux-global-search-result:hover,
|
||||
.ux-global-search-result[aria-selected="true"] {
|
||||
background: var(--vd-accent-soft, var(--primary-soft, #f7e4dc));
|
||||
}
|
||||
|
||||
.ux-global-search-result.is-disabled,
|
||||
.ux-global-search-result[aria-disabled="true"] {
|
||||
cursor: not-allowed;
|
||||
opacity: .62;
|
||||
}
|
||||
|
||||
.ux-global-search-result.is-disabled[aria-selected="true"] {
|
||||
background: var(--vd-surface-raised, var(--surface-hover, #faf8f6));
|
||||
box-shadow: inset 3px 0 0 var(--vd-warning, #b66a00);
|
||||
}
|
||||
|
||||
.ux-global-search-result-icon {
|
||||
align-items: center;
|
||||
background: var(--vd-surface-raised, var(--surface-hover, #faf8f6));
|
||||
block-size: 34px;
|
||||
border: 1px solid var(--vd-border-subtle, var(--border-color, #ded7d1));
|
||||
border-radius: 10px;
|
||||
display: inline-flex;
|
||||
font-size: 1rem;
|
||||
inline-size: 34px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.ux-global-search-result-copy {
|
||||
display: grid;
|
||||
gap: 4px;
|
||||
min-inline-size: 0;
|
||||
}
|
||||
|
||||
.ux-global-search-result-title {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 7px;
|
||||
}
|
||||
|
||||
.ux-global-search-result-copy strong {
|
||||
font-size: .93rem;
|
||||
}
|
||||
|
||||
.ux-global-search-result-copy small,
|
||||
.ux-global-search-result-action,
|
||||
.ux-global-search-result-group {
|
||||
color: var(--vd-text-muted, var(--muted, #716a64));
|
||||
font-size: .78rem;
|
||||
}
|
||||
|
||||
.ux-global-search-result-copy small {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ux-global-search-badge {
|
||||
background: color-mix(in srgb, var(--vd-accent, var(--primary, #d95c34)) 12%, transparent);
|
||||
border: 1px solid color-mix(in srgb, var(--vd-accent, var(--primary, #d95c34)) 24%, transparent);
|
||||
border-radius: 999px;
|
||||
color: var(--vd-accent, var(--primary, #d95c34));
|
||||
font-size: .66rem;
|
||||
font-weight: 700;
|
||||
padding: 2px 6px;
|
||||
}
|
||||
|
||||
.ux-global-search-result-meta {
|
||||
align-items: flex-end;
|
||||
display: grid;
|
||||
gap: 5px;
|
||||
justify-items: end;
|
||||
min-inline-size: 92px;
|
||||
}
|
||||
|
||||
.ux-global-search-empty {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
padding: 30px 18px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ux-global-search-empty span {
|
||||
color: var(--vd-text-muted, var(--muted, #716a64));
|
||||
font-size: .86rem;
|
||||
}
|
||||
|
||||
.ux-global-search-footer {
|
||||
border-top: 1px solid var(--vd-border-subtle, var(--border-color, #ded7d1));
|
||||
padding: 12px 18px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ux-search-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ux-nav-history-button:focus-visible,
|
||||
.ux-global-search-close:focus-visible,
|
||||
.ux-global-search-result:focus-visible,
|
||||
.ux-global-search-input:focus-visible {
|
||||
outline: 3px solid color-mix(in srgb, var(--vd-accent, var(--primary, #d95c34)) 36%, transparent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@media(max-width:900px) {
|
||||
.ux-nav-history {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.topbar-context-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ux-nav-history-button {
|
||||
block-size: 32px;
|
||||
inline-size: 32px;
|
||||
}
|
||||
|
||||
.ux-global-search {
|
||||
padding-top: 72px;
|
||||
}
|
||||
}
|
||||
|
||||
@media(max-width:620px) {
|
||||
.ux-nav-history {
|
||||
margin-inline: 0 4px;
|
||||
}
|
||||
|
||||
.ux-nav-history-button {
|
||||
block-size: 30px;
|
||||
border-radius: 8px;
|
||||
inline-size: 30px;
|
||||
}
|
||||
|
||||
.ux-global-search {
|
||||
padding: 10px;
|
||||
place-items: end center;
|
||||
}
|
||||
|
||||
.ux-global-search-panel {
|
||||
border-radius: 16px;
|
||||
max-block-size: 88vh;
|
||||
}
|
||||
|
||||
.ux-global-search-header {
|
||||
padding: 15px 16px 8px;
|
||||
}
|
||||
|
||||
.ux-global-search-header p,
|
||||
.ux-global-search-result-group,
|
||||
.ux-global-search-result-action {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ux-global-search-result {
|
||||
gap: 9px;
|
||||
grid-template-columns: 32px minmax(0, 1fr) auto;
|
||||
padding-inline: 9px;
|
||||
}
|
||||
|
||||
.ux-global-search-result-icon {
|
||||
block-size: 30px;
|
||||
border-radius: 8px;
|
||||
inline-size: 30px;
|
||||
}
|
||||
|
||||
.ux-global-search-result-meta {
|
||||
min-inline-size: auto;
|
||||
}
|
||||
|
||||
.ux-global-search-footer {
|
||||
font-size: .72rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media(prefers-reduced-motion:reduce) {
|
||||
.ux-nav-history-button {
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.ux-global-search {
|
||||
backdrop-filter: none;
|
||||
}
|
||||
|
||||
.ux-global-search-result {
|
||||
scroll-behavior: auto;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user