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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  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. surface01: '#040404',
  19. surface02: '#141414',
  20. surface03: '#292929',
  21. surface04: '#3D3D3D',
  22. surface05: '#525252',
  23. surface06: '#666',
  24. surface07: '#858585',
  25. surface08: '#A3A3A3',
  26. surface09: '#C2C2C2',
  27. surface10: '#E0E0E0',
  28. surface11: '#FFF',
  29. success04: '#189B55',
  30. success05: '#1EC26A',
  31. warning05: '#F8AE1A'
  32. };
  33. // Mapping between the token used and the color
  34. export const colorMap = {
  35. // Default page background
  36. uiBackground: 'surface01',
  37. // Container background
  38. ui01: 'surface02',
  39. ui02: 'surface03',
  40. ui03: 'surface04',
  41. ui04: 'surface05',
  42. ui05: 'surface06',
  43. // Primary buttons
  44. action01: 'primary05',
  45. // Hover state for primary buttons
  46. action01Hover: 'primary06',
  47. // Active state for primary buttons
  48. action01Active: 'primary04',
  49. // Focus border color
  50. action01Focus: 'primary08',
  51. // Disabled state for primary buttons
  52. action01Disabled: 'primary02',
  53. // Secondary buttons
  54. action02: 'surface04',
  55. // Hover state for secondary buttons
  56. action02Hover: 'surface05',
  57. // Active state for secondary buttons
  58. action02Active: 'surface03',
  59. // Focus border color
  60. action02Focus: 'surface07',
  61. // Disabled state for secondary buttons
  62. action02Disabled: 'surface02',
  63. // Tertiary buttons
  64. action03: 'transparent',
  65. // Hover state for tertiary buttons
  66. action03Hover: 'surface05',
  67. // Active state for tertiary buttons
  68. action03Active: 'surface03',
  69. // Focus border color
  70. action03Focus: 'surface07',
  71. // Disabled state for tertiary buttons
  72. action03Disabled: 'transparent',
  73. // Danger button background
  74. actionDanger: 'error05',
  75. // Hover state for danger buttons
  76. actionDangerHover: 'error06',
  77. // Active state for danger buttons
  78. actionDangerActive: 'error04',
  79. // Focus border color
  80. actionDangerFocus: 'error08',
  81. // Disabled state for danger buttons
  82. actionDangerDisabled: 'error03',
  83. // Primary text – default color for body copy & headers
  84. text01: 'surface11',
  85. // Secondary text with medium contrast
  86. text02: 'surface09',
  87. // Tertiary text with low contrast – placeholders, disabled actions, label for disabled buttons
  88. text03: 'surface07',
  89. // error messages
  90. textError: 'error06',
  91. // Primary color for icons
  92. icon01: 'surface11',
  93. // Secondary color for input fields
  94. icon02: 'surface09',
  95. // Tertiary color for disabled actions
  96. icon03: 'surface07',
  97. // Error message
  98. iconError: 'error06',
  99. // Forms
  100. // Default background for input fields
  101. field01: 'surface01',
  102. // Hover background for input fields
  103. field01Hover: 'surface03',
  104. // Focus border color
  105. field01Focus: 'primary05',
  106. // Disabled background for input fields
  107. field01Disabled: 'surface05',
  108. // Background for high-contrast input fields
  109. field02: 'surface11',
  110. // Background for high-contrast input fields on hover
  111. field02Hover: 'primary09',
  112. // Focus border color
  113. field02Focus: 'primary05',
  114. // Disabled background for high-contrast input fields
  115. field02Disabled: 'surface06',
  116. // Background for section header
  117. section01: 'surface10',
  118. // Active color for section header
  119. section01Active: 'primary04',
  120. // Inactive color for section header
  121. section01Inactive: 'surface01',
  122. // Borders
  123. // Border for the input fields in hover state
  124. border01: 'surface08',
  125. // Border for the input fields
  126. border02: 'surface06',
  127. // Line separators
  128. border03: 'surface04',
  129. // Color for error border & message
  130. borderError: 'error06',
  131. // Links
  132. // Default color for links
  133. link01: 'primary07',
  134. // Color for links in the hover state
  135. link01Hover: 'primary08',
  136. // Color for links in the active state
  137. link01Active: 'primary06',
  138. // Support
  139. // Color for positive messages applied to icons & borders
  140. success01: 'success05',
  141. // Color for positive messages applied to backgrounds
  142. success02: 'success05',
  143. // Color for warning messages applied to icons, borders & backgrounds
  144. warning01: 'warning05'
  145. };
  146. export const font = {
  147. weightRegular: 400,
  148. weightSemiBold: 600
  149. };
  150. export const shape = {
  151. borderRadius: 6
  152. };
  153. export const spacing = [ 0, 4, 8, 16, 24, 32, 40, 48, 56 ];
  154. export const typography = {
  155. labelRegular: {
  156. fontSize: 12,
  157. lineHeight: 16,
  158. fontWeight: font.weightRegular,
  159. letterSpacing: 0.16
  160. },
  161. labelBold: {
  162. fontSize: 12,
  163. lineHeight: 16,
  164. fontWeight: font.weightSemiBold,
  165. letterSpacing: 0.16
  166. },
  167. labelButton: {
  168. fontSize: 14,
  169. lineHeight: 24,
  170. fontWeight: font.weightSemiBold,
  171. letterSpacing: 0
  172. },
  173. labelButtonLarge: {
  174. fontSize: 16,
  175. lineHeight: 24,
  176. fontWeight: font.weightSemiBold,
  177. letterSpacing: 0
  178. },
  179. bodyShortRegular: {
  180. fontSize: 14,
  181. lineHeight: 18,
  182. fontWeight: font.weightRegular,
  183. letterSpacing: 0
  184. },
  185. bodyShortBold: {
  186. fontSize: 14,
  187. lineHeight: 18,
  188. fontWeight: font.weightSemiBold,
  189. letterSpacing: 0
  190. },
  191. bodyShortRegularLarge: {
  192. fontSize: 16,
  193. lineHeight: 24,
  194. fontWeight: font.weightRegular,
  195. letterSpacing: 0
  196. },
  197. bodyShortBoldLarge: {
  198. fontSize: 16,
  199. lineHeight: 24,
  200. fontWeight: font.weightSemiBold,
  201. letterSpacing: 0
  202. },
  203. bodyLongRegular: {
  204. fontSize: 14,
  205. lineHeight: 24,
  206. fontWeight: font.weightRegular,
  207. letterSpacing: 0
  208. },
  209. bodyLongBold: {
  210. fontSize: 14,
  211. lineHeight: 24,
  212. fontWeight: font.weightSemiBold,
  213. letterSpacing: 0
  214. },
  215. heading1: {
  216. fontSize: 54,
  217. lineHeight: 64,
  218. fontWeight: font.weightSemiBold,
  219. letterSpacing: 0
  220. },
  221. heading2: {
  222. fontSize: 42,
  223. lineHeight: 50,
  224. fontWeight: font.weightSemiBold,
  225. letterSpacing: 0
  226. },
  227. heading3: {
  228. fontSize: 32,
  229. lineHeight: 40,
  230. fontWeight: font.weightSemiBold,
  231. letterSpacing: 0
  232. },
  233. heading4: {
  234. fontSize: 28,
  235. lineHeight: 36,
  236. fontWeight: font.weightSemiBold,
  237. letterSpacing: 0
  238. },
  239. heading5: {
  240. fontSize: 20,
  241. lineHeight: 28,
  242. fontWeight: font.weightSemiBold,
  243. letterSpacing: 0
  244. },
  245. heading6: {
  246. fontSize: 16,
  247. lineHeight: 26,
  248. fontWeight: font.weightSemiBold,
  249. letterSpacing: 0
  250. },
  251. heading7: {
  252. fontSize: 14,
  253. lineHeight: 24,
  254. fontWeight: font.weightSemiBold,
  255. letterSpacing: 0
  256. }
  257. };