signal-desktop/stylesheets/components/StickerManager.scss

329 lines
6.2 KiB
SCSS
Raw Normal View History

2022-12-14 00:06:15 +00:00
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
2024-11-15 23:09:31 +00:00
@use '../mixins';
@use '../variables';
2022-12-14 00:06:15 +00:00
.module-sticker-manager {
2023-04-20 17:03:43 +00:00
padding-block: 0;
padding-inline: 16px;
2022-12-14 00:06:15 +00:00
outline: none;
}
.module-sticker-manager__text {
height: 18px;
letter-spacing: 0px;
line-height: 18px;
2023-04-20 17:03:43 +00:00
padding-inline-start: 8px;
2022-12-14 00:06:15 +00:00
2024-11-15 23:09:31 +00:00
@include mixins.light-theme() {
color: variables.$color-gray-60;
2022-12-14 00:06:15 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme() {
color: variables.$color-gray-25;
2022-12-14 00:06:15 +00:00
}
&--heading {
2024-11-15 23:09:31 +00:00
@include mixins.font-body-1-bold;
2022-12-14 00:06:15 +00:00
2024-11-15 23:09:31 +00:00
@include mixins.light-theme() {
color: variables.$color-gray-90;
2022-12-14 00:06:15 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme() {
color: variables.$color-gray-05;
2022-12-14 00:06:15 +00:00
}
}
}
.module-sticker-manager__empty {
display: flex;
justify-content: center;
align-items: center;
height: 64px;
border-radius: 8px;
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
background: variables.$color-gray-02;
color: variables.$color-gray-60;
2022-12-14 00:06:15 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
background: variables.$color-gray-90;
color: variables.$color-gray-25;
2022-12-14 00:06:15 +00:00
}
}
%blessed-sticker-pack-icon {
height: 14px;
width: 14px;
border-radius: 8px;
2024-11-15 23:09:31 +00:00
background-color: variables.$color-white;
2022-12-14 00:06:15 +00:00
display: inline-block;
vertical-align: middle;
2023-04-20 17:03:43 +00:00
margin-inline-start: 5px;
margin-bottom: 2px;
2022-12-14 00:06:15 +00:00
position: relative;
&::before {
content: '';
display: block;
width: 16px;
height: 16px;
position: absolute;
top: -1px;
2023-04-20 17:03:43 +00:00
inset-inline-start: -1px;
2022-12-14 00:06:15 +00:00
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
@include mixins.color-svg(
2023-05-04 18:04:22 +00:00
'../images/icons/v3/check/check-circle-fill.svg',
2024-11-15 23:09:31 +00:00
variables.$color-accent-blue
2022-12-14 00:06:15 +00:00
);
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
@include mixins.color-svg(
2023-05-04 18:04:22 +00:00
'../images/icons/v3/check/check-circle-fill.svg',
2024-11-15 23:09:31 +00:00
variables.$color-accent-blue
2022-12-14 00:06:15 +00:00
);
}
}
}
.module-sticker-manager__pack-row {
2024-11-15 23:09:31 +00:00
@include mixins.button-reset;
2022-12-14 00:06:15 +00:00
2024-11-15 23:09:31 +00:00
& {
display: flex;
flex-direction: row;
padding: 16px;
padding-inline-start: 8px;
}
2022-12-14 00:06:15 +00:00
2024-11-15 23:09:31 +00:00
@include mixins.keyboard-mode {
2022-12-14 00:06:15 +00:00
&:focus {
2024-11-15 23:09:31 +00:00
box-shadow: 0px 0px 0px 2px variables.$color-ultramarine;
2022-12-14 00:06:15 +00:00
}
}
&__cover {
width: 48px;
height: 48px;
object-fit: contain;
}
&__cover-placeholder {
width: 48px;
height: 48px;
2024-11-15 23:09:31 +00:00
background: variables.$color-gray-05;
2022-12-14 00:06:15 +00:00
}
&__meta {
flex-grow: 1;
display: flex;
flex-direction: column;
&:not(:first-child) {
2023-04-20 17:03:43 +00:00
padding-block: 0;
padding-inline: 12px;
2022-12-14 00:06:15 +00:00
}
&__title {
flex: 1;
}
&__author {
flex: 1;
2024-11-15 23:09:31 +00:00
@include mixins.light-theme() {
color: variables.$color-gray-45;
2022-12-14 00:06:15 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme() {
color: variables.$color-gray-25;
2022-12-14 00:06:15 +00:00
}
}
&__blessed-icon {
@extend %blessed-sticker-pack-icon;
}
}
&__controls {
flex-shrink: 1;
display: flex;
justify-content: center;
align-items: center;
&__button {
background: none;
border: 0;
&--menu {
&::after {
content: '';
display: block;
min-width: 24px;
min-height: 24px;
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
@include mixins.color-svg(
2023-05-04 18:04:22 +00:00
'../images/icons/v3/more/more.svg',
2024-11-15 23:09:31 +00:00
variables.$color-gray-60
2022-12-14 00:06:15 +00:00
);
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
@include mixins.color-svg(
2023-05-04 18:04:22 +00:00
'../images/icons/v3/more/more.svg',
2024-11-15 23:09:31 +00:00
variables.$color-gray-25
2022-12-14 00:06:15 +00:00
);
}
}
}
}
}
}
.module-sticker-manager__install-button {
background: none;
border: 0;
2024-11-15 23:09:31 +00:00
color: variables.$color-gray-90;
2022-12-14 00:06:15 +00:00
2024-11-15 23:09:31 +00:00
@include mixins.font-body-1-bold;
2022-12-14 00:06:15 +00:00
height: 24px;
2024-11-15 23:09:31 +00:00
background: variables.$color-gray-05;
2022-12-14 00:06:15 +00:00
border-radius: 12px;
display: flex;
justify-content: center;
align-items: center;
2023-04-20 17:03:43 +00:00
padding-block: 0;
padding-inline: 12px;
2022-12-14 00:06:15 +00:00
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
color: variables.$color-gray-05;
background: variables.$color-gray-75;
2022-12-14 00:06:15 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.mouse-mode {
2022-12-14 00:06:15 +00:00
outline: none;
}
&--blue {
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
background: variables.$color-ultramarine;
color: variables.$color-white;
2022-12-14 00:06:15 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
background: variables.$color-ultramarine-light;
color: variables.$color-white;
2022-12-14 00:06:15 +00:00
}
}
}
.module-sticker-manager__preview-modal {
&__modal.module-Modal {
width: fit-content;
2022-12-14 00:06:15 +00:00
}
&__error {
2024-11-15 23:09:31 +00:00
color: variables.$color-accent-red;
2022-12-14 00:06:15 +00:00
display: flex;
justify-content: center;
align-items: center;
text-align: center;
width: 100%;
height: 100%;
2023-04-20 17:03:43 +00:00
padding-block: 0 30px;
padding-inline: 80px;
2022-12-14 00:06:15 +00:00
2024-11-15 23:09:31 +00:00
@include mixins.font-body-1-bold;
2022-12-14 00:06:15 +00:00
}
&__sticker-grid {
width: 100%;
display: grid;
grid-gap: 8px;
grid-template-columns: repeat(4, 1fr);
&__cell {
width: 96px;
height: 96px;
display: flex;
justify-content: center;
align-items: center;
&__image {
width: 100%;
height: 100%;
object-fit: contain;
}
&--placeholder {
border-radius: 4px;
2024-11-15 23:09:31 +00:00
@include mixins.light-theme() {
background: variables.$color-gray-05;
2022-12-14 00:06:15 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme() {
background: variables.$color-gray-60;
2022-12-14 00:06:15 +00:00
}
}
}
}
&__footer {
display: flex;
justify-content: space-between;
width: 100%;
&--info {
display: flex;
flex-direction: column;
flex-grow: 1;
flex-shrink: 1;
justify-content: center;
overflow: hidden;
}
&--title {
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
2024-11-15 23:09:31 +00:00
@include mixins.font-body-1-bold;
2022-12-14 00:06:15 +00:00
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
color: variables.$color-gray-90;
2022-12-14 00:06:15 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
color: variables.$color-gray-05;
2022-12-14 00:06:15 +00:00
}
}
&--author {
margin: 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
color: variables.$color-gray-45;
2022-12-14 00:06:15 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
color: variables.$color-gray-25;
2022-12-14 00:06:15 +00:00
}
}
&--blessed-icon {
@extend %blessed-sticker-pack-icon;
}
&--install {
flex-shrink: 0;
overflow: hidden;
}
}
}