You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

styled.js 6.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. import React from 'react';
  2. import styled from 'styled-components';
  3. import { Icon, IconHorizontalPoints } from '../../../base/icons';
  4. import { ACTION_TRIGGER } from '../../constants';
  5. export const ignoredChildClassName = 'ignore-child';
  6. export const AntiCollapse = styled.br`
  7. font-size: 0;
  8. `;
  9. export const Button = styled.button`
  10. align-items: center;
  11. background-color: ${
  12. // eslint-disable-next-line no-confusing-arrow
  13. props => props.primary ? '#0056E0' : '#3D3D3D'
  14. };
  15. border: 0;
  16. border-radius: 6px;
  17. display: flex;
  18. font-weight: unset;
  19. justify-content: center;
  20. min-height: 32px;
  21. &:hover {
  22. background-color: ${
  23. // eslint-disable-next-line no-confusing-arrow
  24. props => props.primary ? '#246FE5' : '#525252'
  25. };
  26. }
  27. `;
  28. export const QuickActionButton = styled(Button)`
  29. padding: 0 12px;
  30. `;
  31. export const Container = styled.div`
  32. box-sizing: border-box;
  33. flex: 1;
  34. overflow-y: auto;
  35. position: relative;
  36. padding: 0 ${props => props.theme.panePadding}px;
  37. & > * + *:not(.${ignoredChildClassName}) {
  38. margin-top: 16px;
  39. }
  40. &::-webkit-scrollbar {
  41. display: none;
  42. }
  43. `;
  44. export const ContextMenu = styled.div.attrs(props => {
  45. return {
  46. className: props.className
  47. };
  48. })`
  49. background-color: #292929;
  50. border-radius: 3px;
  51. box-shadow: 0px 3px 16px rgba(0, 0, 0, 0.6), 0px 0px 4px 1px rgba(0, 0, 0, 0.25);
  52. color: white;
  53. font-size: ${props => props.theme.contextFontSize}px;
  54. font-weight: ${props => props.theme.contextFontWeight};
  55. margin-top: ${props => {
  56. const {
  57. participantActionButtonHeight,
  58. participantItemHeight
  59. } = props.theme;
  60. return ((3 * participantItemHeight) + participantActionButtonHeight) / 4;
  61. }}px;
  62. position: absolute;
  63. right: ${props => props.theme.panePadding}px;
  64. top: 0;
  65. z-index: 2;
  66. & > li {
  67. list-style: none;
  68. }
  69. ${props => props.isHidden && `
  70. pointer-events: none;
  71. visibility: hidden;
  72. `}
  73. `;
  74. export const ContextMenuIcon = styled(Icon).attrs({
  75. size: 20
  76. })`
  77. & > svg {
  78. fill: #a4b8d1;
  79. }
  80. `;
  81. export const ContextMenuItem = styled.div`
  82. align-items: center;
  83. box-sizing: border-box;
  84. cursor: pointer;
  85. display: flex;
  86. min-height: 40px;
  87. padding: 10px 16px;
  88. & > *:not(:last-child) {
  89. margin-right: 16px;
  90. }
  91. &:hover {
  92. background-color: #525252;
  93. }
  94. `;
  95. export const ContextMenuItemGroup = styled.div`
  96. &:not(:empty) {
  97. padding: 8px 0;
  98. }
  99. & + &:not(:empty) {
  100. border-top: 1px solid #4C4D50;
  101. }
  102. `;
  103. export const Close = styled.div`
  104. align-items: center;
  105. cursor: pointer;
  106. display: flex;
  107. height: 20px;
  108. justify-content: center;
  109. width: 20px;
  110. &:before, &:after {
  111. content: '';
  112. background-color: #a4b8d1;
  113. border-radius: 2px;
  114. height: 2px;
  115. position: absolute;
  116. transform-origin: center center;
  117. width: 21px;
  118. }
  119. &:before {
  120. transform: rotate(45deg);
  121. }
  122. &:after {
  123. transform: rotate(-45deg);
  124. }
  125. `;
  126. export const Footer = styled.div`
  127. background-color: #141414;
  128. display: flex;
  129. justify-content: flex-end;
  130. padding: 24px ${props => props.theme.panePadding}px;
  131. & > *:not(:last-child) {
  132. margin-right: 16px;
  133. }
  134. `;
  135. export const FooterButton = styled(Button)`
  136. height: 40px;
  137. font-size: 15px;
  138. padding: 0 16px;
  139. `;
  140. export const FooterEllipsisButton = styled(FooterButton).attrs({
  141. children: <Icon src = { IconHorizontalPoints } />
  142. })`
  143. padding: 8px;
  144. `;
  145. export const FooterEllipsisContainer = styled.div`
  146. position: relative;
  147. `;
  148. export const Header = styled.div`
  149. align-items: center;
  150. box-sizing: border-box;
  151. display: flex;
  152. height: ${props => props.theme.headerSize}px;
  153. padding: 0 20px;
  154. `;
  155. export const Heading = styled.div`
  156. color: #d1dbe8;
  157. font-style: normal;
  158. font-size: 15px;
  159. line-height: 24px;
  160. margin: 8px 0 ${props => props.theme.panePadding}px;
  161. `;
  162. export const ParticipantActionButton = styled(Button)`
  163. height: ${props => props.theme.participantActionButtonHeight}px;
  164. padding: 6px 10px;
  165. `;
  166. export const ParticipantActionEllipsis = styled(ParticipantActionButton).attrs({
  167. children: <Icon src = { IconHorizontalPoints } />,
  168. primary: true
  169. })`
  170. padding: 6px;
  171. `;
  172. export const ParticipantActions = styled.div`
  173. align-items: center;
  174. z-index: 1;
  175. & > *:not(:last-child) {
  176. margin-right: 8px;
  177. }
  178. `;
  179. export const ParticipantActionsHover = styled(ParticipantActions)`
  180. background-color: #292929;
  181. bottom: 1px;
  182. display: none;
  183. position: absolute;
  184. right: ${props => props.theme.panePadding};
  185. top: 0;
  186. &:after {
  187. content: '';
  188. background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #292929 100%);
  189. bottom: 0;
  190. display: block;
  191. left: 0;
  192. pointer-events: none;
  193. position: absolute;
  194. top: 0;
  195. transform: translateX(-100%);
  196. }
  197. `;
  198. export const ParticipantActionsPermanent = styled(ParticipantActions)`
  199. display: flex;
  200. `;
  201. export const ParticipantContent = styled.div`
  202. align-items: center;
  203. box-shadow: inset 0px -1px 0px rgba(255, 255, 255, 0.15);
  204. display: flex;
  205. flex: 1;
  206. height: 100%;
  207. overflow: hidden;
  208. padding-right: ${props => props.theme.panePadding}px;
  209. `;
  210. export const ParticipantStates = styled.div`
  211. display: flex;
  212. justify-content: flex-end;
  213. & > * {
  214. align-items: center;
  215. display: flex;
  216. justify-content: center;
  217. }
  218. & > *:not(:last-child) {
  219. margin-right: 8px;
  220. }
  221. .jitsi-icon {
  222. padding: 3px;
  223. }
  224. `;
  225. export const ParticipantContainer = styled.div`
  226. align-items: center;
  227. color: white;
  228. display: flex;
  229. font-size: 13px;
  230. height: ${props => props.theme.participantItemHeight}px;
  231. margin: 0 -${props => props.theme.panePadding}px;
  232. padding-left: ${props => props.theme.panePadding}px;
  233. position: relative;
  234. &:hover {
  235. ${ParticipantStates} {
  236. ${props => !props.local && 'display: none'};
  237. }
  238. }
  239. ${props => !props.isHighlighted && '&:hover {'}
  240. background-color: #292929;
  241. & ${ParticipantActions} {
  242. ${props => props.trigger === ACTION_TRIGGER.HOVER && `
  243. display: flex;
  244. `}
  245. }
  246. & ${ParticipantContent} {
  247. box-shadow: none;
  248. }
  249. ${props => !props.isHighlighted && '}'}
  250. `;
  251. export const ParticipantInviteButton = styled(Button).attrs({
  252. primary: true
  253. })`
  254. font-size: 15px;
  255. height: 40px;
  256. width: 100%;
  257. & > *:not(:last-child) {
  258. margin-right: 8px;
  259. }
  260. `;
  261. export const ParticipantName = styled.div`
  262. overflow: hidden;
  263. text-overflow: ellipsis;
  264. white-space: nowrap;
  265. `;
  266. export const ParticipantNameContainer = styled.div`
  267. display: flex;
  268. flex: 1;
  269. margin-right: 8px;
  270. overflow: hidden;
  271. `;
  272. export const RaisedHandIndicatorBackground = styled.div`
  273. background-color: #ed9e1b;
  274. border-radius: 3px;
  275. height: 24px;
  276. width: 24px;
  277. `;
  278. export const VolumeInput = styled.input.attrs({
  279. type: 'range'
  280. })`
  281. width: 100%;
  282. `;
  283. export const VolumeInputContainer = styled.div`
  284. position: relative;
  285. width: 100%;
  286. `;
  287. export const VolumeOverlay = styled.div`
  288. background-color: #0376da;
  289. border-radius: 1px 0 0 1px;
  290. height: 100%;
  291. left: 0;
  292. pointer-events: none;
  293. position: absolute;
  294. `;