@metamask-previews/design-tokens 4.1.0-preview.019292f

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/CHANGELOG.md +353 -0
  2. package/LICENSE +20 -0
  3. package/README.md +103 -0
  4. package/dist/index.cjs +10 -0
  5. package/dist/index.cjs.map +1 -0
  6. package/dist/index.d.cts +3 -0
  7. package/dist/index.d.cts.map +1 -0
  8. package/dist/index.d.mts +3 -0
  9. package/dist/index.d.mts.map +1 -0
  10. package/dist/index.mjs +2 -0
  11. package/dist/index.mjs.map +1 -0
  12. package/dist/js/brandColor/brandColor.cjs +190 -0
  13. package/dist/js/brandColor/brandColor.cjs.map +1 -0
  14. package/dist/js/brandColor/brandColor.d.cts +3 -0
  15. package/dist/js/brandColor/brandColor.d.cts.map +1 -0
  16. package/dist/js/brandColor/brandColor.d.mts +3 -0
  17. package/dist/js/brandColor/brandColor.d.mts.map +1 -0
  18. package/dist/js/brandColor/brandColor.mjs +187 -0
  19. package/dist/js/brandColor/brandColor.mjs.map +1 -0
  20. package/dist/js/brandColor/brandColor.types.cjs +3 -0
  21. package/dist/js/brandColor/brandColor.types.cjs.map +1 -0
  22. package/dist/js/brandColor/brandColor.types.d.cts +187 -0
  23. package/dist/js/brandColor/brandColor.types.d.cts.map +1 -0
  24. package/dist/js/brandColor/brandColor.types.d.mts +187 -0
  25. package/dist/js/brandColor/brandColor.types.d.mts.map +1 -0
  26. package/dist/js/brandColor/brandColor.types.mjs +2 -0
  27. package/dist/js/brandColor/brandColor.types.mjs.map +1 -0
  28. package/dist/js/brandColor/index.cjs +6 -0
  29. package/dist/js/brandColor/index.cjs.map +1 -0
  30. package/dist/js/brandColor/index.d.cts +2 -0
  31. package/dist/js/brandColor/index.d.cts.map +1 -0
  32. package/dist/js/brandColor/index.d.mts +2 -0
  33. package/dist/js/brandColor/index.d.mts.map +1 -0
  34. package/dist/js/brandColor/index.mjs +2 -0
  35. package/dist/js/brandColor/index.mjs.map +1 -0
  36. package/dist/js/colors/colors.cjs +17 -0
  37. package/dist/js/colors/colors.cjs.map +1 -0
  38. package/dist/js/colors/colors.d.cts +163 -0
  39. package/dist/js/colors/colors.d.cts.map +1 -0
  40. package/dist/js/colors/colors.d.mts +163 -0
  41. package/dist/js/colors/colors.d.mts.map +1 -0
  42. package/dist/js/colors/colors.mjs +14 -0
  43. package/dist/js/colors/colors.mjs.map +1 -0
  44. package/dist/js/colors/index.cjs +8 -0
  45. package/dist/js/colors/index.cjs.map +1 -0
  46. package/dist/js/colors/index.d.cts +3 -0
  47. package/dist/js/colors/index.d.cts.map +1 -0
  48. package/dist/js/colors/index.d.mts +3 -0
  49. package/dist/js/colors/index.d.mts.map +1 -0
  50. package/dist/js/colors/index.mjs +3 -0
  51. package/dist/js/colors/index.mjs.map +1 -0
  52. package/dist/js/index.cjs +15 -0
  53. package/dist/js/index.cjs.map +1 -0
  54. package/dist/js/index.d.cts +7 -0
  55. package/dist/js/index.d.cts.map +1 -0
  56. package/dist/js/index.d.mts +7 -0
  57. package/dist/js/index.d.mts.map +1 -0
  58. package/dist/js/index.mjs +7 -0
  59. package/dist/js/index.mjs.map +1 -0
  60. package/dist/js/themes/darkTheme/colors.cjs +135 -0
  61. package/dist/js/themes/darkTheme/colors.cjs.map +1 -0
  62. package/dist/js/themes/darkTheme/colors.d.cts +3 -0
  63. package/dist/js/themes/darkTheme/colors.d.cts.map +1 -0
  64. package/dist/js/themes/darkTheme/colors.d.mts +3 -0
  65. package/dist/js/themes/darkTheme/colors.d.mts.map +1 -0
  66. package/dist/js/themes/darkTheme/colors.mjs +132 -0
  67. package/dist/js/themes/darkTheme/colors.mjs.map +1 -0
  68. package/dist/js/themes/darkTheme/darkTheme.cjs +12 -0
  69. package/dist/js/themes/darkTheme/darkTheme.cjs.map +1 -0
  70. package/dist/js/themes/darkTheme/darkTheme.d.cts +3 -0
  71. package/dist/js/themes/darkTheme/darkTheme.d.cts.map +1 -0
  72. package/dist/js/themes/darkTheme/darkTheme.d.mts +3 -0
  73. package/dist/js/themes/darkTheme/darkTheme.d.mts.map +1 -0
  74. package/dist/js/themes/darkTheme/darkTheme.mjs +9 -0
  75. package/dist/js/themes/darkTheme/darkTheme.mjs.map +1 -0
  76. package/dist/js/themes/darkTheme/index.cjs +6 -0
  77. package/dist/js/themes/darkTheme/index.cjs.map +1 -0
  78. package/dist/js/themes/darkTheme/index.d.cts +2 -0
  79. package/dist/js/themes/darkTheme/index.d.cts.map +1 -0
  80. package/dist/js/themes/darkTheme/index.d.mts +2 -0
  81. package/dist/js/themes/darkTheme/index.d.mts.map +1 -0
  82. package/dist/js/themes/darkTheme/index.mjs +2 -0
  83. package/dist/js/themes/darkTheme/index.mjs.map +1 -0
  84. package/dist/js/themes/darkTheme/shadows.cjs +45 -0
  85. package/dist/js/themes/darkTheme/shadows.cjs.map +1 -0
  86. package/dist/js/themes/darkTheme/shadows.d.cts +3 -0
  87. package/dist/js/themes/darkTheme/shadows.d.cts.map +1 -0
  88. package/dist/js/themes/darkTheme/shadows.d.mts +3 -0
  89. package/dist/js/themes/darkTheme/shadows.d.mts.map +1 -0
  90. package/dist/js/themes/darkTheme/shadows.mjs +42 -0
  91. package/dist/js/themes/darkTheme/shadows.mjs.map +1 -0
  92. package/dist/js/themes/index.cjs +8 -0
  93. package/dist/js/themes/index.cjs.map +1 -0
  94. package/dist/js/themes/index.d.cts +4 -0
  95. package/dist/js/themes/index.d.cts.map +1 -0
  96. package/dist/js/themes/index.d.mts +4 -0
  97. package/dist/js/themes/index.d.mts.map +1 -0
  98. package/dist/js/themes/index.mjs +3 -0
  99. package/dist/js/themes/index.mjs.map +1 -0
  100. package/dist/js/themes/lightTheme/colors.cjs +135 -0
  101. package/dist/js/themes/lightTheme/colors.cjs.map +1 -0
  102. package/dist/js/themes/lightTheme/colors.d.cts +3 -0
  103. package/dist/js/themes/lightTheme/colors.d.cts.map +1 -0
  104. package/dist/js/themes/lightTheme/colors.d.mts +3 -0
  105. package/dist/js/themes/lightTheme/colors.d.mts.map +1 -0
  106. package/dist/js/themes/lightTheme/colors.mjs +132 -0
  107. package/dist/js/themes/lightTheme/colors.mjs.map +1 -0
  108. package/dist/js/themes/lightTheme/index.cjs +6 -0
  109. package/dist/js/themes/lightTheme/index.cjs.map +1 -0
  110. package/dist/js/themes/lightTheme/index.d.cts +2 -0
  111. package/dist/js/themes/lightTheme/index.d.cts.map +1 -0
  112. package/dist/js/themes/lightTheme/index.d.mts +2 -0
  113. package/dist/js/themes/lightTheme/index.d.mts.map +1 -0
  114. package/dist/js/themes/lightTheme/index.mjs +2 -0
  115. package/dist/js/themes/lightTheme/index.mjs.map +1 -0
  116. package/dist/js/themes/lightTheme/lightTheme.cjs +12 -0
  117. package/dist/js/themes/lightTheme/lightTheme.cjs.map +1 -0
  118. package/dist/js/themes/lightTheme/lightTheme.d.cts +3 -0
  119. package/dist/js/themes/lightTheme/lightTheme.d.cts.map +1 -0
  120. package/dist/js/themes/lightTheme/lightTheme.d.mts +3 -0
  121. package/dist/js/themes/lightTheme/lightTheme.d.mts.map +1 -0
  122. package/dist/js/themes/lightTheme/lightTheme.mjs +9 -0
  123. package/dist/js/themes/lightTheme/lightTheme.mjs.map +1 -0
  124. package/dist/js/themes/lightTheme/shadows.cjs +45 -0
  125. package/dist/js/themes/lightTheme/shadows.cjs.map +1 -0
  126. package/dist/js/themes/lightTheme/shadows.d.cts +3 -0
  127. package/dist/js/themes/lightTheme/shadows.d.cts.map +1 -0
  128. package/dist/js/themes/lightTheme/shadows.d.mts +3 -0
  129. package/dist/js/themes/lightTheme/shadows.d.mts.map +1 -0
  130. package/dist/js/themes/lightTheme/shadows.mjs +42 -0
  131. package/dist/js/themes/lightTheme/shadows.mjs.map +1 -0
  132. package/dist/js/themes/types.cjs +3 -0
  133. package/dist/js/themes/types.cjs.map +1 -0
  134. package/dist/js/themes/types.d.cts +156 -0
  135. package/dist/js/themes/types.d.cts.map +1 -0
  136. package/dist/js/themes/types.d.mts +156 -0
  137. package/dist/js/themes/types.d.mts.map +1 -0
  138. package/dist/js/themes/types.mjs +2 -0
  139. package/dist/js/themes/types.mjs.map +1 -0
  140. package/dist/js/typography/fontFamilies.cjs +7 -0
  141. package/dist/js/typography/fontFamilies.cjs.map +1 -0
  142. package/dist/js/typography/fontFamilies.d.cts +4 -0
  143. package/dist/js/typography/fontFamilies.d.cts.map +1 -0
  144. package/dist/js/typography/fontFamilies.d.mts +4 -0
  145. package/dist/js/typography/fontFamilies.d.mts.map +1 -0
  146. package/dist/js/typography/fontFamilies.mjs +4 -0
  147. package/dist/js/typography/fontFamilies.mjs.map +1 -0
  148. package/dist/js/typography/fontSizes.cjs +14 -0
  149. package/dist/js/typography/fontSizes.cjs.map +1 -0
  150. package/dist/js/typography/fontSizes.d.cts +11 -0
  151. package/dist/js/typography/fontSizes.d.cts.map +1 -0
  152. package/dist/js/typography/fontSizes.d.mts +11 -0
  153. package/dist/js/typography/fontSizes.d.mts.map +1 -0
  154. package/dist/js/typography/fontSizes.mjs +11 -0
  155. package/dist/js/typography/fontSizes.mjs.map +1 -0
  156. package/dist/js/typography/fontWeights.cjs +9 -0
  157. package/dist/js/typography/fontWeights.cjs.map +1 -0
  158. package/dist/js/typography/fontWeights.d.cts +6 -0
  159. package/dist/js/typography/fontWeights.d.cts.map +1 -0
  160. package/dist/js/typography/fontWeights.d.mts +6 -0
  161. package/dist/js/typography/fontWeights.d.mts.map +1 -0
  162. package/dist/js/typography/fontWeights.mjs +6 -0
  163. package/dist/js/typography/fontWeights.mjs.map +1 -0
  164. package/dist/js/typography/index.cjs +6 -0
  165. package/dist/js/typography/index.cjs.map +1 -0
  166. package/dist/js/typography/index.d.cts +3 -0
  167. package/dist/js/typography/index.d.cts.map +1 -0
  168. package/dist/js/typography/index.d.mts +3 -0
  169. package/dist/js/typography/index.d.mts.map +1 -0
  170. package/dist/js/typography/index.mjs +2 -0
  171. package/dist/js/typography/index.mjs.map +1 -0
  172. package/dist/js/typography/letterSpacing.cjs +8 -0
  173. package/dist/js/typography/letterSpacing.cjs.map +1 -0
  174. package/dist/js/typography/letterSpacing.d.cts +5 -0
  175. package/dist/js/typography/letterSpacing.d.cts.map +1 -0
  176. package/dist/js/typography/letterSpacing.d.mts +5 -0
  177. package/dist/js/typography/letterSpacing.d.mts.map +1 -0
  178. package/dist/js/typography/letterSpacing.mjs +5 -0
  179. package/dist/js/typography/letterSpacing.mjs.map +1 -0
  180. package/dist/js/typography/lineHeights.cjs +13 -0
  181. package/dist/js/typography/lineHeights.cjs.map +1 -0
  182. package/dist/js/typography/lineHeights.d.cts +10 -0
  183. package/dist/js/typography/lineHeights.d.cts.map +1 -0
  184. package/dist/js/typography/lineHeights.d.mts +10 -0
  185. package/dist/js/typography/lineHeights.d.mts.map +1 -0
  186. package/dist/js/typography/lineHeights.mjs +10 -0
  187. package/dist/js/typography/lineHeights.mjs.map +1 -0
  188. package/dist/js/typography/types.cjs +3 -0
  189. package/dist/js/typography/types.cjs.map +1 -0
  190. package/dist/js/typography/types.d.cts +39 -0
  191. package/dist/js/typography/types.d.cts.map +1 -0
  192. package/dist/js/typography/types.d.mts +39 -0
  193. package/dist/js/typography/types.d.mts.map +1 -0
  194. package/dist/js/typography/types.mjs +2 -0
  195. package/dist/js/typography/types.mjs.map +1 -0
  196. package/dist/js/typography/typography.cjs +216 -0
  197. package/dist/js/typography/typography.cjs.map +1 -0
  198. package/dist/js/typography/typography.d.cts +3 -0
  199. package/dist/js/typography/typography.d.cts.map +1 -0
  200. package/dist/js/typography/typography.d.mts +3 -0
  201. package/dist/js/typography/typography.d.mts.map +1 -0
  202. package/dist/js/typography/typography.mjs +213 -0
  203. package/dist/js/typography/typography.mjs.map +1 -0
  204. package/dist/styles.css +1 -0
  205. package/package.json +71 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,353 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+
