2021-10-28 19:58:39 +08:00
|
|
|
import styled from 'styled-components';
|
|
|
|
import {
|
|
|
|
borderSize,
|
|
|
|
borderSizeLarge,
|
|
|
|
borderSizeSmall,
|
2022-04-12 01:09:13 +08:00
|
|
|
smPaddingY,
|
2021-10-28 19:58:39 +08:00
|
|
|
} from '/imports/ui/stylesheets/styled-components/general';
|
|
|
|
import {
|
|
|
|
userThumbnailBorder,
|
|
|
|
btnPrimaryBorder,
|
|
|
|
btnDefaultColor,
|
|
|
|
colorGrayLabel,
|
|
|
|
colorGrayLighter,
|
|
|
|
colorPrimary,
|
|
|
|
colorWhite,
|
|
|
|
} from '/imports/ui/stylesheets/styled-components/palette';
|
2022-04-12 01:09:13 +08:00
|
|
|
import { ScrollboxVertical } from '/imports/ui/stylesheets/styled-components/scrollable';
|
|
|
|
import { fontSizeSmallest } from '/imports/ui/stylesheets/styled-components/typography';
|
2022-02-15 04:20:50 +08:00
|
|
|
import Button from '/imports/ui/components/common/button/component';
|
2021-10-28 19:58:39 +08:00
|
|
|
|
|
|
|
const VirtualBackgroundRowThumbnail = styled.div`
|
|
|
|
margin-top: 0.4rem;
|
|
|
|
`;
|
|
|
|
|
2022-04-12 01:09:13 +08:00
|
|
|
const BgWrapper = styled(ScrollboxVertical)`
|
2021-10-28 19:58:39 +08:00
|
|
|
display: flex;
|
|
|
|
justify-content: flex-start;
|
|
|
|
overflow-x: auto;
|
|
|
|
margin: ${borderSizeLarge};
|
|
|
|
padding: ${borderSizeLarge};
|
2022-04-12 01:09:13 +08:00
|
|
|
|
|
|
|
${({ isVisualEffects }) => isVisualEffects && `
|
|
|
|
height: 15rem;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
align-content: flex-start;
|
|
|
|
`}
|
2022-08-26 22:50:46 +08:00
|
|
|
|
|
|
|
${({ brightnessEnabled, isVisualEffects }) => brightnessEnabled && isVisualEffects && `
|
|
|
|
height: 10rem;
|
|
|
|
`}
|
2021-10-28 19:58:39 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
const BgNoneButton = styled(Button)`
|
|
|
|
border-radius: ${borderSizeLarge};
|
|
|
|
height: 48px;
|
|
|
|
width: 48px;
|
|
|
|
border: ${borderSizeSmall} solid ${userThumbnailBorder};
|
2022-07-01 04:10:48 +08:00
|
|
|
margin: 0 0.15rem;
|
2022-02-09 23:52:42 +08:00
|
|
|
flex-shrink: 0;
|
2022-04-12 01:09:13 +08:00
|
|
|
|
|
|
|
${({ isVisualEffects }) => isVisualEffects && `
|
2022-07-01 04:10:48 +08:00
|
|
|
margin: 0.15rem;
|
2022-04-12 01:09:13 +08:00
|
|
|
`}
|
2021-10-28 19:58:39 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
const ThumbnailButton = styled(Button)`
|
|
|
|
outline: none;
|
|
|
|
display: flex;
|
|
|
|
position: relative;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
border-radius: ${borderSizeLarge};
|
|
|
|
cursor: pointer;
|
|
|
|
height: 48px;
|
|
|
|
width: 48px;
|
|
|
|
z-index: 1;
|
|
|
|
background-color: transparent;
|
|
|
|
border: ${borderSizeSmall} solid ${userThumbnailBorder};
|
2022-02-09 23:52:42 +08:00
|
|
|
flex-shrink: 0;
|
2021-10-28 19:58:39 +08:00
|
|
|
|
|
|
|
& + img {
|
|
|
|
border-radius: ${borderSizeLarge};
|
|
|
|
}
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
color: ${btnDefaultColor};
|
|
|
|
background-color: transparent;
|
|
|
|
background-clip: padding-box;
|
|
|
|
box-shadow: 0 0 0 ${borderSize} ${btnPrimaryBorder};
|
|
|
|
}
|
|
|
|
|
|
|
|
${({ disabled }) => disabled && `
|
|
|
|
filter: grayscale(1);
|
|
|
|
|
|
|
|
& + img {
|
|
|
|
filter: grayscale(1);
|
|
|
|
}
|
|
|
|
`}
|
|
|
|
|
2022-07-01 03:39:50 +08:00
|
|
|
${({ background }) => background && `
|
|
|
|
background-image: url(${background});
|
|
|
|
background-size: 46px 46px;
|
|
|
|
background-origin: padding-box;
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
background-image: url(${background});
|
|
|
|
}
|
|
|
|
`}
|
2021-10-28 19:58:39 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
const Select = styled.select`
|
|
|
|
background-color: ${colorWhite};
|
|
|
|
border: ${borderSize} solid ${colorWhite};
|
|
|
|
border-radius: ${borderSize};
|
|
|
|
border-bottom: 0.1rem solid ${colorGrayLighter};
|
|
|
|
color: ${colorGrayLabel};
|
|
|
|
width: 100%;
|
|
|
|
height: 1.75rem;
|
|
|
|
padding: 1px;
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
outline: none;
|
|
|
|
box-shadow: inset 0 0 0 ${borderSizeLarge} ${colorPrimary};
|
|
|
|
border-radius: ${borderSize};
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
outline: transparent;
|
|
|
|
outline-style: dotted;
|
|
|
|
outline-width: ${borderSize};
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
const Label = styled.label`
|
|
|
|
margin-top: 8px;
|
|
|
|
font-size: 0.85rem;
|
|
|
|
font-weight: bold;
|
|
|
|
color: ${colorGrayLabel};
|
|
|
|
`;
|
|
|
|
|
2022-04-12 01:09:13 +08:00
|
|
|
const ThumbnailButtonWrapper = styled.div`
|
|
|
|
position: relative;
|
2022-07-01 04:10:48 +08:00
|
|
|
margin: 0 0.15rem;
|
2022-07-01 03:39:50 +08:00
|
|
|
|
|
|
|
${({ isVisualEffects }) => isVisualEffects && `
|
2022-07-01 04:10:48 +08:00
|
|
|
margin: 0.15rem;
|
2022-07-01 03:39:50 +08:00
|
|
|
`}
|
2022-04-12 01:09:13 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
const ButtonWrapper = styled.div`
|
|
|
|
position: absolute;
|
|
|
|
z-index: 2;
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const ButtonRemove = styled(Button)`
|
|
|
|
span {
|
|
|
|
font-size: ${fontSizeSmallest};
|
|
|
|
padding: ${smPaddingY};
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
const BgCustomButton = styled(BgNoneButton)``;
|
|
|
|
|
2022-07-07 03:03:55 +08:00
|
|
|
const SkeletonWrapper = styled.div`
|
|
|
|
flex-basis: 0 0 48px;
|
|
|
|
margin: 0 0.15rem;
|
|
|
|
height: 48px;
|
|
|
|
|
|
|
|
& .react-loading-skeleton {
|
|
|
|
height: 48px;
|
|
|
|
width: 48px;
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2021-10-28 19:58:39 +08:00
|
|
|
export default {
|
|
|
|
VirtualBackgroundRowThumbnail,
|
|
|
|
BgWrapper,
|
|
|
|
BgNoneButton,
|
|
|
|
ThumbnailButton,
|
|
|
|
Select,
|
|
|
|
Label,
|
2022-04-12 01:09:13 +08:00
|
|
|
ThumbnailButtonWrapper,
|
|
|
|
ButtonWrapper,
|
|
|
|
ButtonRemove,
|
|
|
|
BgCustomButton,
|
2022-07-07 03:03:55 +08:00
|
|
|
SkeletonWrapper,
|
2021-10-28 19:58:39 +08:00
|
|
|
};
|