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