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

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