222 lines
5.2 KiB
SCSS
222 lines
5.2 KiB
SCSS
@use "../css/variables.module" as *;
|
|
|
|
.excalidraw {
|
|
--avatar-size: 1.75rem;
|
|
--avatarList-gap: 0.625rem;
|
|
--userList-padding: var(--space-factor);
|
|
|
|
--userlist-hint-bg-color: var(--color-gray-10);
|
|
--userlist-hint-heading-color: var(--color-gray-80);
|
|
--userlist-hint-text-color: var(--color-gray-60);
|
|
--userlist-collaborators-border-color: var(--color-gray-20);
|
|
|
|
&.theme--dark {
|
|
--userlist-hint-bg-color: var(--color-gray-90);
|
|
--userlist-hint-heading-color: var(--color-gray-30);
|
|
--userlist-hint-text-color: var(--color-gray-40);
|
|
--userlist-collaborators-border-color: var(--color-gray-80);
|
|
}
|
|
|
|
.UserList__wrapper {
|
|
display: flex;
|
|
width: 100%;
|
|
justify-content: flex-end;
|
|
align-items: center;
|
|
pointer-events: none !important;
|
|
}
|
|
|
|
.UserList {
|
|
pointer-events: none;
|
|
padding: var(--userList-padding);
|
|
display: flex;
|
|
// never wrap — the current user's pill is always the last item and its
|
|
// width is already carved out of the container's width up front (see
|
|
// UserList.tsx), so wrapping would only ever orphan it onto its own line
|
|
flex-wrap: nowrap;
|
|
justify-content: flex-end;
|
|
align-items: center;
|
|
gap: var(--avatarList-gap);
|
|
|
|
box-sizing: border-box;
|
|
|
|
--max-size: calc(
|
|
var(--avatar-size) * var(--max-avatars, 2) + var(--avatarList-gap) *
|
|
(var(--max-avatars, 2) - 1) + var(--userList-padding) * 2
|
|
);
|
|
|
|
// max width & height set to fix the max-avatars
|
|
max-height: var(--max-size);
|
|
max-width: var(--max-size);
|
|
|
|
// Tweak in 30px increments to fit more/fewer avatars in a row/column ^^
|
|
}
|
|
|
|
.UserList > * {
|
|
pointer-events: var(--ui-pointerEvents);
|
|
}
|
|
|
|
.UserList_mobile {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
padding: 0;
|
|
justify-content: normal;
|
|
margin: 0.5rem 0;
|
|
max-width: none;
|
|
max-height: none;
|
|
}
|
|
|
|
.UserList_mobile__avatars {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
gap: var(--avatarList-gap);
|
|
|
|
> .is-current-user {
|
|
order: -1;
|
|
}
|
|
}
|
|
|
|
.UserList__collaborator-name {
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.UserList__pill {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0 0.25rem 0 0;
|
|
border-radius: 1.25rem;
|
|
background-color: var(--color-surface-low);
|
|
border: 1px solid var(--color-gray-20);
|
|
cursor: pointer;
|
|
pointer-events: var(--ui-pointerEvents);
|
|
|
|
&:hover {
|
|
background-color: var(--color-surface-high);
|
|
}
|
|
}
|
|
|
|
.UserList__pill-chevron {
|
|
display: flex;
|
|
align-items: center;
|
|
color: var(--color-gray-50);
|
|
width: 15px;
|
|
height: 15px;
|
|
|
|
svg {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
|
|
.UserList__collaborator--avatar-only {
|
|
position: relative;
|
|
display: flex;
|
|
flex: 0 0 auto;
|
|
.UserList__collaborator-status-icon {
|
|
--size: 14px;
|
|
position: absolute;
|
|
display: flex;
|
|
flex: 0 0 auto;
|
|
bottom: -0.25rem;
|
|
right: -0.25rem;
|
|
width: var(--size);
|
|
height: var(--size);
|
|
svg {
|
|
flex: 0 0 auto;
|
|
width: var(--size);
|
|
height: var(--size);
|
|
}
|
|
}
|
|
}
|
|
|
|
.UserList__collaborator-status-icons {
|
|
margin-left: auto;
|
|
flex: 0 0 auto;
|
|
min-width: 2.25rem;
|
|
gap: 0.25rem;
|
|
justify-content: flex-end;
|
|
display: flex;
|
|
}
|
|
|
|
// the current user's own row in the "who's here" list isn't clickable —
|
|
// no hover/active background, no focus ring, no pointer cursor
|
|
.UserList__collaborator.is-current-user {
|
|
pointer-events: none;
|
|
}
|
|
|
|
.UserList__collaborator.is-muted
|
|
.UserList__collaborator-status-icon-microphone-muted {
|
|
color: var(--color-danger);
|
|
filter: drop-shadow(0px 0px 0px rgba(0, 0, 0, 0.5));
|
|
}
|
|
|
|
.UserList__collaborator-status-icon-speaking-indicator {
|
|
display: flex;
|
|
flex-flow: row nowrap;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
width: 1rem;
|
|
padding: 0 3px;
|
|
box-sizing: border-box;
|
|
|
|
div {
|
|
width: 0.125rem;
|
|
height: 0.4rem;
|
|
// keep this in sync with constants.ts
|
|
background-color: #a2f1a6;
|
|
}
|
|
|
|
div:nth-of-type(1) {
|
|
animation: speaking-indicator-anim 1s -0.45s ease-in-out infinite;
|
|
}
|
|
|
|
div:nth-of-type(2) {
|
|
animation: speaking-indicator-anim 1s -0.9s ease-in-out infinite;
|
|
}
|
|
|
|
div:nth-of-type(3) {
|
|
animation: speaking-indicator-anim 1s -0.15s ease-in-out infinite;
|
|
}
|
|
}
|
|
|
|
@keyframes speaking-indicator-anim {
|
|
0%,
|
|
100% {
|
|
transform: scaleY(1);
|
|
}
|
|
|
|
50% {
|
|
transform: scaleY(2);
|
|
}
|
|
}
|
|
|
|
.UserList__collaborators {
|
|
display: flex;
|
|
flex-direction: column;
|
|
top: auto;
|
|
max-height: 50vh;
|
|
// leave room for the focus/hover ring (box-shadow) on collaborator rows —
|
|
// without it, the list's overflow-y:auto (which also clips overflow-x)
|
|
// cuts the ring off flush against the container's edges: sideways for
|
|
// every row, and top/bottom for the first/last one
|
|
padding: 2px;
|
|
box-sizing: border-box;
|
|
|
|
> .hint {
|
|
order: -2;
|
|
}
|
|
|
|
> .is-current-user {
|
|
order: -1;
|
|
}
|
|
}
|
|
|
|
.UserList__menu-divider {
|
|
height: 1px;
|
|
background-color: var(--userlist-collaborators-border-color);
|
|
margin: 0.25rem 0;
|
|
}
|
|
}
|