Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@linode/design-language-system
Advanced tools
yarn install
[!note] You can use
yarn storybook
to view all the tokens we have available
yarn generate
yarn storybook
You should see something like this output:
==============================================
Processing... 1 of 3
- theme: default
- Platform: web
web/js
✔︎ dist/tokens.es6.js
✔︎ dist/theme.es6.js
✔︎ dist/theme.d.ts
✔︎ dist/tokens.d.ts
web/scss
✔︎ dist/tokens.scss
web/css
✔︎ dist/tokens.css
End processing
==============================================
This should have created a build directory and it should look like this:
├── dist/
│ ├── dark
│ ├── ...
│ ├── highContrast
│ ├── ...
│ ├── index.d.ts
│ ├── index.js
│ ├── theme.d.ts
│ ├── theme.es6.js
│ ├── tokens.css
│ ├── tokens.d.js
│ ├── tokens.es6.js
│ ├── tokens.scss
If you open config/build.ts
you will see there is 1 platforms defined for web (however, we can build for android, compose, ios, and ios-swift). Each platform has a transformGroup, buildPath, and files. The buildPath and files of the platform should match up to the files what were built. The files built should look like these:
JS
// tokens.es6.js
export const TokenColorNeutrals5 = "#F7F7FA";
export const TokenColorNeutrals10 = "#EDEDF2";
export const TokenColorNeutrals20 = "#E5E5EA";
export const TokenColorNeutrals30 = "#D6D6DD";
export const TokenColorNeutrals40 = "#C2C2CA";
export const TokenColorNeutrals50 = "#A3A3AB";
export const TokenColorNeutrals60 = "#83838C";
export const TokenColorNeutrals70 = "#717178";
export const TokenColorNeutrals80 = "#5E5E65";
export const TokenColorNeutrals90 = "#4B4B51";
export const TokenColorNeutrals100 = "#3A3A3F";
JS Nested
export default {
Color: {
Neutrals: {
5: "#F7F7FA",
10: "#EDEDF2",
20: "#E5E5EA",
30: "#D6D6DD",
40: "#C2C2CA",
50: "#A3A3AB",
60: "#83838C",
70: "#717178",
80: "#5E5E65",
90: "#4B4B51",
100: "#3A3A3F"
},
}
}
SCSS
// tokens.scss
$token-color-neutrals-5: #F7F7FA;
$token-color-neutrals-10: #EDEDF2;
$token-color-neutrals-20: #E5E5EA;
$token-color-neutrals-30: #D6D6DD;
$token-color-neutrals-40: #C2C2CA;
$token-color-neutrals-50: #A3A3AB;
$token-color-neutrals-60: #83838C;
$token-color-neutrals-70: #717178;
$token-color-neutrals-80: #5E5E65;
$token-color-neutrals-90: #4B4B51;
$token-color-neutrals-100: #3A3A3F;
CSS
// tokens.css
--token-color-neutrals-5: #F7F7FA;
--token-color-neutrals-10: #EDEDF2;
--token-color-neutrals-20: #E5E5EA;
--token-color-neutrals-30: #D6D6DD;
--token-color-neutrals-40: #C2C2CA;
--token-color-neutrals-50: #A3A3AB;
--token-color-neutrals-60: #83838C;
--token-color-neutrals-70: #717178;
--token-color-neutrals-80: #5E5E65;
--token-color-neutrals-90: #4B4B51;
--token-color-neutrals-100: #3A3A3F;
This shows a few things happening:
source
attribute of config/build.ts
. This allows you to split up the token JSON files however you want.tokens/alias/light.json
the value {color.neutrals.white}
gets resolved properly.FAQs
```bash yarn install ```
The npm package @linode/design-language-system receives a total of 4,586 weekly downloads. As such, @linode/design-language-system popularity was classified as popular.
We found that @linode/design-language-system demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.