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.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  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. '.prejoin-dialog': {
  93. backgroundColor: theme.palette.uiBackground,
  94. boxShadow: '0px 2px 20px rgba(0, 0, 0, 0.5)',
  95. borderRadius: theme.shape.borderRadius,
  96. color: '#fff',
  97. height: '400px',
  98. width: '375px',
  99. '.prejoin-dialog--small': {
  100. height: 300,
  101. width: 400
  102. },
  103. '.prejoin-dialog-label': {
  104. fontSize: '15px',
  105. lineHeight: '24px'
  106. },
  107. '.prejoin-dialog-label-num': {
  108. background: '#2b3b4b',
  109. border: '1px solid #A4B8D1',
  110. borderRadius: '50%',
  111. color: '#fff',
  112. display: 'inline-block',
  113. height: '24px',
  114. marginRight: theme.spacing(2),
  115. width: '24px'
  116. },
  117. '.prejoin-dialog-container': {
  118. alignItems: 'center',
  119. background: 'rgba(0,0,0,0.6)',
  120. display: 'flex',
  121. height: '100dvh',
  122. justifyContent: 'center',
  123. left: 0,
  124. position: 'absolute' as const,
  125. top: 0,
  126. width: '100vw',
  127. zIndex: 3
  128. },
  129. '.prejoin-dialog-flag': {
  130. display: 'inline-block',
  131. marginRight: theme.spacing(2),
  132. transform: 'scale(1.2)'
  133. },
  134. '.prejoin-dialog-title': {
  135. display: 'inline-block',
  136. fontSize: '24px',
  137. lineHeight: '32px'
  138. },
  139. '.prejoin-dialog-icon': {
  140. cursor: 'pointer'
  141. },
  142. '.prejoin-dialog-btn': {
  143. marginBottom: '8px'
  144. },
  145. '.prejoin-dialog-dialin-container': {
  146. textAlign: 'center' as const
  147. },
  148. '.prejoin-dialog-delimiter': {
  149. background: theme.palette.ui03,
  150. border: '0',
  151. height: '1px',
  152. margin: '0',
  153. padding: '0',
  154. width: '100%'
  155. },
  156. '.prejoin-dialog-delimiter-container': {
  157. margin: `${theme.spacing(4)} 0`,
  158. position: 'relative' as const
  159. },
  160. '.prejoin-dialog-delimiter-txt-container': {
  161. position: 'absolute' as const,
  162. textAlign: 'center' as const,
  163. top: '-8px',
  164. width: '100%'
  165. },
  166. '.prejoin-dialog-delimiter-txt': {
  167. background: theme.palette.uiBackground,
  168. color: theme.palette.text01,
  169. fontSize: '11px',
  170. textTransform: 'uppercase' as const,
  171. padding: `0 ${theme.spacing(2)}`
  172. }
  173. },
  174. '.prejoin-dialog-btn': {
  175. '&.primary, &.prejoin-dialog-btn.text': {
  176. width: '310px'
  177. }
  178. },
  179. '.toolbox-icon': {
  180. display: 'flex',
  181. borderRadius: 3,
  182. flexDirection: 'column' as const,
  183. fontSize: 24,
  184. height: 48,
  185. justifyContent: 'center',
  186. width: 48,
  187. '@media (hover: hover) and (pointer: fine)': {
  188. '&:hover': {
  189. backgroundColor: theme.palette.ui04
  190. },
  191. '&:active': {
  192. backgroundColor: theme.palette.ui03
  193. }
  194. },
  195. [theme.breakpoints.down(320)]: {
  196. height: 36,
  197. width: 36
  198. },
  199. '&.toggled': {
  200. backgroundColor: theme.palette.ui03
  201. },
  202. '&.disabled': {
  203. cursor: 'initial !important',
  204. backgroundColor: `${theme.palette.disabled01} !important`,
  205. '& svg': {
  206. fill: `${theme.palette.text03} !important`
  207. }
  208. }
  209. },
  210. '.toolbox-button': {
  211. color: theme.palette.text01,
  212. cursor: 'pointer',
  213. display: 'inline-block',
  214. lineHeight: '48px',
  215. textAlign: 'center' as const
  216. },
  217. '.toolbox-content-items': {
  218. background: theme.palette.ui01,
  219. borderRadius: 6,
  220. margin: '0 auto',
  221. padding: 6,
  222. textAlign: 'center' as const,
  223. pointerEvents: 'all' as const,
  224. display: 'flex',
  225. boxShadow: '0px 2px 8px 4px rgba(0, 0, 0, 0.25), 0px 0px 0px 1px rgba(0, 0, 0, 0.15)',
  226. '& > div': {
  227. marginRight: theme.spacing(2),
  228. '&:last-of-type': {
  229. marginRight: 0
  230. }
  231. }
  232. }
  233. };
  234. };