mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-24 21:34:50 +00:00
197 lines
4.9 KiB
CSS
197 lines
4.9 KiB
CSS
@import "./menu-v2.css";
|
|
|
|
/* Select dropdown: slide down from trigger (no scale-from-corner). */
|
|
[data-component="menu-v2-content"][data-slot="select-v2-content"] {
|
|
transform-origin: top center;
|
|
animation: select-v2-content-in 120ms ease-out;
|
|
}
|
|
|
|
[data-component="menu-v2-content"][data-slot="select-v2-content"][data-closed] {
|
|
animation: select-v2-content-out 80ms ease-in forwards;
|
|
}
|
|
|
|
@keyframes select-v2-content-in {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(-2px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
@keyframes select-v2-content-out {
|
|
from {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
transform: translateY(-2px);
|
|
}
|
|
}
|
|
|
|
/* Trigger shell — aligned with text-input-v2 */
|
|
[data-component="select-v2"] {
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: stretch;
|
|
padding: 0 6px 0 0;
|
|
gap: 8px;
|
|
width: 280px;
|
|
height: 28px;
|
|
border: 0;
|
|
border-radius: 6px;
|
|
outline: 1px solid transparent;
|
|
outline-offset: 0;
|
|
background: linear-gradient(180deg, var(--alpha-light-2) 0%, var(--alpha-light-0) 100%), var(--background-bg-base);
|
|
box-shadow: var(--elevation-button-neutral);
|
|
flex: none;
|
|
align-self: stretch;
|
|
transition:
|
|
background 85ms ease-out,
|
|
outline-color 85ms ease-out,
|
|
box-shadow 85ms ease-out;
|
|
}
|
|
|
|
[data-component="select-v2"][data-appearance="large"] {
|
|
height: 32px;
|
|
padding: 0 8px 0 0;
|
|
}
|
|
|
|
[data-component="select-v2"]:where(:hover):not([data-disabled], [data-invalid]):not(:focus-within):not(
|
|
[data-expanded]
|
|
) {
|
|
background:
|
|
linear-gradient(0deg, var(--overlay-simple-overlay-hover), var(--overlay-simple-overlay-hover)),
|
|
linear-gradient(180deg, var(--alpha-light-2) 0%, var(--alpha-light-0) 100%), var(--background-bg-base);
|
|
}
|
|
|
|
[data-component="select-v2"]:where(:focus-within):not([data-disabled], [data-invalid]),
|
|
[data-component="select-v2"]:where([data-expanded]):not([data-disabled], [data-invalid]) {
|
|
outline-color: var(--border-border-focus);
|
|
box-shadow: none;
|
|
}
|
|
|
|
[data-component="select-v2"]:where([data-invalid]):not([data-disabled]) {
|
|
outline-color: var(--state-fg-danger);
|
|
box-shadow: none;
|
|
}
|
|
|
|
[data-component="select-v2"]:where([data-disabled]) {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
[data-component="select-v2"] [data-slot="select-v2-value"] {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
align-self: stretch;
|
|
padding: 0;
|
|
min-width: 0;
|
|
flex: 1 1 auto;
|
|
min-height: 0;
|
|
cursor: default;
|
|
}
|
|
|
|
[data-component="select-v2"] [data-slot="select-v2-value-text"] {
|
|
display: block;
|
|
width: 100%;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
padding: 0 0 0 8px;
|
|
margin: 0;
|
|
border: 0;
|
|
background: transparent;
|
|
outline: none;
|
|
text-align: left;
|
|
font-family: var(--font-family-sans);
|
|
font-style: normal;
|
|
font-weight: 440;
|
|
font-size: 13px;
|
|
line-height: 1;
|
|
letter-spacing: -0.04px;
|
|
color: var(--text-text-base);
|
|
font-variation-settings: "slnt" 0;
|
|
cursor: default;
|
|
}
|
|
|
|
[data-component="select-v2"] [data-slot="select-v2-value-text"][data-placeholder-shown] {
|
|
color: var(--text-text-faint);
|
|
}
|
|
|
|
[data-component="select-v2"][data-numeric] [data-slot="select-v2-value-text"] {
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
[data-component="select-v2"]:where([data-invalid]):not([data-disabled]) [data-slot="select-v2-value-text"] {
|
|
color: var(--state-fg-danger);
|
|
}
|
|
|
|
[data-component="select-v2"] [data-slot="select-v2-chevron"] {
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: center;
|
|
align-items: center;
|
|
align-self: center;
|
|
flex: none;
|
|
width: 20px;
|
|
height: 20px;
|
|
padding: 2px;
|
|
gap: 3px;
|
|
border: 0;
|
|
border-radius: 4px;
|
|
background: transparent;
|
|
color: var(--icon-icon-muted);
|
|
pointer-events: none;
|
|
}
|
|
|
|
[data-component="select-v2"] [data-slot="select-v2-chevron"] svg {
|
|
display: block;
|
|
flex: none;
|
|
transform: rotate(180deg);
|
|
transform-origin: 50% 50%;
|
|
}
|
|
|
|
[data-component="select-v2"][data-expanded] [data-slot="select-v2-chevron"] svg {
|
|
transform: rotate(0deg);
|
|
}
|
|
|
|
/* Listbox inside menu surface */
|
|
[data-component="menu-v2-content"][data-slot="select-v2-content"] [data-slot="select-v2-listbox"] {
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
min-width: 0;
|
|
width: 100%;
|
|
max-height: min(320px, 70vh);
|
|
overflow-y: auto;
|
|
outline: none;
|
|
}
|
|
|
|
/* Listbox uses data-selected; menu item CSS uses data-checked — mirror accent */
|
|
[data-slot="select-v2-listbox"] [data-component="menu-v2-item"][data-selected] [data-slot="menu-v2-item-content"] {
|
|
font-weight: 530;
|
|
color: var(--menu-v2-accent);
|
|
}
|
|
|
|
[data-slot="select-v2-listbox"] [data-component="menu-v2-item"][data-selected] [data-slot="menu-v2-item-indicator"] {
|
|
color: var(--menu-v2-accent);
|
|
}
|
|
|
|
[data-slot="select-v2-listbox"]
|
|
[data-component="menu-v2-item"]:not([data-selected])
|
|
[data-slot="menu-v2-item-indicator"]
|
|
svg {
|
|
visibility: hidden;
|
|
}
|