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

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