bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/video-preview/virtual-background/styles.js

180 lines
3.7 KiB
JavaScript
Raw Normal View History

2021-10-28 19:58:39 +08:00
import styled from 'styled-components';
import {
borderSize,
borderSizeLarge,
borderSizeSmall,
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';
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;
`;
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};
${({ 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;
flex-shrink: 0;
${({ isVisualEffects }) => isVisualEffects && `
2022-07-01 04:10:48 +08:00
margin: 0.15rem;
`}
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};
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);
}
`}
${({ 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};
`;
const ThumbnailButtonWrapper = styled.div`
position: relative;
2022-07-01 04:10:48 +08:00
margin: 0 0.15rem;
${({ isVisualEffects }) => isVisualEffects && `
2022-07-01 04:10:48 +08:00
margin: 0.15rem;
`}
`;
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)``;
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,
ThumbnailButtonWrapper,
ButtonWrapper,
ButtonRemove,
BgCustomButton,
SkeletonWrapper,
2021-10-28 19:58:39 +08:00
};