-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a major refactor. We're upgrading to Storybook v7, switching from Webpack to Vite, and dropping Gulp as a build tool in favor of simple npm scripts. There should be no real changes in the output, aside from dropping some no-longer-needed vendor prefixes since we no longer include Autoprefixer in our PostCSS config.
- Loading branch information
1 parent
ed566a6
commit 9edff6b
Showing
181 changed files
with
6,264 additions
and
12,703 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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
/dist | ||
/src/compiled | ||
/storybook-static | ||
!.storybook | ||
dist | ||
storybook-static | ||
src/compiled | ||
.temp | ||
*.html |
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 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
node: true, | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:react/recommended', // needed to help it understand jsx syntax | ||
'plugin:mdx/recommended', | ||
'plugin:storybook/recommended', | ||
'prettier', | ||
], | ||
settings: { | ||
react: { | ||
version: 'detect', // needed to keep it from complaining about mdx files | ||
}, | ||
}, | ||
rules: {}, | ||
}; |
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,25 +1,34 @@ | ||
# Build directories | ||
dist | ||
dist-ssr | ||
storybook-static | ||
.temp | ||
|
||
# Auto-generated templatized SVG files | ||
/src/assets/**/*.twig | ||
|
||
# Auto-generated design token stories | ||
/src/compiled | ||
# Auto-generated design token files | ||
src/compiled | ||
|
||
# Dependencies | ||
node_modules | ||
|
||
# OS debris | ||
.DS_Store | ||
|
||
# Local configurations | ||
.vscode | ||
*.local | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
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 +1 @@ | ||
lts/gallium | ||
lts/* |
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,4 +1,5 @@ | ||
/dist | ||
/src/compiled | ||
/src/developerdocs.scss | ||
/storybook-static | ||
dist | ||
storybook-static | ||
src/compiled | ||
src/developerdocs.scss | ||
.temp |
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,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "es5" | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Meta, Title, Subtitle, Description, Stories } from '@storybook/blocks'; | ||
|
||
{/* This is a modified version of the default AutoDocs template */} | ||
{/* https://storybook.js.org/docs/html/writing-docs/autodocs#write-a-custom-template */} | ||
|
||
<Meta isTemplate /> | ||
<Title /> | ||
<Subtitle /> | ||
<Description /> | ||
<Stories /> |
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
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,35 +1,31 @@ | ||
import breakpointTokens from '../src/compiled/js/breakpoints'; | ||
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'; | ||
import { themes } from '../src/themes/storybook-themes'; | ||
import { mltshpThemeLight, mltshpThemeDark } from './mltshpTheme'; | ||
/** @type { import('@storybook/html').Preview } */ | ||
import AutoDocsTemplate from './AutoDocsTemplate.mdx'; | ||
import { mltshpThemeDark, mltshpThemeLight } from './mltshpTheme'; | ||
import './preview.scss'; | ||
const breakpoints = breakpointTokens.size.breakpoint; | ||
import '../src/main.scss'; | ||
|
||
// Create viewports using widths defined in design tokens | ||
const breakpointViewports = Object.keys(breakpoints).map((key) => { | ||
return { | ||
name: breakpoints[key].name, | ||
styles: { | ||
width: breakpoints[key].value, | ||
height: '100%', | ||
const preview = { | ||
parameters: { | ||
// @see https://storybook.js.org/docs/html/writing-docs/autodocs | ||
docs: { | ||
page: AutoDocsTemplate, | ||
}, | ||
type: 'other', | ||
}; | ||
}); | ||
|
||
export const parameters = { | ||
themes, | ||
viewport: { | ||
viewports: { | ||
...breakpointViewports, | ||
...INITIAL_VIEWPORTS, | ||
// @see https://storybook.js.org/addons/storybook-dark-mode | ||
darkMode: { | ||
dark: { ...mltshpThemeDark }, | ||
light: { ...mltshpThemeLight }, | ||
darkClass: 't-dark', | ||
lightClass: 't-light', | ||
stylePreview: true, | ||
}, | ||
// @see https://storybook.js.org/addons/storybook-addon-themes | ||
themes: { | ||
list: [ | ||
{ name: 'Light', class: 't-light', color: 'white' }, | ||
{ name: 'Dark', class: 't-dark', color: 'black' }, | ||
], | ||
}, | ||
}, | ||
darkMode: { | ||
dark: { ...mltshpThemeDark }, | ||
light: { ...mltshpThemeLight }, | ||
darkClass: 't-dark', | ||
lightClass: 't-light', | ||
stylePreview: true, | ||
}, | ||
}; | ||
|
||
export default preview; |
Oops, something went wrong.