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;
|
2022-09-29 22:40:09 +00:00
|
|
|
padding: 16px 16px 1em 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;
|
|
|
|
height: 24px;
|
|
|
|
width: 24px;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
content: '';
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
@include light-theme {
|
|
|
|
@include color-svg(
|
|
|
|
'../images/icons/v2/chevron-left-24.svg',
|
|
|
|
$color-gray-75
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
@include dark-theme {
|
|
|
|
@include color-svg(
|
|
|
|
'../images/icons/v2/chevron-left-24.svg',
|
|
|
|
$color-gray-15
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@include light-theme {
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
background: $color-gray-02;
|
|
|
|
}
|
|
|
|
&:active {
|
|
|
|
background: $color-gray-05;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include dark-theme {
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
background: $color-gray-80;
|
|
|
|
}
|
|
|
|
&:active {
|
|
|
|
background: $color-gray-75;
|
|
|
|
}
|
|
|
|
}
|
2021-04-13 14:20:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__close-button {
|
|
|
|
@include button-reset;
|
|
|
|
|
2021-06-04 16:27:50 +00:00
|
|
|
border-radius: 4px;
|
2021-04-13 14:20:02 +00:00
|
|
|
height: 24px;
|
|
|
|
width: 24px;
|
|
|
|
|
2021-05-06 00:09:29 +00:00
|
|
|
&::before {
|
|
|
|
content: '';
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
@include light-theme {
|
|
|
|
@include color-svg('../images/icons/v2/x-24.svg', $color-gray-75);
|
|
|
|
}
|
2021-04-13 14:20:02 +00:00
|
|
|
|
2021-05-06 00:09:29 +00:00
|
|
|
@include dark-theme {
|
|
|
|
@include color-svg('../images/icons/v2/x-24.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
|
|
|
|
2021-06-04 16:27:50 +00:00
|
|
|
@include light-theme {
|
|
|
|
&:hover,
|
2021-05-06 00:09:29 +00:00
|
|
|
&:focus {
|
2021-06-04 16:27:50 +00:00
|
|
|
background: $color-gray-02;
|
|
|
|
}
|
|
|
|
&:active {
|
|
|
|
background: $color-gray-05;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include dark-theme {
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
background: $color-gray-80;
|
|
|
|
}
|
|
|
|
&:active {
|
|
|
|
background: $color-gray-75;
|
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;
|
|
|
|
}
|
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;
|
|
|
|
padding: 1em 16px 16px 16px;
|
|
|
|
gap: 8px;
|
2021-04-27 19:29:59 +00:00
|
|
|
|
|
|
|
.module-Button {
|
|
|
|
margin-left: 8px;
|
|
|
|
}
|
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 {
|
|
|
|
padding: 10px 12px 16px 12px;
|
|
|
|
|
|
|
|
.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 {
|
|
|
|
padding: 0 12px 4px 12px !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.module-Modal__body p {
|
|
|
|
margin: 0 0 20px 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.module-Modal__title {
|
|
|
|
@include font-title-2;
|
|
|
|
text-align: center;
|
|
|
|
margin: 10px 0 22px 0;
|
|
|
|
|
|
|
|
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;
|
2022-09-29 22:40:09 +00:00
|
|
|
padding: 0 12px 4px 12px;
|
2021-05-06 00:09:29 +00:00
|
|
|
|
|
|
|
.module-Button {
|
|
|
|
flex-grow: 1;
|
|
|
|
max-width: 152px;
|
|
|
|
|
|
|
|
&:not(:first-child) {
|
|
|
|
margin-left: 16px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-04-13 14:20:02 +00:00
|
|
|
}
|