feat(core): add bounded people picker foundation
This commit is contained in:
@@ -1516,6 +1516,166 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Principal-aware account/contact picker with structured external entry. */
|
||||
.people-picker {
|
||||
display: grid;
|
||||
gap: 16px;
|
||||
min-width: 0;
|
||||
}
|
||||
.people-picker-search-field,
|
||||
.people-picker-selection,
|
||||
.people-picker-manual {
|
||||
display: grid;
|
||||
gap: 7px;
|
||||
min-width: 0;
|
||||
}
|
||||
.people-picker-search-control {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.people-picker-search-control > svg {
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
z-index: 1;
|
||||
color: var(--muted);
|
||||
pointer-events: none;
|
||||
}
|
||||
.people-picker-search-control input {
|
||||
padding-left: 38px;
|
||||
}
|
||||
.people-picker-search-control:focus-within > svg {
|
||||
color: var(--primary);
|
||||
}
|
||||
.people-picker-results {
|
||||
display: grid;
|
||||
max-height: 360px;
|
||||
overflow: auto;
|
||||
border: var(--border-line-dark);
|
||||
border-radius: 8px;
|
||||
background: var(--surface);
|
||||
box-shadow: var(--shadow-popover);
|
||||
padding: 5px;
|
||||
}
|
||||
.people-picker-result-group {
|
||||
display: grid;
|
||||
gap: 2px;
|
||||
}
|
||||
.people-picker-result-group + .people-picker-result-group {
|
||||
margin-top: 5px;
|
||||
border-top: var(--border-line);
|
||||
padding-top: 5px;
|
||||
}
|
||||
.people-picker-result-group-label {
|
||||
color: var(--text-label);
|
||||
font-size: 11px;
|
||||
font-weight: 800;
|
||||
letter-spacing: .04em;
|
||||
padding: 5px 9px 3px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.people-picker-result {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
width: 100%;
|
||||
border: 0;
|
||||
border-radius: 6px;
|
||||
background: transparent;
|
||||
color: var(--text);
|
||||
cursor: pointer;
|
||||
padding: 8px 9px;
|
||||
text-align: left;
|
||||
}
|
||||
.people-picker-result:hover:not(:disabled),
|
||||
.people-picker-result.is-active:not(:disabled),
|
||||
.people-picker-result:focus-visible:not(:disabled) {
|
||||
background: var(--primary-soft);
|
||||
box-shadow: var(--primary-inset-ring);
|
||||
outline: none;
|
||||
}
|
||||
.people-picker-result:disabled {
|
||||
background: var(--control-disabled-bg);
|
||||
color: var(--control-disabled-text);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.people-picker-result-main,
|
||||
.people-picker-result-context,
|
||||
.people-picker-selected-person {
|
||||
display: grid;
|
||||
gap: 2px;
|
||||
min-width: 0;
|
||||
}
|
||||
.people-picker-result-main strong,
|
||||
.people-picker-result-main small,
|
||||
.people-picker-result-context small,
|
||||
.people-picker-selected-person strong,
|
||||
.people-picker-selected-person small {
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.people-picker-result-main small,
|
||||
.people-picker-result-context,
|
||||
.people-picker-selected-person small {
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
.people-picker-result-context {
|
||||
justify-items: end;
|
||||
text-align: right;
|
||||
}
|
||||
.people-picker-status {
|
||||
min-height: 18px;
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
.people-picker-manual {
|
||||
justify-items: start;
|
||||
}
|
||||
.people-picker-manual-form {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(160px, 1fr) minmax(220px, 1fr) auto;
|
||||
align-items: end;
|
||||
gap: 12px;
|
||||
width: 100%;
|
||||
border: var(--border-line);
|
||||
border-radius: 8px;
|
||||
background: var(--surface-subtle);
|
||||
padding: 12px;
|
||||
}
|
||||
.people-picker-manual-form > label {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
}
|
||||
.people-picker-manual-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.people-picker-manual-form > .form-help {
|
||||
grid-column: 1 / -1;
|
||||
margin: 0;
|
||||
}
|
||||
.people-picker-selection > .field-label,
|
||||
.people-picker-selection > span > .field-label {
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.people-picker-result {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 4px;
|
||||
}
|
||||
.people-picker-result-context {
|
||||
justify-items: start;
|
||||
text-align: left;
|
||||
}
|
||||
.people-picker-manual-form {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
/* Bootstrap-like switch controls without importing Bootstrap. */
|
||||
.toggle-switch-row {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user