restructured styles to diff files
This commit is contained in:
parent
858d9fcb7f
commit
8004e1faa7
151
packages/client/src/pages/Home/InfoPanel/Body/styles/common.js
Normal file
151
packages/client/src/pages/Home/InfoPanel/Body/styles/common.js
Normal file
@ -0,0 +1,151 @@
|
||||
import styled, { css } from "styled-components";
|
||||
|
||||
import { Base } from "@docspace/components/themes";
|
||||
import { mobile } from "@docspace/components/utils/device";
|
||||
|
||||
const StyledInfoPanelBody = styled.div`
|
||||
padding: 0 3px 0 20px;
|
||||
@media ${mobile} {
|
||||
padding: 0 8px 0 16px;
|
||||
}
|
||||
height: auto;
|
||||
background-color: ${(props) => props.theme.infoPanel.backgroundColor};
|
||||
color: ${(props) => props.theme.infoPanel.textColor};
|
||||
|
||||
.no-item {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.no-thumbnail-img-wrapper {
|
||||
height: auto;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.no-thumbnail-img {
|
||||
height: 96px;
|
||||
width: 96px;
|
||||
}
|
||||
.is-room {
|
||||
border-radius: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.current-folder-loader-wrapper {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
height: 96px;
|
||||
margin-top: 116.56px;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledTitle = styled.div`
|
||||
display: flex;
|
||||
flex-wrap: no-wrap;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 44px;
|
||||
padding: 23px 0;
|
||||
|
||||
${(props) =>
|
||||
props.withBottomBorder &&
|
||||
css`
|
||||
width: calc(100% + 20px);
|
||||
margin: 0 -20px 0 -20px;
|
||||
padding: 23px 0 23px 20px;
|
||||
border-bottom: ${(props) =>
|
||||
`solid 1px ${props.theme.infoPanel.borderColor}`};
|
||||
|
||||
@media ${mobile} {
|
||||
width: calc(100% + 16px);
|
||||
padding: 23px 0 23px 16px;
|
||||
margin: 0 -16px 0 -16px;
|
||||
}
|
||||
`}
|
||||
|
||||
img {
|
||||
&.icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
svg {
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
}
|
||||
}
|
||||
&.is-room {
|
||||
border-radius: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
line-height: 22px;
|
||||
max-height: 44px;
|
||||
margin: 0 8px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
.context-menu-button {
|
||||
margin: 0 20px 0 auto;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledSubtitle = styled.div`
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
padding: 24px 0;
|
||||
`;
|
||||
|
||||
const StyledProperties = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
gap: 8px;
|
||||
|
||||
.property {
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: 120px 1fr;
|
||||
grid-column-gap: 24px;
|
||||
|
||||
.property-title {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.property-content {
|
||||
margin: auto 0;
|
||||
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.property-tag_list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
|
||||
.property-tag {
|
||||
max-width: 195px;
|
||||
margin: 0;
|
||||
p {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
StyledInfoPanelBody.defaultProps = { theme: Base };
|
||||
StyledTitle.defaultProps = { theme: Base };
|
||||
|
||||
export { StyledInfoPanelBody, StyledTitle, StyledSubtitle, StyledProperties };
|
@ -0,0 +1,18 @@
|
||||
import styled from "styled-components";
|
||||
|
||||
const StyledGalleryThumbnail = styled.div`
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 346px;
|
||||
overflow: hidden;
|
||||
border: 1px solid #d0d5da;
|
||||
border-radius: 6px;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
|
||||
.info-panel_gallery-img {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
`;
|
||||
|
||||
export { StyledGalleryThumbnail };
|
@ -1,6 +1,7 @@
|
||||
import styled, { css } from "styled-components";
|
||||
import styled from "styled-components";
|
||||
|
||||
import { Base } from "@docspace/components/themes";
|
||||
import { mobile, smallTablet, tablet } from "@docspace/components/utils/device";
|
||||
import { mobile } from "@docspace/components/utils/device";
|
||||
|
||||
const StyledHistoryList = styled.div`
|
||||
display: flex;
|
132
packages/client/src/pages/Home/InfoPanel/Body/styles/info.js
Normal file
132
packages/client/src/pages/Home/InfoPanel/Body/styles/info.js
Normal file
@ -0,0 +1,132 @@
|
||||
import styled from "styled-components";
|
||||
|
||||
import { Base } from "@docspace/components/themes";
|
||||
|
||||
const StyledThumbnail = styled.div`
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
img {
|
||||
border: ${(props) => `solid 1px ${props.theme.infoPanel.borderColor}`};
|
||||
border-radius: 6px;
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledAccess = styled.div`
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
.divider {
|
||||
background: ${(props) => props.theme.infoPanel.borderColor};
|
||||
margin: 2px 4px;
|
||||
width: 1px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.show-more-users {
|
||||
position: static;
|
||||
width: 101px;
|
||||
height: 16px;
|
||||
left: 120px;
|
||||
top: 8px;
|
||||
padding-left: 1px;
|
||||
|
||||
font-family: "Open Sans";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
text-align: left;
|
||||
|
||||
color: ${(props) => props.theme.infoPanel.showAccessUsersTextColor};
|
||||
|
||||
flex: none;
|
||||
order: 3;
|
||||
flex-grow: 0;
|
||||
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledAccessItem = styled.div`
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
|
||||
.access-item-tooltip {
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.item-group {
|
||||
border-radius: 50%;
|
||||
background-color: ${(props) => props.theme.infoPanel.accessGroupBg};
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
span {
|
||||
font-family: "Open Sans";
|
||||
font-weight: 700;
|
||||
font-size: 12px;
|
||||
color: ${(props) => props.theme.infoPanel.accessGroupText};
|
||||
line-height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-user {
|
||||
img {
|
||||
border-radius: 50%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledOpenSharingPanel = styled.div`
|
||||
position: static;
|
||||
width: auto;
|
||||
height: 15px;
|
||||
left: 0px;
|
||||
top: 2px;
|
||||
|
||||
font-family: "Open Sans";
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
line-height: 15px;
|
||||
|
||||
color: ${(props) => props.theme.infoPanel.showAccessPanelTextColor};
|
||||
|
||||
display: flex;
|
||||
margin: 16px 0px;
|
||||
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
text-decoration-style: dashed;
|
||||
`;
|
||||
|
||||
StyledThumbnail.defaultProps = { theme: Base };
|
||||
StyledAccess.defaultProps = { theme: Base };
|
||||
StyledAccessItem.defaultProps = { theme: Base };
|
||||
StyledOpenSharingPanel.defaultProps = { theme: Base };
|
||||
|
||||
export {
|
||||
StyledThumbnail,
|
||||
StyledAccess,
|
||||
StyledAccessItem,
|
||||
StyledOpenSharingPanel,
|
||||
};
|
@ -1,11 +1,12 @@
|
||||
import styled, { css } from "styled-components";
|
||||
import styled from "styled-components";
|
||||
|
||||
import { Base } from "@docspace/components/themes";
|
||||
|
||||
const StyledUserTypeHeader = styled.div`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 24px 0 16px;
|
||||
padding: 8px 0 16px;
|
||||
|
||||
.title {
|
||||
font-weight: 600;
|
@ -1,280 +0,0 @@
|
||||
import styled, { css } from "styled-components";
|
||||
|
||||
import { Base } from "@docspace/components/themes";
|
||||
import { mobile } from "@docspace/components/utils/device";
|
||||
|
||||
const StyledInfoPanelBody = styled.div`
|
||||
padding: 0 3px 0 20px;
|
||||
@media ${mobile} {
|
||||
padding: 0 8px 0 16px;
|
||||
}
|
||||
height: auto;
|
||||
background-color: ${(props) => props.theme.infoPanel.backgroundColor};
|
||||
color: ${(props) => props.theme.infoPanel.textColor};
|
||||
|
||||
.no-item {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.no-thumbnail-img-wrapper {
|
||||
height: auto;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.no-thumbnail-img {
|
||||
height: 96px;
|
||||
width: 96px;
|
||||
}
|
||||
.is-room {
|
||||
border-radius: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.current-folder-loader-wrapper {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
height: 96px;
|
||||
margin-top: 116.56px;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledTitle = styled.div`
|
||||
display: flex;
|
||||
flex-wrap: no-wrap;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 44px;
|
||||
padding: 23px 0;
|
||||
|
||||
${(props) =>
|
||||
props.withBottomBorder &&
|
||||
css`
|
||||
width: calc(100% + 20px);
|
||||
margin: 0 -20px 0 -20px;
|
||||
padding: 23px 0 23px 20px;
|
||||
border-bottom: ${(props) =>
|
||||
`solid 1px ${props.theme.infoPanel.borderColor}`};
|
||||
|
||||
@media ${mobile} {
|
||||
width: calc(100% + 16px);
|
||||
padding: 23px 0 23px 16px;
|
||||
margin: 0 -16px 0 -16px;
|
||||
}
|
||||
`}
|
||||
|
||||
img {
|
||||
&.icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
svg {
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
}
|
||||
}
|
||||
&.is-room {
|
||||
border-radius: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
line-height: 22px;
|
||||
max-height: 44px;
|
||||
margin: 0 8px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
.context-menu-button {
|
||||
margin: 0 20px 0 auto;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledGalleryThumbnail = styled.div`
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 346px;
|
||||
overflow: hidden;
|
||||
border: 1px solid #d0d5da;
|
||||
border-radius: 6px;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
|
||||
.info-panel_gallery-img {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledThumbnail = styled.div`
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
img {
|
||||
border: ${(props) => `solid 1px ${props.theme.infoPanel.borderColor}`};
|
||||
border-radius: 6px;
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledSubtitle = styled.div`
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
padding: 24px 0;
|
||||
`;
|
||||
|
||||
const StyledProperties = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
gap: 8px;
|
||||
|
||||
.property {
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: 120px 1fr;
|
||||
grid-column-gap: 24px;
|
||||
|
||||
.property-title {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.property-content {
|
||||
margin: auto 0;
|
||||
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledAccess = styled.div`
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
.divider {
|
||||
background: ${(props) => props.theme.infoPanel.borderColor};
|
||||
margin: 2px 4px;
|
||||
width: 1px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.show-more-users {
|
||||
position: static;
|
||||
width: 101px;
|
||||
height: 16px;
|
||||
left: 120px;
|
||||
top: 8px;
|
||||
padding-left: 1px;
|
||||
|
||||
font-family: "Open Sans";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
text-align: left;
|
||||
|
||||
color: ${(props) => props.theme.infoPanel.showAccessUsersTextColor};
|
||||
|
||||
flex: none;
|
||||
order: 3;
|
||||
flex-grow: 0;
|
||||
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledAccessItem = styled.div`
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
|
||||
.access-item-tooltip {
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.item-group {
|
||||
border-radius: 50%;
|
||||
background-color: ${(props) => props.theme.infoPanel.accessGroupBg};
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
span {
|
||||
font-family: "Open Sans";
|
||||
font-weight: 700;
|
||||
font-size: 12px;
|
||||
color: ${(props) => props.theme.infoPanel.accessGroupText};
|
||||
line-height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-user {
|
||||
img {
|
||||
border-radius: 50%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledOpenSharingPanel = styled.div`
|
||||
position: static;
|
||||
width: auto;
|
||||
height: 15px;
|
||||
left: 0px;
|
||||
top: 2px;
|
||||
|
||||
font-family: "Open Sans";
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
line-height: 15px;
|
||||
|
||||
color: ${(props) => props.theme.infoPanel.showAccessPanelTextColor};
|
||||
|
||||
display: flex;
|
||||
margin: 16px 0px;
|
||||
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
text-decoration-style: dashed;
|
||||
`;
|
||||
StyledInfoPanelBody.defaultProps = { theme: Base };
|
||||
StyledTitle.defaultProps = { theme: Base };
|
||||
StyledThumbnail.defaultProps = { theme: Base };
|
||||
StyledAccess.defaultProps = { theme: Base };
|
||||
StyledAccessItem.defaultProps = { theme: Base };
|
||||
StyledOpenSharingPanel.defaultProps = { theme: Base };
|
||||
|
||||
export {
|
||||
StyledInfoPanelBody,
|
||||
StyledTitle,
|
||||
StyledThumbnail,
|
||||
StyledSubtitle,
|
||||
StyledProperties,
|
||||
StyledAccess,
|
||||
StyledAccessItem,
|
||||
StyledOpenSharingPanel,
|
||||
StyledGalleryThumbnail,
|
||||
};
|
Loading…
Reference in New Issue
Block a user