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

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