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 8.6KB

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