-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13b551c
commit 801fc1c
Showing
48 changed files
with
1,549 additions
and
6,042 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Merge | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
merge: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: Workday/canvas-kit-actions/install@v1 | ||
with: | ||
node_version: 18.x | ||
|
||
- name: Build Tokens | ||
run: yarn build:tokens | ||
|
||
# Build Storybook and extract component stories for Storybook aggregation. This will be used | ||
# for Chromatic rebaselining and publishing to GH Pages. | ||
- name: Build Storybook | ||
shell: bash | ||
run: | | ||
yarn build-storybook --quiet | ||
npx sb extract docs docs/stories.json | ||
- name: Publish Storybook | ||
if: steps.extract-branch.outputs.branch == 'master' | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages | ||
folder: docs | ||
|
||
## Create a Chromatic baseline auto-accepting changes. Chromatic changes are already accepted | ||
## in PRs, so we don't need to manually approve them here again. This new baseline will be | ||
## used for future PRs. New PRs may show extra Chromatic changes until the "Update Branch" | ||
## button is used in PRs which will pull this new baseline. | ||
- name: Update Chromatic Baseline | ||
uses: chromaui/action@main | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
projectToken: chpt_a9e354687a28e6e | ||
storybookBuildDir: docs | ||
exitOnceUploaded: true | ||
exitZeroOnChanges: true | ||
autoAcceptChanges: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{ | ||
"extends": "nx/presets/npm.json", | ||
"$schema": "./node_modules/nx/schemas/nx-schema.json", | ||
"tasksRunnerOptions": { | ||
"default": { | ||
"runner": "nx/tasks-runners/default", | ||
"options": { | ||
"cacheableOperations": ["build", "lint", "test", "e2e"] | ||
"cacheableOperations": ["build", "lint", "test", "e2e", "build-storybook"] | ||
} | ||
} | ||
} | ||
}, | ||
"extends": "nx/presets/npm.json", | ||
"$schema": "./node_modules/nx/schemas/nx-schema.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import type {StorybookConfig} from '@storybook/react-vite'; | ||
|
||
import {nxViteTsPaths} from '@nx/vite/plugins/nx-tsconfig-paths.plugin'; | ||
import {mergeConfig} from 'vite'; | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../**/*.stories.@(mdx|tsx)', '../stories/*.mdx'], | ||
addons: ['@storybook/addon-essentials'], | ||
framework: { | ||
name: '@storybook/react-vite', | ||
options: {}, | ||
}, | ||
|
||
viteFinal: async config => | ||
mergeConfig(config, { | ||
plugins: [nxViteTsPaths()], | ||
}), | ||
}; | ||
|
||
export default config; | ||
|
||
// To customize your Vite configuration you can use the viteFinal field. | ||
// Check https://storybook.js.org/docs/react/builders/vite#configuration | ||
// and https://nx.dev/packages/storybook/documents/custom-builder-configs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<script> | ||
document.title = 'Canvas Tokens Storybook'; | ||
</script> | ||
|
||
<style type="text/css"> | ||
.sb-unstyled h1,h2,h3,h3,h5,h6,p { | ||
box-sizing: border-box; | ||
font-family: Roboto; | ||
} | ||
</style> | ||
|
||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&family=Roboto+Mono&family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet"> | ||
|
||
<style> | ||
@font-face { | ||
font-family: 'Roboto'; | ||
font-style: normal; | ||
font-weight: 300; | ||
src: local('Roboto Light'), local('Roboto-Light'), url(Roboto-Light.ttf) format('truetype'); | ||
} | ||
|
||
@font-face { | ||
font-family: 'Roboto'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: local('Roboto Regular'), local('Roboto-Regular'), | ||
url(Roboto-Regular.ttf) format('truetype'); | ||
} | ||
|
||
@font-face { | ||
font-family: 'Roboto'; | ||
font-style: normal; | ||
font-weight: 500; | ||
src: local('Roboto Medium'), local('Roboto-Medium'), url(Roboto-Medium.ttf) format('truetype'); | ||
} | ||
|
||
@font-face { | ||
font-family: 'Roboto'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: local('Roboto Bold'), local('Roboto-Bold'), url(Roboto-Bold.ttf) format('truetype'); | ||
} | ||
|
||
@font-face { | ||
font-family: 'Roboto Mono'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: local('Roboto Mono'), local('RobotoMono-Regular'), | ||
url(RobotoMono-Regular.ttf) format('truetype'); | ||
} | ||
|
||
@font-face { | ||
font-family: 'Noto Sans'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: local('Noto Sans'), local('NotoSans-Regular'), | ||
url(NotoSans-Regular.ttf) format('truetype'); | ||
} | ||
</style> | ||
|
||
<style> | ||
pre { | ||
font-family: 'Roboto Mono'; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {Preview} from '@storybook/react'; | ||
import '@workday/canvas-tokens-web/dist/css/base/_variables.css'; | ||
import '@workday/canvas-tokens-web/dist/css/brand/_variables.css'; | ||
import '@workday/canvas-tokens-web/dist/css/system/_variables.css'; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
chromatic: {disableSnapshot: false}, | ||
options: { | ||
storySort: { | ||
order: ['Docs', ['Getting Started'], 'Visual Tests'], | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"composite": true, | ||
"outDir": "" | ||
}, | ||
"files": [ | ||
"../../../node_modules/@nx/react/typings/styled-jsx.d.ts", | ||
"../../../node_modules/@nx/react/typings/cssmodule.d.ts", | ||
"../../../node_modules/@nx/react/typings/image.d.ts" | ||
], | ||
"exclude": ["../**/*.spec.ts", "../**/*.spec.js", "../**/*.spec.tsx", "../**/*.spec.jsx"], | ||
"include": [ | ||
"../src/**/*.stories.ts", | ||
"../src/**/*.stories.js", | ||
"../src/**/*.stories.jsx", | ||
"../src/**/*.stories.tsx", | ||
"../src/**/*.stories.mdx", | ||
"*.ts", | ||
"*.tsx", | ||
"*.js" | ||
] | ||
} |
Oops, something went wrong.