bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/styles.js

327 lines
6.5 KiB
JavaScript
Raw Normal View History

2021-11-08 21:09:56 +08:00
import styled from 'styled-components';
import QuickPollDropdownContainer from '/imports/ui/components/actions-bar/quick-poll-dropdown/container';
import {
colorOffWhite,
colorBlueLightest,
toolbarButtonColor,
colorDanger,
colorWhite,
colorGrayDark,
2021-11-08 21:09:56 +08:00
} from '/imports/ui/stylesheets/styled-components/palette';
import {
whiteboardToolbarMargin,
whiteboardToolbarPaddingSm,
whiteboardToolbarPadding,
borderSize,
smPaddingY,
borderSizeLarge,
smPaddingX,
2021-11-08 21:09:56 +08:00
} from '/imports/ui/stylesheets/styled-components/general';
2022-02-15 04:20:50 +08:00
import Button from '/imports/ui/components/common/button/component';
2021-11-08 21:09:56 +08:00
const PresentationToolbarWrapper = styled.div`
position: absolute;
2021-11-08 21:09:56 +08:00
align-self: center;
z-index: 1;
background-color: ${colorOffWhite};
border-top: 1px solid ${colorBlueLightest};
min-width: fit-content;
width: 100%;
bottom: 0px;
2021-11-08 21:09:56 +08:00
display: grid;
grid-template-columns: 1fr 1fr 1fr;
padding: 2px;
2021-11-08 21:09:56 +08:00
select {
&:-moz-focusring {
outline: none;
}
border: 0;
background-color: ${colorOffWhite};
2024-06-19 02:14:10 +08:00
color: ${toolbarButtonColor};
2021-11-08 21:09:56 +08:00
cursor: pointer;
margin: 0 ${whiteboardToolbarMargin} 0 0;
padding: ${whiteboardToolbarPadding};
padding-left: ${whiteboardToolbarPaddingSm};
[dir="rtl"] & {
margin: 0 0 0 ${whiteboardToolbarMargin};
padding: ${whiteboardToolbarPadding};
padding-right: ${whiteboardToolbarPaddingSm};
}
& > option {
color: ${toolbarButtonColor};
background-color: ${colorOffWhite};
}
}
i {
color: ${toolbarButtonColor};
display: flex;
justify-content: center;
align-items: center;
}
`;
const QuickPollButton = styled(QuickPollDropdownContainer)`
position: relative;
color: ${toolbarButtonColor};
background-color: ${colorOffWhite};
border-radius: 0;
box-shadow: none !important;
border: 0;
&:focus {
background-color: ${colorOffWhite};
}
`;
2023-07-26 02:05:00 +08:00
const QuickPollButtonWrapper = styled.div`
display: flex;
align-items: center;
`;
2021-11-08 21:09:56 +08:00
const PresentationSlideControls = styled.div`
justify-content: center;
padding-left: ${whiteboardToolbarPadding};
padding-right: ${whiteboardToolbarPadding};
display: flex;
flex-direction: row;
align-items: center;
& > button {
padding: ${whiteboardToolbarPadding};
}
`;
const PrevSlideButton = styled(Button)`
2022-07-05 20:05:46 +08:00
i {
2021-11-08 21:09:56 +08:00
font-size: 1rem;
2022-08-16 01:56:10 +08:00
padding-left: 20%;
2021-11-08 21:09:56 +08:00
[dir="rtl"] & {
-webkit-transform: scale(-1, 1);
-moz-transform: scale(-1, 1);
-ms-transform: scale(-1, 1);
-o-transform: scale(-1, 1);
transform: scale(-1, 1);
}
}
`;
const NextSlideButton = styled(Button)`
2022-07-05 20:05:46 +08:00
i {
2021-11-08 21:09:56 +08:00
font-size: 1rem;
2022-08-16 01:56:10 +08:00
padding-left: 60%;
2022-07-05 20:05:46 +08:00
2021-11-08 21:09:56 +08:00
[dir="rtl"] & {
-webkit-transform: scale(-1, 1);
-moz-transform: scale(-1, 1);
-ms-transform: scale(-1, 1);
-o-transform: scale(-1, 1);
transform: scale(-1, 1);
}
}
`;
const SkipSlideSelect = styled.select`
padding: 0 ${smPaddingY};
margin: ${borderSize};
margin-left: ${whiteboardToolbarMargin};
[dir="rtl"] & {
margin: ${borderSize};
margin-right: ${whiteboardToolbarMargin};
}
&:-moz-focusring {
outline: none;
}
&:focus,
2021-11-08 21:09:56 +08:00
&:hover {
outline: transparent;
outline-style: dotted;
outline-width: ${borderSize};
background-color: #DCE4EC;
border-radius: 4px;
2021-11-08 21:09:56 +08:00
}
&:focus {
outline-style: solid;
box-shadow: 0 0 0 1px #cdd6e0 !important;
2021-11-08 21:09:56 +08:00
}
`;
const PresentationZoomControls = styled.div`
justify-content: flex-end;
padding: 0 ${whiteboardToolbarPadding} 0 0;
[dir="rtl"] & {
padding: 0 0 0 ${whiteboardToolbarPadding};
}
display: flex;
flex-direction: row;
align-items: center;
button {
padding: ${whiteboardToolbarPadding};
}
i {
font-size: 1.2rem;
}
`;
const FitToWidthButton = styled(Button)`
border: none !important;
& > i {
font-size: 1.2rem;
[dir="rtl"] & {
-webkit-transform: scale(-1, 1);
-moz-transform: scale(-1, 1);
-ms-transform: scale(-1, 1);
-o-transform: scale(-1, 1);
transform: scale(-1, 1);
}
}
margin-left: ${whiteboardToolbarMargin};
margin-right: ${whiteboardToolbarMargin};
position: relative;
color: ${toolbarButtonColor};
background-color: ${colorOffWhite};
border-radius: 0;
box-shadow: none !important;
border: 0;
2023-08-14 21:47:23 +08:00
${({ $fitToWidth }) => $fitToWidth && `
2023-05-10 22:53:11 +08:00
& > span {
border: solid ${borderSizeLarge} ${colorGrayDark};
}
`}
2021-11-08 21:09:56 +08:00
&:focus {
background-color: ${colorOffWhite};
border: 0;
}
`;
const MultiUserTool = styled.span`
background-color: ${colorDanger};
border-radius: 50%;
width: 1rem;
height: 1rem;
position: relative;
z-index: 2;
bottom: 0.5rem;
color: ${colorWhite};
display: flex;
justify-content: center;
align-items: center;
box-shadow: 1px 1px ${borderSizeLarge} ${colorGrayDark};
font-size: ${smPaddingX};
user-select: none;
cursor: pointer;
2022-08-16 01:56:10 +08:00
[dir="ltr"] & {
right: 1rem;
}
[dir="rtl"] & {
left: 1rem;
}
`;
const MUTPlaceholder = styled.div`
width: 1rem;
height: 1rem;
position: relative;
bottom: 0.5rem;
2022-08-16 01:56:10 +08:00
[dir="ltr"] & {
right: 1rem;
}
[dir="rtl"] & {
left: 1rem;
}
`;
const WBAccessButton = styled(Button)`
border: none !important;
2022-08-16 01:56:10 +08:00
i {
font-size: 1.2rem;
[dir="rtl"] & {
-webkit-transform: scale(-1, 1);
-moz-transform: scale(-1, 1);
-ms-transform: scale(-1, 1);
-o-transform: scale(-1, 1);
transform: scale(-1, 1);
}
}
position: relative;
color: ${toolbarButtonColor};
background-color: ${colorOffWhite};
border-radius: 0;
box-shadow: none !important;
border: 0;
&:focus {
background-color: ${colorOffWhite};
border: 0;
}
`;
2024-07-06 04:09:19 +08:00
const InfiniteWhiteboardButton = styled(Button)`
border: none !important;
svg {
[dir="rtl"] & {
-webkit-transform: scale(-1, 1);
-moz-transform: scale(-1, 1);
-ms-transform: scale(-1, 1);
-o-transform: scale(-1, 1);
transform: scale(-1, 1);
}
}
position: relative;
color: ${toolbarButtonColor};
background-color: ${colorOffWhite};
border-radius: 0;
box-shadow: none !important;
border: 0;
margin-left: 2px;
margin-right: 2px;
&:focus {
background-color: ${colorOffWhite};
border: 0;
}
`;
2021-11-08 21:09:56 +08:00
export default {
PresentationToolbarWrapper,
QuickPollButton,
2023-07-26 02:05:00 +08:00
QuickPollButtonWrapper,
2021-11-08 21:09:56 +08:00
PresentationSlideControls,
PrevSlideButton,
NextSlideButton,
SkipSlideSelect,
PresentationZoomControls,
FitToWidthButton,
MultiUserTool,
WBAccessButton,
MUTPlaceholder,
2024-07-06 04:09:19 +08:00
InfiniteWhiteboardButton,
2021-11-08 21:09:56 +08:00
};