/* =========================
Avatar
Figma: Avatar.
========================= */
@use "../kit-deps" as *;
.avatar {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 48px;
height: 48px;
border-radius: $radius-full;
background-color: $mint-100;
color: $mint-700;
font-family: $font-family-base;
font-size: 16px;
font-weight: $font-weight-bold;
line-height: 1;
text-transform: uppercase;
overflow: hidden;
user-select: none;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
.avatar-status {
position: absolute;
top: 0;
right: 0;
width: 12px;
height: 12px;
border-radius: 50%;
border: 2px solid $neutral-0;
background-color: $mint-600;
transform: translate(15%, -15%);
&.is-online { background-color: $mint-600; }
&.is-offline { background-color: $neutral-400; }
&.is-busy { background-color: $warning-text; }
&.is-away { background-color: $yellow-500; }
&.is-danger { background-color: $danger-text; }
}
// Sizes
&.avatar-sm {
width: 32px;
height: 32px;
font-size: 12px;
.avatar-status {
width: 8px;
height: 8px;
border-width: 1px;
}
}
&.avatar-md {
width: 48px;
height: 48px;
font-size: 16px;
}
&.avatar-lg {
width: 64px;
height: 64px;
font-size: 20px;
}
&.avatar-xl {
width: 96px;
height: 96px;
font-size: 32px;
}
&.avatar-xs {
width: 24px;
height: 24px;
font-size: 10px;
}
// Variants
&.avatar-neutral {
background-color: $neutral-100;
color: $neutral-700;
}
&.avatar-mint,
&.avatar-primary,
&.avatar-success {
background-color: $mint-100;
color: $mint-700;
}
&.avatar-yellow,
&.avatar-accent,
&.avatar-warning {
background-color: $yellow-100;
color: $yellow-800;
}
&.avatar-lavender,
&.avatar-secondary,
&.avatar-info {
background-color: $lavender-100;
color: $lavender-700;
}
&.avatar-danger,
&.avatar-error {
background-color: $danger-bg;
color: $danger-text;
}
}
.avatar-stack {
display: inline-flex;
align-items: center;
.avatar {
margin-right: -$space-2;
box-shadow: 0 0 0 2px $neutral-0;
transition: transform $motion-base $motion-ease;
&:hover {
transform: translateY(-2px);
z-index: 1;
}
}
.avatar-stack-count {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 32px;
height: 32px;
padding: 0 $space-2;
margin-left: $space-1;
border-radius: $radius-full;
background-color: $neutral-100;
color: $neutral-700;
font-size: 12px;
font-weight: $font-weight-medium;
box-shadow: 0 0 0 2px $neutral-0;
}
}
/* Identity */
.identity {
display: inline-flex;
align-items: center;
gap: $space-3;
min-width: 0;
.identity-content {
display: flex;
flex-direction: column;
min-width: 0;
}
.identity-title {
font-size: $font-size-base;
font-weight: $font-weight-semibold;
color: $neutral-900;
line-height: $line-height-snug;
}
.identity-meta {
font-size: $font-size-sm;
color: $neutral-500;
line-height: $line-height-normal;
}
}
.profile-identity {
display: inline-flex;
align-items: center;
text-decoration: none;
color: inherit;
@include hover_touch {
.identity-title {
color: $neutral-700;
}
}
}