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.

Tokens.js 9.2KB

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