Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

constants.ts 8.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. import { Theme } from '@mui/material';
  2. /**
  3. * The types of the buttons.
  4. */
  5. export enum BUTTON_TYPES {
  6. DESTRUCTIVE = 'destructive',
  7. PRIMARY = 'primary',
  8. SECONDARY = 'secondary',
  9. TERTIARY = 'tertiary'
  10. }
  11. /**
  12. * The modes of the buttons.
  13. */
  14. export const BUTTON_MODES: {
  15. CONTAINED: 'contained';
  16. } = {
  17. CONTAINED: 'contained'
  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: Theme) => {
  27. return {
  28. '.empty-list': {
  29. listStyleType: 'none',
  30. margin: 0,
  31. padding: 0
  32. },
  33. '.mute-dialog': {
  34. '& .separator-line': {
  35. margin: `${theme.spacing(4)} 0 ${theme.spacing(4)} -20px`,
  36. padding: '0 20px',
  37. width: '100%',
  38. height: '1px',
  39. background: '#5E6D7A'
  40. },
  41. '& .control-row': {
  42. display: 'flex',
  43. justifyContent: 'space-between',
  44. marginTop: theme.spacing(3),
  45. '& label': {
  46. fontSize: '14px'
  47. }
  48. }
  49. },
  50. '.overflow-menu-item': {
  51. alignItems: 'center',
  52. color: theme.palette.text01,
  53. cursor: 'pointer',
  54. display: 'flex',
  55. fontSize: 14,
  56. fontWeight: 400,
  57. height: 40,
  58. lineHeight: '24px',
  59. padding: '8px 16px',
  60. boxSizing: 'border-box' as const,
  61. '& > div': {
  62. display: 'flex',
  63. alignItems: 'center'
  64. },
  65. '&.unclickable': {
  66. cursor: 'default'
  67. },
  68. '&.disabled': {
  69. cursor: 'initial',
  70. color: theme.palette.text03,
  71. '&:hover': {
  72. background: 'none'
  73. },
  74. '& svg': {
  75. fill: theme.palette.text03
  76. }
  77. },
  78. '@media (hover: hover) and (pointer: fine)': {
  79. '&:hover': {
  80. background: theme.palette.action02Hover
  81. },
  82. '&.unclickable:hover': {
  83. background: 'inherit'
  84. }
  85. }
  86. },
  87. '.overflow-menu-item-icon': {
  88. marginRight: '16px',
  89. '& i': {
  90. display: 'inline',
  91. fontSize: 24
  92. },
  93. '@media (hover: hover) and (pointer: fine)': {
  94. '&i:hover': {
  95. backgroundColor: 'initial'
  96. }
  97. },
  98. '& img': {
  99. maxWidth: 24,
  100. maxHeight: 24
  101. },
  102. '& svg': {
  103. fill: theme.palette.text01,
  104. height: 20,
  105. width: 20
  106. }
  107. },
  108. '.participant-avatar': {
  109. margin: `${theme.spacing(2)} ${theme.spacing(3)} ${theme.spacing(2)} 0`
  110. },
  111. '.prejoin-dialog': {
  112. background: '#1C2025',
  113. boxShadow: '0px 2px 20px rgba(0, 0, 0, 0.5)',
  114. borderRadius: '5px',
  115. color: '#fff',
  116. height: '400px',
  117. width: '375px',
  118. '.prejoin-dialog--small': {
  119. height: 300,
  120. width: 400
  121. },
  122. '.prejoin-dialog-label': {
  123. fontSize: '15px',
  124. lineHeight: '24px'
  125. },
  126. '.prejoin-dialog-label-num': {
  127. background: '#2b3b4b',
  128. border: '1px solid #A4B8D1',
  129. borderRadius: '50%',
  130. color: '#fff',
  131. display: 'inline-block',
  132. height: '24px',
  133. marginRight: theme.spacing(2),
  134. width: '24px'
  135. },
  136. '.prejoin-dialog-container': {
  137. alignItems: 'center',
  138. background: 'rgba(0,0,0,0.6)',
  139. display: 'flex',
  140. height: '100vh',
  141. justifyContent: 'center',
  142. left: 0,
  143. position: 'absolute' as const,
  144. top: 0,
  145. width: '100vw',
  146. zIndex: 3
  147. },
  148. '.prejoin-dialog-flag': {
  149. display: 'inline-block',
  150. marginRight: theme.spacing(2),
  151. transform: 'scale(1.2)'
  152. },
  153. '.prejoin-dialog-title': {
  154. display: 'inline-block',
  155. fontSize: '24px',
  156. lineHeight: '32px'
  157. },
  158. '.prejoin-dialog-icon': {
  159. cursor: 'pointer',
  160. '& > svg': {
  161. fill: '#A4B8D1'
  162. }
  163. },
  164. '.prejoin-dialog-btn': {
  165. width: '309px',
  166. marginBottom: '8px'
  167. },
  168. '.prejoin-dialog-dialin-container': {
  169. textAlign: 'center' as const
  170. },
  171. '.prejoin-dialog-delimiter': {
  172. background: '#5f6266',
  173. border: '0',
  174. height: '1px',
  175. margin: '0',
  176. padding: '0',
  177. width: '100%'
  178. },
  179. '.prejoin-dialog-delimiter-container': {
  180. margin: `${theme.spacing(3)} 0 ${theme.spacing(4)} 0`,
  181. position: 'relative' as const
  182. },
  183. '.prejoin-dialog-delimiter-txt-container': {
  184. position: 'absolute' as const,
  185. textAlign: 'center' as const,
  186. top: '-8px',
  187. width: '100%'
  188. },
  189. '.prejoin-dialog-delimiter-txt': {
  190. background: '#1C2025',
  191. color: '#5f6266',
  192. fontSize: '11px',
  193. textTransform: 'uppercase' as const,
  194. padding: `0 ${theme.spacing(2)}`
  195. }
  196. },
  197. '.prejoin-dialog-btn': {
  198. '&.primary, &.prejoin-dialog-btn.text': {
  199. width: '310px'
  200. }
  201. },
  202. '.toolbox-icon': {
  203. display: 'flex',
  204. borderRadius: 3,
  205. flexDirection: 'column' as const,
  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. '.toolbox-button': {
  231. color: theme.palette.text01,
  232. cursor: 'pointer',
  233. display: 'inline-block',
  234. lineHeight: '48px',
  235. textAlign: 'center' as const
  236. },
  237. '.toolbox-content-items': {
  238. background: theme.palette.ui01,
  239. borderRadius: 6,
  240. margin: '0 auto',
  241. padding: 6,
  242. textAlign: 'center' as const,
  243. pointerEvents: 'all' as const,
  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: Theme) => {
  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. };