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,
|
2022-05-26 07:25:53 +08:00
|
|
|
colorDanger,
|
|
|
|
colorWhite,
|
|
|
|
colorGrayDark,
|
2021-11-08 21:09:56 +08:00
|
|
|
} from '/imports/ui/stylesheets/styled-components/palette';
|
|
|
|
import {
|
|
|
|
whiteboardToolbarMargin,
|
|
|
|
whiteboardToolbarPaddingSm,
|
|
|
|
whiteboardToolbarPadding,
|
|
|
|
borderSize,
|
|
|
|
smPaddingY,
|
2022-05-26 07:25:53 +08:00
|
|
|
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`
|
2022-05-30 00:24:44 +08:00
|
|
|
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%;
|
2022-05-30 00:24:44 +08:00
|
|
|
bottom: 0px;
|
2021-11-08 21:09:56 +08:00
|
|
|
display: grid;
|
|
|
|
grid-template-columns: 1fr 1fr 1fr;
|
2022-09-13 03:27:29 +08:00
|
|
|
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;
|
|
|
|
}
|
2022-10-04 23:38:34 +08:00
|
|
|
|
|
|
|
&:focus,
|
2021-11-08 21:09:56 +08:00
|
|
|
&:hover {
|
|
|
|
outline: transparent;
|
|
|
|
outline-style: dotted;
|
|
|
|
outline-width: ${borderSize};
|
2022-10-04 23:38:34 +08:00
|
|
|
background-color: #DCE4EC;
|
|
|
|
border-radius: 4px;
|
2021-11-08 21:09:56 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
outline-style: solid;
|
2022-10-04 23:38:34 +08:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2022-05-26 07:25:53 +08:00
|
|
|
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};
|
2023-10-31 02:50:32 +08:00
|
|
|
user-select: none;
|
2023-10-31 20:10:03 +08:00
|
|
|
cursor: pointer;
|
2022-08-16 01:56:10 +08:00
|
|
|
|
|
|
|
[dir="ltr"] & {
|
|
|
|
right: 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
[dir="rtl"] & {
|
|
|
|
left: 1rem;
|
|
|
|
}
|
2022-05-26 07:25:53 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
2022-05-26 07:25:53 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
const WBAccessButton = styled(Button)`
|
|
|
|
border: none !important;
|
|
|
|
|
2022-08-16 01:56:10 +08:00
|
|
|
i {
|
2022-05-26 07:25:53 +08:00
|
|
|
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)`
|
2024-06-14 21:58:32 +08:00
|
|
|
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,
|
2022-05-26 07:25:53 +08:00
|
|
|
MultiUserTool,
|
|
|
|
WBAccessButton,
|
|
|
|
MUTPlaceholder,
|
2024-07-06 04:09:19 +08:00
|
|
|
InfiniteWhiteboardButton,
|
2021-11-08 21:09:56 +08:00
|
|
|
};
|