2021-11-11 03:10:35 +08:00
|
|
|
import styled from 'styled-components';
|
2023-04-12 23:51:23 +08:00
|
|
|
import Styled from '../base/component';
|
2021-11-11 03:10:35 +08:00
|
|
|
import { smallOnly } from '/imports/ui/stylesheets/styled-components/breakpoints';
|
2022-02-15 04:20:50 +08:00
|
|
|
import Button from '/imports/ui/components/common/button/component';
|
2022-11-09 01:51:36 +08:00
|
|
|
import {
|
|
|
|
borderSize,
|
|
|
|
smPaddingX,
|
|
|
|
} from '/imports/ui/stylesheets/styled-components/general';
|
2021-11-11 03:10:35 +08:00
|
|
|
import {
|
|
|
|
lineHeightComputed,
|
2022-11-09 01:51:36 +08:00
|
|
|
headingsFontWeight,
|
|
|
|
fontSizeLarger,
|
2021-11-11 03:10:35 +08:00
|
|
|
} from '/imports/ui/stylesheets/styled-components/typography';
|
|
|
|
import {
|
2022-03-24 21:56:07 +08:00
|
|
|
colorGrayLightest,
|
2021-11-11 03:10:35 +08:00
|
|
|
colorText,
|
|
|
|
} from '/imports/ui/stylesheets/styled-components/palette';
|
|
|
|
|
|
|
|
const FullscreenModal = styled(Styled.BaseModal)`
|
|
|
|
outline: transparent;
|
|
|
|
outline-width: ${borderSize};
|
|
|
|
outline-style: solid;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2023-07-06 02:48:21 +08:00
|
|
|
height: 100%;
|
2021-11-11 03:10:35 +08:00
|
|
|
align-self: flex-start;
|
|
|
|
padding: calc(${lineHeightComputed} / 2) ${lineHeightComputed};
|
|
|
|
|
|
|
|
@media ${smallOnly} {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
const Header = styled.header`
|
|
|
|
display: flex;
|
|
|
|
padding: ${lineHeightComputed} 0;
|
2022-03-24 21:56:07 +08:00
|
|
|
border-bottom: ${borderSize} solid ${colorGrayLightest};
|
2021-11-11 03:10:35 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
const Title = styled.h1`
|
|
|
|
min-width: 0;
|
|
|
|
display: inline-block;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
flex: 1;
|
|
|
|
margin: 0;
|
2022-11-09 01:51:36 +08:00
|
|
|
font-size: ${fontSizeLarger};
|
|
|
|
font-weight: ${headingsFontWeight};
|
2021-11-11 03:10:35 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
const Actions = styled.div`
|
|
|
|
flex: 0 1 35%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const Content = styled.div`
|
|
|
|
color: ${colorText};
|
|
|
|
font-weight: normal;
|
|
|
|
padding: ${lineHeightComputed} 0;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const DismissButton = styled(Button)`
|
|
|
|
flex: 0 1 48%;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const ConfirmButton = styled(Button)`
|
|
|
|
flex: 0 1 48%;
|
|
|
|
|
|
|
|
${({ popout }) => popout === 'popout' && `
|
|
|
|
& > i {
|
|
|
|
bottom: ${borderSize};
|
|
|
|
left: ${smPaddingX};
|
|
|
|
|
|
|
|
[dir="rtl"] & {
|
|
|
|
left: -0.5rem;
|
|
|
|
transform: rotateY(180deg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export default {
|
|
|
|
FullscreenModal,
|
|
|
|
Header,
|
|
|
|
Title,
|
|
|
|
Actions,
|
|
|
|
Content,
|
|
|
|
DismissButton,
|
|
|
|
ConfirmButton,
|
|
|
|
};
|