Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move components docs to Storybook #162

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7a41411
feat: Update Babel, ESLint and Prettier
Apr 5, 2022
6559560
fix: Remove missing InputLarge component import and fix lint errors.
Apr 5, 2022
da81474
Add .DS_Store and yarn.lock to .gitignore
Apr 5, 2022
0910b93
Use JSON for ESLint config
Apr 5, 2022
3d03976
feat: Upgrade Storybook to v6.4
Apr 5, 2022
42c4b7b
Move stories to src/stories and MDX files to Storybook
Apr 5, 2022
482951d
Move stories to src/stories and MDX files to Storybook
Apr 5, 2022
b361389
chore: Replace node-sass with sass, update loaders to Storybook recom…
Apr 6, 2022
9d5c062
Change ESLint, Babel and Prettier config to follow Storybook guidelines
Apr 6, 2022
f70d334
Remove docz
Apr 6, 2022
26b1434
fix: Add @babel/plugin-transform-runtime to .babelrc
Apr 6, 2022
93fab26
chore: Delete unused docz files
Apr 8, 2022
0d2bb24
Add controls and sort to Storybook config
Apr 8, 2022
eba074e
Add services stories
Apr 8, 2022
cd67099
Add component stories
Apr 8, 2022
be8681a
Add template stories
Apr 8, 2022
5b8b784
Add Storybook Component doc info
Apr 8, 2022
ff768fe
Import missing FA icons to avoid console errors
Apr 8, 2022
c1bc79b
Add Header props to tests to avoid console errors
Apr 8, 2022
c8d6bf8
Add empty items array to IconList test to avoid console errors
Apr 8, 2022
bafb1ff
Add Home stories section
Apr 8, 2022
d5a9b36
chore: Update Storybook -> v6.4.21
Apr 11, 2022
a620ea0
fix: Change story endpoint url to DKAN demo
Apr 11, 2022
343271b
Remove deprecated @storybook/addon-knobs
Apr 11, 2022
5dc5ac4
Move ApiDocs stories to WIP
Apr 11, 2022
8815819
Revert "Add .DS_Store and yarn.lock to .gitignore"
Apr 21, 2022
33c0d2d
Add .DS_Store to .gitignore
Apr 21, 2022
ef6fb53
Update yarn.lock
Apr 21, 2022
78fb954
Remove docz scripts
alex-ahumada Apr 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 44 additions & 16 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,39 +1,67 @@
{
"sourceType": "unambiguous",
"presets": [
[
"@babel/preset-env",
{
"shippedProposals": true,
"loose": true
}
],
"@babel/preset-react",
"@babel/env"
"@babel/preset-typescript"
],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-json-strings",
"@babel/plugin-transform-shorthand-properties",
"@babel/plugin-transform-block-scoping",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",
[
"@babel/plugin-proposal-class-properties",
{
"loose": true
}
],
[
"@babel/plugin-proposal-private-methods",
{
"loose": true
}
],
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-syntax-dynamic-import",
[
"@babel/plugin-proposal-pipeline-operator",
"@babel/plugin-proposal-object-rest-spread",
{
"proposal": "minimal"
"loose": true,
"useBuiltIns": true
}
],
"@babel/plugin-transform-classes",
"@babel/plugin-transform-arrow-functions",
"@babel/plugin-transform-parameters",
"@babel/plugin-transform-destructuring",
"@babel/plugin-transform-spread",
"@babel/plugin-transform-for-of",
"babel-plugin-macros",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-do-expressions",
"@babel/plugin-proposal-function-bind",
[
"babel-plugin-polyfill-corejs3",
{
"method": "usage-global",
"absoluteImports": "core-js",
"version": "3.18.3"
}
],
["@babel/plugin-transform-runtime",
{
"regenerator": true
}
]
]
}
}
11 changes: 0 additions & 11 deletions .eslintrc.js

This file was deleted.

24 changes: 24 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:storybook/recommended",
"plugin:prettier/recommended"
],
"parser": "@babel/eslint-parser",
"plugins": ["@babel", "testing-library"],
"env": {
"jest": true,
"browser": true
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"react/jsx-key": "off",
"react/jsx-curly-spacing": [2, "never", { "allowMultiline": true }],
"prettier/prettier": ["error", {}, { "usePrettierrc": true }]
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
package-lock.json
.DS_Store
lib
dist
.idea
Expand Down
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
"bracketSameLine": false,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
}
5 changes: 0 additions & 5 deletions .storybook/addons.js

This file was deleted.

55 changes: 0 additions & 55 deletions .storybook/config.js

This file was deleted.

46 changes: 46 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
const path = require('path')

module.exports = {
stories: [
'../src/**/*.stories.mdx',
'../src/**/*.stories.@(js|jsx|ts|tsx)'
],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-a11y',
'@storybook/preset-scss',
{
/**
* Fix Storybook issue with PostCSS@8
* @see https://github.com/storybookjs/storybook/issues/12668#issuecomment-773958085
*/
name: '@storybook/addon-postcss',
options: {
postcssLoaderOptions: {
implementation: require('postcss'),
},
},
},
],
framework: '@storybook/react',
core: {
builder: 'webpack5',
},
webpackFinal: (config, { configType }) => {
/**
* Add support for alias-imports
* @see https://github.com/storybookjs/storybook/issues/11989#issuecomment-715524391
*/
config.resolve.alias = {
...config.resolve?.alias,
'@': [
path.resolve(__dirname, '../src/'),
path.resolve(__dirname, '../')
],
}

return config;
},
}
18 changes: 18 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import '../src/styles/scss/index.scss';

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color|fill)$/i,
date: /Date$/,
},
},
options: {
storySort: {
method: 'alphabetical',
order: ['Home', 'Components', 'Services', 'Templates', '*', 'WIP'],
locales: 'en-US',
},
},
}
34 changes: 0 additions & 34 deletions .storybook/webpack.config.js

This file was deleted.

17 changes: 0 additions & 17 deletions doczrc.js

This file was deleted.

3 changes: 0 additions & 3 deletions gatsby-config.js

This file was deleted.

22 changes: 0 additions & 22 deletions gatsby-node.js

This file was deleted.

Loading