Skip to content

Commit

Permalink
Merge branch 'main' into fix-tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
Raisa Primerova committed Sep 9, 2024
2 parents 5fa0855 + 917872d commit a09aa74
Show file tree
Hide file tree
Showing 25 changed files with 582 additions and 256 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ _Canvas design token infrastructure_

This repository builds design tokens for various platforms and formats.

## Version Support

At this time, we only support the latest major version of our Canvas Tokens Web package. This means we will not provide patches or new features to previous major versions. If you need assistance with a previous version, please reach out to the team. We're happy to help.

If you find an issue and would like support, please follow [our guidelines](https://github.com/Workday/canvas-tokens/blob/main/CONTRIBUTING.md#creating-an-issue) to create an issue in our Contributing Guidelines doc.

## Contributing

Contributions are welcome! Please read our [Contributing Guidelines doc](CONTRIBUTING.md) to learn
Expand Down
7 changes: 7 additions & 0 deletions packages/canvas-tokens-docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @workday/canvas-tokens-docs

## 0.0.2

### Patch Changes

- Updated dependencies
- @workday/canvas-tokens-web@2.0.0

## 0.0.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/canvas-tokens-docs/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@workday/canvas-tokens-docs",
"version": "0.0.1",
"version": "0.0.2",
"description": "documentation for Canvas Tokens",
"author": "Workday, Inc. (https://www.workday.com)",
"license": "CC-BY-ND-4.0",
"dependencies": {
"@workday/canvas-tokens-web": "^1.0.0"
"@workday/canvas-tokens-web": "^2.0.0"
}
}
64 changes: 64 additions & 0 deletions packages/canvas-tokens-web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,69 @@
# @workday/canvas-tokens-web

## 2.0.1

### Patch Changes

- **Web Tokens**

- fix: Fix type file generation to export types instead of declarations
([#120](https://github.com/Workday/canvas-tokens/pull/120))
([@RayRedGoose](https://github.com/RayRedGoose)) Type generation has been updated to fix a type
issue happening for user who doesn't use `--skipLibCheck`. Now generated type files contains
types (`export declare const cinnamon100: "--cnvs-base-palette-cinnamon-100";`) instead of value
declarations
(`export declare const cinnamon100 = "--cnvs-base-palette-cinnamon-100" as const;`).

## 2.0.0

### Major Changes

- **Web Tokens**

- chore: Sync tokens and update SD config to handle new changes
([#115](https://github.com/Workday/canvas-tokens/pull/115))
([@alanbsmith](https://github.com/alanbsmith), [@RayRedGoose](https://github.com/RayRedGoose))
`⚠️ BREAKING CHANGES:`

- `color.bg.positive.soft` has been renamed to `color.bg.positive.softer` for consistency.
- Figma specific tokens: `typescale`, `level`, `shadow` has been excluded from base web tokens.
- Depth token values has been updated from the base token reference to raw value.

Other Changes:

- JSDoc has been updated to include the base token info

## 1.3.1

### Patch Changes

- **Documentation**

- docs: Add system color stories ([#102](https://github.com/Workday/canvas-tokens/pull/102))
([@alanbsmith](https://github.com/alanbsmith))

**Infrastructure**

- chore: Add workflow for project board
([#104](https://github.com/Workday/canvas-tokens/pull/104))
([@jaclynjessup](https://github.com/jaclynjessup))
- chore: Add Figma-only tokens to filter out
([#108](https://github.com/Workday/canvas-tokens/pull/108))
([@RayRedGoose](https://github.com/RayRedGoose)) Sync script has been updated by adding
Figma-only token to filter. This change will exclude Figma-only tokens from the web token json.
- chore: Update Style Dictionary transform
([#110](https://github.com/Workday/canvas-tokens/pull/110))
([@RayRedGoose](https://github.com/RayRedGoose)) Bug fixing of generating wrong value for colors
with alpha and replacing transparent colors by `transparent` value. New transforms has been
added to handle text values of `font-weight` and px values of `line-height`. Transforms for
`font-family` and `letter-spacing` have been updated to support different token types, transform
for `flatten-rgba` has been updated to handle spaces and percentage alpha.
- chore: Sync Tokens Studio config 🤖 ([#112](https://github.com/Workday/canvas-tokens/pull/112))
([@alanbsmith](https://github.com/alanbsmith), [@RayRedGoose](https://github.com/RayRedGoose))
Incorrect value of `sys.color.static.orange.default` token has been changed to the correct
`cantaloupe.400`. Token Studio structure has been updated for Figma only (types and
`font-weight`, `line-height` values changes).

## 1.3.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/canvas-tokens-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@workday/canvas-tokens-web",
"version": "1.3.0",
"version": "2.0.1",
"description": "Canvas design tokens for web",
"author": "Workday, Inc. (https://www.workday.com)",
"license": "CC-BY-ND-4.0",
Expand Down
11 changes: 7 additions & 4 deletions packages/canvas-tokens/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ const config = setConfig({
{
level: ['base'],
filterByLevel: true,
filter: filters.filterCodeTokens,
},
{
level: ['brand', 'sys'],
format: 'merge/refs',
combineWith: ['{platform}/composite', '{platform}/variables'],
combineWith: ['{platform}/composite', '{platform}/variables', '{platform}/shadow'],
options: {
outputReferences: true,
},
Expand All @@ -36,7 +37,7 @@ const config = setConfig({
'es6, common-js': {
buildPath: '../canvas-tokens-web/dist/',
transformGroup: 'js',
transforms: ['value/flatten-border', 'value/flatten-base-shadow', 'name/camel'],
transforms: ['value/flatten-border', 'value/shadow/flat-sys', 'name/camel'],
fileName: '{platform}/{level}/index',
extensions: ['js', 'd.ts'],
modifiers: [
Expand All @@ -45,12 +46,14 @@ const config = setConfig({
extensions: ['js'],
format: 'js/{platform}',
filterByLevel: true,
filter: filters.filterCodeTokens,
},
{
level: ['base'],
extensions: ['d.ts'],
format: 'ts/inline',
filterByLevel: true,
filter: filters.filterCodeTokens,
},
{
level: ['brand', 'sys'],
Expand Down Expand Up @@ -109,14 +112,14 @@ StyleDictionary.registerTransformGroup({
transforms: [
'name/cti/kebab',
'value/flatten-border',
'value/flatten-base-shadow',
'value/shadow/flat-sys',
'value/breakpoints/px',
'value/hex-to-rgba',
'value/wrapped-font-family',
'value/math',
'value/letter-spacing/px2rem',
'value/flatten-rgba',
'value/font-weight/lower-case',
'value/font-weight/numbers',
'value/line-height/px2rem',
],
});
Expand Down
Loading

0 comments on commit a09aa74

Please sign in to comment.