Skip to content

Commit

Permalink
feat: update tokens for better documentation (#8395)
Browse files Browse the repository at this point in the history
**Related Issue:** #8315

## Summary

This PR updates tokens to include a "calcite-schema" in each token's
attributes. This schema fully defines the token and it's role in the
design system. It also changes the Docs output to always stringify the
token value and fix the filePath to be relative to the tokens directory.
  • Loading branch information
alisonailea authored Dec 18, 2023
1 parent 766b5a2 commit ff19630
Show file tree
Hide file tree
Showing 28 changed files with 10,806 additions and 621 deletions.
3 changes: 1 addition & 2 deletions packages/calcite-design-tokens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"lint:json": "prettier --write \"**/*.json\" >/dev/null",
"lint:md": "markdownlint \"**/*.md\" --fix --dot --ignore-path ../../.gitignore && prettier --write \"**/*.md\" >/dev/null",
"lint:ts": "eslint --ext .ts,.tsx --fix . && prettier --write \"**/*.ts?(x)\" >/dev/null",
"lint": "concurrently npm:lint:*",
"test": "jest"
"lint": "concurrently npm:lint:*"
}
}
30 changes: 30 additions & 0 deletions packages/calcite-design-tokens/src/component/button.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"component": {
"button": {
"background": {
"type": "color",
"value": "{semantic.color.background.default}",
"attributes": {
"calcite-schema": {
"system": "calcite",
"tier": "component",
"domain": "",
"component": "button",
"pattern": "",
"element": "",
"category": "color",
"group": "",
"kind": "",
"appearance": "",
"property": "background",
"variant": "",
"state": "",
"scale": "",
"context": "",
"mode": ""
}
}
}
}
}
}
Loading

0 comments on commit ff19630

Please sign in to comment.