您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

Tokens.ts 7.8KB

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