mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Some checks are pending
DevInfra / assistant_to_the_branch_manager (push) Waiting to run
CI (push) / zone-js (push) Waiting to run
CI (push) / lint (push) Waiting to run
CI (push) / devtools (push) Waiting to run
CI (push) / test (push) Waiting to run
CI (push) / integration-tests (push) Waiting to run
CI (push) / adev (push) Waiting to run
CI (push) / vscode-ng-language-service (push) Waiting to run
CI (push) / publish-snapshots (push) Waiting to run
CI (push) / adev-deploy (push) Blocked by required conditions
Update ADEV Cross Repo Docs / Update Cross Repo ADEV Docs (push) Waiting to run
Performance Tracking / workflow (push) Blocked by required conditions
Performance Tracking / list (push) Waiting to run
OpenSSF Scorecard / Scorecards analysis (push) Waiting to run
This PR also replaces the implementation of the select component on ADEV due to the aria breaking changes
193 lines
3.6 KiB
SCSS
193 lines
3.6 KiB
SCSS
:host {
|
|
--border-color: color-mix(in srgb, var(--full-contrast) 20%, var(--page-background));
|
|
|
|
position: relative;
|
|
width: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 0.25rem;
|
|
}
|
|
|
|
.docs-select-input-container {
|
|
display: flex;
|
|
position: relative;
|
|
align-items: center;
|
|
border-radius: 0.25rem;
|
|
|
|
input {
|
|
width: 100%;
|
|
border: none;
|
|
outline: none;
|
|
font-size: 1rem;
|
|
padding: 0.7rem 1rem 0.7rem;
|
|
background-color: var(--septenary-contrast);
|
|
color: var(--primary-contrast);
|
|
|
|
&[readonly] {
|
|
cursor: pointer;
|
|
padding: 0.7rem 1rem;
|
|
}
|
|
|
|
&[aria-expanded='true'] + .docs-select-arrow {
|
|
transform: rotate(180deg);
|
|
}
|
|
}
|
|
}
|
|
|
|
[ngCombobox]:focus-within [ngComboboxInput]:not(.docs-select-search-input) {
|
|
outline: 1.5px solid var(--vivid-pink);
|
|
box-shadow: 0 0 0 4px color-mix(in srgb, var(--vivid-pink) 25%, transparent);
|
|
}
|
|
|
|
.docs-select-popover {
|
|
width: 100%;
|
|
}
|
|
|
|
.docs-select-arrow {
|
|
width: 24px;
|
|
height: 24px;
|
|
font-size: 20px;
|
|
display: grid;
|
|
place-items: center;
|
|
pointer-events: none;
|
|
padding: 0 0.5rem;
|
|
position: absolute;
|
|
right: 0;
|
|
opacity: 0.8;
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
[ngComboboxInput] [ngCombobox] {
|
|
border: none;
|
|
outline: none;
|
|
font-size: 1rem;
|
|
padding: 0.7rem 1rem 0.7rem;
|
|
background-color: var(--septenary-contrast);
|
|
color: var(--primary-contrast);
|
|
}
|
|
|
|
.docs-select-dialog {
|
|
position: absolute;
|
|
left: auto;
|
|
right: auto;
|
|
top: auto;
|
|
bottom: auto;
|
|
padding: 0;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 0.25rem;
|
|
background-color: var(--septenary-contrast);
|
|
color: inherit;
|
|
|
|
.docs-select-input-container {
|
|
border-radius: 0;
|
|
}
|
|
|
|
[ngCombobox],
|
|
.docs-select-input-container {
|
|
border: none;
|
|
}
|
|
|
|
[ngComboboxInput] {
|
|
border-bottom-left-radius: 0;
|
|
border-bottom-right-radius: 0;
|
|
}
|
|
|
|
[ngCombobox]:focus-within [ngComboboxInput] {
|
|
outline: none;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.docs-select-search-input:focus {
|
|
outline: none;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.docs-select-search-container {
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
&::backdrop {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
.docs-select-search-container {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
border-radius: 0;
|
|
}
|
|
|
|
.docs-select-search-icon {
|
|
width: 24px;
|
|
height: 24px;
|
|
font-size: 20px;
|
|
display: grid;
|
|
place-items: center;
|
|
pointer-events: none;
|
|
position: absolute;
|
|
padding: 0 0.5rem;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.docs-select-search-input {
|
|
width: 100%;
|
|
border: none;
|
|
outline: none;
|
|
font-size: 0.875rem;
|
|
padding: 0.5rem 0.75rem 0.5rem 2rem;
|
|
background-color: var(--septenary-contrast);
|
|
color: var(--primary-contrast);
|
|
}
|
|
|
|
.docs-select-no-results {
|
|
padding: 0.75rem;
|
|
text-align: center;
|
|
font-size: 0.875rem;
|
|
color: var(--primary-contrast);
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.docs-select-listbox {
|
|
display: flex;
|
|
flex-direction: column;
|
|
max-height: 12rem;
|
|
overflow: auto;
|
|
padding: 0.25rem;
|
|
}
|
|
|
|
.docs-select-option {
|
|
display: flex;
|
|
cursor: pointer;
|
|
align-items: center;
|
|
padding: 0.5rem 0.75rem;
|
|
font-size: 0.875rem;
|
|
border-radius: 0.25rem;
|
|
|
|
&:hover {
|
|
background-color: color-mix(in srgb, var(--primary-contrast) 5%, transparent);
|
|
}
|
|
|
|
&[data-active='true'] {
|
|
outline-offset: -2px;
|
|
outline: 2px solid var(--vivid-pink);
|
|
}
|
|
|
|
&[aria-selected='true'] {
|
|
color: var(--vivid-pink);
|
|
background-color: color-mix(in srgb, var(--vivid-pink) 5%, transparent);
|
|
}
|
|
|
|
&:not([aria-selected='true']) .docs-select-check-icon {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.docs-select-option-label {
|
|
flex: 1;
|
|
}
|
|
|
|
.docs-select-check-icon {
|
|
font-size: 0.9rem;
|
|
}
|