2021-05-06 03:08:14 +03:00
|
|
|
import * as Constants from "~/common/constants";
|
|
|
|
|
|
|
|
import { css } from "@emotion/react";
|
|
|
|
|
|
|
|
/* TYPOGRAPHY */
|
|
|
|
|
2021-11-17 03:52:19 +03:00
|
|
|
export const OVERFLOW_ELLIPSIS = css`
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
|
|
|
`;
|
|
|
|
|
2021-07-07 23:50:57 +03:00
|
|
|
export const LINK = css`
|
|
|
|
text-decoration: none;
|
2021-11-17 03:52:19 +03:00
|
|
|
color: ${Constants.semantic.textBlack};
|
2021-07-07 23:50:57 +03:00
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
:visited {
|
2021-11-17 03:52:19 +03:00
|
|
|
color: ${Constants.semantic.textBlack};
|
2021-07-07 23:50:57 +03:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
const TEXT = css`
|
|
|
|
box-sizing: border-box;
|
|
|
|
overflow-wrap: break-word;
|
2021-08-04 22:06:38 +03:00
|
|
|
text-align: left;
|
2021-08-19 19:59:15 +03:00
|
|
|
font-weight: normal;
|
2021-07-07 23:50:57 +03:00
|
|
|
|
|
|
|
a {
|
|
|
|
${LINK}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const H1 = css`
|
2021-08-19 19:59:15 +03:00
|
|
|
font-family: ${Constants.font.medium};
|
2021-11-17 15:49:04 +03:00
|
|
|
font-size: 2rem;
|
|
|
|
line-height: 1.5;
|
2021-07-07 23:50:57 +03:00
|
|
|
letter-spacing: -0.021px;
|
|
|
|
|
|
|
|
${TEXT}
|
2021-05-06 03:08:14 +03:00
|
|
|
`;
|
|
|
|
|
2021-07-07 23:50:57 +03:00
|
|
|
export const H2 = css`
|
2021-08-19 19:59:15 +03:00
|
|
|
font-family: ${Constants.font.medium};
|
2021-11-17 15:49:04 +03:00
|
|
|
font-size: 1.5rem;
|
|
|
|
line-height: 1.5;
|
2021-07-07 23:50:57 +03:00
|
|
|
letter-spacing: -0.019px;
|
|
|
|
|
|
|
|
${TEXT}
|
2021-05-06 03:08:14 +03:00
|
|
|
`;
|
|
|
|
|
2021-07-07 23:50:57 +03:00
|
|
|
export const H3 = css`
|
2021-08-19 19:59:15 +03:00
|
|
|
font-family: ${Constants.font.medium};
|
2021-11-12 01:28:15 +03:00
|
|
|
font-size: 20px;
|
|
|
|
line-height: 28px;
|
2021-07-07 23:50:57 +03:00
|
|
|
letter-spacing: -0.017px;
|
|
|
|
|
|
|
|
${TEXT}
|
2021-05-06 03:08:14 +03:00
|
|
|
`;
|
|
|
|
|
2021-07-07 23:50:57 +03:00
|
|
|
export const H4 = css`
|
2021-08-19 19:59:15 +03:00
|
|
|
font-family: ${Constants.font.medium};
|
2021-11-12 01:28:15 +03:00
|
|
|
font-size: 16px;
|
|
|
|
line-height: 24px;
|
2021-07-07 23:50:57 +03:00
|
|
|
letter-spacing: -0.011px;
|
|
|
|
|
|
|
|
${TEXT}
|
2021-05-06 03:08:14 +03:00
|
|
|
`;
|
|
|
|
|
2021-07-07 23:50:57 +03:00
|
|
|
export const H5 = css`
|
2021-08-19 19:59:15 +03:00
|
|
|
font-family: ${Constants.font.medium};
|
2021-11-12 01:28:15 +03:00
|
|
|
font-size: 14px;
|
|
|
|
line-height: 20px;
|
2021-07-07 23:50:57 +03:00
|
|
|
letter-spacing: -0.006px;
|
|
|
|
|
|
|
|
${TEXT}
|
2021-05-06 03:08:14 +03:00
|
|
|
`;
|
|
|
|
|
2021-09-24 19:38:48 +03:00
|
|
|
export const H6 = css`
|
|
|
|
font-family: ${Constants.font.medium};
|
2021-11-12 01:28:15 +03:00
|
|
|
font-size: 12px;
|
|
|
|
line-height: 20px;
|
2021-09-24 19:38:48 +03:00
|
|
|
letter-spacing: -0.01px;
|
|
|
|
|
|
|
|
${TEXT}
|
|
|
|
`;
|
|
|
|
|
2021-07-07 23:50:57 +03:00
|
|
|
export const P1 = css`
|
2021-05-06 03:08:14 +03:00
|
|
|
font-family: ${Constants.font.text};
|
2021-11-12 01:28:15 +03:00
|
|
|
font-size: 16px;
|
|
|
|
line-height: 24px;
|
2021-07-07 23:50:57 +03:00
|
|
|
letter-spacing: -0.011px;
|
|
|
|
|
2021-05-27 11:20:34 +03:00
|
|
|
@media (max-width: ${Constants.sizes.mobile}px) {
|
|
|
|
font-family: ${Constants.font.text};
|
2021-11-12 01:28:15 +03:00
|
|
|
font-size: 14px;
|
|
|
|
line-height: 20px;
|
2021-05-27 11:20:34 +03:00
|
|
|
letter-spacing: -0.006px;
|
|
|
|
}
|
|
|
|
|
2021-07-07 23:50:57 +03:00
|
|
|
${TEXT}
|
2021-05-06 03:08:14 +03:00
|
|
|
`;
|
|
|
|
|
2021-07-07 23:50:57 +03:00
|
|
|
export const P2 = css`
|
2021-05-06 03:08:14 +03:00
|
|
|
font-family: ${Constants.font.text};
|
2021-11-12 01:28:15 +03:00
|
|
|
font-size: 14px;
|
|
|
|
line-height: 20px;
|
2021-07-07 23:50:57 +03:00
|
|
|
letter-spacing: -0.006px;
|
|
|
|
|
|
|
|
${TEXT}
|
2021-05-06 03:08:14 +03:00
|
|
|
`;
|
|
|
|
|
2021-07-07 23:50:57 +03:00
|
|
|
export const P3 = css`
|
2021-05-06 03:08:14 +03:00
|
|
|
font-family: ${Constants.font.text};
|
2021-11-12 01:28:15 +03:00
|
|
|
font-size: 12px;
|
|
|
|
line-height: 16px;
|
2021-07-07 23:50:57 +03:00
|
|
|
letter-spacing: 0px;
|
|
|
|
|
|
|
|
${TEXT}
|
2021-05-06 03:08:14 +03:00
|
|
|
`;
|
|
|
|
|
2021-07-07 23:50:57 +03:00
|
|
|
export const C1 = css`
|
2021-05-06 03:08:14 +03:00
|
|
|
font-family: ${Constants.font.code};
|
2021-11-12 01:28:15 +03:00
|
|
|
font-size: 16px;
|
|
|
|
line-height: 24px;
|
|
|
|
|
|
|
|
@media (max-width: ${Constants.sizes.mobile}px) {
|
|
|
|
font-size: 14px;
|
|
|
|
line-height: 20px;
|
|
|
|
}
|
2021-07-07 23:50:57 +03:00
|
|
|
|
|
|
|
${TEXT}
|
2021-05-06 03:08:14 +03:00
|
|
|
`;
|
|
|
|
|
2021-07-07 23:50:57 +03:00
|
|
|
export const C2 = css`
|
2021-05-06 03:08:14 +03:00
|
|
|
font-family: ${Constants.font.code};
|
2021-11-12 01:28:15 +03:00
|
|
|
font-size: 14px;
|
|
|
|
line-height: 20px;
|
2021-07-07 23:50:57 +03:00
|
|
|
|
|
|
|
${TEXT}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const C3 = css`
|
|
|
|
font-family: ${Constants.font.code};
|
2021-11-12 01:28:15 +03:00
|
|
|
font-size: 12px;
|
|
|
|
line-height: 16px;
|
2021-07-07 23:50:57 +03:00
|
|
|
|
|
|
|
${TEXT}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const B1 = css`
|
2021-08-19 19:59:15 +03:00
|
|
|
font-family: ${Constants.font.medium};
|
2021-07-07 23:50:57 +03:00
|
|
|
font-size: 0.875rem;
|
|
|
|
line-height: 1;
|
|
|
|
letter-spacing: -0.006px;
|
|
|
|
|
|
|
|
${TEXT}
|
2021-05-06 03:08:14 +03:00
|
|
|
`;
|
|
|
|
|
|
|
|
/* FREQUENTLY USED */
|
|
|
|
|
|
|
|
export const HORIZONTAL_CONTAINER = css`
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const VERTICAL_CONTAINER = css`
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const HORIZONTAL_CONTAINER_CENTERED = css`
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const VERTICAL_CONTAINER_CENTERED = css`
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const CONTAINER_CENTERED = css`
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const ICON_CONTAINER = css`
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
padding: 4px;
|
|
|
|
margin: -4px;
|
|
|
|
cursor: pointer;
|
|
|
|
color: ${Constants.system.black};
|
|
|
|
|
|
|
|
:hover {
|
2021-11-12 01:28:15 +03:00
|
|
|
color: ${Constants.semantic.textGrayDark};
|
2021-05-06 03:08:14 +03:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const HOVERABLE = css`
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
:hover {
|
2021-11-12 01:28:15 +03:00
|
|
|
color: ${Constants.semantic.textGrayDark};
|
2021-05-06 03:08:14 +03:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const MOBILE_HIDDEN = css`
|
|
|
|
@media (max-width: ${Constants.sizes.mobile}px) {
|
|
|
|
display: none;
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const MOBILE_ONLY = css`
|
|
|
|
@media (min-width: ${Constants.sizes.mobile}px) {
|
|
|
|
display: none;
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
`;
|
2021-07-16 23:35:43 +03:00
|
|
|
|
|
|
|
//NOTE(martina): resize so the image is fills its container from edge to edge, while maintaining aspect ratio. Any overflow is clipped
|
|
|
|
export const IMAGE_FILL = css`
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
object-fit: cover;
|
|
|
|
`;
|
|
|
|
|
|
|
|
//NOTE(martina): resize so the image is contained within the bounds of its container, while maintaining aspect ratio. There is no overflow
|
|
|
|
export const IMAGE_FIT = css`
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
object-fit: contain;
|
|
|
|
`;
|
2021-05-27 11:20:34 +03:00
|
|
|
|
|
|
|
/* COMMON GRIDS */
|
2021-07-14 13:16:52 +03:00
|
|
|
export const OBJECTS_PREVIEW_GRID = (theme) => css`
|
2021-05-27 11:20:34 +03:00
|
|
|
display: grid;
|
2021-07-14 13:16:52 +03:00
|
|
|
grid-template-columns: repeat(auto-fill, minmax(${theme.grids.object.desktop.width}px, 1fr));
|
|
|
|
grid-gap: 24px ${theme.grids.object.desktop.rowGap}px;
|
2021-05-27 11:20:34 +03:00
|
|
|
|
|
|
|
@media (max-width: ${Constants.sizes.mobile}px) {
|
2021-07-14 13:16:52 +03:00
|
|
|
grid-gap: 20px ${theme.grids.object.mobile.rowGap}px;
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(${theme.grids.object.mobile.width}px, 1fr));
|
2021-05-27 11:20:34 +03:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const BUTTON_RESET = css`
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
background-color: unset;
|
|
|
|
border: none;
|
2021-10-08 19:33:06 +03:00
|
|
|
cursor: pointer;
|
2021-05-27 11:20:34 +03:00
|
|
|
${HOVERABLE}
|
|
|
|
`;
|
|
|
|
|
2021-07-14 13:16:52 +03:00
|
|
|
export const COLLECTIONS_PREVIEW_GRID = (theme) => css`
|
2021-05-27 11:20:34 +03:00
|
|
|
display: grid;
|
2021-07-14 13:16:52 +03:00
|
|
|
grid-template-columns: repeat(auto-fill, minmax(${theme.grids.collection.desktop.width}px, 1fr));
|
|
|
|
grid-gap: 24px ${theme.grids.collection.desktop.rowGap}px;
|
2021-05-27 11:20:34 +03:00
|
|
|
|
|
|
|
@media (max-width: ${Constants.sizes.desktop}px) {
|
2021-07-14 13:16:52 +03:00
|
|
|
grid-gap: 20px ${theme.grids.collection.mobile.rowGap}px;
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(${theme.grids.collection.mobile.width}px, 1fr));
|
2021-05-27 11:20:34 +03:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2021-07-14 13:16:52 +03:00
|
|
|
export const PROFILE_PREVIEW_GRID = (theme) => css`
|
2021-05-27 11:20:34 +03:00
|
|
|
display: grid;
|
2021-07-14 13:16:52 +03:00
|
|
|
grid-template-columns: repeat(auto-fill, minmax(${theme.grids.profile.desktop.width}px, 1fr));
|
|
|
|
grid-gap: 24px ${theme.grids.profile.desktop.rowGap}px;
|
2021-05-27 11:20:34 +03:00
|
|
|
|
|
|
|
@media (max-width: ${Constants.sizes.mobile}px) {
|
2021-07-14 13:16:52 +03:00
|
|
|
grid-gap: 20px ${theme.grids.profile.mobile.rowGap}px;
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(${theme.grids.profile.mobile.width}px, 1fr));
|
2021-05-27 11:20:34 +03:00
|
|
|
}
|
|
|
|
`;
|
2021-12-11 00:26:41 +03:00
|
|
|
|
|
|
|
export const PAGE_CONTENT_WRAPPER = (theme) => css`
|
|
|
|
width: 100%;
|
2021-12-14 21:06:12 +03:00
|
|
|
min-height: calc(100vh - ${theme.sizes.filterNavbar}px - ${theme.sizes.header}px);
|
2021-12-11 00:26:41 +03:00
|
|
|
padding: 20px 20px 44px;
|
|
|
|
@media (max-width: ${theme.sizes.mobile}px) {
|
|
|
|
padding: 16px 16px 44px;
|
|
|
|
}
|
|
|
|
`;
|
2021-12-14 21:06:12 +03:00
|
|
|
|
|
|
|
export const PAGE_EMPTY_STATE_WRAPPER = (theme) => css`
|
|
|
|
height: calc(100vh - ${theme.sizes.filterNavbar + theme.sizes.header}px);
|
|
|
|
padding: 20px;
|
|
|
|
@media (max-width: ${theme.sizes.mobile}px) {
|
|
|
|
padding: 0px;
|
|
|
|
height: calc(100vh - ${theme.sizes.header}px - 44px);
|
|
|
|
}
|
|
|
|
`;
|