bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/actions-bar/create-breakout-room/styles.js

380 lines
7.3 KiB
JavaScript
Raw Normal View History

2021-10-26 03:21:27 +08:00
import styled from 'styled-components';
import { smallOnly } from '/imports/ui/stylesheets/styled-components/breakpoints';
import { ScrollboxVertical } from '/imports/ui/stylesheets/styled-components/scrollable';
import HoldButton from '/imports/ui/components/presentation/presentation-toolbar/zoom-tool/holdButton/component';
2022-02-15 04:20:50 +08:00
import Button from '/imports/ui/components/common/button/component';
2021-10-26 03:21:27 +08:00
import { FlexRow, FlexColumn } from '/imports/ui/stylesheets/styled-components/placeholders';
2021-10-26 20:37:26 +08:00
import {
colorDanger,
colorGray,
colorGrayLight,
colorGrayLighter,
colorWhite,
colorPrimary,
colorBlueLight,
colorBlueLightest,
colorGrayLightest,
2021-10-26 20:37:26 +08:00
} from '/imports/ui/stylesheets/styled-components/palette';
import { fontSizeSmall, fontSizeBase, fontSizeSmaller } from '/imports/ui/stylesheets/styled-components/typography';
2021-10-26 20:37:26 +08:00
import {
borderRadius,
borderSize,
lgPaddingX,
lgPaddingY,
2021-10-26 20:37:26 +08:00
} from '/imports/ui/stylesheets/styled-components/general';
2021-10-26 03:21:27 +08:00
const BoxContainer = styled.div`
display: grid;
grid-template-columns: repeat(2, 1fr);
2021-10-26 03:21:27 +08:00
grid-gap: 1.6rem 1rem;
box-sizing: border-box;
padding-bottom: 1rem;
`;
const ContentContainer = styled.div`
display: grid;
grid-template-columns: 1fr 2fr;
grid-template-areas: "sidebar content";
grid-gap: 1.5rem;
`;
2021-10-26 03:21:27 +08:00
const Alert = styled.div`
grid-area: sidebar;
margin-bottom: 2.5rem;
2023-07-06 00:58:40 +08:00
${({ valid }) => valid === false && `
2021-10-26 03:21:27 +08:00
position: relative;
& > * {
2021-10-26 20:37:26 +08:00
border-color: ${colorDanger} !important;
color: ${colorDanger};
2021-10-26 03:21:27 +08:00
}
`}
`;
const FreeJoinLabel = styled.label`
2021-10-26 20:37:26 +08:00
font-size: ${fontSizeSmall};
2021-10-26 03:21:27 +08:00
font-weight: bolder;
display: flex;
align-items: center;
2021-10-26 20:37:26 +08:00
font-size: ${fontSizeSmall};
2023-08-07 22:34:35 +08:00
margin-bottom: 0.2rem;
2021-10-26 03:21:27 +08:00
& > * {
margin: 0 .5rem 0 0;
[dir="rtl"] & {
margin: 0 0 0 .5rem;
}
}
`;
const BreakoutNameInput = styled.input`
width: 100%;
text-align: center;
font-weight: 600;
padding: .25rem .25rem .25rem 0;
2021-10-26 03:21:27 +08:00
margin: 0;
&::placeholder {
2021-10-26 20:37:26 +08:00
color: ${colorGray};
2021-10-26 03:21:27 +08:00
opacity: 1;
}
border: 1px solid ${colorGrayLightest};
margin-bottom: 1rem;
${({ readOnly }) => readOnly && `
cursor: default;
`}
2021-10-26 03:21:27 +08:00
`;
const BreakoutBox = styled(ScrollboxVertical)`
width: 100%;
height: 10rem;
border: 1px solid ${colorGrayLightest};
border-radius: ${borderRadius};
padding: ${lgPaddingY} 0;
${({ hundred }) => hundred && `
height: 100%;
`}
2021-10-26 03:21:27 +08:00
`;
const SpanWarn = styled.span`
${({ valid }) => valid && `
display: none;
`}
${({ valid }) => !valid && `
margin: .25rem;
position: absolute;
2021-10-26 20:37:26 +08:00
font-size: ${fontSizeSmall};
color: ${colorDanger};
2021-10-26 03:21:27 +08:00
font-weight: 200;
white-space: nowrap;
`}
`;
const RoomName = styled(BreakoutNameInput)`
${({ value }) => value.length === 0 && `
2021-10-26 20:37:26 +08:00
border-color: ${colorDanger} !important;
2021-10-26 03:21:27 +08:00
`}
${({ duplicated }) => duplicated === 0 && `
2021-10-26 20:37:26 +08:00
border-color: ${colorDanger} !important;
2021-10-26 03:21:27 +08:00
`}
`;
const BreakoutSettings = styled.div`
display: grid;
2023-08-07 22:34:35 +08:00
grid-template-columns: 1fr 1fr 2fr;
2021-10-26 03:21:27 +08:00
grid-template-rows: 1fr;
2023-08-07 22:34:35 +08:00
grid-gap: 2rem;
2021-10-26 03:21:27 +08:00
@media ${smallOnly} {
grid-template-columns: 1fr ;
grid-template-rows: 1fr 1fr 1fr;
flex-direction: column;
}
`;
const FormLabel = styled.p`
2021-10-26 20:37:26 +08:00
color: ${colorGray};
2021-10-26 03:21:27 +08:00
white-space: nowrap;
margin-bottom: .5rem;
${({ valid }) => !valid && `
2021-10-26 20:37:26 +08:00
color: ${colorDanger};
2021-10-26 03:21:27 +08:00
`}
`;
const InputRooms = styled.select`
2021-10-26 20:37:26 +08:00
background-color: ${colorWhite};
color: ${colorGray};
border: 1px solid ${colorGrayLighter};
border-radius: ${borderRadius};
2021-10-26 03:21:27 +08:00
width: 100%;
padding-top: .25rem;
padding-bottom: .25rem;
padding: .25rem 0 .25rem .25rem;
${({ valid }) => !valid && `
2021-10-26 20:37:26 +08:00
border-color: ${colorDanger} !important;
2021-10-26 03:21:27 +08:00
`}
`;
const DurationLabel = styled.label`
${({ valid }) => !valid && `
& > * {
2021-10-26 20:37:26 +08:00
border-color: ${colorDanger} !important;
color: ${colorDanger};
2021-10-26 03:21:27 +08:00
}
`}
`;
const LabelText = styled.p`
2021-10-26 20:37:26 +08:00
color: ${colorGray};
2021-10-26 03:21:27 +08:00
white-space: nowrap;
margin-bottom: .5rem;
${({ bold }) => bold && `
font-weight: bold;
font-size: 1.5rem;
`}
2021-10-26 03:21:27 +08:00
`;
const DurationArea = styled.div`
display: flex;
align-items: center;
justify-content: space-between;
`;
const DurationInput = styled.input`
2021-10-26 20:37:26 +08:00
background-color: ${colorWhite};
color: ${colorGray};
border: 1px solid ${colorGrayLighter};
border-radius: ${borderRadius};
width: 100%;
text-align: left;
2021-10-26 03:21:27 +08:00
padding: .25rem;
2021-10-26 03:21:27 +08:00
&::placeholder {
2021-10-26 20:37:26 +08:00
color: ${colorGray};
2021-10-26 03:21:27 +08:00
}
`;
const HoldButtonWrapper = styled(HoldButton)`
& > button > span {
2021-10-26 20:37:26 +08:00
padding-bottom: ${borderSize};
2021-10-26 03:21:27 +08:00
}
& > button > span > i {
2021-10-26 20:37:26 +08:00
color: ${colorGray};
width: ${lgPaddingX};
height: ${lgPaddingX};
2021-10-26 03:21:27 +08:00
font-size: 170% !important;
}
`;
2021-11-12 01:02:03 +08:00
const AssignBtnsContainer = styled.div`
justify-items: center;
display: flex;
flex-flow: row;
align-items: baseline;
2021-11-12 01:02:03 +08:00
margin-top: auto;
`;
const AssignBtns = styled(Button)`
color: ${colorDanger};
2021-10-26 20:37:26 +08:00
font-size: ${fontSizeSmall};
2021-10-26 03:21:27 +08:00
white-space: nowrap;
margin-bottom: 0.5rem;
2023-07-06 00:58:40 +08:00
${({ random }) => random && `
color: ${colorPrimary};
`}
2021-10-26 03:21:27 +08:00
`;
const CheckBoxesContainer = styled(FlexRow)`
display: flex;
flex-flow: column;
justify-content: flex-end;
`;
const Separator = styled.div`
width: 100%;
height: 1px;
margin: 1rem 0;
border: 1px solid ${colorGrayLightest};
2021-10-26 03:21:27 +08:00
`;
const FreeJoinCheckbox = styled.input`
width: 1rem;
height: 1rem;
`;
const RoomUserItem = styled.p`
margin: 0;
padding: .25rem 0 .25rem .25rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
display: flex;
justify-content: space-between;
2021-10-26 03:21:27 +08:00
[dir="rtl"] & {
padding: .25rem .25rem .25rem 0;
}
span.close {
display: flex;
flex-direction: column;
justify-content: center;
margin-right: 5px;
font-size: ${fontSizeSmaller};
}
&:focus {
background-color: ${colorPrimary};
color: ${colorWhite};
}
2021-10-26 03:21:27 +08:00
${({ selected }) => selected && `
2021-10-26 20:37:26 +08:00
background-color: ${colorPrimary};
color: ${colorWhite};
2021-10-26 03:21:27 +08:00
`}
${({ disabled }) => disabled && `
cursor: not-allowed;
2021-10-26 20:37:26 +08:00
color: ${colorGrayLighter};
2021-10-26 03:21:27 +08:00
`}
${({ highlight }) => highlight && `
background-color: ${colorBlueLightest};
`}
2021-10-26 03:21:27 +08:00
`;
const LockIcon = styled.span`
float: right;
margin-right: 1rem;
@media ${smallOnly} {
margin-left: .5rem;
margin-right: auto;
float: left;
}
&:after {
font-family: 'bbb-icons' !important;
2021-10-26 03:58:37 +08:00
content: '\\e926';
2021-10-26 20:37:26 +08:00
color: ${colorGrayLight};
2021-10-26 03:21:27 +08:00
}
`;
const ListContainer = styled(FlexColumn)`
justify-content: flex-start;
`;
const RoomItem = styled.div`
margin: 1rem 0 1rem 0;
`;
const ItemTitle = styled.h2`
margin: 0;
2021-10-26 20:37:26 +08:00
color: ${colorBlueLight};
2021-10-26 03:21:27 +08:00
`;
const ItemButton = styled(Button)`
padding: 0;
outline: none !important;
& > span {
2021-10-26 20:37:26 +08:00
color: ${colorBlueLight};
2021-10-26 03:21:27 +08:00
}
`;
const WithError = styled.span`
2021-10-26 20:37:26 +08:00
color: ${colorDanger};
2021-10-26 03:21:27 +08:00
`;
const SubTitle = styled.p`
2021-10-26 20:37:26 +08:00
font-size: ${fontSizeBase};
2021-10-26 03:21:27 +08:00
text-align: justify;
2021-10-26 20:37:26 +08:00
color: ${colorGray};
2021-10-26 03:21:27 +08:00
`;
const Content = styled(FlexColumn)``;
export default {
BoxContainer,
Alert,
FreeJoinLabel,
BreakoutNameInput,
BreakoutBox,
SpanWarn,
RoomName,
BreakoutSettings,
FormLabel,
InputRooms,
DurationLabel,
LabelText,
DurationArea,
DurationInput,
HoldButtonWrapper,
2021-11-12 01:02:03 +08:00
AssignBtnsContainer,
AssignBtns,
2021-10-26 03:21:27 +08:00
CheckBoxesContainer,
Separator,
2021-10-26 03:21:27 +08:00
FreeJoinCheckbox,
RoomUserItem,
LockIcon,
ListContainer,
RoomItem,
ItemTitle,
ItemButton,
WithError,
SubTitle,
Content,
ContentContainer,
2021-10-26 03:21:27 +08:00
};