2021-04-13 14:20:02 +00:00
|
|
|
// Copyright 2021 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
.module-Modal {
|
|
|
|
@include popper-shadow();
|
|
|
|
border-radius: 8px;
|
2022-09-29 22:40:09 +00:00
|
|
|
overflow: hidden;
|
2021-08-06 00:17:05 +00:00
|
|
|
// We need this to be a number not divisible by 5 so that if we have sticky
|
|
|
|
// buttons the bottom doesn't bleed through by 1px.
|
|
|
|
max-height: 89vh;
|
2021-04-13 14:20:02 +00:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
@include light-theme() {
|
|
|
|
background: $color-white;
|
|
|
|
color: $color-gray-90;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include dark-theme() {
|
2021-11-20 15:41:32 +00:00
|
|
|
background: $color-gray-80;
|
2021-04-13 14:20:02 +00:00
|
|
|
color: $color-gray-05;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__header {
|
2022-07-21 00:07:09 +00:00
|
|
|
align-items: center;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
2023-04-20 17:03:43 +00:00
|
|
|
padding-block: 16px 1em;
|
|
|
|
padding-inline: 16px;
|
2022-07-21 00:07:09 +00:00
|
|
|
|
|
|
|
&--with-back-button .module-Modal__title {
|
|
|
|
text-align: center;
|
|
|
|
}
|
2021-04-13 14:20:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__title {
|
|
|
|
@include font-body-1-bold;
|
2022-07-21 00:07:09 +00:00
|
|
|
margin: 0;
|
2021-04-13 14:20:02 +00:00
|
|
|
padding: 0;
|
2022-07-21 00:07:09 +00:00
|
|
|
flex: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__back-button {
|
|
|
|
@include button-reset;
|
|
|
|
border-radius: 4px;
|
2023-05-04 18:04:22 +00:00
|
|
|
height: 20px;
|
|
|
|
width: 20px;
|
2022-07-21 00:07:09 +00:00
|
|
|
|
|
|
|
&::before {
|
|
|
|
content: '';
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
@include light-theme {
|
|
|
|
@include color-svg(
|
2023-05-04 18:04:22 +00:00
|
|
|
'../images/icons/v3/chevron/chevron-left.svg',
|
2022-07-21 00:07:09 +00:00
|
|
|
$color-gray-75
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
@include dark-theme {
|
|
|
|
@include color-svg(
|
2023-05-04 18:04:22 +00:00
|
|
|
'../images/icons/v3/chevron/chevron-left.svg',
|
2022-07-21 00:07:09 +00:00
|
|
|
$color-gray-15
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-03 13:09:55 +00:00
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
background: $color-gray-45;
|
|
|
|
&::before {
|
|
|
|
background-color: $color-ultramarine;
|
2022-07-21 00:07:09 +00:00
|
|
|
}
|
|
|
|
}
|
2023-05-03 13:09:55 +00:00
|
|
|
&:active {
|
|
|
|
background: $color-gray-45;
|
|
|
|
&::before {
|
|
|
|
background-color: $color-ultramarine;
|
2022-07-21 00:07:09 +00:00
|
|
|
}
|
|
|
|
}
|
2021-04-13 14:20:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__close-button {
|
|
|
|
@include button-reset;
|
|
|
|
|
2021-06-04 16:27:50 +00:00
|
|
|
border-radius: 4px;
|
2023-05-04 18:04:22 +00:00
|
|
|
height: 20px;
|
|
|
|
width: 20px;
|
2021-04-13 14:20:02 +00:00
|
|
|
|
2021-05-06 00:09:29 +00:00
|
|
|
&::before {
|
|
|
|
content: '';
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
@include light-theme {
|
2023-05-04 18:04:22 +00:00
|
|
|
@include color-svg('../images/icons/v3/x/x.svg', $color-gray-75);
|
2021-05-06 00:09:29 +00:00
|
|
|
}
|
2021-04-13 14:20:02 +00:00
|
|
|
|
2021-05-06 00:09:29 +00:00
|
|
|
@include dark-theme {
|
2023-05-04 18:04:22 +00:00
|
|
|
@include color-svg('../images/icons/v3/x/x.svg', $color-gray-15);
|
2021-04-13 14:20:02 +00:00
|
|
|
}
|
2021-06-04 16:27:50 +00:00
|
|
|
}
|
2021-05-06 00:09:29 +00:00
|
|
|
|
2023-05-03 13:09:55 +00:00
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
box-shadow: 0 0 0 2px $color-ultramarine;
|
2021-04-13 14:20:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__body {
|
2022-08-10 18:37:19 +00:00
|
|
|
@include scrollbar;
|
2021-04-13 14:20:02 +00:00
|
|
|
@include font-body-1;
|
|
|
|
margin: 0;
|
2022-09-29 22:40:09 +00:00
|
|
|
overflow-y: overlay;
|
|
|
|
overflow-x: auto;
|
2022-10-04 23:17:15 +00:00
|
|
|
transition: border-color 150ms ease-in-out;
|
2022-09-29 22:40:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&--padded {
|
|
|
|
.module-Modal__body {
|
|
|
|
padding: 16px;
|
2023-03-09 00:35:40 +00:00
|
|
|
|
|
|
|
// ProfileEditor nests footer within the Modal's body
|
|
|
|
.module-Modal__button-footer {
|
2023-04-20 17:03:43 +00:00
|
|
|
padding-block: 1em 0;
|
|
|
|
padding-inline: 0;
|
2023-03-09 00:35:40 +00:00
|
|
|
}
|
2022-09-29 22:40:09 +00:00
|
|
|
}
|
2021-04-13 14:20:02 +00:00
|
|
|
}
|
|
|
|
|
2022-10-04 23:17:15 +00:00
|
|
|
&--has-header#{&}--header-divider {
|
|
|
|
.module-Modal__body {
|
|
|
|
@include light-theme() {
|
|
|
|
border-top-color: $color-gray-15;
|
|
|
|
}
|
|
|
|
@include dark-theme() {
|
|
|
|
border-top-color: $color-gray-60;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-13 14:20:02 +00:00
|
|
|
&--has-header {
|
|
|
|
.module-Modal__body {
|
2022-09-26 16:24:52 +00:00
|
|
|
padding-top: 0;
|
2021-04-13 14:20:02 +00:00
|
|
|
border-top: 1px solid transparent;
|
|
|
|
|
|
|
|
&--scrolled {
|
|
|
|
@include light-theme {
|
|
|
|
border-top-color: $color-gray-05;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include dark-theme {
|
|
|
|
border-top-color: $color-gray-80;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-04 23:17:15 +00:00
|
|
|
&--has-footer#{&}--footer-divider {
|
|
|
|
.module-Modal__body {
|
|
|
|
@include light-theme() {
|
|
|
|
border-bottom-color: $color-gray-15;
|
|
|
|
}
|
|
|
|
@include dark-theme() {
|
|
|
|
border-bottom-color: $color-gray-60;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&--has-footer {
|
|
|
|
.module-Modal__body {
|
|
|
|
border-bottom: 1px solid transparent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-27 15:43:39 +00:00
|
|
|
&__button-footer {
|
2021-04-13 14:20:02 +00:00
|
|
|
display: flex;
|
2021-05-27 15:43:39 +00:00
|
|
|
flex-wrap: wrap;
|
2021-04-13 14:20:02 +00:00
|
|
|
justify-content: flex-end;
|
2022-09-29 22:40:09 +00:00
|
|
|
align-items: center;
|
2023-04-20 17:03:43 +00:00
|
|
|
padding-block: 1em 16px;
|
|
|
|
padding-inline: 16px;
|
2022-09-29 22:40:09 +00:00
|
|
|
gap: 8px;
|
2021-04-27 19:29:59 +00:00
|
|
|
|
|
|
|
.module-Button {
|
2023-04-20 17:03:43 +00:00
|
|
|
margin-inline-start: 8px;
|
2021-04-27 19:29:59 +00:00
|
|
|
}
|
2021-05-27 20:17:05 +00:00
|
|
|
|
|
|
|
&--one-button-per-line {
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: flex-end;
|
|
|
|
}
|
2021-04-13 14:20:02 +00:00
|
|
|
}
|
2021-05-06 00:09:29 +00:00
|
|
|
|
|
|
|
// Overrides for a modal with important message
|
|
|
|
&--important {
|
2023-04-20 17:03:43 +00:00
|
|
|
padding-block: 10px 16px;
|
|
|
|
padding-inline: 12px;
|
2021-05-06 00:09:29 +00:00
|
|
|
|
|
|
|
.module-Modal__header {
|
2022-08-03 17:51:58 +00:00
|
|
|
// Necessary because of the larger top margins for the title
|
|
|
|
align-items: start;
|
2021-05-06 00:09:29 +00:00
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.module-Modal__body {
|
2023-04-20 17:03:43 +00:00
|
|
|
padding-block: 0 4px !important;
|
|
|
|
padding-inline: 12px !important;
|
2021-05-06 00:09:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.module-Modal__body p {
|
2023-04-20 17:03:43 +00:00
|
|
|
margin-block: 0 20px;
|
|
|
|
margin-inline: 0;
|
2021-05-06 00:09:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.module-Modal__title {
|
|
|
|
@include font-title-2;
|
|
|
|
text-align: center;
|
2023-04-20 17:03:43 +00:00
|
|
|
margin-block: 10px 22px;
|
|
|
|
margin-inline: 0;
|
2021-05-06 00:09:29 +00:00
|
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
|
|
&--with-x-button {
|
|
|
|
margin-top: 31px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-01 23:55:47 +00:00
|
|
|
.module-Modal__button-footer {
|
2021-05-06 00:09:29 +00:00
|
|
|
justify-content: center;
|
|
|
|
margin-top: 27px;
|
|
|
|
flex-grow: 0;
|
|
|
|
flex-shrink: 0;
|
2023-04-20 17:03:43 +00:00
|
|
|
padding-block: 0 4px;
|
|
|
|
padding-inline: 12px;
|
2021-05-06 00:09:29 +00:00
|
|
|
|
|
|
|
.module-Button {
|
|
|
|
flex-grow: 1;
|
|
|
|
max-width: 152px;
|
|
|
|
|
|
|
|
&:not(:first-child) {
|
2023-04-20 17:03:43 +00:00
|
|
|
margin-inline-start: 16px;
|
2021-05-06 00:09:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-04-13 14:20:02 +00:00
|
|
|
}
|