{theme}
} +From ad358f2087374da80ec707e366b826eedd944852 Mon Sep 17 00:00:00 2001
From: Katie Langerman <18661030+langermank@users.noreply.github.com>
Date: Thu, 13 Jul 2023 15:14:44 -0700
Subject: [PATCH] Remove Gatsby docs site (#2484)
* upgrade
* add all stories
* new directory
* move back to docs
* remove from root
* cleanup
* try node 16
* adjust build script
* try to fix build
* try node 16
* maybe?
* please
* bye gatsby
* fix button story
* add info banner
* add missing marketing docs
---
.github/workflows/deploy_preview.yml | 2 +-
docs/.babelrc | 12 +-
docs/.eslintrc.json | 12 +-
docs/.storybook/main.js | 35 +-
docs/.storybook/manager.js | 6 +
docs/.storybook/preview-head.html | 33 +-
docs/.storybook/preview.css | 9 +
docs/.storybook/preview.js | 227 +-
docs/.storybook/storybook.css | 60 +
docs/.storybook/theme.js | 13 +
docs/content/components/alerts.md | 197 -
docs/content/components/autocomplete.md | 450 -
docs/content/components/avatar-stack.md | 152 -
docs/content/components/avatars.md | 111 -
docs/content/components/blankslate.md | 152 -
docs/content/components/box-overlay.md | 60 -
docs/content/components/box.md | 579 -
docs/content/components/branch-name.md | 27 -
docs/content/components/breadcrumb.md | 34 -
docs/content/components/button-group.md | 47 -
docs/content/components/buttons.md | 257 -
docs/content/components/counter.md | 48 -
docs/content/components/dialog.md | 58 -
docs/content/components/dropdown.md | 204 -
docs/content/components/filter-list.md | 31 -
docs/content/components/forms.md | 422 -
docs/content/components/header.md | 104 -
docs/content/components/index.md | 9 -
docs/content/components/labels.md | 101 -
docs/content/components/layout.md | 267 -
docs/content/components/links.md | 74 -
docs/content/components/loaders.md | 26 -
docs/content/components/markdown.md | 493 -
docs/content/components/marketing-buttons.md | 83 -
docs/content/components/marketing-links.md | 76 -
docs/content/components/menu.md | 86 -
docs/content/components/navigation.md | 16 -
docs/content/components/pagination.md | 49 -
docs/content/components/popover.md | 241 -
docs/content/components/progress.md | 74 -
.../components/select-menu-deprecated.md | 880 -
docs/content/components/select-menu.md | 623 -
docs/content/components/side-nav.md | 112 -
docs/content/components/state.md | 56 -
docs/content/components/subhead.md | 80 -
docs/content/components/subnav.md | 59 -
docs/content/components/tabnav.md | 92 -
docs/content/components/timeline.md | 190 -
docs/content/components/toasts.md | 227 -
docs/content/components/tooltips.md | 124 -
docs/content/components/truncate.md | 88 -
docs/content/components/underline-nav.md | 121 -
docs/content/getting-started/contributing.md | 113 -
docs/content/getting-started/index.md | 126 -
docs/content/index.mdx | 99 -
docs/content/marketing/index.md | 6 -
docs/content/principles/accessibility.md | 191 -
docs/content/principles/html.md | 85 -
docs/content/principles/index.md | 207 -
docs/content/principles/scss.md | 74 -
docs/content/stickersheet/index.md | 216 -
docs/content/stickersheet/labels.md | 130 -
docs/content/stickersheet/sizes.md | 95 -
docs/content/support/breakpoints.md | 139 -
docs/content/support/index.md | 18 -
docs/content/support/spacing.md | 57 -
docs/content/support/theming.md | 115 -
docs/content/support/typography.md | 94 -
docs/content/support/variables.mdx | 15 -
docs/content/tools/deprecations.md | 82 -
docs/content/tools/index.md | 6 -
docs/content/tools/linting.md | 99 -
docs/content/tools/prototyping.md | 38 -
docs/content/tools/testing.md | 20 -
docs/content/utilities/animations.md | 108 -
docs/content/utilities/borders.mdx | 124 -
docs/content/utilities/box-shadow.md | 119 -
docs/content/utilities/colors.mdx | 121 -
docs/content/utilities/details.md | 65 -
docs/content/utilities/flexbox.md | 786 -
docs/content/utilities/grid.md | 445 -
docs/content/utilities/index.md | 9 -
docs/content/utilities/layout.md | 475 -
docs/content/utilities/margin.md | 155 -
docs/content/utilities/marketing-filters.md | 22 -
docs/content/utilities/marketing-layout.md | 39 -
docs/content/utilities/marketing-type.md | 52 -
docs/content/utilities/padding.md | 109 -
docs/content/utilities/typography.md | 151 -
docs/gatsby-browser.js | 11 -
docs/gatsby-config.js | 36 -
docs/gatsby-node.js | 12 -
docs/package.json | 39 +-
docs/script/build-storybook | 5 +-
.../gatsby-theme-doctocat/components/hero.js | 25 -
.../components/live-preview-wrapper.js | 42 -
.../src/@primer/gatsby-theme-doctocat/nav.yml | 164 -
docs/src/color-system.js | 297 -
docs/src/color-variables.js | 114 -
docs/src/readme.png | Bin 29621 -> 0 bytes
.../BranchName/BranchName.stories.mdx | 13 -
docs/src/stories/static/color-image.svg | 29 -
docs/src/stories/static/hero-illustration.svg | 97 -
docs/src/stories/static/objects-image.svg | 1 -
docs/src/stories/static/spacing-image.svg | 27 -
docs/src/table.js | 47 -
docs/src/utilities-image.svg | 1 -
docs/src/variables.js | 192 -
.../Contributing.mdx} | 4 -
.../GettingStarted.mdx} | 4 -
.../Introduction.mdx} | 4 -
.../components/Layout/AppFrame.stories.jsx | 0
.../components/Layout/LayoutAlpha.stories.jsx | 0
.../components/Layout/LayoutBeta.stories.jsx | 0
.../components/Layout/PageLayout.stories.jsx | 0
.../Layout/SplitPageLayout.stories.jsx | 0
.../components/Layout/Stack.stories.jsx | 0
.../Layout/StackExamples.stories.jsx | 0
.../Layout/StackFeatures.stories.jsx | 0
.../BoxOverlay/BoxOverlay.mdx} | 8 +-
.../BoxOverlay/BoxOverlay.stories.tsx | 3 +
.../BranchName/BranchName.mdx | 11 +
.../BranchName/BranchName.stories.tsx | 6 +
.../deprecated-components/Button/Button.mdx} | 76 +-
.../Button/Button.stories.tsx | 7 +-
.../FilterList/FilterList.mdx} | 8 +-
.../FilterList/FilterList.stories.tsx | 6 +
.../deprecated-components/Forms/Forms.mdx} | 76 +-
.../Forms/Forms.stories.tsx | 6 +
.../deprecated-components/Header/Header.mdx} | 20 +-
.../Header/Header.stories.tsx | 6 +
.../IssueLabel/IssueLabel.mdx} | 12 +-
.../IssueLabel/IssueLabel.stories.tsx | 6 +
.../Loaders/Loaders.mdx} | 8 +-
.../Loaders/Loaders.stories.tsx | 6 +
.../Markdown/Markdown.stories.tsx | 6 +
.../Marketing/Marketing.mdx} | 16 +-
.../Marketing/Marketing.stories.tsx | 6 +
.../Pagination/Pagination.mdx} | 12 +-
.../Pagination/Pagination.stories.tsx | 6 +
.../SelectMenu/SelectMenu.mdx} | 60 +-
.../SelectMenu/SelectMenu.stories.tsx | 6 +
.../SideNav/SideNav.mdx} | 20 +-
.../SideNav/SideNav.stories.tsx | 6 +
.../deprecated-components/SubNav/SubNav.mdx} | 16 +-
.../SubNav/SubNav.stories.tsx | 6 +
.../deprecated-components/Toast/Toast.mdx} | 36 +-
.../Toast/Toast.stories.tsx | 6 +
.../Tooltip/Tooltip.mdx} | 20 +-
.../Tooltip/Tooltip.stories.tsx | 6 +
.../stories/helpers/pageLayoutBehavior.jsx | 0
.../stories/principles/Accessibility.mdx | 0
docs/{src => }/stories/principles/HTML.mdx | 0
.../stories/principles/Principles.mdx | 0
docs/{src => }/stories/principles/SCSS.mdx | 0
docs/{src => stories/static}/color-image.svg | 0
.../static/components-image copy.svg} | 0
.../stories/static/components-image.svg | 0
.../static}/hero-illustration.svg | 0
.../{src => stories/static}/objects-image.svg | 0
.../{src => stories/static}/spacing-image.svg | 0
.../static}/typography-image.png | Bin
.../stories/static/utilities-image.svg | 0
.../{src => }/stories/support/Breakpoints.mdx | 0
.../stories/support/Deprecations.mdx | 0
docs/{src => }/stories/support/Linting.mdx | 0
.../{src => }/stories/support/Prototyping.mdx | 0
docs/{src => }/stories/support/Spacing.mdx | 0
docs/{src => }/stories/support/Theming.mdx | 0
docs/{src => }/stories/support/Typography.mdx | 0
.../stories/utilities/Animation.stories.jsx | 0
.../stories/utilities/Border.stories.jsx | 0
.../stories/utilities/Color.stories.jsx | 0
.../stories/utilities/Details.stories.jsx | 0
.../stories/utilities/Flexbox.stories.jsx | 0
.../stories/utilities/Grid.stories.jsx | 0
.../stories/utilities/Layout.stories.jsx | 0
.../stories/utilities/Margin.stories.jsx | 0
docs/stories/utilities/MarketingFilters.mdx | 15 +
.../utilities/MarketingFilters.stories.jsx | 9 +
docs/stories/utilities/MarketingLayout.mdx | 23 +
.../utilities/MarketingLayout.stories.jsx | 22 +
.../stories/utilities/MarketingTypography.mdx | 27 +
.../utilities/MarketingTypography.stories.jsx | 67 +
.../stories/utilities/Padding.stories.jsx | 0
.../stories/utilities/Shadow.stories.jsx | 0
.../stories/utilities/Typography.stories.jsx | 0
docs/yarn.lock | 21945 ++++------------
.../v16-migration.mdx => migrations/v16.md | 5 -
.../v18-migration.mdx => migrations/v18.md | 15 +-
package.json | 6 +-
script/build-docs | 4 +-
192 files changed, 5932 insertions(+), 30257 deletions(-)
create mode 100644 docs/.storybook/manager.js
create mode 100644 docs/.storybook/preview.css
create mode 100644 docs/.storybook/storybook.css
create mode 100644 docs/.storybook/theme.js
delete mode 100644 docs/content/components/alerts.md
delete mode 100644 docs/content/components/autocomplete.md
delete mode 100644 docs/content/components/avatar-stack.md
delete mode 100644 docs/content/components/avatars.md
delete mode 100644 docs/content/components/blankslate.md
delete mode 100644 docs/content/components/box-overlay.md
delete mode 100644 docs/content/components/box.md
delete mode 100644 docs/content/components/branch-name.md
delete mode 100644 docs/content/components/breadcrumb.md
delete mode 100644 docs/content/components/button-group.md
delete mode 100644 docs/content/components/buttons.md
delete mode 100644 docs/content/components/counter.md
delete mode 100644 docs/content/components/dialog.md
delete mode 100644 docs/content/components/dropdown.md
delete mode 100644 docs/content/components/filter-list.md
delete mode 100644 docs/content/components/forms.md
delete mode 100644 docs/content/components/header.md
delete mode 100644 docs/content/components/index.md
delete mode 100644 docs/content/components/labels.md
delete mode 100644 docs/content/components/layout.md
delete mode 100644 docs/content/components/links.md
delete mode 100644 docs/content/components/loaders.md
delete mode 100644 docs/content/components/markdown.md
delete mode 100644 docs/content/components/marketing-buttons.md
delete mode 100644 docs/content/components/marketing-links.md
delete mode 100644 docs/content/components/menu.md
delete mode 100644 docs/content/components/navigation.md
delete mode 100644 docs/content/components/pagination.md
delete mode 100644 docs/content/components/popover.md
delete mode 100644 docs/content/components/progress.md
delete mode 100644 docs/content/components/select-menu-deprecated.md
delete mode 100644 docs/content/components/select-menu.md
delete mode 100644 docs/content/components/side-nav.md
delete mode 100644 docs/content/components/state.md
delete mode 100644 docs/content/components/subhead.md
delete mode 100644 docs/content/components/subnav.md
delete mode 100644 docs/content/components/tabnav.md
delete mode 100644 docs/content/components/timeline.md
delete mode 100644 docs/content/components/toasts.md
delete mode 100644 docs/content/components/tooltips.md
delete mode 100644 docs/content/components/truncate.md
delete mode 100644 docs/content/components/underline-nav.md
delete mode 100644 docs/content/getting-started/contributing.md
delete mode 100644 docs/content/getting-started/index.md
delete mode 100644 docs/content/index.mdx
delete mode 100644 docs/content/marketing/index.md
delete mode 100644 docs/content/principles/accessibility.md
delete mode 100644 docs/content/principles/html.md
delete mode 100644 docs/content/principles/index.md
delete mode 100644 docs/content/principles/scss.md
delete mode 100644 docs/content/stickersheet/index.md
delete mode 100644 docs/content/stickersheet/labels.md
delete mode 100644 docs/content/stickersheet/sizes.md
delete mode 100644 docs/content/support/breakpoints.md
delete mode 100644 docs/content/support/index.md
delete mode 100644 docs/content/support/spacing.md
delete mode 100644 docs/content/support/theming.md
delete mode 100644 docs/content/support/typography.md
delete mode 100644 docs/content/support/variables.mdx
delete mode 100644 docs/content/tools/deprecations.md
delete mode 100644 docs/content/tools/index.md
delete mode 100644 docs/content/tools/linting.md
delete mode 100644 docs/content/tools/prototyping.md
delete mode 100644 docs/content/tools/testing.md
delete mode 100644 docs/content/utilities/animations.md
delete mode 100644 docs/content/utilities/borders.mdx
delete mode 100644 docs/content/utilities/box-shadow.md
delete mode 100644 docs/content/utilities/colors.mdx
delete mode 100644 docs/content/utilities/details.md
delete mode 100644 docs/content/utilities/flexbox.md
delete mode 100644 docs/content/utilities/grid.md
delete mode 100644 docs/content/utilities/index.md
delete mode 100644 docs/content/utilities/layout.md
delete mode 100644 docs/content/utilities/margin.md
delete mode 100644 docs/content/utilities/marketing-filters.md
delete mode 100644 docs/content/utilities/marketing-layout.md
delete mode 100644 docs/content/utilities/marketing-type.md
delete mode 100644 docs/content/utilities/padding.md
delete mode 100644 docs/content/utilities/typography.md
delete mode 100644 docs/gatsby-browser.js
delete mode 100644 docs/gatsby-config.js
delete mode 100644 docs/gatsby-node.js
delete mode 100644 docs/src/@primer/gatsby-theme-doctocat/components/hero.js
delete mode 100644 docs/src/@primer/gatsby-theme-doctocat/components/live-preview-wrapper.js
delete mode 100644 docs/src/@primer/gatsby-theme-doctocat/nav.yml
delete mode 100644 docs/src/color-system.js
delete mode 100644 docs/src/color-variables.js
delete mode 100644 docs/src/readme.png
delete mode 100644 docs/src/stories/deprecated-components/BranchName/BranchName.stories.mdx
delete mode 100644 docs/src/stories/static/color-image.svg
delete mode 100644 docs/src/stories/static/hero-illustration.svg
delete mode 100644 docs/src/stories/static/objects-image.svg
delete mode 100644 docs/src/stories/static/spacing-image.svg
delete mode 100644 docs/src/table.js
delete mode 100644 docs/src/utilities-image.svg
delete mode 100644 docs/src/variables.js
rename docs/{src/stories/Contributing.stories.mdx => stories/Contributing.mdx} (98%)
rename docs/{src/stories/GettingStarted.stories.mdx => stories/GettingStarted.mdx} (98%)
rename docs/{src/stories/Introduction.stories.mdx => stories/Introduction.mdx} (98%)
rename docs/{src => }/stories/components/Layout/AppFrame.stories.jsx (100%)
rename docs/{src => }/stories/components/Layout/LayoutAlpha.stories.jsx (100%)
rename docs/{src => }/stories/components/Layout/LayoutBeta.stories.jsx (100%)
rename docs/{src => }/stories/components/Layout/PageLayout.stories.jsx (100%)
rename docs/{src => }/stories/components/Layout/SplitPageLayout.stories.jsx (100%)
rename docs/{src => }/stories/components/Layout/Stack.stories.jsx (100%)
rename docs/{src => }/stories/components/Layout/StackExamples.stories.jsx (100%)
rename docs/{src => }/stories/components/Layout/StackFeatures.stories.jsx (100%)
rename docs/{src/stories/deprecated-components/BoxOverlay/BoxOverlay.stories.mdx => stories/deprecated-components/BoxOverlay/BoxOverlay.mdx} (76%)
rename docs/{src => }/stories/deprecated-components/BoxOverlay/BoxOverlay.stories.tsx (96%)
create mode 100644 docs/stories/deprecated-components/BranchName/BranchName.mdx
rename docs/{src => }/stories/deprecated-components/BranchName/BranchName.stories.tsx (85%)
rename docs/{src/stories/deprecated-components/Button/Button.stories.mdx => stories/deprecated-components/Button/Button.mdx} (73%)
rename docs/{src => }/stories/deprecated-components/Button/Button.stories.tsx (98%)
rename docs/{src/stories/deprecated-components/FilterList/FilterList.stories.mdx => stories/deprecated-components/FilterList/FilterList.mdx} (57%)
rename docs/{src => }/stories/deprecated-components/FilterList/FilterList.stories.tsx (76%)
rename docs/{src/stories/deprecated-components/Forms/Forms.stories.mdx => stories/deprecated-components/Forms/Forms.mdx} (75%)
rename docs/{src => }/stories/deprecated-components/Forms/Forms.stories.tsx (98%)
rename docs/{src/stories/deprecated-components/Header/Header.stories.mdx => stories/deprecated-components/Header/Header.mdx} (81%)
rename docs/{src => }/stories/deprecated-components/Header/Header.stories.tsx (94%)
rename docs/{src/stories/deprecated-components/IssueLabel/IssueLabel.stories.mdx => stories/deprecated-components/IssueLabel/IssueLabel.mdx} (52%)
rename docs/{src => }/stories/deprecated-components/IssueLabel/IssueLabel.stories.tsx (86%)
rename docs/{src/stories/deprecated-components/Loaders/Loaders.stories.mdx => stories/deprecated-components/Loaders/Loaders.mdx} (61%)
rename docs/{src => }/stories/deprecated-components/Loaders/Loaders.stories.tsx (78%)
rename docs/{src => }/stories/deprecated-components/Markdown/Markdown.stories.tsx (98%)
rename docs/{src/stories/deprecated-components/Marketing/Marketing.stories.mdx => stories/deprecated-components/Marketing/Marketing.mdx} (67%)
rename docs/{src => }/stories/deprecated-components/Marketing/Marketing.stories.tsx (97%)
rename docs/{src/stories/deprecated-components/Pagination/Pagination.stories.mdx => stories/deprecated-components/Pagination/Pagination.mdx} (82%)
rename docs/{src => }/stories/deprecated-components/Pagination/Pagination.stories.tsx (87%)
rename docs/{src/stories/deprecated-components/SelectMenu/SelectMenu.stories.mdx => stories/deprecated-components/SelectMenu/SelectMenu.mdx} (83%)
rename docs/{src => }/stories/deprecated-components/SelectMenu/SelectMenu.stories.tsx (99%)
rename docs/{src/stories/deprecated-components/SideNav/SideNav.stories.mdx => stories/deprecated-components/SideNav/SideNav.mdx} (74%)
rename docs/{src => }/stories/deprecated-components/SideNav/SideNav.stories.tsx (97%)
rename docs/{src/stories/deprecated-components/SubNav/SubNav.stories.mdx => stories/deprecated-components/SubNav/SubNav.mdx} (56%)
rename docs/{src => }/stories/deprecated-components/SubNav/SubNav.stories.tsx (94%)
rename docs/{src/stories/deprecated-components/Toast/Toast.stories.mdx => stories/deprecated-components/Toast/Toast.mdx} (67%)
rename docs/{src => }/stories/deprecated-components/Toast/Toast.stories.tsx (97%)
rename docs/{src/stories/deprecated-components/Tooltip/Tooltip.stories.mdx => stories/deprecated-components/Tooltip/Tooltip.mdx} (86%)
rename docs/{src => }/stories/deprecated-components/Tooltip/Tooltip.stories.tsx (96%)
rename docs/{src => }/stories/helpers/pageLayoutBehavior.jsx (100%)
rename docs/{src => }/stories/principles/Accessibility.mdx (100%)
rename docs/{src => }/stories/principles/HTML.mdx (100%)
rename docs/{src => }/stories/principles/Principles.mdx (100%)
rename docs/{src => }/stories/principles/SCSS.mdx (100%)
rename docs/{src => stories/static}/color-image.svg (100%)
rename docs/{src/components-image.svg => stories/static/components-image copy.svg} (100%)
rename docs/{src => }/stories/static/components-image.svg (100%)
rename docs/{src => stories/static}/hero-illustration.svg (100%)
rename docs/{src => stories/static}/objects-image.svg (100%)
rename docs/{src => stories/static}/spacing-image.svg (100%)
rename docs/{src => stories/static}/typography-image.png (100%)
rename docs/{src => }/stories/static/utilities-image.svg (100%)
rename docs/{src => }/stories/support/Breakpoints.mdx (100%)
rename docs/{src => }/stories/support/Deprecations.mdx (100%)
rename docs/{src => }/stories/support/Linting.mdx (100%)
rename docs/{src => }/stories/support/Prototyping.mdx (100%)
rename docs/{src => }/stories/support/Spacing.mdx (100%)
rename docs/{src => }/stories/support/Theming.mdx (100%)
rename docs/{src => }/stories/support/Typography.mdx (100%)
rename docs/{src => }/stories/utilities/Animation.stories.jsx (100%)
rename docs/{src => }/stories/utilities/Border.stories.jsx (100%)
rename docs/{src => }/stories/utilities/Color.stories.jsx (100%)
rename docs/{src => }/stories/utilities/Details.stories.jsx (100%)
rename docs/{src => }/stories/utilities/Flexbox.stories.jsx (100%)
rename docs/{src => }/stories/utilities/Grid.stories.jsx (100%)
rename docs/{src => }/stories/utilities/Layout.stories.jsx (100%)
rename docs/{src => }/stories/utilities/Margin.stories.jsx (100%)
create mode 100644 docs/stories/utilities/MarketingFilters.mdx
create mode 100644 docs/stories/utilities/MarketingFilters.stories.jsx
create mode 100644 docs/stories/utilities/MarketingLayout.mdx
create mode 100644 docs/stories/utilities/MarketingLayout.stories.jsx
create mode 100644 docs/stories/utilities/MarketingTypography.mdx
create mode 100644 docs/stories/utilities/MarketingTypography.stories.jsx
rename docs/{src => }/stories/utilities/Padding.stories.jsx (100%)
rename docs/{src => }/stories/utilities/Shadow.stories.jsx (100%)
rename docs/{src => }/stories/utilities/Typography.stories.jsx (100%)
rename docs/content/support/v16-migration.mdx => migrations/v16.md (99%)
rename docs/content/support/v18-migration.mdx => migrations/v18.md (89%)
diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml
index 1917b227..a35d7d3a 100644
--- a/.github/workflows/deploy_preview.yml
+++ b/.github/workflows/deploy_preview.yml
@@ -19,7 +19,7 @@ jobs:
secrets:
gh_token: ${{ secrets.GITHUB_TOKEN }}
with:
- node_version: 14
+ node_version: 16
install: yarn && cd docs && yarn && cd ..
build: yarn build:docs:preview
output_dir: docs/public
diff --git a/docs/.babelrc b/docs/.babelrc
index 0f92253e..f8182480 100644
--- a/docs/.babelrc
+++ b/docs/.babelrc
@@ -1,6 +1,14 @@
{
+ "sourceType": "unambiguous",
"presets": [
- "babel-preset-gatsby",
- "@babel/preset-react"
+ "@babel/preset-react",
+ [
+ "@babel/preset-env",
+ {
+ "targets": {
+ "chrome": 100
+ }
+ }
+ ]
]
}
diff --git a/docs/.eslintrc.json b/docs/.eslintrc.json
index 9a7049fd..ee56e826 100644
--- a/docs/.eslintrc.json
+++ b/docs/.eslintrc.json
@@ -1,13 +1,17 @@
{
"extends": [
"plugin:react/recommended",
- "plugin:jsx-a11y/recommended"
+ "plugin:jsx-a11y/recommended",
+ "plugin:storybook/recommended"
],
"rules": {
"import/no-namespace": 0,
- "no-unused-vars": ["error", {
- "ignoreRestSiblings": true
- }]
+ "no-unused-vars": [
+ "error",
+ {
+ "ignoreRestSiblings": true
+ }
+ ]
},
"settings": {
"react": {
diff --git a/docs/.storybook/main.js b/docs/.storybook/main.js
index 0479b1a2..f3d94c88 100644
--- a/docs/.storybook/main.js
+++ b/docs/.storybook/main.js
@@ -1,22 +1,29 @@
-module.exports = {
- stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
+/** @type { import('@storybook/react-webpack5').StorybookConfig } */
+const config = {
+ stories: ['../stories/**/*.mdx', '../stories/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
+ '@storybook/addon-links',
+ '@storybook/addon-essentials',
+ '@storybook/addon-interactions',
+ 'storybook-addon-pseudo-states',
+ '@storybook/addon-storysource',
+ '@geometricpanda/storybook-addon-badges',
{
- name: '@storybook/addon-essentials',
+ name: '@storybook/addon-styling',
options: {
- actions: false,
- controls: false,
- docs: true,
- viewport: true,
+ sass: {
+ implementation: require('sass'),
+ },
},
},
- '@storybook/addon-a11y',
- '@storybook/addon-links',
- '@storybook/preset-scss',
],
- framework: '@storybook/react',
- core: {
- builder: 'webpack5',
+ framework: {
+ name: '@storybook/react-webpack5',
+ options: {},
},
- staticDirs: ['../src/stories/static'],
+ docs: {
+ autodocs: 'tag',
+ },
+ staticDirs: ['../stories/static'],
}
+export default config
diff --git a/docs/.storybook/manager.js b/docs/.storybook/manager.js
new file mode 100644
index 00000000..65340e9b
--- /dev/null
+++ b/docs/.storybook/manager.js
@@ -0,0 +1,6 @@
+import {addons} from '@storybook/manager-api'
+import theme from './theme'
+
+addons.setConfig({
+ theme: theme,
+})
diff --git a/docs/.storybook/preview-head.html b/docs/.storybook/preview-head.html
index 6f25036b..3ed18e99 100644
--- a/docs/.storybook/preview-head.html
+++ b/docs/.storybook/preview-head.html
@@ -1,32 +1 @@
-
+
diff --git a/docs/.storybook/preview.css b/docs/.storybook/preview.css
new file mode 100644
index 00000000..de33cb81
--- /dev/null
+++ b/docs/.storybook/preview.css
@@ -0,0 +1,9 @@
+@import '@primer/primitives/tokens-next-private/css/base/size/size.css';
+@import '@primer/primitives/tokens-next-private/css/base/typography/typography.css';
+@import '@primer/primitives/tokens-next-private/css/functional/size/border.css';
+@import '@primer/primitives/tokens-next-private/css/functional/size/breakpoints.css';
+@import '@primer/primitives/tokens-next-private/css/functional/size/size-coarse.css';
+@import '@primer/primitives/tokens-next-private/css/functional/size/size-fine.css';
+@import '@primer/primitives/tokens-next-private/css/functional/size/size.css';
+@import '@primer/primitives/tokens-next-private/css/functional/size/viewport.css';
+@import '@primer/primitives/tokens-next-private/css/functional/typography/typography.css';
diff --git a/docs/.storybook/preview.js b/docs/.storybook/preview.js
index 5dd6c5d2..3f2fcf74 100644
--- a/docs/.storybook/preview.js
+++ b/docs/.storybook/preview.js
@@ -1,138 +1,54 @@
import '../../src/docs.scss'
import '../../src/index.scss'
import '../../src/base/index.scss'
-// temporary import until primitives moves to core bundle
-// importing the index from /css didn't play nice with Storybook
-import '@primer/primitives/tokens-next-private/css/base/size/size.css'
-import '@primer/primitives/tokens-next-private/css/base/typography/typography.css'
-import '@primer/primitives/tokens-next-private/css/functional/size/border.css'
-import '@primer/primitives/tokens-next-private/css/functional/size/breakpoints.css'
-import '@primer/primitives/tokens-next-private/css/functional/size/size-coarse.css'
-import '@primer/primitives/tokens-next-private/css/functional/size/size-fine.css'
-import '@primer/primitives/tokens-next-private/css/functional/size/size.css'
-import '@primer/primitives/tokens-next-private/css/functional/size/viewport.css'
-import '@primer/primitives/tokens-next-private/css/functional/typography/typography.css'
+import './preview.css'
+import './storybook.css'
+import clsx from 'clsx'
+import {BADGE, BadgesConfig} from '@geometricpanda/storybook-addon-badges'
-const customViewports = {
- minXS: {
- name: 'XS (min)',
- styles: {
- width: '320px',
- height: '100%',
+/** @type { import('@storybook/react').Preview } */
+const preview = {
+ parameters: {
+ actions: {argTypesRegex: '^on[A-Z].*'},
+ controls: {
+ matchers: {
+ color: /(background|color)$/i,
+ date: /Date$/,
+ },
},
- },
- medXS: {
- name: 'XS (med)',
- styles: {
- width: '375px',
- height: '100%',
+ options: {
+ storySort: {
+ order: ['Introduction', 'GettingStarting', 'Contributing', 'Utilities'],
+ },
},
- },
- maxXS: {
- name: 'XS (max)',
- styles: {
- width: '543px',
- height: '100%',
- },
- },
- minSM: {
- name: 'SM (min)',
- styles: {
- width: '544px',
- height: '100%',
- },
- },
- maxSM: {
- name: 'SM (max)',
- styles: {
- width: '767px',
- height: '100%',
- },
- },
- minMD: {
- name: 'MD (min)',
- styles: {
- width: '768px',
- height: '100%',
- },
- },
- maxMD: {
- name: 'MD (max)',
- styles: {
- width: '1011px',
- height: '100%',
- },
- },
- minLG: {
- name: 'LG (min)',
- styles: {
- width: '1012px',
- height: '100%',
- },
- },
- maxLG: {
- name: 'LG (max)',
- styles: {
- width: '1279px',
- height: '100%',
- },
- },
- minXL: {
- name: 'XL (min)',
- styles: {
- width: '1280px',
- height: '100%',
- },
- },
- medXL: {
- name: 'XL (med)',
- styles: {
- width: '1440px',
- height: '100%',
+ badgesConfig: {
+ [BADGE.DEPRECATED]: {
+ title: 'Deprecated',
+ tooltip: {
+ desc: 'Please use a Primer View Component instead',
+ links: [{title: 'See docs', href: 'https://primer.style/design/components'}],
+ },
+ },
+ [BADGE.OBSOLETE]: {
+ title: 'Outdated',
+ tooltip: {
+ desc: 'Information in this document may be outdated.',
+ },
+ },
},
},
}
-export const parameters = {
- actions: {argTypesRegex: '^on[A-Z].*'},
- // docs: {
- // transformSource: (src, storyContext) => renderToHTML(storyContext.storyFn),
- // },
- controls: {
- matchers: {
- color: /(background|color)$/i,
- date: /Date$/,
- },
- expanded: true,
- },
-
- layout: 'padded',
- html: {
- root: '#story', // target id for html tab (should be direct parent of
{theme}
} +- This is a longer flash message in it's own paragraph. It ends up looking something like this. If we keep adding more - text, it'll eventually wrap to a new line. -
-And this is another paragraph.
-Use it to provide information when no dynamic content exists.
-Use it to provide information when no dynamic content exists.
-Pull requests help you discuss potential changes before they are merged into the base branch.
-Pull requests help you discuss potential changes before they are merged into the base branch.
-Pull requests help you discuss potential changes before they are merged into the base branch.
-Pull requests help you discuss potential changes before they are merged into the base branch.
-Pull requests help you discuss potential changes before they are merged into the base branch.
-Pull requests help you discuss potential changes before they are merged into the base branch.
-A very long paragraph that wraps onto multiple lines without overlapping or wrapping underneath the icon to it's left
-