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.ts 7.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. // Default color palette
  2. export const colors = {
  3. error03: '#7A141F',
  4. error04: '#A21B29',
  5. error05: '#CB2233',
  6. error06: '#D83848',
  7. error08: '#F24D5F',
  8. primary01: '#00112D',
  9. primary02: '#00225A',
  10. primary03: '#003486',
  11. primary04: '#0045B3',
  12. primary05: '#0056E0',
  13. primary06: '#246FE5',
  14. primary07: '#4687ED',
  15. primary08: '#99BBF3',
  16. primary09: '#CCDDF9',
  17. surface01: '#040404',
  18. surface02: '#141414',
  19. surface03: '#292929',
  20. surface04: '#3D3D3D',
  21. surface05: '#525252',
  22. surface06: '#666',
  23. surface07: '#858585',
  24. surface08: '#A3A3A3',
  25. surface09: '#C2C2C2',
  26. surface10: '#E0E0E0',
  27. surface11: '#FFF',
  28. success04: '#189B55',
  29. success05: '#1EC26A',
  30. warning05: '#F8AE1A',
  31. warning06: '#FFD600',
  32. support01: '#FF9B42',
  33. support02: '#F96E57',
  34. support03: '#DF486F',
  35. support04: '#B23683',
  36. support05: '#73348C',
  37. support06: '#6A50D3',
  38. support07: '#4380E2',
  39. support08: '#00A8B3',
  40. support09: '#2AA076',
  41. // The following tokens are not in the Design System and they should be removed
  42. // after we replace them in the components.
  43. primary10: '#17A0DB',
  44. primary11: '#1081B2',
  45. surface00: '#111111',
  46. surface12: '#AAAAAA',
  47. surface13: '#495258',
  48. surface14: '#555555',
  49. surface15: '#474747',
  50. surface16: '#131519',
  51. surface17: '#161618',
  52. warning07: '#FFD740',
  53. disabled01: '#00000040'
  54. };
  55. // Mapping between the token used and the color
  56. export const colorMap = {
  57. // ----- Surfaces -----
  58. // Default page background
  59. uiBackground: 'surface01',
  60. // Container backgrounds
  61. ui01: 'surface02',
  62. ui02: 'surface03',
  63. ui03: 'surface04',
  64. ui04: 'surface05',
  65. ui05: 'surface06',
  66. ui06: 'surface07',
  67. ui07: 'surface08',
  68. ui08: 'surface09',
  69. ui09: 'surface10',
  70. ui10: 'surface11',
  71. // ----- Actions -----
  72. // Primary
  73. action01: 'primary06',
  74. action01Hover: 'primary07',
  75. action01Active: 'primary04',
  76. // Secondary
  77. action02: 'surface10',
  78. action02Hover: 'surface11',
  79. action02Active: 'surface09',
  80. // Destructive
  81. actionDanger: 'error05',
  82. actionDangerHover: 'error06',
  83. actionDangerActive: 'error04',
  84. // Tertiary
  85. action03: 'transparent',
  86. action03Hover: 'surface04',
  87. action03Active: 'surface03',
  88. // Disabled
  89. disabled01: 'surface09',
  90. // Focus
  91. focus01: 'primary07',
  92. // ----- Links -----
  93. link01: 'primary07',
  94. link01Hover: 'primary08',
  95. link01Active: 'primary06',
  96. // ----- Text -----
  97. // Primary
  98. text01: 'surface11',
  99. // Secondary
  100. text02: 'surface09',
  101. // Tertiary
  102. text03: 'surface07',
  103. // High-contrast
  104. text04: 'surface01',
  105. // Error
  106. textError: 'error08',
  107. // ----- Icons -----
  108. // Primary
  109. icon01: 'surface11',
  110. // Secondary
  111. icon02: 'surface09',
  112. // Tertiary
  113. icon03: 'surface07',
  114. // High-contrast
  115. icon04: 'surface01',
  116. // Error
  117. iconError: 'error06',
  118. // ----- Forms -----
  119. field01: 'surface04',
  120. // ----- Feedback -----
  121. // Success
  122. success01: 'success05',
  123. success02: 'success04',
  124. // Warning
  125. warning01: 'warning05',
  126. warning02: 'warning06',
  127. // ----- Support -----
  128. support01: 'support01',
  129. support02: 'support02',
  130. support03: 'support03',
  131. support04: 'support04',
  132. support05: 'support05',
  133. support06: 'support06',
  134. support07: 'support07',
  135. support08: 'support08',
  136. support09: 'support09',
  137. // The following mappings are not in the Design System and they should be removed
  138. // after we replace them in the components.
  139. ui00: 'surface00',
  140. ui12: 'surface11',
  141. ui13: 'surface14',
  142. ui14: 'surface15',
  143. ui15: 'surface12',
  144. ui16: 'surface16',
  145. action04: 'primary11',
  146. action03Focus: 'surface07',
  147. action03Disabled: 'transparent',
  148. actionDisabled: 'surface09',
  149. icon05: 'surface04',
  150. text05: 'surface06',
  151. text06: 'surface03',
  152. text07Info: 'surface02',
  153. screen01Header: 'primary10',
  154. screen02Header: 'surface17',
  155. underlay01: 'surface13',
  156. bottomSheet: 'surface00',
  157. dividerColor: 'surface12',
  158. indicatorColor: 'surface12',
  159. section01: 'surface10',
  160. border01: 'surface08',
  161. border02: 'surface06',
  162. border03: 'surface04',
  163. border05: 'surface07',
  164. borderError: 'error06',
  165. warning03: 'warning07',
  166. tab01Disabled: 'disabled01',
  167. switch01Enabled: 'success04',
  168. switch01Disabled: 'surface06',
  169. video01Disabled: 'disabled01',
  170. field01Hover: 'surface03',
  171. field01Focus: 'primary05',
  172. field01Disabled: 'surface05',
  173. field02: 'surface11',
  174. field02Hover: 'primary09',
  175. field02Focus: 'primary05',
  176. field02Disabled: 'surface06'
  177. };
  178. export const font = {
  179. weightRegular: '400',
  180. weightSemiBold: '600'
  181. };
  182. export const shape = {
  183. borderRadius: 6,
  184. boxShadow: 'inset 0px -1px 0px rgba(255, 255, 255, 0.15)'
  185. };
  186. export const spacing
  187. = [ 0, 4, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128 ];
  188. export const typography = {
  189. labelRegular: {
  190. fontSize: 12,
  191. lineHeight: 16,
  192. fontWeight: font.weightRegular,
  193. letterSpacing: 0.16
  194. },
  195. labelBold: {
  196. fontSize: 12,
  197. lineHeight: 16,
  198. fontWeight: font.weightSemiBold,
  199. letterSpacing: 0.16
  200. },
  201. bodyShortRegular: {
  202. fontSize: 14,
  203. lineHeight: 20,
  204. fontWeight: font.weightRegular,
  205. letterSpacing: 0
  206. },
  207. bodyShortBold: {
  208. fontSize: 14,
  209. lineHeight: 20,
  210. fontWeight: font.weightSemiBold,
  211. letterSpacing: 0
  212. },
  213. bodyShortRegularLarge: {
  214. fontSize: 16,
  215. lineHeight: 22,
  216. fontWeight: font.weightRegular,
  217. letterSpacing: 0
  218. },
  219. bodyShortBoldLarge: {
  220. fontSize: 16,
  221. lineHeight: 22,
  222. fontWeight: font.weightSemiBold,
  223. letterSpacing: 0
  224. },
  225. bodyLongRegular: {
  226. fontSize: 14,
  227. lineHeight: 24,
  228. fontWeight: font.weightRegular,
  229. letterSpacing: 0
  230. },
  231. bodyLongRegularLarge: {
  232. fontSize: 16,
  233. lineHeight: 26,
  234. fontWeight: font.weightRegular,
  235. letterSpacing: 0
  236. },
  237. bodyLongBold: {
  238. fontSize: 14,
  239. lineHeight: 24,
  240. fontWeight: font.weightSemiBold,
  241. letterSpacing: 0
  242. },
  243. bodyLongBoldLarge: {
  244. fontSize: 16,
  245. lineHeight: 26,
  246. fontWeight: font.weightSemiBold,
  247. letterSpacing: 0
  248. },
  249. heading1: {
  250. fontSize: 54,
  251. lineHeight: 64,
  252. fontWeight: font.weightSemiBold,
  253. letterSpacing: 0
  254. },
  255. heading2: {
  256. fontSize: 42,
  257. lineHeight: 50,
  258. fontWeight: font.weightSemiBold,
  259. letterSpacing: 0
  260. },
  261. heading3: {
  262. fontSize: 32,
  263. lineHeight: 40,
  264. fontWeight: font.weightSemiBold,
  265. letterSpacing: 0
  266. },
  267. heading4: {
  268. fontSize: 28,
  269. lineHeight: 36,
  270. fontWeight: font.weightSemiBold,
  271. letterSpacing: 0
  272. },
  273. heading5: {
  274. fontSize: 20,
  275. lineHeight: 28,
  276. fontWeight: font.weightSemiBold,
  277. letterSpacing: 0
  278. },
  279. heading6: {
  280. fontSize: 16,
  281. lineHeight: 26,
  282. fontWeight: font.weightSemiBold,
  283. letterSpacing: 0
  284. },
  285. // These styles are no longer part of the Design System.
  286. // They should be replaced and removed.
  287. heading7: {
  288. fontSize: 14,
  289. lineHeight: 24,
  290. fontWeight: font.weightSemiBold,
  291. letterSpacing: 0
  292. },
  293. labelButton: {
  294. fontSize: 14,
  295. lineHeight: 24,
  296. fontWeight: font.weightSemiBold,
  297. letterSpacing: 0
  298. },
  299. labelButtonLarge: {
  300. fontSize: 16,
  301. lineHeight: 24,
  302. fontWeight: font.weightSemiBold,
  303. letterSpacing: 0
  304. }
  305. };
  306. export const breakpoints = {
  307. values: {
  308. '0': 0,
  309. '320': 320,
  310. '400': 400,
  311. '480': 480
  312. }
  313. };