Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

constants.js 8.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. // @flow
  2. /**
  3. * An object containing all the class names for common CSS.
  4. * Add a new name here and the styles to {@code commonStyles} object.
  5. *
  6. */
  7. export const commonClassName = {
  8. emptyList: 'empty-list',
  9. muteDialog: 'mute-dialog',
  10. overflowMenuItem: 'overflow-menu-item',
  11. overflowMenuItemIcon: 'overflow-menu-item-icon',
  12. participantAvatar: 'participant-avatar',
  13. prejoinDialog: 'prejoin-dialog',
  14. prejoinDialogButton: 'prejoin-dialog-btn',
  15. toolboxIcon: 'toolbox-icon',
  16. toolboxButton: 'toolbox-button',
  17. toolboxContentItems: 'toolbox-content-items'
  18. };
  19. /**
  20. * Returns an object containing the declaration of the common, reusable CSS classes.
  21. *
  22. * @param {Object} theme -The theme.
  23. *
  24. * @returns {Object} - The common styles.
  25. */
  26. export const commonStyles = (theme: Object) => {
  27. return {
  28. // '.empty-list'
  29. [commonClassName.emptyList]: {
  30. listStyleType: 'none',
  31. margin: 0,
  32. padding: 0
  33. },
  34. [commonClassName.muteDialog]: {
  35. '& .separator-line': {
  36. margin: `${theme.spacing(4)}px 0 ${theme.spacing(4)}px -20px`,
  37. padding: '0 20px',
  38. width: '100%',
  39. height: '1px',
  40. background: '#5E6D7A'
  41. },
  42. '& .control-row': {
  43. display: 'flex',
  44. justifyContent: 'space-between',
  45. marginTop: `${theme.spacing(3)}px`,
  46. '& label': {
  47. fontSize: '14px'
  48. }
  49. }
  50. },
  51. [commonClassName.overflowMenuItem]: {
  52. alignItems: 'center',
  53. color: theme.palette.text01,
  54. cursor: 'pointer',
  55. display: 'flex',
  56. fontSize: 14,
  57. fontWeight: 400,
  58. height: 40,
  59. lineHeight: '24px',
  60. padding: '8px 16px',
  61. boxSizing: 'border-box',
  62. '& > div': {
  63. display: 'flex',
  64. alignItems: 'center'
  65. },
  66. '&.unclickable': {
  67. cursor: 'default'
  68. },
  69. '&.disabled': {
  70. cursor: 'initial',
  71. color: theme.palette.text03,
  72. '&:hover': {
  73. background: 'none'
  74. },
  75. '& svg': {
  76. fill: theme.palette.text03
  77. }
  78. },
  79. '@media (hover: hover) and (pointer: fine)': {
  80. '&:hover': {
  81. background: theme.palette.action02Hover
  82. },
  83. '&.unclickable:hover': {
  84. background: 'inherit'
  85. }
  86. }
  87. },
  88. [commonClassName.overflowMenuItemIcon]: {
  89. marginRight: '16px',
  90. '& i': {
  91. display: 'inline',
  92. fontSize: 24
  93. },
  94. '@media (hover: hover) and (pointer: fine)': {
  95. '&i:hover': {
  96. backgroundColor: 'initial'
  97. }
  98. },
  99. '& img': {
  100. maxWidth: 24,
  101. maxHeight: 24
  102. },
  103. '& svg': {
  104. fill: theme.palette.text01,
  105. height: 20,
  106. width: 20
  107. }
  108. },
  109. [commonClassName.participantAvatar]: {
  110. margin: `${theme.spacing(2)}px ${theme.spacing(3)}px ${theme.spacing(2)}px 0`
  111. },
  112. [commonClassName.prejoinDialog]: {
  113. background: '#1C2025',
  114. boxShadow: '0px 2px 20px rgba(0, 0, 0, 0.5)',
  115. borderRadius: '5px',
  116. color: '#fff',
  117. height: '400px',
  118. width: '375px',
  119. [`${commonClassName.prejoinDialog}--small`]: {
  120. height: 300,
  121. width: 400
  122. },
  123. [`${commonClassName.prejoinDialog}-label`]: {
  124. fontSize: '15px',
  125. lineHeight: '24px'
  126. },
  127. [`${commonClassName.prejoinDialog}-label-num`]: {
  128. background: '#2b3b4b',
  129. border: '1px solid #A4B8D1',
  130. borderRadius: '50%',
  131. color: '#fff',
  132. display: 'inline-block',
  133. height: '24px',
  134. marginRight: `${theme.spacing(2)}px`,
  135. width: '24px'
  136. },
  137. [`${commonClassName.prejoinDialog}-container`]: {
  138. alignItems: 'center',
  139. background: 'rgba(0,0,0,0.6)',
  140. display: 'flex',
  141. height: '100vh',
  142. justifyContent: 'center',
  143. left: 0,
  144. position: 'absolute',
  145. top: 0,
  146. width: '100vw',
  147. zIndex: 3
  148. },
  149. [`${commonClassName.prejoinDialog}-flag`]: {
  150. display: 'inline-block',
  151. marginRight: `${theme.spacing(2)}px}`,
  152. transform: 'scale(1.2)'
  153. },
  154. [`${commonClassName.prejoinDialog}-title`]: {
  155. display: 'inline-block',
  156. fontSize: '24px',
  157. lineHeight: '32px'
  158. },
  159. [`${commonClassName.prejoinDialog}-icon`]: {
  160. cursor: 'pointer',
  161. '& > svg': {
  162. fill: '#A4B8D1'
  163. }
  164. },
  165. [commonClassName.prejoinDialogButton]: {
  166. width: '309px'
  167. },
  168. [`${commonClassName.prejoinDialog}-dialin-container`]: {
  169. textAlign: 'center'
  170. },
  171. [`${commonClassName.prejoinDialog}-delimiter`]: {
  172. background: '#5f6266',
  173. border: '0',
  174. height: '1px',
  175. margin: '0',
  176. padding: '0',
  177. width: '100%'
  178. },
  179. [`${commonClassName.prejoinDialog}-delimiter-container`]: {
  180. margin: `${theme.spacing(3)}px 0 ${theme.spacing(4)}px 0`,
  181. position: 'relative'
  182. },
  183. [`${commonClassName.prejoinDialog}-delimiter-txt-container`]: {
  184. position: 'absolute',
  185. textAlign: 'center',
  186. top: '-8px',
  187. width: '100%'
  188. },
  189. [`${commonClassName.prejoinDialog}-delimiter-txt`]: {
  190. background: '#1C2025',
  191. color: '#5f6266',
  192. fontSize: '11px',
  193. textTransform: 'uppercase',
  194. padding: `0 ${theme.spacing(2)}px`
  195. }
  196. },
  197. [commonClassName.prejoinDialogButton]: {
  198. [`&.primary, &${commonClassName.prejoinDialogButton}.text`]: {
  199. width: '310px'
  200. }
  201. },
  202. [commonClassName.toolboxIcon]: {
  203. display: 'flex',
  204. borderRadius: 3,
  205. flexDirection: 'column',
  206. fontSize: 24,
  207. height: 48,
  208. justifyContent: 'center',
  209. width: 48,
  210. '@media (hover: hover) and (pointer: fine)': {
  211. '&:hover': {
  212. background: theme.palette.ui04
  213. }
  214. },
  215. [theme.breakpoints.down('320')]: {
  216. height: 36,
  217. width: 36
  218. },
  219. '&.toggled': {
  220. background: theme.palette.ui03
  221. },
  222. '&.disabled': {
  223. cursor: 'initial !important',
  224. backgroundColor: `${theme.palette.disabled01} !important`,
  225. '& svg': {
  226. fill: `${theme.palette.text03} !important`
  227. }
  228. }
  229. },
  230. [commonClassName.toolboxButton]: {
  231. color: theme.palette.text01,
  232. cursor: 'pointer',
  233. display: 'inline-block',
  234. lineHeight: '48px',
  235. textAlign: 'center'
  236. },
  237. [commonClassName.toolboxContentItems]: {
  238. background: theme.palette.ui01,
  239. borderRadius: 6,
  240. margin: '0 auto',
  241. padding: 6,
  242. textAlign: 'center',
  243. pointerEvents: 'all',
  244. boxShadow: '0px 2px 8px 4px rgba(0, 0, 0, 0.25), 0px 0px 0px 1px rgba(0, 0, 0, 0.15)',
  245. '& > div': {
  246. marginLeft: 8,
  247. '&:first-child': {
  248. marginLeft: 0
  249. }
  250. }
  251. }
  252. };
  253. };
  254. /**
  255. * Returns the global styles.
  256. *
  257. * @param {Object} theme - The Jitsi theme.
  258. * @returns {Object}
  259. */
  260. export const getGlobalStyles = (theme: Object) => {
  261. return {
  262. // @atlaskit/modal-dialog OVERRIDES
  263. '.atlaskit-portal div[role=dialog]': {
  264. // override dialog background
  265. '& > div': {
  266. background: theme.palette.ui02,
  267. color: theme.palette.text01
  268. }
  269. }
  270. };
  271. };