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.

constants.web.ts 7.5KB

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