您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

Tokens.js 8.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. // @flow
  2. // Default color palette
  3. export const colors = {
  4. error03: '#7A141F',
  5. error04: '#A21B29',
  6. error05: '#CB2233',
  7. error06: '#E04757',
  8. error08: '#EAA7AD',
  9. primary01: '#00112D',
  10. primary02: '#00225A',
  11. primary03: '#003486',
  12. primary04: '#0045B3',
  13. primary05: '#0056E0',
  14. primary06: '#246FE5',
  15. primary07: '#669AEC',
  16. primary08: '#99BBF3',
  17. primary09: '#CCDDF9',
  18. primary10: '#17A0DB',
  19. primary11: '#1081B2',
  20. surface00: '#111111',
  21. surface01: '#040404',
  22. surface02: '#141414',
  23. surface03: '#292929',
  24. surface04: '#3D3D3D',
  25. surface05: '#525252',
  26. surface06: '#666',
  27. surface07: '#858585',
  28. surface08: '#A3A3A3',
  29. surface09: '#C2C2C2',
  30. surface10: '#E0E0E0',
  31. surface11: '#FFF',
  32. surface12: '#AAAAAA',
  33. surface13: '#495258',
  34. surface14: '#555555',
  35. success04: '#189B55',
  36. success05: '#1EC26A',
  37. warning05: '#F8AE1A',
  38. warning06: '#ED9E1B',
  39. warning07: '#D77976',
  40. disabled01: '#00000040',
  41. support01: '#FF9B42',
  42. support02: '#F96E57',
  43. support03: '#DF486F',
  44. support04: '#B23683',
  45. support05: '#73348C',
  46. support06: '#6A50D3',
  47. support07: '#4380E2',
  48. support08: '#00A8B3',
  49. support09: '#2AA076'
  50. };
  51. // Mapping between the token used and the color
  52. export const colorMap = {
  53. // Default page background
  54. uiBackground: 'surface01',
  55. // Container background
  56. ui01: 'surface02',
  57. ui02: 'surface03',
  58. ui03: 'surface04',
  59. ui04: 'surface05',
  60. ui05: 'surface06',
  61. ui12: 'surface11',
  62. ui13: 'surface14',
  63. // Primary buttons
  64. action01: 'primary05',
  65. action04: 'primary11',
  66. // Screen header
  67. screen01Header: 'primary10',
  68. // Status bar
  69. status01Bar: 'primary11',
  70. // Hover state for primary buttons
  71. action01Hover: 'primary06',
  72. // Active state for primary buttons
  73. action01Active: 'primary04',
  74. // Focus border color
  75. action01Focus: 'primary08',
  76. // Disabled state for primary buttons
  77. action01Disabled: 'primary02',
  78. // Secondary buttons
  79. action02: 'surface04',
  80. // Hover state for secondary buttons
  81. action02Hover: 'surface05',
  82. // Active state for secondary buttons
  83. action02Active: 'surface03',
  84. // Focus border color
  85. action02Focus: 'surface07',
  86. // Disabled state for secondary buttons
  87. action02Disabled: 'surface02',
  88. // Tertiary buttons
  89. action03: 'transparent',
  90. // Hover state for tertiary buttons
  91. action03Hover: 'surface05',
  92. // Active state for tertiary buttons
  93. action03Active: 'surface03',
  94. // Focus border color
  95. action03Focus: 'surface07',
  96. // Disabled state for tertiary buttons
  97. action03Disabled: 'transparent',
  98. // Danger button background
  99. actionDanger: 'error05',
  100. // Hover state for danger buttons
  101. actionDangerHover: 'error06',
  102. // Active state for danger buttons
  103. actionDangerActive: 'error04',
  104. // Focus border color
  105. actionDangerFocus: 'error08',
  106. // Disabled state for danger buttons
  107. actionDangerDisabled: 'error03',
  108. // Underlay color for buttons
  109. underlay01: 'surface13',
  110. // Bottom sheet background
  111. bottomSheet: 'surface00',
  112. // Primary text – default color for body copy & headers
  113. text01: 'surface11',
  114. // Secondary text with medium contrast
  115. text02: 'surface09',
  116. // Tertiary text with low contrast – placeholders, disabled actions, label for disabled buttons
  117. text03: 'surface07',
  118. // Text for bottom sheet items
  119. text04: 'surface12',
  120. // Text for drawer menu displayed name
  121. text05: 'surface06',
  122. // error messages
  123. textError: 'error06',
  124. // Primary color for icons
  125. icon01: 'surface11',
  126. // Secondary color for input fields
  127. icon02: 'surface09',
  128. // Tertiary color for disabled actions
  129. icon03: 'surface07',
  130. // Quaternary color for disabled actions
  131. icon04: 'surface14',
  132. // Quinary color for disabled actions
  133. icon05: 'surface04',
  134. // Error message
  135. iconError: 'error06',
  136. // Forms
  137. // Default background for input fields
  138. field01: 'surface01',
  139. // Hover background for input fields
  140. field01Hover: 'surface03',
  141. // Focus border color
  142. field01Focus: 'primary05',
  143. // Disabled background for input fields
  144. field01Disabled: 'surface05',
  145. // Background for high-contrast input fields
  146. field02: 'surface11',
  147. // Color for the section divider
  148. dividerColor: 'surface12',
  149. // Background for high-contrast input fields on hover
  150. field02Hover: 'primary09',
  151. // Focus border color
  152. field02Focus: 'primary05',
  153. // Disabled background for high-contrast input fields
  154. field02Disabled: 'surface06',
  155. // Background for section header
  156. section01: 'surface10',
  157. // Active color for section header
  158. section01Active: 'primary04',
  159. // Inactive color for section header
  160. section01Inactive: 'surface01',
  161. // Borders
  162. // Border for the input fields in hover state
  163. border01: 'surface08',
  164. // Border for the input fields
  165. border02: 'surface06',
  166. // Line separators
  167. border03: 'surface04',
  168. // Color for error border & message
  169. borderError: 'error06',
  170. // Links
  171. // Default color for links
  172. link01: 'primary07',
  173. // Color for links in the hover state
  174. link01Hover: 'primary08',
  175. // Color for links in the active state
  176. link01Active: 'primary06',
  177. // Support
  178. // Color for positive messages applied to icons & borders
  179. success01: 'success05',
  180. // Color for positive messages applied to backgrounds
  181. success02: 'success05',
  182. // Color for warning messages applied to icons, borders & backgrounds
  183. warning01: 'warning05',
  184. // Color for indicating a raised hand
  185. warning02: 'warning06',
  186. // Color for insecure room
  187. warning03: 'warning07',
  188. // Color for disabled tab
  189. tab01Disabled: 'disabled01',
  190. // Color for disabled video switch
  191. video01Disabled: 'disabled01',
  192. // Backgrounds for avatars
  193. support01: 'support01',
  194. support02: 'support02',
  195. support03: 'support03',
  196. support04: 'support04',
  197. support05: 'support05',
  198. support06: 'support06',
  199. support08: 'support08',
  200. support09: 'support09',
  201. // Used for avatars and raise hand badge
  202. support07: 'support07'
  203. };
  204. export const font = {
  205. weightRegular: '400',
  206. weightSemiBold: '600'
  207. };
  208. export const shape = {
  209. borderRadius: 6,
  210. boxShadow: 'inset 0px -1px 0px rgba(255, 255, 255, 0.15)'
  211. };
  212. export const spacing
  213. = [ 0, 4, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128 ];
  214. export const typography = {
  215. labelRegular: {
  216. fontSize: 12,
  217. lineHeight: 16,
  218. fontWeight: font.weightRegular,
  219. letterSpacing: 0.16
  220. },
  221. labelBold: {
  222. fontSize: 12,
  223. lineHeight: 16,
  224. fontWeight: font.weightSemiBold,
  225. letterSpacing: 0.16
  226. },
  227. labelButton: {
  228. fontSize: 14,
  229. lineHeight: 24,
  230. fontWeight: font.weightSemiBold,
  231. letterSpacing: 0
  232. },
  233. labelButtonLarge: {
  234. fontSize: 16,
  235. lineHeight: 24,
  236. fontWeight: font.weightSemiBold,
  237. letterSpacing: 0
  238. },
  239. bodyShortRegular: {
  240. fontSize: 14,
  241. lineHeight: 18,
  242. fontWeight: font.weightRegular,
  243. letterSpacing: 0
  244. },
  245. bodyShortBold: {
  246. fontSize: 14,
  247. lineHeight: 18,
  248. fontWeight: font.weightSemiBold,
  249. letterSpacing: 0
  250. },
  251. bodyShortRegularLarge: {
  252. fontSize: 16,
  253. lineHeight: 24,
  254. fontWeight: font.weightRegular,
  255. letterSpacing: 0
  256. },
  257. bodyShortBoldLarge: {
  258. fontSize: 16,
  259. lineHeight: 24,
  260. fontWeight: font.weightSemiBold,
  261. letterSpacing: 0
  262. },
  263. bodyLongRegular: {
  264. fontSize: 14,
  265. lineHeight: 24,
  266. fontWeight: font.weightRegular,
  267. letterSpacing: 0
  268. },
  269. bodyLongBold: {
  270. fontSize: 14,
  271. lineHeight: 24,
  272. fontWeight: font.weightSemiBold,
  273. letterSpacing: 0
  274. },
  275. heading1: {
  276. fontSize: 54,
  277. lineHeight: 64,
  278. fontWeight: font.weightSemiBold,
  279. letterSpacing: 0
  280. },
  281. heading2: {
  282. fontSize: 42,
  283. lineHeight: 50,
  284. fontWeight: font.weightSemiBold,
  285. letterSpacing: 0
  286. },
  287. heading3: {
  288. fontSize: 32,
  289. lineHeight: 40,
  290. fontWeight: font.weightSemiBold,
  291. letterSpacing: 0
  292. },
  293. heading4: {
  294. fontSize: 28,
  295. lineHeight: 36,
  296. fontWeight: font.weightSemiBold,
  297. letterSpacing: 0
  298. },
  299. heading5: {
  300. fontSize: 20,
  301. lineHeight: 28,
  302. fontWeight: font.weightSemiBold,
  303. letterSpacing: 0
  304. },
  305. heading6: {
  306. fontSize: 16,
  307. lineHeight: 26,
  308. fontWeight: font.weightSemiBold,
  309. letterSpacing: 0
  310. },
  311. heading7: {
  312. fontSize: 14,
  313. lineHeight: 24,
  314. fontWeight: font.weightSemiBold,
  315. letterSpacing: 0
  316. }
  317. };
  318. export const breakpoints = {
  319. values: {
  320. '0': 0,
  321. '320': 320,
  322. '400': 400,
  323. '480': 480
  324. }
  325. };