12
+ - Migrate `@metamask/design-tokens` into the design system monorepo ([128](https://github.com/MetaMask/metamask-design-system/pull/128))
13
+
14
+ ## [4.1.0]
15
+
16
+ ### Added
17
+
18
+ - Adding (MIT OR Apache 2.0) license aligning with MetaMask’s open-source standards ([#738](https://github.com/MetaMask/design-tokens/pull/738))
19
+ - Adding dark/light classname ([#729](https://github.com/MetaMask/design-tokens/pull/729))
20
+
21
+ ## [4.0.0]
22
+
23
+ ### Changed
24
+
25
+ - chore: updated js variables based on updated json ([#709](https://github.com/MetaMask/design-tokens/pull/709))
26
+ - chore: updated css variables based on updated json ([#708](https://github.com/MetaMask/design-tokens/pull/708))
27
+ - chore: adding overlay.inverse colors to json ([#715](https://github.com/MetaMask/design-tokens/pull/715))
28
+ - chore: upgrading storybook to 8.1.4 ([#703](https://github.com/MetaMask/design-tokens/pull/703))
29
+ - chore: updating doc components and helpers ([#706](https://github.com/MetaMask/design-tokens/pull/706))
30
+ - fix: updating brand color figma json ([#702](https://github.com/MetaMask/design-tokens/pull/702))
31
+
32
+ ## [3.0.0]
33
+
34
+ ### Added
35
+
36
+ - Enabled MetaMask security code scanner ([#635](https://github.com/MetaMask/design-tokens/pull/635)).
37
+ - Added initial JSON generated from Figma ([#665](https://github.com/MetaMask/design-tokens/pull/665)).
38
+
39
+ ### Changed
40
+
41
+ - Refactored color swatch component and CSS stories to use CSS variables instead of hex values ([#696](https://github.com/MetaMask/design-tokens/pull/696)).
42
+ - Upgraded Storybook to 8.1.2 ([#690](https://github.com/MetaMask/design-tokens/pull/690)).
43
+ - Updated README to add tooling section that links to eslint-plugin ([#689](https://github.com/MetaMask/design-tokens/pull/689)).
44
+ - Cleaned JSON token names ([#679](https://github.com/MetaMask/design-tokens/pull/679)).
45
+ - Refactored CSS and improved build to adhere to workspace conventions ([#676](https://github.com/MetaMask/design-tokens/pull/676)).
46
+ - Upgraded Storybook to version 8 ([#674](https://github.com/MetaMask/design-tokens/pull/674)).
47
+ - Added initial JSON generated from Figma variables ([#673](https://github.com/MetaMask/design-tokens/pull/673)).
48
+ - Upgraded LavaMoat ([#670](https://github.com/MetaMask/design-tokens/pull/670)).
49
+ - Aligned release docs with the latest standards ([#634](https://github.com/MetaMask/design-tokens/pull/634)).
50
+
51
+ ### Fixed
52
+
53
+ - Fixed CSS theme variables doc display ([#672](https://github.com/MetaMask/design-tokens/pull/672)).
54
+ - Fixed build to align with module template ([#667](https://github.com/MetaMask/design-tokens/pull/667)).
55
+
56
+ ### Security
57
+
58
+ - Bumped `webpack-dev-middleware` from 6.1.1 to 6.1.2 ([#636](https://github.com/MetaMask/design-tokens/pull/636)).
59
+ - Bumped `express` from 4.18.2 to 4.19.2 ([#638](https://github.com/MetaMask/design-tokens/pull/638)).
60
+ - Bumped `tar` from 6.2.0 to 6.2.1 ([#652](https://github.com/MetaMask/design-tokens/pull/652)).
61
+
62
+ ## [2.1.1]
63
+
64
+ ### Changed
65
+
66
+ - fix: move data attribute to light theme variables ([#631](https://github.com/MetaMask/design-tokens/pull/631))
67
+ - Bump ip from 2.0.0 to 2.0.1 ([#630](https://github.com/MetaMask/design-tokens/pull/630))
68
+
69
+ ## [2.1.0]
70
+
71
+ ### Changed
72
+
73
+ - feat: adding data theme light attribute to stylesheet to provide dynamic theming ([#627](https://github.com/MetaMask/design-tokens/pull/627))
74
+
75
+ ## [2.0.3]
76
+
77
+ ### Changed
78
+
79
+ - chore: updating package.json css path ([#622](https://github.com/MetaMask/design-tokens/pull/622))
80
+
81
+ ## [2.0.2]
82
+
83
+ ### Changed
84
+
85
+ - bug: fix css exports ([#614](https://github.com/MetaMask/design-tokens/pull/614))
86
+
87
+ ## [2.0.1]
88
+
89
+ ### Changed
90
+
91
+ - chore: updating package.json and contraints.prop config to allow for css export ([#609](https://github.com/MetaMask/design-tokens/pull/609))
92
+
93
+ ## [2.0.0]
94
+
95
+ ### Changed
96
+
97
+ - Dependencies upgrade and module template sync ([#601](https://github.com/MetaMask/design-tokens/pull/601))
98
+
99
+ ## [1.13.0]
100
+
101
+ ### Changed
102
+
103
+ - Adding CSS and JS token display in storybook ([#594](https://github.com/MetaMask/design-tokens/pull/594))
104
+ - Refactoring the brand color object ([#585](https://github.com/MetaMask/design-tokens/pull/585))
105
+ - Added sets of hover& pressed tokens. Also updated warning/success/inverses ([#586](https://github.com/MetaMask/design-tokens/pull/586))
106
+ - Updating documentation ([#593](https://github.com/MetaMask/design-tokens/pull/593))
107
+ - Upgrading storybook from 7.5 to 7.6 ([#592](https://github.com/MetaMask/design-tokens/pull/592))
108
+ - Revert "Adding brand colors to CSSinJS exports" ([#589](https://github.com/MetaMask/design-tokens/pull/589))
109
+ - Enhancements to CircleCI Script and Storybook Build ([#583](https://github.com/MetaMask/design-tokens/pull/583))
110
+ - Adding brand colors to CSSinJS exports ([#582](https://github.com/MetaMask/design-tokens/pull/582))
111
+ - devDeps: storybook v7 ([#538](https://github.com/MetaMask/design-tokens/pull/538))
112
+ - ci: fix build-test workflow ([#539](https://github.com/MetaMask/design-tokens/pull/539))
113
+ - Bump @metamask/auto-changelog from 3.4.3 to 3.4.4 ([#571](https://github.com/MetaMask/design-tokens/pull/571))
114
+ - bump webpack@4, webpack@5 ([#536](https://github.com/MetaMask/design-tokens/pull/536))
115
+ - ci: remove broken require-additional-reviewer workflow ([#537](https://github.com/MetaMask/design-tokens/pull/537))
116
+ - Bump @metamask/auto-changelog from 3.4.2 to 3.4.3 ([#544](https://github.com/MetaMask/design-tokens/pull/544))
117
+ - Bump @metamask/auto-changelog from 3.4.1 to 3.4.2 ([#542](https://github.com/MetaMask/design-tokens/pull/542))
118
+ - Bump @metamask/auto-changelog from 3.3.0 to 3.4.1 ([#541](https://github.com/MetaMask/design-tokens/pull/541))
119
+ - Bump decode-uri-component from 0.2.0 to 0.2.2 ([#535](https://github.com/MetaMask/design-tokens/pull/535))
120
+ - Bump loader-utils from 1.4.0 to 1.4.2 ([#533](https://github.com/MetaMask/design-tokens/pull/533))
121
+ - Bump json5 from 1.0.1 to 1.0.2 ([#534](https://github.com/MetaMask/design-tokens/pull/534))
122
+ - Bump @babel/traverse from 7.18.11 to 7.23.2 ([#532](https://github.com/MetaMask/design-tokens/pull/532))
123
+ - Bump @metamask/auto-changelog from 3.2.0 to 3.3.0 ([#516](https://github.com/MetaMask/design-tokens/pull/516))
124
+ - Bump @metamask/auto-changelog from 3.1.0 to 3.2.0 ([#497](https://github.com/MetaMask/design-tokens/pull/497))
125
+ - Bump @metamask/auto-changelog from 2.6.1 to 3.1.0 ([#248](https://github.com/MetaMask/design-tokens/pull/248))
126
+
127
+ ## [1.12.0]
128
+
129
+ ### Changed
130
+
131
+ - Hover & Pressed color updates ([#487](https://github.com/MetaMask/design-tokens/pull/487))
132
+ - Add body medium font weight ([#486](https://github.com/MetaMask/design-tokens/pull/486))
133
+
134
+ ## [1.11.1]
135
+
136
+ ### Changed
137
+
138
+ - Updating primary, error and info colors to meet AA accessibility standards for light mode ([#255](https://github.com/MetaMask/design-tokens/pull/255))
139
+ - Adding storybook a11y plugin ([#258](https://github.com/MetaMask/design-tokens/pull/258))
140
+
141
+ ## [1.11.0]
142
+
143
+ ### Changed
144
+
145
+ - added sepolia test network colors ([#243](https://github.com/MetaMask/design-tokens/pull/243))
146
+ - rename action ([#239](https://github.com/MetaMask/design-tokens/pull/239))
147
+
148
+ ## [1.10.0]
149
+
150
+ ### Changed
151
+
152
+ - Updating descriptions and deprecated tags ([#235](https://github.com/MetaMask/design-tokens/pull/235))
153
+ - Adding test network and flask color tokens ([#223](https://github.com/MetaMask/design-tokens/pull/223))
154
+ - Hover and pressed color tokens ([#233](https://github.com/MetaMask/design-tokens/pull/233))
155
+ - 230 revert to old storybook build and update main branch storybook de… ([#231](https://github.com/MetaMask/design-tokens/pull/231))
156
+ - Feat/196/fix gh pages font ([#228](https://github.com/MetaMask/design-tokens/pull/228))
157
+
158
+ ## [1.9.1]
159
+
160
+ ### Changed
161
+
162
+ - 196: update gh pages storybook build ([#226](https://github.com/MetaMask/design-tokens/pull/226))
163
+ - DS-214: add fonts and font awesome to docs ([#217](https://github.com/MetaMask/design-tokens/pull/217))
164
+ - Also attempting to fix font for Github pages build of storybook with this release
165
+
166
+ ## [1.9.0]
167
+
168
+ ### Changed
169
+
170
+ - 210: update typography line height tokens to be REM based ([#211](https://github.com/MetaMask/design-tokens/pull/211))
171
+ - Upgrading storybook to 6.5 ([#212](https://github.com/MetaMask/design-tokens/pull/212))
172
+ - Replaced Heading-SM-Regular by Body-LG-Medium ([#194](https://github.com/MetaMask/design-tokens/pull/194))
173
+ - Updated Light Theme Shadows to match Storybook ([#195](https://github.com/MetaMask/design-tokens/pull/195))
174
+
175
+ ## [1.8.0]
176
+
177
+ ### Changed
178
+
179
+ - Adding shadows to design tokens ([#137](https://github.com/MetaMask/design-tokens/pull/137))
180
+ - Bump @metamask/auto-changelog from 2.6.0 to 2.6.1 ([#178](https://github.com/MetaMask/design-tokens/pull/178))
181
+
182
+ ## [1.7.0]
183
+
184
+ ### Changed
185
+
186
+ - Adding themes to token architecture for CSS-in-JS ([#148](https://github.com/MetaMask/design-tokens/pull/148))
187
+ - Fix for readme badge to show correct version ([#163](https://github.com/MetaMask/design-tokens/pull/163))
188
+ - Updating readme with npm and storybook badges ([#150](https://github.com/MetaMask/design-tokens/pull/150))
189
+ - Updating typography tests and some token json ([#147](https://github.com/MetaMask/design-tokens/pull/147))
190
+ - Fixing wrong token mappings & Naming Typo for Typography ([#144](https://github.com/MetaMask/design-tokens/pull/144))
191
+ - Bump @metamask/auto-changelog from 2.5.0 to 2.6.0 ([#142](https://github.com/MetaMask/design-tokens/pull/142))
192
+
193
+ ## [1.6.5]
194
+
195
+ ### Changed
196
+
197
+ - Update readme ([#120](https://github.com/MetaMask/design-tokens/pull/120))
198
+ - [FIX] Update js font weight to string ([#127](https://github.com/MetaMask/design-tokens/pull/127))
199
+
200
+ ## [1.6.4]
201
+
202
+ ### Changed
203
+
204
+ - Setting storybook folder to root for gh-pages ([#133](https://github.com/MetaMask/design-tokens/pull/133))
205
+
206
+ ## [1.6.3]
207
+
208
+ ### Changed
209
+
210
+ - Adding homepage to package.json for gh pages ([#131](https://github.com/MetaMask/design-tokens/pull/131))
211
+
212
+ ## [1.6.2]
213
+
214
+ ### Changed
215
+
216
+ - Adding yarn setup to gh pages action ([#129](https://github.com/MetaMask/design-tokens/pull/129))
217
+
218
+ ## [1.6.1]
219
+
220
+ ### Changed
221
+
222
+ - Adding storybook pages to publish release action ([#121](https://github.com/MetaMask/design-tokens/pull/121))
223
+ - Fixing some case mistakes in figma token json ([#123](https://github.com/MetaMask/design-tokens/pull/123))
224
+
225
+ ## [1.6.0]
226
+
227
+ ### Changed
228
+
229
+ - Adding initial typography tokens ([#94](https://github.com/MetaMask/design-tokens/pull/94))
230
+ - Adding Circle CI and storybook builds for PRs ([#105](https://github.com/MetaMask/design-tokens/pull/105))
231
+ - CSS in JS description update ([#104](https://github.com/MetaMask/design-tokens/pull/104))
232
+ - Adding icon alternative ([#102](https://github.com/MetaMask/design-tokens/pull/102))
233
+ - updated warning.default to #DA8301 ([#99](https://github.com/MetaMask/design-tokens/pull/99))
234
+ - Updated Light Theme Color Token descriptions to the latest ([#86](https://github.com/MetaMask/design-tokens/pull/86))
235
+ - Updating icon/default and text/alternative colors ([#90](https://github.com/MetaMask/design-tokens/pull/90))
236
+
237
+ ## [1.5.1]
238
+
239
+ ### Changed
240
+
241
+ - Fixing descriptions for dark theme overlays ([#79](https://github.com/MetaMask/design-tokens/pull/79))
242
+
243
+ ## [1.5.0]
244
+
245
+ ### Changed
246
+
247
+ - Updating dark theme background and overlay colors ([#72](https://github.com/MetaMask/design-tokens/pull/72))
248
+ - background default and background alternative values swapped
249
+ - overlays changed to dark for both light and dark themes
250
+
251
+ ## [1.4.4]
252
+
253
+ ### Changed
254
+
255
+ - Add types and documentation to DS code library ([#61](https://github.com/MetaMask/design-tokens/pull/61))
256
+
257
+ ## [1.4.3]
258
+
259
+ ### Changed
260
+
261
+ - Fixing secondary default color for CSS in JS ([#57](https://github.com/MetaMask/design-tokens/pull/57))
262
+
263
+ ## [1.4.2]
264
+
265
+ ### Changed
266
+
267
+ - Fix overlays, muted and disabled alpha channel ([#48](https://github.com/MetaMask/design-tokens/pull/48))
268
+
269
+ ## [1.4.1]
270
+
271
+ ### Changed
272
+
273
+ - Bump overlay alternative from 75% opacity to 80% ([#46](https://github.com/MetaMask/design-tokens/pull/46))
274
+
275
+ ## [1.4.0]
276
+
277
+ ### Added
278
+
279
+ - Add overlay alternative color for light and dark themes ([#40](https://github.com/MetaMask/design-tokens/pull/40))
280
+ - Updating dark theme overlay.inverse to grey800: #24272A
281
+
282
+ ## [1.3.1]
283
+
284
+ ### Changed
285
+
286
+ - Token update generate library code ([#39](https://github.com/MetaMask/design-tokens/pull/39))
287
+ - Changing hsla to HEX with alpha values. Updating Hex values and documentation.
288
+
289
+ ## [1.3.0]
290
+
291
+ ### Changed
292
+
293
+ - Changing theme class to data attribute ([#30](https://github.com/MetaMask/design-tokens/pull/30))
294
+
295
+ ## [1.2.0]
296
+
297
+ ### Changed
298
+
299
+ - token updates ([#22](https://github.com/MetaMask/design-tokens/pull/22))
300
+ - Adding storybook and design token documentation ([#19](https://github.com/MetaMask/design-tokens/pull/19))
301
+
302
+ ## [1.1.0]
303
+
304
+ ### Changed
305
+
306
+ - Adding css stylesheet containg color design tokens ([#17](https://github.com/MetaMask/design-tokens/pull/17))
307
+ - Add issue template ([#20](https://github.com/MetaMask/design-tokens/pull/20))
308
+
309
+ ## [1.0.0]
310
+
311
+ ### Changed
312
+
313
+ - Initial release.
314
+
315
+ - Initial release.
316
+
317
+ [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@4.1.0...HEAD
318
+ [4.1.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@4.0.0...@metamask/design-tokens@4.1.0
319
+ [4.0.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@3.0.0...@metamask/design-tokens@4.0.0
320
+ [3.0.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@2.1.1...@metamask/design-tokens@3.0.0
321
+ [2.1.1]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@2.1.0...@metamask/design-tokens@2.1.1
322
+ [2.1.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@2.0.3...@metamask/design-tokens@2.1.0
323
+ [2.0.3]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@2.0.2...@metamask/design-tokens@2.0.3
324
+ [2.0.2]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@2.0.1...@metamask/design-tokens@2.0.2
325
+ [2.0.1]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@2.0.0...@metamask/design-tokens@2.0.1
326
+ [2.0.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.13.0...@metamask/design-tokens@2.0.0
327
+ [1.13.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.12.0...@metamask/design-tokens@1.13.0
328
+ [1.12.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.11.1...@metamask/design-tokens@1.12.0
329
+ [1.11.1]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.11.0...@metamask/design-tokens@1.11.1
330
+ [1.11.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.10.0...@metamask/design-tokens@1.11.0
331
+ [1.10.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.9.1...@metamask/design-tokens@1.10.0
332
+ [1.9.1]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.9.0...@metamask/design-tokens@1.9.1
333
+ [1.9.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.8.0...@metamask/design-tokens@1.9.0
334
+ [1.8.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.7.0...@metamask/design-tokens@1.8.0
335
+ [1.7.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.6.5...@metamask/design-tokens@1.7.0
336
+ [1.6.5]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.6.4...@metamask/design-tokens@1.6.5
337
+ [1.6.4]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.6.3...@metamask/design-tokens@1.6.4
338
+ [1.6.3]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.6.2...@metamask/design-tokens@1.6.3
339
+ [1.6.2]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.6.1...@metamask/design-tokens@1.6.2
340
+ [1.6.1]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.6.0...@metamask/design-tokens@1.6.1
341
+ [1.6.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.5.1...@metamask/design-tokens@1.6.0
342
+ [1.5.1]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.5.0...@metamask/design-tokens@1.5.1
343
+ [1.5.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.4.4...@metamask/design-tokens@1.5.0
344
+ [1.4.4]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.4.3...@metamask/design-tokens@1.4.4
345
+ [1.4.3]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.4.2...@metamask/design-tokens@1.4.3
346
+ [1.4.2]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.4.1...@metamask/design-tokens@1.4.2
347
+ [1.4.1]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.4.0...@metamask/design-tokens@1.4.1
348
+ [1.4.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.3.1...@metamask/design-tokens@1.4.0
349
+ [1.3.1]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.3.0...@metamask/design-tokens@1.3.1
350
+ [1.3.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.2.0...@metamask/design-tokens@1.3.0
351
+ [1.2.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.1.0...@metamask/design-tokens@1.2.0
352
+ [1.1.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-tokens@1.0.0...@metamask/design-tokens@1.1.0
353
+ [1.0.0]: https://github.com/MetaMask/metamask-design-system/releases/tag/@metamask/design-tokens@1.0.0
package/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 MetaMask
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
package/README.md ADDED
@@ -0,0 +1,103 @@
1
+ # `@metamask/design-tokens`
2
+
3
+ A collection of design tokens based on MetaMask's design system.
4
+
5
+ ## Installation
6
+
7
+ `yarn add @metamask/design-tokens`
8
+
9
+ or
10
+
11
+ `npm install @metamask/design-tokens`
12
+
13
+ ## Usage
14
+
15
+ Currently the metamask design tokens repo supports 2 formats, CSS-in-JS and CSS variables. These formats are based on its primary consumers [metamask-mobile](https://github.com/MetaMask/metamask-mobile), [metamask-extension](https://github.com/MetaMask/metamask-extension) and [metamask-portfolio](https://github.com/consensys-vertical-apps/metamask-portfolio) .
16
+
17
+ ### CSS Variables
18
+
19
+ 1. Import the design tokens stylesheet into your CSS or SCSS.
20
+
21
+ > _Please note the file path will depend on where in your project you are importing it from._
22
+
23
+ ```css
24
+ @import '@metamask/design-tokens/styles';
25
+ ```
26
+
27
+ 2. Use design token CSS variables in the code.
28
+
29
+ ```css
30
+ /* In CSS/SCSS */
31
+ .card {
32
+ --card-color-text: var(--color-text-default);
33
+ --card-color-background: var(--color-background-default);
34
+ --card-color-border: var(--color-border-muted);
35
+
36
+ background-color: var(--card-color-background);
37
+ color: var(--card-color-text);
38
+ border: 1px solid var(--card-color-border);
39
+ }
40
+ ```
41
+
42
+ ```js
43
+ // They also work for inline styles in javascript
44
+ <div style={{ color: 'var(--color-error-default)' }}>This was is an error</div>
45
+ ```
46
+
47
+ ### CSS-in-JS
48
+
49
+ 1. Use design tokens in code by importing from library:
50
+
51
+ ```js
52
+ import { lightTheme, darkTheme } from '@metamask/design-tokens';
53
+
54
+ // Create provider that swaps theme (pseudo code)
55
+ <ThemeProvider theme={theme === 'default' ? lightTheme : darkTheme} />;
56
+
57
+ const createStyles = (theme) =>
58
+ StyleSheet.create({
59
+ modalContainer: {
60
+ backgroundColor: theme.colors.background.default,
61
+ borderColor: theme.colors.border.default,
62
+ },
63
+ });
64
+ ```
65
+
66
+ ## Tooling
67
+
68
+ To prevent color tech debt and ensure themability, accessibility, and consistency of the MetaMask brand, we recommend using [@metamask/eslint-plugin-design-tokens](https://github.com/MetaMask/eslint-plugin-design-tokens). This ESLint plugin helps enforce the usage of design tokens in your codebase.
69
+
70
+ You'll first need to install [ESLint](https://eslint.org):
71
+
72
+ ```shell
73
+ $ npm install --save-dev eslint
74
+ # or
75
+ $ yarn add --dev eslint
76
+ ```
77
+
78
+ Next, install `@metamask/eslint-plugin-design-tokens`:
79
+
80
+ ```shell
81
+ $ npm install --save-dev @metamask/eslint-plugin-design-tokens
82
+ # or
83
+ $ yarn add --dev @metamask/eslint-plugin-design-tokens
84
+ ```
85
+
86
+ ### Configuration
87
+
88
+ Add `eslint-plugin-design-tokens` to your ESLint configuration:
89
+
90
+ ```json
91
+ {
92
+ "plugins": ["@metamask/design-tokens"],
93
+ "rules": {
94
+ "@metamask/design-tokens/color-no-hex": "warn"
95
+ }
96
+ }
97
+ ```
98
+
99
+ This configuration will enforce the usage of design tokens instead of static hex color values, helping to maintain a consistent design system. See more [supported rules](https://github.com/MetaMask/eslint-plugin-design-tokens?tab=readme-ov-file#supported-rules)
100
+
101
+ ## Contributing
102
+
103
+ This package is part of a monorepo. Instructions for contributing can be found in the [monorepo README](https://github.com/MetaMask/metamask-design-system#readme).
package/dist/index.cjs ADDED
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.brandColor = exports.darkTheme = exports.lightTheme = exports.typography = exports.colors = void 0;
4
+ var js_1 = require("./js/index.cjs");
5
+ Object.defineProperty(exports, "colors", { enumerable: true, get: function () { return js_1.colors; } });
6
+ Object.defineProperty(exports, "typography", { enumerable: true, get: function () { return js_1.typography; } });
7
+ Object.defineProperty(exports, "lightTheme", { enumerable: true, get: function () { return js_1.lightTheme; } });
8
+ Object.defineProperty(exports, "darkTheme", { enumerable: true, get: function () { return js_1.darkTheme; } });
9
+ Object.defineProperty(exports, "brandColor", { enumerable: true, get: function () { return js_1.brandColor; } });
10
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,qCAA6E;AAApE,4FAAA,MAAM,OAAA;AAAE,gGAAA,UAAU,OAAA;AAAE,gGAAA,UAAU,OAAA;AAAE,+FAAA,SAAS,OAAA;AAAE,gGAAA,UAAU,OAAA","sourcesContent":["export type { Theme } from './js';\nexport { colors, typography, lightTheme, darkTheme, brandColor } from './js';\n"]}
@@ -0,0 +1,3 @@
1
+ export type { Theme } from "./js/index.cjs";
2
+ export { colors, typography, lightTheme, darkTheme, brandColor } from "./js/index.cjs";
3
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,EAAE,uBAAa;AAClC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,uBAAa"}
@@ -0,0 +1,3 @@
1
+ export type { Theme } from "./js/index.mjs";
2
+ export { colors, typography, lightTheme, darkTheme, brandColor } from "./js/index.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,EAAE,uBAAa;AAClC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,uBAAa"}
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ export { colors, typography, lightTheme, darkTheme, brandColor } from "./js/index.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,uBAAa","sourcesContent":["export type { Theme } from './js';\nexport { colors, typography, lightTheme, darkTheme, brandColor } from './js';\n"]}