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

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