From 43b340d06ff3b76a4446c906220a31d77a070c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Fri, 2 Jul 2021 17:32:42 +0200 Subject: [PATCH 01/62] QuickStart: fix closing tag --- .../react-components/FluentUIComponents/QuickStart.stories.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-examples/src/react-components/FluentUIComponents/QuickStart.stories.mdx b/packages/react-examples/src/react-components/FluentUIComponents/QuickStart.stories.mdx index 72638b0cd3d78..4ee8ad709d219 100644 --- a/packages/react-examples/src/react-components/FluentUIComponents/QuickStart.stories.mdx +++ b/packages/react-examples/src/react-components/FluentUIComponents/QuickStart.stories.mdx @@ -26,7 +26,7 @@ import App from './App'; ReactDOM.render( - , + , document.getElementById('root'), ); ``` From c9d5c7d2e5be53a7696fce8ba58d57a7b72e8ee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Fri, 30 Jul 2021 16:06:49 +0200 Subject: [PATCH 02/62] Update RFC/authoring stories --- rfcs/convergence/authoring-stories.md | 36 ++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index 427c598bac333..2d81e67c8880a 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -2,7 +2,7 @@ --- -_List contributors to the proposal:_ @hotell, @miroslavstastny, @ling1726, @andrefcdias +_List contributors to the proposal:_ @hotell, @miroslavstastny, @ling1726, @andrefcdias, @PeterDraex @@ -15,8 +15,11 @@ _List contributors to the proposal:_ @hotell, @miroslavstastny, @ling1726, @andr - [4. should we render descriptions table in Canvas Control pane](#4-should-we-render-descriptions-table-in-canvas-control-pane) - [5. how to author e2e suites for those stories](#5-how-to-author-e2e-suites-for-those-stories) - [6. how to properly annotate stories with TS metadata to get the best DX possible](#6-how-to-properly-annotate-stories-with-ts-metadata-to-get-the-best-dx-possible) - - [7. how structure stories in the storybook nav tree](#7-how-structure-stories-in-the-storybook-nav-tree) - - [8. dissecting big story files into smaller ones](#8-dissecting-big-story-files-into-smaller-ones) + - [7. dissecting big story files into smaller ones](#7-dissecting-big-story-files-into-smaller-ones) + - [8. how structure stories in the storybook nav tree](#8-how-structure-stories-in-the-storybook-nav-tree) + - [9. default story](#9-default-story) + - [10. design of stories](#10-design-of-stories) + - [11. story code must be useful](#11-story-code-must-be-useful) - [Pros and Cons](#pros-and-cons) - [Discarded Solutions](#discarded-solutions) - [Open Issues](#open-issues) @@ -267,11 +270,32 @@ TBA TBA -### 7. how structure stories in the storybook nav tree +### 7. dissecting big story files into smaller ones -TBA +Components with complex API require many long stories, both for documentation and for e2e testing. This creates long files with hundres of lines, which are hard to maintain. How can these files be dissected into smaller ones? + +**Proposal:** + +1. Every component shall have at most one `.stories.tsx` file. This file has a default export with Storybook configuration for the docs page. +2. If putting all stories into one file would make it too long, individual stories might be put into `.story.tsx` files as a named export, and then re-exported from `.stories.tsx` file like this: `export * from ‘./IndividualStoryFile.story’;` +3. If individual story files are employed, `.stories.tsx` file must not contain any stories. + +### 8. how structure stories in the storybook nav tree + +1. Story files should be in the same folder as the component which they are targeting. +2. Name of every .stories.tsx / .story.tsx file should start with name of a component which it is targeting, to improve colocation in alphabetical file ordering. If appropriate, story name should be adjusted via configuration to a well readable name, suitable for the documentation. + +### 9. default story + +1. Every documented component must have a story which supports [Controls](https://storybook.js.org/docs/react/essentials/controls). This story must be called `Default`, so it would be first in the docs page. + +### 10. design of stories + +1. Publicly visible stories should follow Fluent Design Language to give developers better feel for patterns they should utilise. For example, when button is necessary do demonstrate usage of a component, Fluent UI Button should be used instead of pure HTML button. + +### 11. story code must be useful -### 8. dissecting big story files into smaller ones +Public stories should contain only code, which is useful for user to see after clicking on “Show code” in documentation. Extra markup (e.g., container with CSS styles) can be added via [Decorators](https://storybook.js.org/docs/react/writing-stories/decorators). TBA From 5d74494498071e47fa93a096998ab236f5d31ba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Fri, 30 Jul 2021 16:23:23 +0200 Subject: [PATCH 03/62] polish RFC for authoring stories --- rfcs/convergence/authoring-stories.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index 2d81e67c8880a..ce36158bc6582 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -276,28 +276,34 @@ Components with complex API require many long stories, both for documentation an **Proposal:** -1. Every component shall have at most one `.stories.tsx` file. This file has a default export with Storybook configuration for the docs page. +1. Every component can have at most one `.stories.tsx` file. This file has a default export with Storybook configuration for the docs page. 2. If putting all stories into one file would make it too long, individual stories might be put into `.story.tsx` files as a named export, and then re-exported from `.stories.tsx` file like this: `export * from ‘./IndividualStoryFile.story’;` 3. If individual story files are employed, `.stories.tsx` file must not contain any stories. -### 8. how structure stories in the storybook nav tree +### 8. location and naming convention 1. Story files should be in the same folder as the component which they are targeting. -2. Name of every .stories.tsx / .story.tsx file should start with name of a component which it is targeting, to improve colocation in alphabetical file ordering. If appropriate, story name should be adjusted via configuration to a well readable name, suitable for the documentation. +2. Name of every .stories.tsx / .story.tsx file should start with name of a component which it is targeting, to improve colocation in alphabetical file ordering. If appropriate, story name should be adjusted via configuration to a well readable name, suitable for documentation. For example: + +```tsx +export const ButtonPrimary = (props: ButtonProps) => ; +Primary.args = { + primary: true, +}; +Primary.storyName = 'Better story name'; +``` ### 9. default story -1. Every documented component must have a story which supports [Controls](https://storybook.js.org/docs/react/essentials/controls). This story must be called `Default`, so it would be first in the docs page. +1. Every documented component must have a story called `Default`, which supports [Controls](https://storybook.js.org/docs/react/essentials/controls). This will be the first story in Storybook nav tree. ### 10. design of stories -1. Publicly visible stories should follow Fluent Design Language to give developers better feel for patterns they should utilise. For example, when button is necessary do demonstrate usage of a component, Fluent UI Button should be used instead of pure HTML button. +1. Publicly visible stories should follow Fluent Design Language to give developers better feel for patterns they should utilise. For example, when a button is necessary do demonstrate usage of a component, Fluent UI Button should be used instead of a pure HTML button. ### 11. story code must be useful -Public stories should contain only code, which is useful for user to see after clicking on “Show code” in documentation. Extra markup (e.g., container with CSS styles) can be added via [Decorators](https://storybook.js.org/docs/react/writing-stories/decorators). - -TBA +Public stories should contain only code, which is useful for users to see after clicking on “Show code” in documentation. Extra markup (e.g., container with CSS styles) can be added via [Decorators](https://storybook.js.org/docs/react/writing-stories/decorators). ### Pros and Cons From 8034742c8404831fa4292447aba28acc49ed32e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Fri, 30 Jul 2021 16:25:57 +0200 Subject: [PATCH 04/62] fix toc --- rfcs/convergence/authoring-stories.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index ce36158bc6582..48320387ff762 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -16,7 +16,7 @@ _List contributors to the proposal:_ @hotell, @miroslavstastny, @ling1726, @andr - [5. how to author e2e suites for those stories](#5-how-to-author-e2e-suites-for-those-stories) - [6. how to properly annotate stories with TS metadata to get the best DX possible](#6-how-to-properly-annotate-stories-with-ts-metadata-to-get-the-best-dx-possible) - [7. dissecting big story files into smaller ones](#7-dissecting-big-story-files-into-smaller-ones) - - [8. how structure stories in the storybook nav tree](#8-how-structure-stories-in-the-storybook-nav-tree) + - [8. location and naming convention](#8-location-and-naming-convention) - [9. default story](#9-default-story) - [10. design of stories](#10-design-of-stories) - [11. story code must be useful](#11-story-code-must-be-useful) From 7a27b0b445952bdf04a3747ed0cd7a92bf80a17b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Fri, 30 Jul 2021 16:30:32 +0200 Subject: [PATCH 05/62] fix stylization --- rfcs/convergence/authoring-stories.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index 48320387ff762..b8ab36f03630e 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -295,7 +295,7 @@ Primary.storyName = 'Better story name'; ### 9. default story -1. Every documented component must have a story called `Default`, which supports [Controls](https://storybook.js.org/docs/react/essentials/controls). This will be the first story in Storybook nav tree. +1. Every documented component must have a story called `Default`. This story must support manipulation with [Controls](https://storybook.js.org/docs/react/essentials/controls). Ordering of stories will be set up, so this would be the first story in Storybook nav tree. ### 10. design of stories From 13941635f38fb977ddde7b326f9dc610d896c279 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Fri, 30 Jul 2021 16:36:59 +0200 Subject: [PATCH 06/62] fix config example --- rfcs/convergence/authoring-stories.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index b8ab36f03630e..e8201e8842962 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -283,14 +283,14 @@ Components with complex API require many long stories, both for documentation an ### 8. location and naming convention 1. Story files should be in the same folder as the component which they are targeting. -2. Name of every .stories.tsx / .story.tsx file should start with name of a component which it is targeting, to improve colocation in alphabetical file ordering. If appropriate, story name should be adjusted via configuration to a well readable name, suitable for documentation. For example: +2. Name of every .stories.tsx / .story.tsx file should start with name of a component which it is targeting, to improve colocation in alphabetical file ordering. If appropriate, story name should be adjusted via configuration to a well readable name, suitable for documentation, like this: ```tsx export const ButtonPrimary = (props: ButtonProps) => ; -Primary.args = { +ButtonPrimary.args = { primary: true, }; -Primary.storyName = 'Better story name'; +ButtonPrimary.storyName = 'Better story name'; ``` ### 9. default story From 074908e793a9fd8f5c78e6efeb866899d37c6efc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Fri, 30 Jul 2021 17:00:44 +0200 Subject: [PATCH 07/62] remove lists with one bullet --- rfcs/convergence/authoring-stories.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index e8201e8842962..0d67848d270d1 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -295,11 +295,11 @@ ButtonPrimary.storyName = 'Better story name'; ### 9. default story -1. Every documented component must have a story called `Default`. This story must support manipulation with [Controls](https://storybook.js.org/docs/react/essentials/controls). Ordering of stories will be set up, so this would be the first story in Storybook nav tree. +Every documented component must have a story called `Default`. This story must support manipulation with [Controls](https://storybook.js.org/docs/react/essentials/controls). Ordering of stories will be set up, so this would be the first story in Storybook nav tree. ### 10. design of stories -1. Publicly visible stories should follow Fluent Design Language to give developers better feel for patterns they should utilise. For example, when a button is necessary do demonstrate usage of a component, Fluent UI Button should be used instead of a pure HTML button. +Public stories should follow Fluent Design Language to give developers better feel for patterns they should utilise. For example, when a button is necessary do demonstrate usage of a component, Fluent UI Button should be used instead of a pure HTML button. ### 11. story code must be useful From 2536d8614f8cec6f05756aaa4c08e9939e867ffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Tue, 3 Aug 2021 15:34:26 +0200 Subject: [PATCH 08/62] Update rfcs/convergence/authoring-stories.md Co-authored-by: Martin Hochel --- rfcs/convergence/authoring-stories.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index 0d67848d270d1..d0acc8eae5121 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -272,7 +272,7 @@ TBA ### 7. dissecting big story files into smaller ones -Components with complex API require many long stories, both for documentation and for e2e testing. This creates long files with hundres of lines, which are hard to maintain. How can these files be dissected into smaller ones? +Components with complex API require many long stories, both for documentation and for e2e testing. This creates big story files, which are hard to maintain. How can these files be dissected into smaller ones? **Proposal:** From 7eb2523d694bc8b0bfcff4514a98bf420f2e8c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Tue, 3 Aug 2021 15:54:20 +0200 Subject: [PATCH 09/62] .story.tsx -> .stories.tsx --- rfcs/convergence/authoring-stories.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index d0acc8eae5121..df610d5de610e 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -276,14 +276,14 @@ Components with complex API require many long stories, both for documentation an **Proposal:** -1. Every component can have at most one `.stories.tsx` file. This file has a default export with Storybook configuration for the docs page. -2. If putting all stories into one file would make it too long, individual stories might be put into `.story.tsx` files as a named export, and then re-exported from `.stories.tsx` file like this: `export * from ‘./IndividualStoryFile.story’;` +1. Every component can have at most one `.stories.tsx` file with default export which configures metadata about the component. This file must be called `Component.stories.tsx`, for example `Button.stories.tsx`. +2. If putting all stories into one file would make it too long, individual stories might be put into additional `.stories.tsx` files as a named export, and then re-exported from `Component.stories.tsx` file like this: `export * from ‘./IndividualStoryFile.stories’;` 3. If individual story files are employed, `.stories.tsx` file must not contain any stories. ### 8. location and naming convention 1. Story files should be in the same folder as the component which they are targeting. -2. Name of every .stories.tsx / .story.tsx file should start with name of a component which it is targeting, to improve colocation in alphabetical file ordering. If appropriate, story name should be adjusted via configuration to a well readable name, suitable for documentation, like this: +2. Name of every .stories.tsx file should start with name of a component which it is targeting, to improve colocation in alphabetical file ordering. If appropriate, story name should be adjusted via configuration to a well readable name, suitable for documentation, like this: ```tsx export const ButtonPrimary = (props: ButtonProps) => ; From 080702ed88e3ef28ba2394f9624449ba719a4b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Tue, 3 Aug 2021 15:56:47 +0200 Subject: [PATCH 10/62] Update rfcs/convergence/authoring-stories.md --- rfcs/convergence/authoring-stories.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index df610d5de610e..213a6db598ad5 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -282,7 +282,7 @@ Components with complex API require many long stories, both for documentation an ### 8. location and naming convention -1. Story files should be in the same folder as the component which they are targeting. +1. Story files should be in the same folder as the component which they are meant to show off. This will usually be the component which is the most unique to the story. 2. Name of every .stories.tsx file should start with name of a component which it is targeting, to improve colocation in alphabetical file ordering. If appropriate, story name should be adjusted via configuration to a well readable name, suitable for documentation, like this: ```tsx From 97c00aab19db4fe0262ecfbdff63f9290acb6ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Tue, 3 Aug 2021 19:00:12 +0200 Subject: [PATCH 11/62] Update authoring-stories.md --- rfcs/convergence/authoring-stories.md | 37 ++++++++++++++++++++------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index 213a6db598ad5..12c9bbf6bbd9d 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -17,9 +17,10 @@ _List contributors to the proposal:_ @hotell, @miroslavstastny, @ling1726, @andr - [6. how to properly annotate stories with TS metadata to get the best DX possible](#6-how-to-properly-annotate-stories-with-ts-metadata-to-get-the-best-dx-possible) - [7. dissecting big story files into smaller ones](#7-dissecting-big-story-files-into-smaller-ones) - [8. location and naming convention](#8-location-and-naming-convention) - - [9. default story](#9-default-story) - - [10. design of stories](#10-design-of-stories) - - [11. story code must be useful](#11-story-code-must-be-useful) + - [9. UX of stories](#9-ux-of-stories) + - [default story](#default-story) + - [appearence of stories](#appearence-of-stories) + - [story code must be useful](#story-code-must-be-useful) - [Pros and Cons](#pros-and-cons) - [Discarded Solutions](#discarded-solutions) - [Open Issues](#open-issues) @@ -293,17 +294,35 @@ ButtonPrimary.args = { ButtonPrimary.storyName = 'Better story name'; ``` -### 9. default story +### 9. UX of stories -Every documented component must have a story called `Default`. This story must support manipulation with [Controls](https://storybook.js.org/docs/react/essentials/controls). Ordering of stories will be set up, so this would be the first story in Storybook nav tree. +#### default story -### 10. design of stories +The first story in every component must be called `Default`. This story must support manipulation with [Controls](https://storybook.js.org/docs/react/essentials/controls). -Public stories should follow Fluent Design Language to give developers better feel for patterns they should utilise. For example, when a button is necessary do demonstrate usage of a component, Fluent UI Button should be used instead of a pure HTML button. +#### appearence of stories -### 11. story code must be useful +Public stories should follow Fluent Design Language to give developers better feel for patterns they should utilise. For example, when a button is necessary to demonstrate usage of a component, Fluent UI Button should be used instead of a pure HTML button. -Public stories should contain only code, which is useful for users to see after clicking on “Show code” in documentation. Extra markup (e.g., container with CSS styles) can be added via [Decorators](https://storybook.js.org/docs/react/writing-stories/decorators). +#### story code should be useful + +Public stories should, only contain code, which is useful for users to see after clicking on “Show code” in documentation. +Extra markup (e.g., container with CSS styles) can be added via [Decorators](https://storybook.js.org/docs/react/writing-stories/decorators). + +In cases when encapsulation via Decorator is not sufficient and the story needs to contain code which is not relevant to the user, +visible code might be configured manually. However, since this will not work well together with live editing, it should be used sparingly. + +```tsx +// DON’T DO THIS OFTEN +export const ButtonPrimary = () => irrelevant code; +ButtonPrimary.parameters = { + docs: { + source: { + code: 'relevant code', + }, + }, +}; +``` ### Pros and Cons From dd8ed8c7fe1b1c01e1da45881963c4b14282e901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Tue, 3 Aug 2021 19:08:18 +0200 Subject: [PATCH 12/62] Update authoring-stories.md --- rfcs/convergence/authoring-stories.md | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index 12c9bbf6bbd9d..757d190eeabb6 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -306,24 +306,9 @@ Public stories should follow Fluent Design Language to give developers better fe #### story code should be useful -Public stories should, only contain code, which is useful for users to see after clicking on “Show code” in documentation. +Public stories should only contain code, which is useful for users to see after clicking on “Show code” in documentation. Extra markup (e.g., container with CSS styles) can be added via [Decorators](https://storybook.js.org/docs/react/writing-stories/decorators). -In cases when encapsulation via Decorator is not sufficient and the story needs to contain code which is not relevant to the user, -visible code might be configured manually. However, since this will not work well together with live editing, it should be used sparingly. - -```tsx -// DON’T DO THIS OFTEN -export const ButtonPrimary = () => irrelevant code; -ButtonPrimary.parameters = { - docs: { - source: { - code: 'relevant code', - }, - }, -}; -``` - ### Pros and Cons From a6e25a9b8bdc294bdfda2cfee7835720e17e3eda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Tue, 3 Aug 2021 19:28:18 +0200 Subject: [PATCH 13/62] Update authoring-stories.md --- rfcs/convergence/authoring-stories.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index 757d190eeabb6..f1e63919245df 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -18,9 +18,9 @@ _List contributors to the proposal:_ @hotell, @miroslavstastny, @ling1726, @andr - [7. dissecting big story files into smaller ones](#7-dissecting-big-story-files-into-smaller-ones) - [8. location and naming convention](#8-location-and-naming-convention) - [9. UX of stories](#9-ux-of-stories) - - [default story](#default-story) + - [first story is called default](#first-story-is-called-default) - [appearence of stories](#appearence-of-stories) - - [story code must be useful](#story-code-must-be-useful) + - [story code should be useful](#story-code-should-be-useful) - [Pros and Cons](#pros-and-cons) - [Discarded Solutions](#discarded-solutions) - [Open Issues](#open-issues) @@ -296,9 +296,9 @@ ButtonPrimary.storyName = 'Better story name'; ### 9. UX of stories -#### default story +#### first story is called default -The first story in every component must be called `Default`. This story must support manipulation with [Controls](https://storybook.js.org/docs/react/essentials/controls). +The first story in every component must be called `Default`. This story must support manipulation with [Controls](https://storybook.js.org/docs/react/essentials/controls). More details in [chapter 3](#3-should-controls-work-for-all-stories-or-only-for-generaldefault-one). #### appearence of stories From d0c3fbb3df9aa8e32ab2d9366a611167bf4c994a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Wed, 4 Aug 2021 00:51:41 +0200 Subject: [PATCH 14/62] Update rfcs/convergence/authoring-stories.md Co-authored-by: Makoto Morimoto --- rfcs/convergence/authoring-stories.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index f1e63919245df..de5769da47d14 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -19,7 +19,7 @@ _List contributors to the proposal:_ @hotell, @miroslavstastny, @ling1726, @andr - [8. location and naming convention](#8-location-and-naming-convention) - [9. UX of stories](#9-ux-of-stories) - [first story is called default](#first-story-is-called-default) - - [appearence of stories](#appearence-of-stories) + - [appearance of stories](#appearance-of-stories) - [story code should be useful](#story-code-should-be-useful) - [Pros and Cons](#pros-and-cons) - [Discarded Solutions](#discarded-solutions) From b3b1c50d9da1b1d1ad9639d828220722408b9d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Wed, 4 Aug 2021 11:38:02 +0200 Subject: [PATCH 15/62] Update rfcs/convergence/authoring-stories.md Co-authored-by: Makoto Morimoto --- rfcs/convergence/authoring-stories.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index de5769da47d14..cb598d7f9fbba 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -279,7 +279,7 @@ Components with complex API require many long stories, both for documentation an 1. Every component can have at most one `.stories.tsx` file with default export which configures metadata about the component. This file must be called `Component.stories.tsx`, for example `Button.stories.tsx`. 2. If putting all stories into one file would make it too long, individual stories might be put into additional `.stories.tsx` files as a named export, and then re-exported from `Component.stories.tsx` file like this: `export * from ‘./IndividualStoryFile.stories’;` -3. If individual story files are employed, `.stories.tsx` file must not contain any stories. +3. If individual story files are employed, `Component.stories.tsx` file must not contain any stories. ### 8. location and naming convention From cedc49c20cdb097798a45dad2653f98f0161901f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Wed, 4 Aug 2021 11:38:17 +0200 Subject: [PATCH 16/62] Update rfcs/convergence/authoring-stories.md Co-authored-by: Makoto Morimoto --- rfcs/convergence/authoring-stories.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index cb598d7f9fbba..cff9455782fb6 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -300,7 +300,7 @@ ButtonPrimary.storyName = 'Better story name'; The first story in every component must be called `Default`. This story must support manipulation with [Controls](https://storybook.js.org/docs/react/essentials/controls). More details in [chapter 3](#3-should-controls-work-for-all-stories-or-only-for-generaldefault-one). -#### appearence of stories +#### appearance of stories Public stories should follow Fluent Design Language to give developers better feel for patterns they should utilise. For example, when a button is necessary to demonstrate usage of a component, Fluent UI Button should be used instead of a pure HTML button. From 0e5187fbcdd854cb4f08e0d9afd2828440284851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Wed, 4 Aug 2021 11:38:34 +0200 Subject: [PATCH 17/62] Update rfcs/convergence/authoring-stories.md Co-authored-by: Makoto Morimoto --- rfcs/convergence/authoring-stories.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index cff9455782fb6..b55a416bfcc65 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -302,7 +302,7 @@ The first story in every component must be called `Default`. This story must sup #### appearance of stories -Public stories should follow Fluent Design Language to give developers better feel for patterns they should utilise. For example, when a button is necessary to demonstrate usage of a component, Fluent UI Button should be used instead of a pure HTML button. +Public stories should follow Fluent Design Language to give developers better feel for patterns they should utilize. For example, when a button is necessary to demonstrate usage of a component, Fluent UI Button should be used instead of a pure HTML button. #### story code should be useful From ddc13de919dc10730c4a5f6d57d44b843f404fac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Wed, 4 Aug 2021 14:05:32 +0200 Subject: [PATCH 18/62] Update authoring-stories.md --- rfcs/convergence/authoring-stories.md | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index b55a416bfcc65..7b481dba66071 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -304,6 +304,36 @@ The first story in every component must be called `Default`. This story must sup Public stories should follow Fluent Design Language to give developers better feel for patterns they should utilize. For example, when a button is necessary to demonstrate usage of a component, Fluent UI Button should be used instead of a pure HTML button. +##### Do: + +```tsx +import { Button } from '@fluentui/react-button'; + +export const Default = (props: PopoverProps) => ( + + + + + + Content + +); +``` + +##### Don’t: + +```tsx +export const Default = (props: PopoverProps) => ( + + + + + + Content + +); +``` + #### story code should be useful Public stories should only contain code, which is useful for users to see after clicking on “Show code” in documentation. From f05c67fc2ed21a4bbff18c3eb276585fb831b9bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Thu, 5 Aug 2021 18:56:00 +0200 Subject: [PATCH 19/62] Update authoring-stories.md --- rfcs/convergence/authoring-stories.md | 79 +++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 4 deletions(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index 7b481dba66071..7c6919401b207 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -275,11 +275,78 @@ TBA Components with complex API require many long stories, both for documentation and for e2e testing. This creates big story files, which are hard to maintain. How can these files be dissected into smaller ones? -**Proposal:** +#### Proposal 1. Every component can have at most one `.stories.tsx` file with default export which configures metadata about the component. This file must be called `Component.stories.tsx`, for example `Button.stories.tsx`. 2. If putting all stories into one file would make it too long, individual stories might be put into additional `.stories.tsx` files as a named export, and then re-exported from `Component.stories.tsx` file like this: `export * from ‘./IndividualStoryFile.stories’;` -3. If individual story files are employed, `Component.stories.tsx` file must not contain any stories. +3. If individual story files are employed, `Component.stories.tsx` file must not contain any stories besides the default export. + + +##### Good Example 1 - single file + +Button.stories.tsx: +```tsx +import { Meta } from '@storybook/react'; + +export const Default = (props: ButtonProps) => ; +export const ButtonWithIcon = () => ; + +export default { + title: 'Components/Button', + component: Button +} as Meta; +``` + +##### Good Example 2 - multiple files + +Button.stories.tsx: +```tsx +import { Meta } from '@storybook/react'; + +export * from "ButtonWithIcon.stories" +export * from "ButtonDefault.stories" + +export default { + title: 'Components/Button', + component: Button +} as Meta; +``` + +ButtonWithIcon.stories.tsx: +```tsx +export const ButtonWithIcon = () => ; +``` + +ButtonDefault.stories.tsx: +```tsx +export const ButtonDefault = (props: ButtonProps) => ; +ButtonDefault.storyName = "Default" +``` + +##### Bad example - multiple files + +ButtonDefault.stories.tsx: +```tsx +export const ButtonDefault = (props: ButtonProps) => ; +ButtonDefault.storyName = "Default" + +// don’t do this +export default { + title: 'Components/Button', + component: Button +} as Meta; +``` + +ButtonWithIcon.stories.tsx: +```tsx +export const ButtonWithIcon = () => ; + +// don’t do this +export default { + title: 'Components/Button', + component: Button +} as Meta; +``` ### 8. location and naming convention @@ -296,9 +363,13 @@ ButtonPrimary.storyName = 'Better story name'; ### 9. UX of stories -#### first story is called default +#### default story + +Every component must have a story called `Default`, which: +- must be the first story in the component - see examples in [chapter 7](#7-dissecting-big-story-files-into-smaller-ones) for examples +- must support auto generated [Controls](https://storybook.js.org/docs/react/essentials/controls) - more details in [chapter 3](#3-should-controls-work-for-all-stories-or-only-for-generaldefault-one) -The first story in every component must be called `Default`. This story must support manipulation with [Controls](https://storybook.js.org/docs/react/essentials/controls). More details in [chapter 3](#3-should-controls-work-for-all-stories-or-only-for-generaldefault-one). +Under this story, there will be Controls table rendered. #### appearance of stories From b20e6d5d9f0cf184e3dadc61ab4ce4cc3786bf9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Thu, 5 Aug 2021 18:58:02 +0200 Subject: [PATCH 20/62] Update authoring-stories.md --- rfcs/convergence/authoring-stories.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index 7c6919401b207..493f634b07895 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -303,8 +303,8 @@ Button.stories.tsx: ```tsx import { Meta } from '@storybook/react'; -export * from "ButtonWithIcon.stories" export * from "ButtonDefault.stories" +export * from "ButtonWithIcon.stories" export default { title: 'Components/Button', @@ -312,17 +312,17 @@ export default { } as Meta; ``` -ButtonWithIcon.stories.tsx: -```tsx -export const ButtonWithIcon = () => ; -``` - ButtonDefault.stories.tsx: ```tsx export const ButtonDefault = (props: ButtonProps) => ; ButtonDefault.storyName = "Default" ``` +ButtonWithIcon.stories.tsx: +```tsx +export const ButtonWithIcon = () => ; +``` + ##### Bad example - multiple files ButtonDefault.stories.tsx: From d209ba61d48e935a42f4cb677b6bf098ec14aaa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Thu, 5 Aug 2021 19:07:30 +0200 Subject: [PATCH 21/62] Update authoring-stories.md --- rfcs/convergence/authoring-stories.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index 493f634b07895..46117050bad62 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -366,10 +366,10 @@ ButtonPrimary.storyName = 'Better story name'; #### default story Every component must have a story called `Default`, which: -- must be the first story in the component - see examples in [chapter 7](#7-dissecting-big-story-files-into-smaller-ones) for examples +- must be the first story in the component - see [chapter 7](#7-dissecting-big-story-files-into-smaller-ones) for examples - must support auto generated [Controls](https://storybook.js.org/docs/react/essentials/controls) - more details in [chapter 3](#3-should-controls-work-for-all-stories-or-only-for-generaldefault-one) -Under this story, there will be Controls table rendered. +Storybook will render a Controls table under this story. #### appearance of stories From 7e5240892bb81cf2f3a26d7eeb4fa39304a2ccfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Mon, 9 Aug 2021 10:23:56 +0200 Subject: [PATCH 22/62] formatting --- rfcs/convergence/authoring-stories.md | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index 46117050bad62..ee7b08710ec7e 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -281,10 +281,10 @@ Components with complex API require many long stories, both for documentation an 2. If putting all stories into one file would make it too long, individual stories might be put into additional `.stories.tsx` files as a named export, and then re-exported from `Component.stories.tsx` file like this: `export * from ‘./IndividualStoryFile.stories’;` 3. If individual story files are employed, `Component.stories.tsx` file must not contain any stories besides the default export. - ##### Good Example 1 - single file Button.stories.tsx: + ```tsx import { Meta } from '@storybook/react'; @@ -293,32 +293,35 @@ export const ButtonWithIcon = () => ; -ButtonDefault.storyName = "Default" +ButtonDefault.storyName = 'Default'; ``` ButtonWithIcon.stories.tsx: + ```tsx export const ButtonWithIcon = () => ; ``` @@ -326,25 +329,27 @@ export const ButtonWithIcon = () => ; -ButtonDefault.storyName = "Default" +ButtonDefault.storyName = 'Default'; // don’t do this export default { title: 'Components/Button', - component: Button + component: Button, } as Meta; ``` ButtonWithIcon.stories.tsx: + ```tsx export const ButtonWithIcon = () => ; // don’t do this export default { title: 'Components/Button', - component: Button + component: Button, } as Meta; ``` @@ -366,6 +371,7 @@ ButtonPrimary.storyName = 'Better story name'; #### default story Every component must have a story called `Default`, which: + - must be the first story in the component - see [chapter 7](#7-dissecting-big-story-files-into-smaller-ones) for examples - must support auto generated [Controls](https://storybook.js.org/docs/react/essentials/controls) - more details in [chapter 3](#3-should-controls-work-for-all-stories-or-only-for-generaldefault-one) From 494981a74335fed45d9df9e2822ed3ff7685b6de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Mon, 9 Aug 2021 10:26:17 +0200 Subject: [PATCH 23/62] heading to bold text --- rfcs/convergence/authoring-stories.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index ee7b08710ec7e..f010f4ff3ae1d 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -281,7 +281,7 @@ Components with complex API require many long stories, both for documentation an 2. If putting all stories into one file would make it too long, individual stories might be put into additional `.stories.tsx` files as a named export, and then re-exported from `Component.stories.tsx` file like this: `export * from ‘./IndividualStoryFile.stories’;` 3. If individual story files are employed, `Component.stories.tsx` file must not contain any stories besides the default export. -##### Good Example 1 - single file +**Good Example 1 - single file** Button.stories.tsx: @@ -297,7 +297,7 @@ export default { } as Meta; ``` -##### Good Example 2 - multiple files +**Good Example 2 - multiple files** Button.stories.tsx: @@ -326,7 +326,7 @@ ButtonWithIcon.stories.tsx: export const ButtonWithIcon = () => ; ``` -##### Bad example - multiple files +**Bad example - multiple files** ButtonDefault.stories.tsx: @@ -381,7 +381,7 @@ Storybook will render a Controls table under this story. Public stories should follow Fluent Design Language to give developers better feel for patterns they should utilize. For example, when a button is necessary to demonstrate usage of a component, Fluent UI Button should be used instead of a pure HTML button. -##### Do: +**Do:** ```tsx import { Button } from '@fluentui/react-button'; @@ -397,7 +397,7 @@ export const Default = (props: PopoverProps) => ( ); ``` -##### Don’t: +**Don’t:** ```tsx export const Default = (props: PopoverProps) => ( From 3d7a839ec35377eb392f0db6db4a61a610ff3cbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Mon, 9 Aug 2021 10:29:19 +0200 Subject: [PATCH 24/62] use @filename pragma --- rfcs/convergence/authoring-stories.md | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index f010f4ff3ae1d..2d75bbefe8a39 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -283,9 +283,8 @@ Components with complex API require many long stories, both for documentation an **Good Example 1 - single file** -Button.stories.tsx: - ```tsx +@filename Button.stories.tsx import { Meta } from '@storybook/react'; export const Default = (props: ButtonProps) => ; @@ -299,9 +298,8 @@ export default { **Good Example 2 - multiple files** -Button.stories.tsx: - ```tsx +@filename Button.stories.tsx import { Meta } from '@storybook/react'; export * from 'ButtonDefault.stories'; @@ -313,24 +311,21 @@ export default { } as Meta; ``` -ButtonDefault.stories.tsx: - ```tsx +@filename ButtonDefault.stories.tsx export const ButtonDefault = (props: ButtonProps) => ; ButtonDefault.storyName = 'Default'; ``` -ButtonWithIcon.stories.tsx: - ```tsx +@filename ButtonWithIcon.stories.tsx export const ButtonWithIcon = () => ; ``` **Bad example - multiple files** -ButtonDefault.stories.tsx: - ```tsx +@filename ButtonDefault.stories.tsx export const ButtonDefault = (props: ButtonProps) => ; ButtonDefault.storyName = 'Default'; @@ -341,9 +336,8 @@ export default { } as Meta; ``` -ButtonWithIcon.stories.tsx: - ```tsx +@filename ButtonWithIcon.stories.tsx export const ButtonWithIcon = () => ; // don’t do this From f3d5ec22da8ce2a76f4678fabe45c1b67d5e880e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Mon, 9 Aug 2021 10:44:06 +0200 Subject: [PATCH 25/62] add component to imports --- rfcs/convergence/authoring-stories.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index 2d75bbefe8a39..c5ddc42870ca8 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -285,6 +285,7 @@ Components with complex API require many long stories, both for documentation an ```tsx @filename Button.stories.tsx +import { Button, ButtonProps } from './Button'; // the component import { Meta } from '@storybook/react'; export const Default = (props: ButtonProps) => ; @@ -300,6 +301,7 @@ export default { ```tsx @filename Button.stories.tsx +import { Button } from './Button'; // the component import { Meta } from '@storybook/react'; export * from 'ButtonDefault.stories'; From 754d075c20053af52b1662bf5873e94706cb3583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Mon, 9 Aug 2021 10:47:37 +0200 Subject: [PATCH 26/62] make "first" more explicit --- rfcs/convergence/authoring-stories.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index c5ddc42870ca8..a146eadf5ca90 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -304,6 +304,7 @@ export default { import { Button } from './Button'; // the component import { Meta } from '@storybook/react'; +// 💡 `Default` re-export needs to be always first ! export * from 'ButtonDefault.stories'; export * from 'ButtonWithIcon.stories'; @@ -368,7 +369,7 @@ ButtonPrimary.storyName = 'Better story name'; Every component must have a story called `Default`, which: -- must be the first story in the component - see [chapter 7](#7-dissecting-big-story-files-into-smaller-ones) for examples +- must be defined as first story inline or as first re-expored story when using multi-file pattern - see [chapter 7](#7-dissecting-big-story-files-into-smaller-ones) for examples - must support auto generated [Controls](https://storybook.js.org/docs/react/essentials/controls) - more details in [chapter 3](#3-should-controls-work-for-all-stories-or-only-for-generaldefault-one) Storybook will render a Controls table under this story. From e982e55a0d94f4c258c0529fdee06b46bef7e047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Mon, 9 Aug 2021 11:27:12 +0200 Subject: [PATCH 27/62] add bad example --- rfcs/convergence/authoring-stories.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index a146eadf5ca90..ec1d68421bde3 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -325,7 +325,7 @@ ButtonDefault.storyName = 'Default'; export const ButtonWithIcon = () => ; ``` -**Bad example - multiple files** +**Bad example 1** - only Component.stories.tsx can have a default export ```tsx @filename ButtonDefault.stories.tsx @@ -350,6 +350,26 @@ export default { } as Meta; ``` +**Bad example 2** - don’t mix re-exports with inline definition within the main story + +```tsx +@filename Button.stories.tsx +export const ButtonDefault = (props: ButtonProps) => ; +ButtonDefault.storyName = 'Default'; + +export * from 'ButtonWithIcon.stories'; + +export default { + title: 'Components/Button', + component: Button, +} as Meta; +``` + +```tsx +@filename ButtonWithIcon.stories.tsx +export const ButtonWithIcon = () => ; +``` + ### 8. location and naming convention 1. Story files should be in the same folder as the component which they are meant to show off. This will usually be the component which is the most unique to the story. From e820ea0b5dd8628d00698a5e15c9565106c03574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Mon, 9 Aug 2021 11:33:49 +0200 Subject: [PATCH 28/62] code style --- rfcs/convergence/authoring-stories.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/rfcs/convergence/authoring-stories.md b/rfcs/convergence/authoring-stories.md index ec1d68421bde3..4af74c15af7d2 100644 --- a/rfcs/convergence/authoring-stories.md +++ b/rfcs/convergence/authoring-stories.md @@ -284,7 +284,7 @@ Components with complex API require many long stories, both for documentation an **Good Example 1 - single file** ```tsx -@filename Button.stories.tsx +// @filename Button.stories.tsx import { Button, ButtonProps } from './Button'; // the component import { Meta } from '@storybook/react'; @@ -300,7 +300,7 @@ export default { **Good Example 2 - multiple files** ```tsx -@filename Button.stories.tsx +// @filename Button.stories.tsx import { Button } from './Button'; // the component import { Meta } from '@storybook/react'; @@ -315,20 +315,20 @@ export default { ``` ```tsx -@filename ButtonDefault.stories.tsx +// @filename ButtonDefault.stories.tsx export const ButtonDefault = (props: ButtonProps) => ; ButtonDefault.storyName = 'Default'; ``` ```tsx -@filename ButtonWithIcon.stories.tsx +// @filename ButtonWithIcon.stories.tsx export const ButtonWithIcon = () => ; ``` -**Bad example 1** - only Component.stories.tsx can have a default export +**Bad example 1** - only `Component.stories.tsx` can have a default export ```tsx -@filename ButtonDefault.stories.tsx +// @filename ButtonDefault.stories.tsx export const ButtonDefault = (props: ButtonProps) => ; ButtonDefault.storyName = 'Default'; @@ -340,7 +340,7 @@ export default { ``` ```tsx -@filename ButtonWithIcon.stories.tsx +// @filename ButtonWithIcon.stories.tsx export const ButtonWithIcon = () => ; // don’t do this @@ -353,7 +353,7 @@ export default { **Bad example 2** - don’t mix re-exports with inline definition within the main story ```tsx -@filename Button.stories.tsx +// @filename Button.stories.tsx export const ButtonDefault = (props: ButtonProps) => ; ButtonDefault.storyName = 'Default'; @@ -366,7 +366,7 @@ export default { ``` ```tsx -@filename ButtonWithIcon.stories.tsx +// @filename ButtonWithIcon.stories.tsx export const ButtonWithIcon = () => ; ``` From cb8fac9ca196fe27d785cc65c20d3bfadf92f706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Tue, 31 Aug 2021 19:18:13 +0200 Subject: [PATCH 29/62] export to codesandbox --- .storybook/main.js | 1 + .storybook/preview.js | 14 + .../src/components/Button/Button.stories.tsx | 170 +----- .../components/Button/ButtonBlock.stories.tsx | 15 + .../Button/ButtonCircular.stories.tsx | 19 + .../Button/ButtonDefault.stories.tsx | 4 + .../Button/ButtonDisabled.stories.tsx | 38 ++ .../Button/ButtonEmphasis.stories.tsx | 24 + .../components/Button/ButtonSize.stories.tsx | 41 ++ .../Button/ButtonWithIcon.stories.tsx | 22 + .../Button/ButtonWithLongText.stories.tsx | 16 + packages/react-components/package.json | 3 +- yarn.lock | 574 +++++++++++++++++- 13 files changed, 759 insertions(+), 182 deletions(-) create mode 100644 packages/react-button/src/components/Button/ButtonBlock.stories.tsx create mode 100644 packages/react-button/src/components/Button/ButtonCircular.stories.tsx create mode 100644 packages/react-button/src/components/Button/ButtonDefault.stories.tsx create mode 100644 packages/react-button/src/components/Button/ButtonDisabled.stories.tsx create mode 100644 packages/react-button/src/components/Button/ButtonEmphasis.stories.tsx create mode 100644 packages/react-button/src/components/Button/ButtonSize.stories.tsx create mode 100644 packages/react-button/src/components/Button/ButtonWithIcon.stories.tsx create mode 100644 packages/react-button/src/components/Button/ButtonWithLongText.stories.tsx diff --git a/.storybook/main.js b/.storybook/main.js index 30c501933e30d..55bf78835d4d0 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -39,6 +39,7 @@ module.exports = /** @type {Omit} */ ({ '@storybook/addon-a11y', '@storybook/addon-knobs/preset', 'storybook-addon-performance', + 'storybook-addon-export-to-codesandbox', ], webpackFinal: config => { const tsPaths = new TsconfigPathsPlugin({ diff --git a/.storybook/preview.js b/.storybook/preview.js index fef17237e88a9..b421a65794b85 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -15,4 +15,18 @@ export const parameters = { excludeDecorators: true, }, }, + exportToCodeSandbox: { + getStoryFiles: () => { + const webpackContext = require.context('!!raw-loader!../packages/', true, /\.stories\.tsx$/); + + /** @type { {[key: string]: string} } */ + const storyFiles = {}; + + webpackContext.keys().forEach(filename => { + storyFiles['.' + filename] = webpackContext(filename).default; + }); + + return storyFiles; + }, + }, }; diff --git a/packages/react-button/src/components/Button/Button.stories.tsx b/packages/react-button/src/components/Button/Button.stories.tsx index 0d6a4f1cf4a4b..fed9f3e4cb259 100644 --- a/packages/react-button/src/components/Button/Button.stories.tsx +++ b/packages/react-button/src/components/Button/Button.stories.tsx @@ -1,168 +1,18 @@ import * as React from 'react'; -import { Button, ButtonProps } from '../../Button'; +import { Button } from '../../Button'; import { Meta } from '@storybook/react'; -import { CalendarMonth24Regular } from '@fluentui/react-icons'; + import descriptionMd from './ButtonDescription.md'; import bestPracticesMd from './ButtonBestPractices.md'; -export const Default = (props: ButtonProps) => ; - -export const Emphasis = () => ( - <> - - - - - - -); -Emphasis.parameters = { - docs: { - description: { - story: - '- `primary` button is used for the most important action on the page or in a view\n' + - '- `default` button is used for subordinate actions\n' + - '- `outline` has no background styling and is emphasized through the styling of its content and borders\n' + - '- `transparent` has no background or border styling and is just emphasized through its content styling\n' + - '- `subtle` button blends into its background and becomes less emphasized\n', - }, - }, -}; - -export const ButtonWithIcon = () => ( - <> - - - - - - - - - - - -); -BlockButton.parameters = { - docs: { - description: { - story: 'A button can fill the width of its container.', - }, - }, -}; - -export const DisabledButton = () => { - const groupStyles: React.CSSProperties = { display: 'flex', flexWrap: 'wrap', gap: '0.5em' }; - - return ( - <> -
- - - -
-
- - - -
- - ); -}; -DisabledButton.parameters = { - docs: { - description: { - story: `A button can be \`disabled\` or \`disabledFocusable\`. - \`disabledFocusable\` is used in scenarios where it is important to keep a consistent tab order - for screen reader and keyboard users. The primary example of this pattern is when - the disabled button is in a menu or a commandbar and is seldom used for standalone buttons.`, - }, - }, -}; - -export const ButtonWithLongText = () => ( - <> - - - -); -ButtonWithLongText.parameters = { - docs: { - description: { - story: 'Text truncates after it hits the max width theme token value.', - }, - }, -}; +export { Emphasis } from './ButtonEmphasis.stories'; +export { Default } from './ButtonDefault.stories'; +export { ButtonDisabled } from './ButtonDisabled.stories'; +export { ButtonWithIcon } from './ButtonWithIcon.stories'; +export { ButtonCircular } from './ButtonCircular.stories'; +export { ButtonSize } from './ButtonSize.stories'; +export { ButtonBlock } from './ButtonBlock.stories'; +export { ButtonWithLongText } from './ButtonWithLongText.stories'; export default { title: 'Components/Button', diff --git a/packages/react-button/src/components/Button/ButtonBlock.stories.tsx b/packages/react-button/src/components/Button/ButtonBlock.stories.tsx new file mode 100644 index 0000000000000..0daba11a4ce4e --- /dev/null +++ b/packages/react-button/src/components/Button/ButtonBlock.stories.tsx @@ -0,0 +1,15 @@ +import * as React from 'react'; +import { Button } from '@fluentui/react-button'; + +export const ButtonBlock = () => ( + <> + + +); +ButtonBlock.parameters = { + docs: { + description: { + story: 'A button can fill the width of its container.', + }, + }, +}; diff --git a/packages/react-button/src/components/Button/ButtonCircular.stories.tsx b/packages/react-button/src/components/Button/ButtonCircular.stories.tsx new file mode 100644 index 0000000000000..662998428b2e0 --- /dev/null +++ b/packages/react-button/src/components/Button/ButtonCircular.stories.tsx @@ -0,0 +1,19 @@ +import * as React from 'react'; +import { Button } from '@fluentui/react-button'; +import { CalendarMonth24Regular } from '@fluentui/react-icons'; + +export const ButtonCircular = () => ( + <> + + ; diff --git a/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx b/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx new file mode 100644 index 0000000000000..c9b2404184b29 --- /dev/null +++ b/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx @@ -0,0 +1,38 @@ +import * as React from 'react'; +import { Button } from '@fluentui/react-button'; +import { CalendarMonth24Regular } from '@fluentui/react-icons'; + +export const ButtonDisabled = () => { + const groupStyles: React.CSSProperties = { display: 'flex', flexWrap: 'wrap', gap: '0.5em' }; + + return ( + <> +
+ + + +
+
+ + + +
+ + ); +}; +ButtonDisabled.parameters = { + docs: { + description: { + story: `A button can be \`disabled\` or \`disabledFocusable\`. + \`disabledFocusable\` is used in scenarios where it is important to keep a consistent tab order + for screen reader and keyboard users. The primary example of this pattern is when + the disabled button is in a menu or a commandbar and is seldom used for standalone buttons.`, + }, + }, +}; diff --git a/packages/react-button/src/components/Button/ButtonEmphasis.stories.tsx b/packages/react-button/src/components/Button/ButtonEmphasis.stories.tsx new file mode 100644 index 0000000000000..99455b0896e16 --- /dev/null +++ b/packages/react-button/src/components/Button/ButtonEmphasis.stories.tsx @@ -0,0 +1,24 @@ +import * as React from 'react'; +import { Button } from '@fluentui/react-button'; + +export const Emphasis = () => ( + <> + + + + + + +); +Emphasis.parameters = { + docs: { + description: { + story: + '- `primary` button is used for the most important action on the page or in a view\n' + + '- `default` button is used for subordinate actions\n' + + '- `outline` has no background styling and is emphasized through the styling of its content and borders\n' + + '- `transparent` has no background or border styling and is just emphasized through its content styling\n' + + '- `subtle` button blends into its background and becomes less emphasized\n', + }, + }, +}; diff --git a/packages/react-button/src/components/Button/ButtonSize.stories.tsx b/packages/react-button/src/components/Button/ButtonSize.stories.tsx new file mode 100644 index 0000000000000..784a6506b993f --- /dev/null +++ b/packages/react-button/src/components/Button/ButtonSize.stories.tsx @@ -0,0 +1,41 @@ +import * as React from 'react'; +import { Button } from '@fluentui/react-button'; +import { CalendarMonth24Regular } from '@fluentui/react-icons'; + +export const ButtonSize = () => { + const groupStyles: React.CSSProperties = { display: 'flex', flexWrap: 'wrap', gap: '0.5em' }; + const headerStyles: React.CSSProperties = { width: '100%', margin: 0 }; + return ( + <> +
+

small

+ + +
+
+

medium

+ + +
+
+

large

+ + +
+ + ); +}; +ButtonSize.parameters = { + docs: { + description: { + story: 'A button supports `small`, `medium` and `large` size. Default size is `medium`.', + }, + }, +}; diff --git a/packages/react-button/src/components/Button/ButtonWithIcon.stories.tsx b/packages/react-button/src/components/Button/ButtonWithIcon.stories.tsx new file mode 100644 index 0000000000000..64a352101381c --- /dev/null +++ b/packages/react-button/src/components/Button/ButtonWithIcon.stories.tsx @@ -0,0 +1,22 @@ +import * as React from 'react'; +import { Button } from '@fluentui/react-button'; +import { CalendarMonth24Regular } from '@fluentui/react-icons'; + +export const ButtonWithIcon = () => ( + <> + + + + + +); +ButtonWithLongText.parameters = { + docs: { + description: { + story: 'Text truncates after it hits the max width theme token value.', + }, + }, +}; diff --git a/packages/react-components/package.json b/packages/react-components/package.json index 9d4d3bcfabc2e..cf67f401cf90c 100644 --- a/packages/react-components/package.json +++ b/packages/react-components/package.json @@ -22,7 +22,7 @@ "start": "yarn storybook", "docs": "api-extractor run --config=config/api-extractor.local.json --local", "build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/react-components/src && yarn docs", - "storybook": "start-storybook --port 3000 -s ./public", + "storybook": "start-storybook --port 3000 -s ./public --no-manager-cache", "build-storybook": "build-storybook -s ./public -o ./dist/storybook", "test": "jest" }, @@ -51,6 +51,7 @@ "@fluentui/react-theme": "^9.0.0-alpha.22", "@fluentui/react-tooltip": "^9.0.0-alpha.75", "@fluentui/react-utilities": "^9.0.0-alpha.43", + "storybook-addon-export-to-codesandbox": "^0.1.8", "tslib": "^2.1.0" }, "peerDependencies": { diff --git a/yarn.lock b/yarn.lock index 18b43efa461e3..ca8c772d4d85a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5968,7 +5968,7 @@ after@0.8.2: resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" integrity sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8= -agent-base@4, agent-base@^4.3.0: +agent-base@4, agent-base@^4.1.0, agent-base@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== @@ -5989,7 +5989,7 @@ agent-base@~4.2.1: dependencies: es6-promisify "^5.0.0" -agentkeepalive@^3.4.1: +agentkeepalive@^3.3.0, agentkeepalive@^3.4.1: version "3.5.2" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.5.2.tgz#a113924dd3fa24a0bc3b78108c450c2abee00f67" integrity sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ== @@ -6836,6 +6836,21 @@ axe-sarif-converter@^2.0.1: "@types/sarif" "2.1.1" axe-core "^3.2.2" +axios@0.21.1: + version "0.21.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" + integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== + dependencies: + follow-redirects "^1.10.0" + +axios@^0.18.1: + version "0.18.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.1.tgz#ff3f0de2e7b5d180e757ad98000f1081b87bcea3" + integrity sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g== + dependencies: + follow-redirects "1.5.10" + is-buffer "^2.0.2" + axobject-query@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be" @@ -7405,6 +7420,11 @@ binary@^0.3.0: buffers "~0.1.1" chainsaw "~0.1.0" +binaryextensions@^2.1.2: + version "2.3.0" + resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-2.3.0.tgz#1d269cbf7e6243ea886aa41453c3651ccbe13c22" + integrity sha512-nAihlQsYGyc5Bwq6+EsubvANYGExeJKHDO3RjnvwU042fawQTQfM3Kxn7IHUXQOz4bzfwsGYYHGSvXyW4zOGLg== + bl@^1.0.0: version "1.2.3" resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" @@ -7432,7 +7452,7 @@ blob@0.0.5: resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.5.tgz#d680eeef25f8cd91ad533f5b01eed48e64caf683" integrity sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig== -bluebird@^3.0.6, bluebird@^3.3.5, bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5, bluebird@^3.7.2: +bluebird@^3.0.6, bluebird@^3.3.5, bluebird@^3.5.0, bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5, bluebird@^3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== @@ -7807,6 +7827,25 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== +cacache@^10.0.0: + version "10.0.4" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.4.tgz#6452367999eff9d4188aefd9a14e9d7c6a263460" + integrity sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA== + dependencies: + bluebird "^3.5.1" + chownr "^1.0.1" + glob "^7.1.2" + graceful-fs "^4.1.11" + lru-cache "^4.1.1" + mississippi "^2.0.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.2" + ssri "^5.2.4" + unique-filename "^1.1.0" + y18n "^4.0.0" + cacache@^12.0.0, cacache@^12.0.3: version "12.0.4" resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" @@ -7895,6 +7934,25 @@ cacache@^15.0.4: tar "^6.0.2" unique-filename "^1.1.1" +cacache@^9.2.9: + version "9.3.0" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-9.3.0.tgz#9cd58f2dd0b8c8cacf685b7067b416d6d3cf9db1" + integrity sha512-Vbi8J1XfC8v+FbQ6QkOtKXsHpPnB0i9uMeYFJoj40EbdOsEqWB3DPpNjfsnYBkqOPYA8UvrqH6FZPpBP0zdN7g== + dependencies: + bluebird "^3.5.0" + chownr "^1.0.1" + glob "^7.1.2" + graceful-fs "^4.1.11" + lru-cache "^4.1.1" + mississippi "^1.3.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.1" + ssri "^4.1.6" + unique-filename "^1.1.0" + y18n "^3.2.1" + cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -8322,7 +8380,7 @@ chokidar@^3.0.0, chokidar@^3.2.1, chokidar@^3.3.0, chokidar@^3.4.1, chokidar@^3. optionalDependencies: fsevents "~2.3.2" -chownr@^1.1.1, chownr@^1.1.2: +chownr@^1.0.1, chownr@^1.1.1, chownr@^1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== @@ -8441,6 +8499,11 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" +cli-spinners@^1.0.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.3.1.tgz#002c1990912d0d59580c93bd36c056de99e4259a" + integrity sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg== + cli-spinners@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.3.0.tgz#0632239a4b5aa4c958610142c34bb7a651fc8df5" @@ -8613,6 +8676,47 @@ code-point-at@^1.0.0: resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= +codesandbox-import-util-types@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/codesandbox-import-util-types/-/codesandbox-import-util-types-2.2.3.tgz#b354b2f732ad130e119ebd9ead3bda3be5981a54" + integrity sha512-Qj00p60oNExthP2oR3vvXmUGjukij+rxJGuiaKM6tyUmSyimdZsqHI/TUvFFClAffk9s7hxGnQgWQ8KCce27qQ== + +codesandbox-import-utils@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/codesandbox-import-utils/-/codesandbox-import-utils-2.2.3.tgz#f7b4801245b381cb8c90fe245e336624e19b6c84" + integrity sha512-ymtmcgZKU27U+nM2qUb21aO8Ut/u2S9s6KorOgG81weP+NA0UZkaHKlaRqbLJ9h4i/4FLvwmEXYAnTjNmp6ogg== + dependencies: + codesandbox-import-util-types "^2.2.3" + istextorbinary "^2.2.1" + lz-string "^1.4.4" + +codesandbox@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/codesandbox/-/codesandbox-2.2.3.tgz#092de403506d9e4c5358cd61dc84068c3ee8ceea" + integrity sha512-IAkWFk6UUglOhSemI7UFgNNL/jgg+1YjVEIllFULLgsaHhFnY51pCqAifMNuAd5d9Zp4Nk/xMgrEaGNV0L4Xlg== + dependencies: + axios "^0.18.1" + chalk "^2.4.1" + codesandbox-import-util-types "^2.2.3" + codesandbox-import-utils "^2.2.3" + commander "^2.9.0" + datauri "^3.0.0" + filesize "^3.6.1" + fs-extra "^3.0.1" + git-branch "^1.0.0" + git-repo-name "^0.6.0" + git-username "^0.5.0" + humps "^2.0.1" + inquirer "^6.2.2" + lodash "^4.17.5" + lz-string "^1.4.4" + ms "^2.0.0" + open "^6.3.0" + ora "^1.3.0" + pacote "^2.7.36" + shortid "^2.2.8" + update-notifier "^2.2.0" + codesandboxer@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/codesandboxer/-/codesandboxer-1.0.3.tgz#a2530a15eb9395f2c6f25e4b8064063dfb7b12f9" @@ -8751,7 +8855,7 @@ commander@6.1.0: resolved "https://registry.yarnpkg.com/commander/-/commander-6.1.0.tgz#f8d722b78103141006b66f4c7ba1e97315ba75bc" integrity sha512-wl7PNrYWd2y5mp1OK/LhTlv8Ff4kQJQRXXAvF+uU/TPNiVJUxZLRYGj/B0y/lPGAVcSbJqH2Za/cvHmrPMC8mA== -commander@^2.18.0, commander@^2.19.0, commander@^2.20.0, commander@^2.7.1, commander@^2.8.1: +commander@^2.18.0, commander@^2.19.0, commander@^2.20.0, commander@^2.7.1, commander@^2.8.1, commander@^2.9.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -9552,6 +9656,13 @@ custom-event@~1.0.0: resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" integrity sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU= +cwd@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/cwd/-/cwd-0.9.1.tgz#41e10a7e1ab833dc59c2eca83814c7de77b5a4fd" + integrity sha1-QeEKfhq4M9xZwuyoOBTH3ne1pP0= + dependencies: + find-pkg "^0.1.0" + cyclist@~0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" @@ -9824,6 +9935,14 @@ data-urls@^2.0.0: whatwg-mimetype "^2.3.0" whatwg-url "^8.0.0" +datauri@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/datauri/-/datauri-3.0.0.tgz#6196997e9a7bbbee81b60e8c8acb1a2c871e2349" + integrity sha512-NeDFuUPV1YCpCn8MUIcDk1QnuyenUHs7f4Q5P0n9FFA0neKFrfEH9esR+YMW95BplbYfdmjbs0Pl/ZGAaM2QHQ== + dependencies: + image-size "0.8.3" + mimer "1.1.0" + date-fns@^1.27.2: version "1.30.1" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" @@ -9875,7 +9994,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8, debug@^2.6. dependencies: ms "2.0.0" -debug@3.1.0, debug@~3.1.0: +debug@3.1.0, debug@=3.1.0, debug@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== @@ -10699,6 +10818,14 @@ ecdsa-sig-formatter@1.0.11: dependencies: safe-buffer "^5.0.1" +editions@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/editions/-/editions-2.3.1.tgz#3bc9962f1978e801312fbd0aebfed63b49bfe698" + integrity sha512-ptGvkwTvGdGfC0hfhKg0MT+TRLRKGtUiWGBInxOm5pz7ssADezahjCUaYuZ8Dr+C05FW0AECIIPt4WBxVINEhA== + dependencies: + errlop "^2.0.0" + semver "^6.3.0" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -10989,6 +11116,11 @@ err-code@^1.0.0: resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA= +errlop@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/errlop/-/errlop-2.2.0.tgz#1ff383f8f917ae328bebb802d6ca69666a42d21b" + integrity sha512-e64Qj9+4aZzjzzFpZC7p5kmm/ccCrbLhAJplhsDXQFs87XTsXwOpH4s1Io2s90Tau/8r2j9f4l/thhDevRjzxw== + errno@^0.1.3, errno@~0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" @@ -11659,6 +11791,13 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" +expand-tilde@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-1.2.2.tgz#0b81eba897e5a3d31d1c3d102f8f01441e559449" + integrity sha1-C4HrqJflo9MdHD0QL48BRB5VlEk= + dependencies: + os-homedir "^1.0.1" + expand-tilde@^2.0.0, expand-tilde@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" @@ -12088,6 +12227,11 @@ file-loader@6.2.0, file-loader@^6.2.0: loader-utils "^2.0.0" schema-utils "^3.0.0" +file-name@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/file-name/-/file-name-0.1.0.tgz#12b122f120f9c34dbc176c1ab81a548aced6def7" + integrity sha1-ErEi8SD5w028F2wauBpUis7W3vc= + file-system-cache@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/file-system-cache/-/file-system-cache-1.0.5.tgz#84259b36a2bbb8d3d6eb1021d3132ffe64cfff4f" @@ -12228,11 +12372,26 @@ find-cache-dir@^3.3.1: make-dir "^3.0.2" pkg-dir "^4.1.0" +find-file-up@^0.1.2: + version "0.1.3" + resolved "https://registry.yarnpkg.com/find-file-up/-/find-file-up-0.1.3.tgz#cf68091bcf9f300a40da411b37da5cce5a2fbea0" + integrity sha1-z2gJG8+fMApA2kEbN9pczlovvqA= + dependencies: + fs-exists-sync "^0.1.0" + resolve-dir "^0.1.0" + find-free-port@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/find-free-port/-/find-free-port-2.0.0.tgz#4b22e5f6579eb1a38c41ac6bcb3efed1b6da9b1b" integrity sha1-SyLl9leesaOMQaxryz7+0bbamxs= +find-pkg@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/find-pkg/-/find-pkg-0.1.2.tgz#1bdc22c06e36365532e2a248046854b9788da557" + integrity sha1-G9wiwG42NlUy4qJIBGhUuXiNpVc= + dependencies: + find-file-up "^0.1.2" + find-root@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" @@ -12384,6 +12543,13 @@ flush-write-stream@^1.0.0, flush-write-stream@^1.0.2: inherits "^2.0.3" readable-stream "^2.3.6" +follow-redirects@1.5.10: + version "1.5.10" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" + integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== + dependencies: + debug "=3.1.0" + follow-redirects@^1.0.0: version "1.7.0" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.7.0.tgz#489ebc198dc0e7f64167bd23b03c4c19b5784c76" @@ -12573,6 +12739,15 @@ fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" +fs-extra@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" + integrity sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE= + dependencies: + graceful-fs "^4.1.2" + jsonfile "^3.0.0" + universalify "^0.1.0" + fs-extra@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" @@ -12736,6 +12911,11 @@ generic-names@^2.0.1: dependencies: loader-utils "^1.1.0" +genfun@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/genfun/-/genfun-4.0.1.tgz#ed10041f2e4a7f1b0a38466d17a5c3e27df1dfc1" + integrity sha1-7RAEHy5KfxsKOEZtF6XD4n3x38E= + genfun@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537" @@ -12885,6 +13065,11 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" +git-branch@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/git-branch/-/git-branch-1.0.0.tgz#64cc7dd75da2d81a9d4679087c1f8b56e6bd2d3d" + integrity sha512-ZTzuqw5Df8fyLXQWrX6hK+4FpNCdKzMcERlxENEGO5aKcLmG7MAszhrMhluUKNKmOS/JAGijDMQDXDCDw1mE/A== + git-config-path@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/git-config-path/-/git-config-path-1.0.1.tgz#6d33f7ed63db0d0e118131503bab3aca47d54664" @@ -12913,6 +13098,16 @@ git-remote-origin-url@^2.0.0: gitconfiglocal "^1.0.0" pify "^2.3.0" +git-repo-name@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/git-repo-name/-/git-repo-name-0.6.0.tgz#af09884656aa537ec625c7087008175cd61228ff" + integrity sha1-rwmIRlaqU37GJccIcAgXXNYSKP8= + dependencies: + cwd "^0.9.1" + file-name "^0.1.0" + lazy-cache "^1.0.4" + remote-origin-url "^0.5.1" + git-semver-tags@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-2.0.2.tgz#f506ec07caade191ac0c8d5a21bdb8131b4934e3" @@ -12944,6 +13139,13 @@ git-url-parse@^11.1.2: dependencies: git-up "^4.0.0" +git-username@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/git-username/-/git-username-0.5.1.tgz#432a41b34a19607892354004c9893a8829ffa4f0" + integrity sha512-xjUjrj3i4kup2A3a/ZVZB1Nt0PUX7SU7KeVqIbXPdslT7NbNfyO04JMxBv4gar77JePdS+A6f05jG1Viy6+U1w== + dependencies: + remote-origin-url "^0.4.0" + gitconfiglocal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" @@ -13101,6 +13303,14 @@ global-modules@2.0.0: dependencies: global-prefix "^3.0.0" +global-modules@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d" + integrity sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0= + dependencies: + global-prefix "^0.1.4" + is-windows "^0.2.0" + global-modules@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" @@ -13110,6 +13320,16 @@ global-modules@^1.0.0: is-windows "^1.0.1" resolve-dir "^1.0.0" +global-prefix@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-0.1.5.tgz#8d3bc6b8da3ca8112a160d8d496ff0462bfef78f" + integrity sha1-jTvGuNo8qBEqFg2NSW/wRiv+948= + dependencies: + homedir-polyfill "^1.0.0" + ini "^1.3.4" + is-windows "^0.2.0" + which "^1.2.12" + global-prefix@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" @@ -13831,7 +14051,7 @@ homedir-polyfill@^1.0.0, homedir-polyfill@^1.0.1: dependencies: parse-passwd "^1.0.0" -hosted-git-info@^2.1.4, hosted-git-info@^2.6.0: +hosted-git-info@^2.1.4, hosted-git-info@^2.4.2, hosted-git-info@^2.6.0: version "2.8.9" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== @@ -14035,7 +14255,7 @@ htmltojsx@^0.3.0: react-dom "~15.4.1" yargs "~4.6.0" -http-cache-semantics@3.8.1, http-cache-semantics@^3.8.1: +http-cache-semantics@3.8.1, http-cache-semantics@^3.8.0, http-cache-semantics@^3.8.1: version "3.8.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== @@ -14092,7 +14312,7 @@ http-parser-js@>=0.5.1: resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.3.tgz#01d2709c79d41698bb01d4decc5e9da4e4a033d9" integrity sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg== -http-proxy-agent@^2.1.0: +http-proxy-agent@^2.0.0, http-proxy-agent@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== @@ -14151,7 +14371,7 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= -https-proxy-agent@^2.2.0, https-proxy-agent@^2.2.1, https-proxy-agent@^2.2.3: +https-proxy-agent@^2.1.0, https-proxy-agent@^2.2.0, https-proxy-agent@^2.2.1, https-proxy-agent@^2.2.3: version "2.2.4" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== @@ -14184,6 +14404,11 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" +humps@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/humps/-/humps-2.0.1.tgz#dd02ea6081bd0568dc5d073184463957ba9ef9aa" + integrity sha1-3QLqYIG9BWjcXQcxhEY5V7qe+ao= + hyperlinker@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/hyperlinker/-/hyperlinker-1.0.0.tgz#23dc9e38a206b208ee49bc2d6c8ef47027df0c0e" @@ -14262,6 +14487,13 @@ ignore@^5.0.4, ignore@^5.1.1, ignore@^5.1.4: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== +image-size@0.8.3: + version "0.8.3" + resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.8.3.tgz#f0b568857e034f29baffd37013587f2c0cad8b46" + integrity sha512-SMtq1AJ+aqHB45c3FsB4ERK0UCiA2d3H1uq8s+8T0Pf8A3W4teyBQyaFaktH6xvZqh+npwlKU7i4fJo0r7TYTg== + dependencies: + queue "6.0.1" + immer@8.0.1, immer@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/immer/-/immer-8.0.1.tgz#9c73db683e2b3975c424fb0572af5889877ae656" @@ -14401,7 +14633,7 @@ ini@1.3.7: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84" integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ== -ini@^1.3.2, ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: +ini@^1.3.2, ini@^1.3.3, ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== @@ -14449,6 +14681,25 @@ inquirer@^6.2.0: strip-ansi "^5.1.0" through "^2.3.6" +inquirer@^6.2.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" + integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== + dependencies: + ansi-escapes "^3.2.0" + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^2.0.0" + lodash "^4.17.12" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.4.0" + string-width "^2.1.0" + strip-ansi "^5.1.0" + through "^2.3.6" + inquirer@^7.0.0, inquirer@^7.3.3: version "7.3.3" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" @@ -14541,7 +14792,7 @@ ip-regex@^4.0.0: resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== -ip@1.1.5, ip@^1.1.0, ip@^1.1.5: +ip@1.1.5, ip@^1.1.0, ip@^1.1.4, ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= @@ -14657,6 +14908,11 @@ is-buffer@^2.0.0, is-buffer@~2.0.3: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== +is-buffer@^2.0.2: + version "2.0.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" + integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== + is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" @@ -15179,6 +15435,11 @@ is-window@^1.0.2: resolved "https://registry.yarnpkg.com/is-window/-/is-window-1.0.2.tgz#2c896ca53db97de45d3c33133a65d8c9f563480d" integrity sha1-LIlspT25feRdPDMTOmXYyfVjSA0= +is-windows@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c" + integrity sha1-3hqm1j6indJIc3tp8f+LgALSEIw= + is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -15405,6 +15666,15 @@ istanbul@^0.4.5: which "^1.1.1" wordwrap "^1.0.0" +istextorbinary@^2.2.1: + version "2.6.0" + resolved "https://registry.yarnpkg.com/istextorbinary/-/istextorbinary-2.6.0.tgz#60776315fb0fa3999add276c02c69557b9ca28ab" + integrity sha512-+XRlFseT8B3L9KyjxxLjfXSLMuErKDsd8DBNrsaxoViABMEZlOSCstwmw0qpoFX3+U6yWU1yhLudAe6/lETGGA== + dependencies: + binaryextensions "^2.1.2" + editions "^2.2.0" + textextensions "^2.5.0" + isurl@^1.0.0-alpha5: version "1.0.0" resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" @@ -16197,6 +16467,13 @@ jsonfile@^2.1.0: optionalDependencies: graceful-fs "^4.1.6" +jsonfile@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" + integrity sha1-pezG9l9T9mLEQVx2daAzHQmS7GY= + optionalDependencies: + graceful-fs "^4.1.6" + jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -16581,6 +16858,11 @@ lazy-ass@^1.6.0: resolved "https://registry.yarnpkg.com/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513" integrity sha1-eZllXoZGwX8In90YfRUNMyTVRRM= +lazy-cache@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + integrity sha1-odePw6UEdMuAhF07O24dpJpEbo4= + lazy-universal-dotenv@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/lazy-universal-dotenv/-/lazy-universal-dotenv-3.0.1.tgz#a6c8938414bca426ab8c9463940da451a911db38" @@ -17344,7 +17626,7 @@ lowlight@~1.11.0: fault "^1.0.2" highlight.js "~9.13.0" -lru-cache@^4.0.1: +lru-cache@^4.0.1, lru-cache@^4.1.1: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== @@ -17417,6 +17699,23 @@ make-error@1.x, make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== +make-fetch-happen@^2.4.13: + version "2.6.0" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-2.6.0.tgz#8474aa52198f6b1ae4f3094c04e8370d35ea8a38" + integrity sha512-FFq0lNI0ax+n9IWzWpH8A4JdgYiAp2DDYIZ3rsaav8JDe8I+72CzK6PQW/oom15YDZpV5bYW/9INd6nIJ2ZfZw== + dependencies: + agentkeepalive "^3.3.0" + cacache "^10.0.0" + http-cache-semantics "^3.8.0" + http-proxy-agent "^2.0.0" + https-proxy-agent "^2.1.0" + lru-cache "^4.1.1" + mississippi "^1.2.0" + node-fetch-npm "^2.0.2" + promise-retry "^1.1.1" + socks-proxy-agent "^3.0.1" + ssri "^5.0.0" + make-fetch-happen@^5.0.0: version "5.0.2" resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz#aa8387104f2687edca01c8687ee45013d02d19bd" @@ -17863,6 +18162,11 @@ mime@^2.3.1: resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.7.tgz#962aed9be0ed19c91fd7dc2ece5d7f4e89a90d74" integrity sha512-dhNd1uA2u397uQk3Nv5LM4lm93WYDUXFn3Fu291FJerns4jyTudqhIWe4W04YLy7Uk1tm1Ore04NpjRvQp/NPA== +mimer@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mimer/-/mimer-1.1.0.tgz#2cb67f7093998e772a0e62c090f77daa1b8a2dbe" + integrity sha512-y9dVfy2uiycQvDNiAYW6zp49ZhFlXDMr5wfdOiMbdzGM/0N5LNR6HTUn3un+WUQcM0koaw8FMTG1bt5EnHJdvQ== + mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" @@ -18024,6 +18328,38 @@ minizlib@^2.0.0, minizlib@^2.1.1: minipass "^3.0.0" yallist "^4.0.0" +mississippi@^1.2.0, mississippi@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-1.3.1.tgz#2a8bb465e86550ac8b36a7b6f45599171d78671e" + integrity sha512-/6rB8YXFbAtsUVRphIRQqB0+9c7VaPHCjVtvto+JqwVxgz8Zz+I+f68/JgQ+Pb4VlZb2svA9OtdXnHHsZz7ltg== + dependencies: + concat-stream "^1.5.0" + duplexify "^3.4.2" + end-of-stream "^1.1.0" + flush-write-stream "^1.0.0" + from2 "^2.1.0" + parallel-transform "^1.1.0" + pump "^1.0.0" + pumpify "^1.3.3" + stream-each "^1.1.0" + through2 "^2.0.0" + +mississippi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-2.0.0.tgz#3442a508fafc28500486feea99409676e4ee5a6f" + integrity sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw== + dependencies: + concat-stream "^1.5.0" + duplexify "^3.4.2" + end-of-stream "^1.1.0" + flush-write-stream "^1.0.0" + from2 "^2.1.0" + parallel-transform "^1.1.0" + pump "^2.0.1" + pumpify "^1.3.3" + stream-each "^1.1.0" + through2 "^2.0.0" + mississippi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" @@ -18765,6 +19101,16 @@ npm-normalize-package-bin@^1.0.1: semver "^5.5.0" validate-npm-package-name "^3.0.0" +npm-package-arg@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-5.1.2.tgz#fb18d17bb61e60900d6312619919bd753755ab37" + integrity sha512-wJBsrf0qpypPT7A0LART18hCdyhpCMxeTtcb0X4IZO2jsP6Om7EHN1d9KSKiqD+KVH030RVNpWS9thk+pb7wzA== + dependencies: + hosted-git-info "^2.4.2" + osenv "^0.1.4" + semver "^5.1.0" + validate-npm-package-name "^3.0.0" + npm-package-arg@^8.0.0, npm-package-arg@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.0.1.tgz#9d76f8d7667b2373ffda60bb801a27ef71e3e270" @@ -18801,6 +19147,14 @@ npm-packlist@^2.1.0: npm-bundled "^1.1.1" npm-normalize-package-bin "^1.0.1" +npm-pick-manifest@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-1.0.4.tgz#a5ee6510c1fe7221c0bc0414e70924c14045f7e8" + integrity sha512-MKxNdeyOZysPRTTbHtW0M5Fw38Jo/3ARsoGw5qjCfS+XGjvNB/Gb4qtAZUFmKPM2mVum+eX559eHvKywU856BQ== + dependencies: + npm-package-arg "^5.1.2" + semver "^5.3.0" + npm-pick-manifest@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz#f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7" @@ -19161,6 +19515,13 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" +open@^6.3.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/open/-/open-6.4.0.tgz#5c13e96d0dc894686164f18965ecfe889ecfc8a9" + integrity sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg== + dependencies: + is-wsl "^1.1.0" + open@^7.0.2, open@^7.0.3, open@^7.4.2: version "7.4.2" resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" @@ -19214,6 +19575,31 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" +ora@5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.0.tgz#42eda4855835b9cd14d33864c97a3c95a3f56bf4" + integrity sha512-1StwyXQGoU6gdjYkyVcqOLnVlbKj+6yPNNOxJVgpt9t4eksKjiriiHuxktLYkgllwk+D6MbC4ihH84L1udRXPg== + dependencies: + bl "^4.1.0" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-spinners "^2.5.0" + is-interactive "^1.0.0" + is-unicode-supported "^0.1.0" + log-symbols "^4.1.0" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + +ora@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-1.4.0.tgz#884458215b3a5d4097592285f93321bb7a79e2e5" + integrity sha512-iMK1DOQxzzh2MBlVsU42G80mnrvUhqsMh74phHtDlrcTZPK0pH6o7l7DRshK+0YsxDyEuaOkziVdvM3T0QTzpw== + dependencies: + chalk "^2.1.0" + cli-cursor "^2.1.0" + cli-spinners "^1.0.1" + log-symbols "^2.1.0" + ora@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/ora/-/ora-3.4.0.tgz#bf0752491059a3ef3ed4c85097531de9fdbcd318" @@ -19245,7 +19631,7 @@ os-filter-obj@^2.0.0: dependencies: arch "^2.1.0" -os-homedir@^1.0.0: +os-homedir@^1.0.0, os-homedir@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= @@ -19565,6 +19951,33 @@ pacote@^11.1.6: ssri "^8.0.0" tar "^6.0.1" +pacote@^2.7.36: + version "2.7.38" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-2.7.38.tgz#5091f8774298c26c3eca24606037f1bb73db74c1" + integrity sha512-XxHUyHQB7QCVBxoXeVu0yKxT+2PvJucsc0+1E+6f95lMUxEAYERgSAc71ckYXrYr35Ew3xFU/LrhdIK21GQFFA== + dependencies: + bluebird "^3.5.0" + cacache "^9.2.9" + glob "^7.1.2" + lru-cache "^4.1.1" + make-fetch-happen "^2.4.13" + minimatch "^3.0.4" + mississippi "^1.2.0" + normalize-package-data "^2.4.0" + npm-package-arg "^5.1.2" + npm-pick-manifest "^1.0.4" + osenv "^0.1.4" + promise-inflight "^1.0.1" + promise-retry "^1.1.1" + protoduck "^4.0.0" + safe-buffer "^5.1.1" + semver "^5.3.0" + ssri "^4.1.6" + tar-fs "^1.15.3" + tar-stream "^1.5.4" + unique-filename "^1.1.0" + which "^1.2.12" + pako@~1.0.5: version "1.0.10" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.10.tgz#4328badb5086a426aa90f541977d4955da5c9732" @@ -19674,6 +20087,23 @@ parse-filepath@^1.0.1: map-cache "^0.2.0" path-root "^0.1.1" +parse-git-config@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/parse-git-config/-/parse-git-config-0.2.0.tgz#272833fdd15fea146fb75d336d236b963b6ff706" + integrity sha1-Jygz/dFf6hRvt10zbSNrljtv9wY= + dependencies: + ini "^1.3.3" + +parse-git-config@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/parse-git-config/-/parse-git-config-1.1.1.tgz#d3a9984317132f57398712bba438e129590ddf8c" + integrity sha1-06mYQxcTL1c5hxK7pDjhKVkN34w= + dependencies: + extend-shallow "^2.0.1" + fs-exists-sync "^0.1.0" + git-config-path "^1.0.1" + ini "^1.3.4" + parse-git-config@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/parse-git-config/-/parse-git-config-2.0.3.tgz#6fb840d4a956e28b971c97b33a5deb73a6d5b6bb" @@ -20524,6 +20954,13 @@ protocols@^1.1.0, protocols@^1.4.0: resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.7.tgz#95f788a4f0e979b291ffefcf5636ad113d037d32" integrity sha512-Fx65lf9/YDn3hUX08XUc0J8rSux36rEsyiv21ZGUC1mOyeM3lTRpZLcrm8aAolzS4itwVfm7TAPyxC2E5zd6xg== +protoduck@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-4.0.0.tgz#fe4874d8c7913366cfd9ead12453a22cd3657f8e" + integrity sha1-/kh02MeRM2bP2erRJFOiLNNlf44= + dependencies: + genfun "^4.0.1" + protoduck@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.1.tgz#03c3659ca18007b69a50fd82a7ebcc516261151f" @@ -20576,7 +21013,15 @@ public-encrypt@^4.0.0: randombytes "^2.0.1" safe-buffer "^5.1.2" -pump@^2.0.0: +pump@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.3.tgz#5dfe8311c33bbf6fc18261f9f34702c47c08a954" + integrity sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pump@^2.0.0, pump@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== @@ -20676,6 +21121,13 @@ querystring@0.2.0, querystring@^0.2.0: resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= +queue@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/queue/-/queue-6.0.1.tgz#abd5a5b0376912f070a25729e0b6a7d565683791" + integrity sha512-AJBQabRCCNr9ANq8v77RJEv73DPbn55cdTb+Giq4X0AVnNVZvMHlYp7XlQiN+1npCZj1DuSmaA2hYVUUDgxFDg== + dependencies: + inherits "~2.0.3" + quick-lru@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" @@ -20809,7 +21261,7 @@ react-app-polyfill@2.0.0: regenerator-runtime "^0.13.7" whatwg-fetch "^3.4.1" -react-codesandboxer@^3.1.3: +react-codesandboxer@^3.1.3, react-codesandboxer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/react-codesandboxer/-/react-codesandboxer-3.1.5.tgz#ae647383be78c01761f6063f052fd817cc3a5942" integrity sha512-gao6ydAfVI9DlmxvXJb1poqWDZt4jCSi2DWvfUCLUBmJAxH8+DkoGtjrO3VJDjdwcCFvumWb+ztg3WxsvrsWJw== @@ -21786,6 +22238,20 @@ remark-squeeze-paragraphs@4.0.0: dependencies: mdast-squeeze-paragraphs "^4.0.0" +remote-origin-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/remote-origin-url/-/remote-origin-url-0.4.0.tgz#4d3e2902f34e2d37d1c263d87710b77eb4086a30" + integrity sha1-TT4pAvNOLTfRwmPYdxC3frQIajA= + dependencies: + parse-git-config "^0.2.0" + +remote-origin-url@^0.5.1: + version "0.5.3" + resolved "https://registry.yarnpkg.com/remote-origin-url/-/remote-origin-url-0.5.3.tgz#b9fc6ced2c826690d0b07218b2b8c17fcec88e87" + integrity sha512-crQ7Xk1m/F2IiwBx5oTqk/c0hjoumrEz+a36+ZoVupskQRE/q7pAwHKsTNeiZ31sbSTELvVlVv4h1W0Xo5szKg== + dependencies: + parse-git-config "^1.1.1" + remove-bom-buffer@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz#c2bf1e377520d324f623892e33c10cac2c252b53" @@ -22006,6 +22472,14 @@ resolve-cwd@^3.0.0: dependencies: resolve-from "^5.0.0" +resolve-dir@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-0.1.1.tgz#b219259a5602fac5c5c496ad894a6e8cc430261e" + integrity sha1-shklmlYC+sXFxJatiUpujMQwJh4= + dependencies: + expand-tilde "^1.2.2" + global-modules "^0.2.3" + resolve-dir@^1.0.0, resolve-dir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" @@ -22854,7 +23328,7 @@ shellwords@^0.1.1: resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== -shortid@~2.2.15: +shortid@^2.2.8, shortid@~2.2.15: version "2.2.16" resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.16.tgz#b742b8f0cb96406fd391c76bfc18a67a57fe5608" integrity sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g== @@ -22962,6 +23436,11 @@ smart-buffer@4.0.2: resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.2.tgz#5207858c3815cc69110703c6b94e46c15634395d" integrity sha512-JDhEpTKzXusOqXZ0BUIdH+CjFdO/CR3tLlf5CN34IypI+xMmXW1uB16OOY8z3cICbJlDAVJzNbwBhNO0wt9OAw== +smart-buffer@^1.0.13: + version "1.1.15" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-1.1.15.tgz#7f114b5b65fab3e2a35aa775bb12f0d1c649bf16" + integrity sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY= + smart-buffer@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" @@ -23073,6 +23552,14 @@ sockjs@^0.3.21: uuid "^3.4.0" websocket-driver "^0.7.4" +socks-proxy-agent@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz#2eae7cf8e2a82d34565761539a7f9718c5617659" + integrity sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA== + dependencies: + agent-base "^4.1.0" + socks "^1.1.10" + socks-proxy-agent@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz#3c8991f3145b2799e70e11bd5fbc8b1963116386" @@ -23090,6 +23577,14 @@ socks-proxy-agent@^5.0.0: debug "4" socks "^2.3.3" +socks@^1.1.10: + version "1.1.10" + resolved "https://registry.yarnpkg.com/socks/-/socks-1.1.10.tgz#5b8b7fc7c8f341c53ed056e929b7bf4de8ba7b5a" + integrity sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o= + dependencies: + ip "^1.1.4" + smart-buffer "^1.0.13" + socks@^2.3.3: version "2.4.1" resolved "https://registry.yarnpkg.com/socks/-/socks-2.4.1.tgz#cea68a280a3bf7cb6333dbb40cfb243d10725e9d" @@ -23354,6 +23849,20 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" +ssri@^4.1.6: + version "4.1.6" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-4.1.6.tgz#0cb49b6ac84457e7bdd466cb730c3cb623e9a25b" + integrity sha512-WUbCdgSAMQjTFZRWvSPpauryvREEA+Krn19rx67UlJEJx/M192ZHxMmJXjZ4tkdFm+Sb0SXGlENeQVlA5wY7kA== + dependencies: + safe-buffer "^5.1.0" + +ssri@^5.0.0, ssri@^5.2.4: + version "5.3.0" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-5.3.0.tgz#ba3872c9c6d33a0704a7d71ff045e5ec48999d06" + integrity sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ== + dependencies: + safe-buffer "^5.1.1" + ssri@^6.0.0, ssri@^6.0.1: version "6.0.2" resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5" @@ -23435,6 +23944,14 @@ store2@^2.12.0: resolved "https://registry.yarnpkg.com/store2/-/store2-2.12.0.tgz#e1f1b7e1a59b6083b2596a8d067f6ee88fd4d3cf" integrity sha512-7t+/wpKLanLzSnQPX8WAcuLCCeuSHoWdQuh9SB3xD0kNOM38DNf+0Oa+wmvxmYueRzkmh6IcdKFtvTa+ecgPDw== +storybook-addon-export-to-codesandbox@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/storybook-addon-export-to-codesandbox/-/storybook-addon-export-to-codesandbox-0.1.8.tgz#6eadd241d29aaaf52907676dfbeb6d7f0db95117" + integrity sha512-JL/rTzVCtrB43xNJsHiZHed4Lh4oNu80CBvOITT1JGLJBTSOU1qx9M2PjwvRtxa3YejpTofkzop6h0R9UmTGqQ== + dependencies: + codesandbox "^2.2.3" + react-codesandboxer "^3.1.5" + storybook-addon-outline@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/storybook-addon-outline/-/storybook-addon-outline-1.4.1.tgz#0a1b262b9c65df43fc63308a1fdbd4283c3d9458" @@ -24066,6 +24583,16 @@ tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== +tar-fs@^1.15.3: + version "1.16.3" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.3.tgz#966a628841da2c4010406a82167cbd5e0c72d509" + integrity sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw== + dependencies: + chownr "^1.0.1" + mkdirp "^0.5.1" + pump "^1.0.0" + tar-stream "^1.1.2" + tar-fs@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.0.tgz#d1cdd121ab465ee0eb9ccde2d35049d3f3daf0d5" @@ -24076,7 +24603,7 @@ tar-fs@^2.1.0: pump "^3.0.0" tar-stream "^2.0.0" -tar-stream@^1.5.2: +tar-stream@^1.1.2, tar-stream@^1.5.2, tar-stream@^1.5.4: version "1.6.2" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== @@ -24267,6 +24794,11 @@ text-table@0.2.0, text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= +textextensions@^2.5.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/textextensions/-/textextensions-2.6.0.tgz#d7e4ab13fe54e32e08873be40d51b74229b00fc4" + integrity sha512-49WtAWS+tcsy93dRt6P0P3AMD2m5PvXRhuEA0kaXos5ZLlujtYmpmFsB+QvWUSxE1ZsstmYXfQ7L40+EcQgpAQ== + thenify-all@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" @@ -25097,7 +25629,7 @@ uniq@^1.0.1: resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= -unique-filename@^1.1.1: +unique-filename@^1.1.0, unique-filename@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== @@ -25287,7 +25819,7 @@ upath@^1.2.0: resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== -update-notifier@^2.1.0: +update-notifier@^2.1.0, update-notifier@^2.2.0: version "2.5.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6" integrity sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw== @@ -26150,7 +26682,7 @@ which-typed-array@^1.1.2: has-symbols "^1.0.1" is-typed-array "^1.1.3" -which@1.3.1, which@^1.1.1, which@^1.2.1, which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: +which@1.3.1, which@^1.1.1, which@^1.2.1, which@^1.2.12, which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== From 375a1a79f80cde5720800ba7794ad431224b94f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Tue, 31 Aug 2021 19:45:04 +0200 Subject: [PATCH 30/62] simplify story names --- .../src/components/Button/Button.stories.tsx | 12 ++++++------ .../src/components/Button/ButtonBlock.stories.tsx | 4 ++-- .../src/components/Button/ButtonCircular.stories.tsx | 4 ++-- .../src/components/Button/ButtonDisabled.stories.tsx | 4 ++-- .../src/components/Button/ButtonSize.stories.tsx | 4 ++-- .../src/components/Button/ButtonWithIcon.stories.tsx | 4 ++-- .../components/Button/ButtonWithLongText.stories.tsx | 4 ++-- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/react-button/src/components/Button/Button.stories.tsx b/packages/react-button/src/components/Button/Button.stories.tsx index fed9f3e4cb259..b2d1f920f2caf 100644 --- a/packages/react-button/src/components/Button/Button.stories.tsx +++ b/packages/react-button/src/components/Button/Button.stories.tsx @@ -7,12 +7,12 @@ import bestPracticesMd from './ButtonBestPractices.md'; export { Emphasis } from './ButtonEmphasis.stories'; export { Default } from './ButtonDefault.stories'; -export { ButtonDisabled } from './ButtonDisabled.stories'; -export { ButtonWithIcon } from './ButtonWithIcon.stories'; -export { ButtonCircular } from './ButtonCircular.stories'; -export { ButtonSize } from './ButtonSize.stories'; -export { ButtonBlock } from './ButtonBlock.stories'; -export { ButtonWithLongText } from './ButtonWithLongText.stories'; +export { Disabled } from './ButtonDisabled.stories'; +export { WithIcon } from './ButtonWithIcon.stories'; +export { Circular } from './ButtonCircular.stories'; +export { Size } from './ButtonSize.stories'; +export { Block } from './ButtonBlock.stories'; +export { WithLongText } from './ButtonWithLongText.stories'; export default { title: 'Components/Button', diff --git a/packages/react-button/src/components/Button/ButtonBlock.stories.tsx b/packages/react-button/src/components/Button/ButtonBlock.stories.tsx index 0daba11a4ce4e..d9cf42835fbf1 100644 --- a/packages/react-button/src/components/Button/ButtonBlock.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonBlock.stories.tsx @@ -1,12 +1,12 @@ import * as React from 'react'; import { Button } from '@fluentui/react-button'; -export const ButtonBlock = () => ( +export const Block = () => ( <> ); -ButtonBlock.parameters = { +Block.parameters = { docs: { description: { story: 'A button can fill the width of its container.', diff --git a/packages/react-button/src/components/Button/ButtonCircular.stories.tsx b/packages/react-button/src/components/Button/ButtonCircular.stories.tsx index 662998428b2e0..6e6456f510259 100644 --- a/packages/react-button/src/components/Button/ButtonCircular.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonCircular.stories.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { Button } from '@fluentui/react-button'; import { CalendarMonth24Regular } from '@fluentui/react-icons'; -export const ButtonCircular = () => ( +export const Circular = () => ( <> ); -ButtonWithLongText.parameters = { +WithLongText.parameters = { docs: { description: { story: 'Text truncates after it hits the max width theme token value.', From cb323afdde32a620dab7e191b4d89ac465934d61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Tue, 31 Aug 2021 19:47:53 +0200 Subject: [PATCH 31/62] Change files --- ...-react-button-d1f817e2-ff90-495f-bdc9-27c91f7931ef.json | 7 +++++++ ...ct-components-ac6ea616-3cc3-4a01-ae02-aa2fb02937fe.json | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 change/@fluentui-react-button-d1f817e2-ff90-495f-bdc9-27c91f7931ef.json create mode 100644 change/@fluentui-react-components-ac6ea616-3cc3-4a01-ae02-aa2fb02937fe.json diff --git a/change/@fluentui-react-button-d1f817e2-ff90-495f-bdc9-27c91f7931ef.json b/change/@fluentui-react-button-d1f817e2-ff90-495f-bdc9-27c91f7931ef.json new file mode 100644 index 0000000000000..38a15b9c9b9a7 --- /dev/null +++ b/change/@fluentui-react-button-d1f817e2-ff90-495f-bdc9-27c91f7931ef.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "export to codesandbox", + "packageName": "@fluentui/react-button", + "email": "peter@draxler.ml", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-components-ac6ea616-3cc3-4a01-ae02-aa2fb02937fe.json b/change/@fluentui-react-components-ac6ea616-3cc3-4a01-ae02-aa2fb02937fe.json new file mode 100644 index 0000000000000..c6a18e48a7236 --- /dev/null +++ b/change/@fluentui-react-components-ac6ea616-3cc3-4a01-ae02-aa2fb02937fe.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "export to codesandbox", + "packageName": "@fluentui/react-components", + "email": "peter@draxler.ml", + "dependentChangeType": "none" +} From d178b4c3058b2c25a0e0f6d4563d0aee07c73958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Wed, 1 Sep 2021 12:28:53 +0200 Subject: [PATCH 32/62] fix pipeline --- tsconfig.base.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.base.json b/tsconfig.base.json index 2329de2f7d83e..6cb8629fce96c 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -53,5 +53,5 @@ "@fluentui/react-utilities": ["packages/react-utilities/src/index.ts"] } }, - "exclude": ["node_modules"] + "exclude": ["node_modules", "./**/*.stories.tsx", "./**/*.stories.ts"] } From 9b9135323a15377c47df7285562c4f476c8ea2a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Wed, 1 Sep 2021 14:27:34 +0200 Subject: [PATCH 33/62] fix pipeline --- .../src/components/Button/Button.stories.tsx | 25 ++++++++++++++++++- .../Button/ButtonDefault.stories.tsx | 8 +++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/packages/react-button/src/components/Button/Button.stories.tsx b/packages/react-button/src/components/Button/Button.stories.tsx index b2d1f920f2caf..488ce78d0696f 100644 --- a/packages/react-button/src/components/Button/Button.stories.tsx +++ b/packages/react-button/src/components/Button/Button.stories.tsx @@ -1,17 +1,40 @@ import * as React from 'react'; -import { Button } from '../../Button'; +import { Button } from '@fluentui/react-button'; import { Meta } from '@storybook/react'; import descriptionMd from './ButtonDescription.md'; import bestPracticesMd from './ButtonBestPractices.md'; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) export { Emphasis } from './ButtonEmphasis.stories'; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) export { Default } from './ButtonDefault.stories'; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) export { Disabled } from './ButtonDisabled.stories'; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) export { WithIcon } from './ButtonWithIcon.stories'; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) export { Circular } from './ButtonCircular.stories'; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) export { Size } from './ButtonSize.stories'; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) export { Block } from './ButtonBlock.stories'; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) export { WithLongText } from './ButtonWithLongText.stories'; export default { diff --git a/packages/react-button/src/components/Button/ButtonDefault.stories.tsx b/packages/react-button/src/components/Button/ButtonDefault.stories.tsx index 8f2f9fea6173d..88eebb79acc88 100644 --- a/packages/react-button/src/components/Button/ButtonDefault.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonDefault.stories.tsx @@ -1,4 +1,10 @@ import * as React from 'react'; -import { Button, ButtonProps } from '@fluentui/react-button'; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) +import { Button } from '@fluentui/react-button'; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) +import { ButtonProps } from './Button.types'; export const Default = (props: ButtonProps) => ; From 6a362215e76a0f72bc7a779248b812a74fb69443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Wed, 1 Sep 2021 14:28:12 +0200 Subject: [PATCH 34/62] update package.json --- package.json | 3 ++- packages/react-components/package.json | 3 +-- yarn.lock | 24 +----------------------- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 740ff612f10e9..0989f589c8da8 100644 --- a/package.json +++ b/package.json @@ -230,7 +230,8 @@ "webpack-merge": "5.7.3", "workspace-tools": "0.12.3", "yargs": "13.3.2", - "yargs-parser": "13.1.2" + "yargs-parser": "13.1.2", + "storybook-addon-export-to-codesandbox": "0.1.8" }, "license": "MIT", "workspaces": { diff --git a/packages/react-components/package.json b/packages/react-components/package.json index cf67f401cf90c..9d4d3bcfabc2e 100644 --- a/packages/react-components/package.json +++ b/packages/react-components/package.json @@ -22,7 +22,7 @@ "start": "yarn storybook", "docs": "api-extractor run --config=config/api-extractor.local.json --local", "build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/react-components/src && yarn docs", - "storybook": "start-storybook --port 3000 -s ./public --no-manager-cache", + "storybook": "start-storybook --port 3000 -s ./public", "build-storybook": "build-storybook -s ./public -o ./dist/storybook", "test": "jest" }, @@ -51,7 +51,6 @@ "@fluentui/react-theme": "^9.0.0-alpha.22", "@fluentui/react-tooltip": "^9.0.0-alpha.75", "@fluentui/react-utilities": "^9.0.0-alpha.43", - "storybook-addon-export-to-codesandbox": "^0.1.8", "tslib": "^2.1.0" }, "peerDependencies": { diff --git a/yarn.lock b/yarn.lock index ca8c772d4d85a..34d8bcf783522 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6836,13 +6836,6 @@ axe-sarif-converter@^2.0.1: "@types/sarif" "2.1.1" axe-core "^3.2.2" -axios@0.21.1: - version "0.21.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" - integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== - dependencies: - follow-redirects "^1.10.0" - axios@^0.18.1: version "0.18.1" resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.1.tgz#ff3f0de2e7b5d180e757ad98000f1081b87bcea3" @@ -19575,21 +19568,6 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" -ora@5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.0.tgz#42eda4855835b9cd14d33864c97a3c95a3f56bf4" - integrity sha512-1StwyXQGoU6gdjYkyVcqOLnVlbKj+6yPNNOxJVgpt9t4eksKjiriiHuxktLYkgllwk+D6MbC4ihH84L1udRXPg== - dependencies: - bl "^4.1.0" - chalk "^4.1.0" - cli-cursor "^3.1.0" - cli-spinners "^2.5.0" - is-interactive "^1.0.0" - is-unicode-supported "^0.1.0" - log-symbols "^4.1.0" - strip-ansi "^6.0.0" - wcwidth "^1.0.1" - ora@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ora/-/ora-1.4.0.tgz#884458215b3a5d4097592285f93321bb7a79e2e5" @@ -23944,7 +23922,7 @@ store2@^2.12.0: resolved "https://registry.yarnpkg.com/store2/-/store2-2.12.0.tgz#e1f1b7e1a59b6083b2596a8d067f6ee88fd4d3cf" integrity sha512-7t+/wpKLanLzSnQPX8WAcuLCCeuSHoWdQuh9SB3xD0kNOM38DNf+0Oa+wmvxmYueRzkmh6IcdKFtvTa+ecgPDw== -storybook-addon-export-to-codesandbox@^0.1.8: +storybook-addon-export-to-codesandbox@0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/storybook-addon-export-to-codesandbox/-/storybook-addon-export-to-codesandbox-0.1.8.tgz#6eadd241d29aaaf52907676dfbeb6d7f0db95117" integrity sha512-JL/rTzVCtrB43xNJsHiZHed4Lh4oNu80CBvOITT1JGLJBTSOU1qx9M2PjwvRtxa3YejpTofkzop6h0R9UmTGqQ== From f05fc752ccbd87d3421f94d8743adc26ce8edb69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Wed, 1 Sep 2021 14:34:26 +0200 Subject: [PATCH 35/62] Update change/@fluentui-react-components-ac6ea616-3cc3-4a01-ae02-aa2fb02937fe.json Co-authored-by: Oleksandr Fediashov --- ...i-react-components-ac6ea616-3cc3-4a01-ae02-aa2fb02937fe.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/change/@fluentui-react-components-ac6ea616-3cc3-4a01-ae02-aa2fb02937fe.json b/change/@fluentui-react-components-ac6ea616-3cc3-4a01-ae02-aa2fb02937fe.json index c6a18e48a7236..3222ecdc1dc48 100644 --- a/change/@fluentui-react-components-ac6ea616-3cc3-4a01-ae02-aa2fb02937fe.json +++ b/change/@fluentui-react-components-ac6ea616-3cc3-4a01-ae02-aa2fb02937fe.json @@ -1,6 +1,6 @@ { "type": "none", - "comment": "export to codesandbox", + "comment": "Add export to CodeSandbox for stories", "packageName": "@fluentui/react-components", "email": "peter@draxler.ml", "dependentChangeType": "none" From 18686f662489592dd35d7f75677f81ef5e98787d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Wed, 1 Sep 2021 14:35:43 +0200 Subject: [PATCH 36/62] Update change/@fluentui-react-button-d1f817e2-ff90-495f-bdc9-27c91f7931ef.json Co-authored-by: Oleksandr Fediashov --- ...entui-react-button-d1f817e2-ff90-495f-bdc9-27c91f7931ef.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/change/@fluentui-react-button-d1f817e2-ff90-495f-bdc9-27c91f7931ef.json b/change/@fluentui-react-button-d1f817e2-ff90-495f-bdc9-27c91f7931ef.json index 38a15b9c9b9a7..01b59364b3cc0 100644 --- a/change/@fluentui-react-button-d1f817e2-ff90-495f-bdc9-27c91f7931ef.json +++ b/change/@fluentui-react-button-d1f817e2-ff90-495f-bdc9-27c91f7931ef.json @@ -1,6 +1,6 @@ { "type": "none", - "comment": "export to codesandbox", + "comment": "update stories structure to make them exportable to CodeSandbox", "packageName": "@fluentui/react-button", "email": "peter@draxler.ml", "dependentChangeType": "none" From 4397531b2999c91c3fc56f0de8ecae2970623f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Wed, 1 Sep 2021 14:37:33 +0200 Subject: [PATCH 37/62] remove stories exclusion from tsconfig.base.json --- tsconfig.base.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.base.json b/tsconfig.base.json index 6cb8629fce96c..2329de2f7d83e 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -53,5 +53,5 @@ "@fluentui/react-utilities": ["packages/react-utilities/src/index.ts"] } }, - "exclude": ["node_modules", "./**/*.stories.tsx", "./**/*.stories.ts"] + "exclude": ["node_modules"] } From b7d863e42514fc9419570552947bcaa80e464743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Wed, 1 Sep 2021 14:46:10 +0200 Subject: [PATCH 38/62] update to version without bundled codesandbox --- package.json | 2 +- yarn.lock | 509 +++------------------------------------------------ 2 files changed, 27 insertions(+), 484 deletions(-) diff --git a/package.json b/package.json index 0989f589c8da8..0ef1b75e39399 100644 --- a/package.json +++ b/package.json @@ -231,7 +231,7 @@ "workspace-tools": "0.12.3", "yargs": "13.3.2", "yargs-parser": "13.1.2", - "storybook-addon-export-to-codesandbox": "0.1.8" + "storybook-addon-export-to-codesandbox": "0.1.9" }, "license": "MIT", "workspaces": { diff --git a/yarn.lock b/yarn.lock index 34d8bcf783522..acf59f46d5f96 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5968,7 +5968,7 @@ after@0.8.2: resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" integrity sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8= -agent-base@4, agent-base@^4.1.0, agent-base@^4.3.0: +agent-base@4, agent-base@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== @@ -5989,7 +5989,7 @@ agent-base@~4.2.1: dependencies: es6-promisify "^5.0.0" -agentkeepalive@^3.3.0, agentkeepalive@^3.4.1: +agentkeepalive@^3.4.1: version "3.5.2" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.5.2.tgz#a113924dd3fa24a0bc3b78108c450c2abee00f67" integrity sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ== @@ -6836,14 +6836,6 @@ axe-sarif-converter@^2.0.1: "@types/sarif" "2.1.1" axe-core "^3.2.2" -axios@^0.18.1: - version "0.18.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.1.tgz#ff3f0de2e7b5d180e757ad98000f1081b87bcea3" - integrity sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g== - dependencies: - follow-redirects "1.5.10" - is-buffer "^2.0.2" - axobject-query@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be" @@ -7445,7 +7437,7 @@ blob@0.0.5: resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.5.tgz#d680eeef25f8cd91ad533f5b01eed48e64caf683" integrity sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig== -bluebird@^3.0.6, bluebird@^3.3.5, bluebird@^3.5.0, bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5, bluebird@^3.7.2: +bluebird@^3.0.6, bluebird@^3.3.5, bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5, bluebird@^3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== @@ -7820,25 +7812,6 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== -cacache@^10.0.0: - version "10.0.4" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.4.tgz#6452367999eff9d4188aefd9a14e9d7c6a263460" - integrity sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA== - dependencies: - bluebird "^3.5.1" - chownr "^1.0.1" - glob "^7.1.2" - graceful-fs "^4.1.11" - lru-cache "^4.1.1" - mississippi "^2.0.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - promise-inflight "^1.0.1" - rimraf "^2.6.2" - ssri "^5.2.4" - unique-filename "^1.1.0" - y18n "^4.0.0" - cacache@^12.0.0, cacache@^12.0.3: version "12.0.4" resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" @@ -7927,25 +7900,6 @@ cacache@^15.0.4: tar "^6.0.2" unique-filename "^1.1.1" -cacache@^9.2.9: - version "9.3.0" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-9.3.0.tgz#9cd58f2dd0b8c8cacf685b7067b416d6d3cf9db1" - integrity sha512-Vbi8J1XfC8v+FbQ6QkOtKXsHpPnB0i9uMeYFJoj40EbdOsEqWB3DPpNjfsnYBkqOPYA8UvrqH6FZPpBP0zdN7g== - dependencies: - bluebird "^3.5.0" - chownr "^1.0.1" - glob "^7.1.2" - graceful-fs "^4.1.11" - lru-cache "^4.1.1" - mississippi "^1.3.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - promise-inflight "^1.0.1" - rimraf "^2.6.1" - ssri "^4.1.6" - unique-filename "^1.1.0" - y18n "^3.2.1" - cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -8373,7 +8327,7 @@ chokidar@^3.0.0, chokidar@^3.2.1, chokidar@^3.3.0, chokidar@^3.4.1, chokidar@^3. optionalDependencies: fsevents "~2.3.2" -chownr@^1.0.1, chownr@^1.1.1, chownr@^1.1.2: +chownr@^1.1.1, chownr@^1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== @@ -8492,11 +8446,6 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-spinners@^1.0.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.3.1.tgz#002c1990912d0d59580c93bd36c056de99e4259a" - integrity sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg== - cli-spinners@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.3.0.tgz#0632239a4b5aa4c958610142c34bb7a651fc8df5" @@ -8683,33 +8632,6 @@ codesandbox-import-utils@^2.2.3: istextorbinary "^2.2.1" lz-string "^1.4.4" -codesandbox@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/codesandbox/-/codesandbox-2.2.3.tgz#092de403506d9e4c5358cd61dc84068c3ee8ceea" - integrity sha512-IAkWFk6UUglOhSemI7UFgNNL/jgg+1YjVEIllFULLgsaHhFnY51pCqAifMNuAd5d9Zp4Nk/xMgrEaGNV0L4Xlg== - dependencies: - axios "^0.18.1" - chalk "^2.4.1" - codesandbox-import-util-types "^2.2.3" - codesandbox-import-utils "^2.2.3" - commander "^2.9.0" - datauri "^3.0.0" - filesize "^3.6.1" - fs-extra "^3.0.1" - git-branch "^1.0.0" - git-repo-name "^0.6.0" - git-username "^0.5.0" - humps "^2.0.1" - inquirer "^6.2.2" - lodash "^4.17.5" - lz-string "^1.4.4" - ms "^2.0.0" - open "^6.3.0" - ora "^1.3.0" - pacote "^2.7.36" - shortid "^2.2.8" - update-notifier "^2.2.0" - codesandboxer@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/codesandboxer/-/codesandboxer-1.0.3.tgz#a2530a15eb9395f2c6f25e4b8064063dfb7b12f9" @@ -8848,7 +8770,7 @@ commander@6.1.0: resolved "https://registry.yarnpkg.com/commander/-/commander-6.1.0.tgz#f8d722b78103141006b66f4c7ba1e97315ba75bc" integrity sha512-wl7PNrYWd2y5mp1OK/LhTlv8Ff4kQJQRXXAvF+uU/TPNiVJUxZLRYGj/B0y/lPGAVcSbJqH2Za/cvHmrPMC8mA== -commander@^2.18.0, commander@^2.19.0, commander@^2.20.0, commander@^2.7.1, commander@^2.8.1, commander@^2.9.0: +commander@^2.18.0, commander@^2.19.0, commander@^2.20.0, commander@^2.7.1, commander@^2.8.1: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -9649,13 +9571,6 @@ custom-event@~1.0.0: resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" integrity sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU= -cwd@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/cwd/-/cwd-0.9.1.tgz#41e10a7e1ab833dc59c2eca83814c7de77b5a4fd" - integrity sha1-QeEKfhq4M9xZwuyoOBTH3ne1pP0= - dependencies: - find-pkg "^0.1.0" - cyclist@~0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" @@ -9928,14 +9843,6 @@ data-urls@^2.0.0: whatwg-mimetype "^2.3.0" whatwg-url "^8.0.0" -datauri@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/datauri/-/datauri-3.0.0.tgz#6196997e9a7bbbee81b60e8c8acb1a2c871e2349" - integrity sha512-NeDFuUPV1YCpCn8MUIcDk1QnuyenUHs7f4Q5P0n9FFA0neKFrfEH9esR+YMW95BplbYfdmjbs0Pl/ZGAaM2QHQ== - dependencies: - image-size "0.8.3" - mimer "1.1.0" - date-fns@^1.27.2: version "1.30.1" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" @@ -9987,7 +9894,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8, debug@^2.6. dependencies: ms "2.0.0" -debug@3.1.0, debug@=3.1.0, debug@~3.1.0: +debug@3.1.0, debug@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== @@ -11784,13 +11691,6 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expand-tilde@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-1.2.2.tgz#0b81eba897e5a3d31d1c3d102f8f01441e559449" - integrity sha1-C4HrqJflo9MdHD0QL48BRB5VlEk= - dependencies: - os-homedir "^1.0.1" - expand-tilde@^2.0.0, expand-tilde@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" @@ -12220,11 +12120,6 @@ file-loader@6.2.0, file-loader@^6.2.0: loader-utils "^2.0.0" schema-utils "^3.0.0" -file-name@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/file-name/-/file-name-0.1.0.tgz#12b122f120f9c34dbc176c1ab81a548aced6def7" - integrity sha1-ErEi8SD5w028F2wauBpUis7W3vc= - file-system-cache@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/file-system-cache/-/file-system-cache-1.0.5.tgz#84259b36a2bbb8d3d6eb1021d3132ffe64cfff4f" @@ -12365,26 +12260,11 @@ find-cache-dir@^3.3.1: make-dir "^3.0.2" pkg-dir "^4.1.0" -find-file-up@^0.1.2: - version "0.1.3" - resolved "https://registry.yarnpkg.com/find-file-up/-/find-file-up-0.1.3.tgz#cf68091bcf9f300a40da411b37da5cce5a2fbea0" - integrity sha1-z2gJG8+fMApA2kEbN9pczlovvqA= - dependencies: - fs-exists-sync "^0.1.0" - resolve-dir "^0.1.0" - find-free-port@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/find-free-port/-/find-free-port-2.0.0.tgz#4b22e5f6579eb1a38c41ac6bcb3efed1b6da9b1b" integrity sha1-SyLl9leesaOMQaxryz7+0bbamxs= -find-pkg@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/find-pkg/-/find-pkg-0.1.2.tgz#1bdc22c06e36365532e2a248046854b9788da557" - integrity sha1-G9wiwG42NlUy4qJIBGhUuXiNpVc= - dependencies: - find-file-up "^0.1.2" - find-root@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" @@ -12536,13 +12416,6 @@ flush-write-stream@^1.0.0, flush-write-stream@^1.0.2: inherits "^2.0.3" readable-stream "^2.3.6" -follow-redirects@1.5.10: - version "1.5.10" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" - integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== - dependencies: - debug "=3.1.0" - follow-redirects@^1.0.0: version "1.7.0" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.7.0.tgz#489ebc198dc0e7f64167bd23b03c4c19b5784c76" @@ -12732,15 +12605,6 @@ fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" -fs-extra@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" - integrity sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE= - dependencies: - graceful-fs "^4.1.2" - jsonfile "^3.0.0" - universalify "^0.1.0" - fs-extra@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" @@ -12904,11 +12768,6 @@ generic-names@^2.0.1: dependencies: loader-utils "^1.1.0" -genfun@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/genfun/-/genfun-4.0.1.tgz#ed10041f2e4a7f1b0a38466d17a5c3e27df1dfc1" - integrity sha1-7RAEHy5KfxsKOEZtF6XD4n3x38E= - genfun@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537" @@ -13058,11 +12917,6 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -git-branch@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/git-branch/-/git-branch-1.0.0.tgz#64cc7dd75da2d81a9d4679087c1f8b56e6bd2d3d" - integrity sha512-ZTzuqw5Df8fyLXQWrX6hK+4FpNCdKzMcERlxENEGO5aKcLmG7MAszhrMhluUKNKmOS/JAGijDMQDXDCDw1mE/A== - git-config-path@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/git-config-path/-/git-config-path-1.0.1.tgz#6d33f7ed63db0d0e118131503bab3aca47d54664" @@ -13091,16 +12945,6 @@ git-remote-origin-url@^2.0.0: gitconfiglocal "^1.0.0" pify "^2.3.0" -git-repo-name@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/git-repo-name/-/git-repo-name-0.6.0.tgz#af09884656aa537ec625c7087008175cd61228ff" - integrity sha1-rwmIRlaqU37GJccIcAgXXNYSKP8= - dependencies: - cwd "^0.9.1" - file-name "^0.1.0" - lazy-cache "^1.0.4" - remote-origin-url "^0.5.1" - git-semver-tags@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-2.0.2.tgz#f506ec07caade191ac0c8d5a21bdb8131b4934e3" @@ -13132,13 +12976,6 @@ git-url-parse@^11.1.2: dependencies: git-up "^4.0.0" -git-username@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/git-username/-/git-username-0.5.1.tgz#432a41b34a19607892354004c9893a8829ffa4f0" - integrity sha512-xjUjrj3i4kup2A3a/ZVZB1Nt0PUX7SU7KeVqIbXPdslT7NbNfyO04JMxBv4gar77JePdS+A6f05jG1Viy6+U1w== - dependencies: - remote-origin-url "^0.4.0" - gitconfiglocal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" @@ -13296,14 +13133,6 @@ global-modules@2.0.0: dependencies: global-prefix "^3.0.0" -global-modules@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d" - integrity sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0= - dependencies: - global-prefix "^0.1.4" - is-windows "^0.2.0" - global-modules@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" @@ -13313,16 +13142,6 @@ global-modules@^1.0.0: is-windows "^1.0.1" resolve-dir "^1.0.0" -global-prefix@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-0.1.5.tgz#8d3bc6b8da3ca8112a160d8d496ff0462bfef78f" - integrity sha1-jTvGuNo8qBEqFg2NSW/wRiv+948= - dependencies: - homedir-polyfill "^1.0.0" - ini "^1.3.4" - is-windows "^0.2.0" - which "^1.2.12" - global-prefix@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" @@ -14044,7 +13863,7 @@ homedir-polyfill@^1.0.0, homedir-polyfill@^1.0.1: dependencies: parse-passwd "^1.0.0" -hosted-git-info@^2.1.4, hosted-git-info@^2.4.2, hosted-git-info@^2.6.0: +hosted-git-info@^2.1.4, hosted-git-info@^2.6.0: version "2.8.9" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== @@ -14248,7 +14067,7 @@ htmltojsx@^0.3.0: react-dom "~15.4.1" yargs "~4.6.0" -http-cache-semantics@3.8.1, http-cache-semantics@^3.8.0, http-cache-semantics@^3.8.1: +http-cache-semantics@3.8.1, http-cache-semantics@^3.8.1: version "3.8.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== @@ -14305,7 +14124,7 @@ http-parser-js@>=0.5.1: resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.3.tgz#01d2709c79d41698bb01d4decc5e9da4e4a033d9" integrity sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg== -http-proxy-agent@^2.0.0, http-proxy-agent@^2.1.0: +http-proxy-agent@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== @@ -14364,7 +14183,7 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= -https-proxy-agent@^2.1.0, https-proxy-agent@^2.2.0, https-proxy-agent@^2.2.1, https-proxy-agent@^2.2.3: +https-proxy-agent@^2.2.0, https-proxy-agent@^2.2.1, https-proxy-agent@^2.2.3: version "2.2.4" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== @@ -14397,11 +14216,6 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -humps@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/humps/-/humps-2.0.1.tgz#dd02ea6081bd0568dc5d073184463957ba9ef9aa" - integrity sha1-3QLqYIG9BWjcXQcxhEY5V7qe+ao= - hyperlinker@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/hyperlinker/-/hyperlinker-1.0.0.tgz#23dc9e38a206b208ee49bc2d6c8ef47027df0c0e" @@ -14480,13 +14294,6 @@ ignore@^5.0.4, ignore@^5.1.1, ignore@^5.1.4: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== -image-size@0.8.3: - version "0.8.3" - resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.8.3.tgz#f0b568857e034f29baffd37013587f2c0cad8b46" - integrity sha512-SMtq1AJ+aqHB45c3FsB4ERK0UCiA2d3H1uq8s+8T0Pf8A3W4teyBQyaFaktH6xvZqh+npwlKU7i4fJo0r7TYTg== - dependencies: - queue "6.0.1" - immer@8.0.1, immer@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/immer/-/immer-8.0.1.tgz#9c73db683e2b3975c424fb0572af5889877ae656" @@ -14626,7 +14433,7 @@ ini@1.3.7: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84" integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ== -ini@^1.3.2, ini@^1.3.3, ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: +ini@^1.3.2, ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== @@ -14674,25 +14481,6 @@ inquirer@^6.2.0: strip-ansi "^5.1.0" through "^2.3.6" -inquirer@^6.2.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" - integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== - dependencies: - ansi-escapes "^3.2.0" - chalk "^2.4.2" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^3.0.3" - figures "^2.0.0" - lodash "^4.17.12" - mute-stream "0.0.7" - run-async "^2.2.0" - rxjs "^6.4.0" - string-width "^2.1.0" - strip-ansi "^5.1.0" - through "^2.3.6" - inquirer@^7.0.0, inquirer@^7.3.3: version "7.3.3" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" @@ -14785,7 +14573,7 @@ ip-regex@^4.0.0: resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== -ip@1.1.5, ip@^1.1.0, ip@^1.1.4, ip@^1.1.5: +ip@1.1.5, ip@^1.1.0, ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= @@ -14901,11 +14689,6 @@ is-buffer@^2.0.0, is-buffer@~2.0.3: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== -is-buffer@^2.0.2: - version "2.0.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" - integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== - is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" @@ -15428,11 +15211,6 @@ is-window@^1.0.2: resolved "https://registry.yarnpkg.com/is-window/-/is-window-1.0.2.tgz#2c896ca53db97de45d3c33133a65d8c9f563480d" integrity sha1-LIlspT25feRdPDMTOmXYyfVjSA0= -is-windows@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c" - integrity sha1-3hqm1j6indJIc3tp8f+LgALSEIw= - is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -16460,13 +16238,6 @@ jsonfile@^2.1.0: optionalDependencies: graceful-fs "^4.1.6" -jsonfile@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" - integrity sha1-pezG9l9T9mLEQVx2daAzHQmS7GY= - optionalDependencies: - graceful-fs "^4.1.6" - jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -16851,11 +16622,6 @@ lazy-ass@^1.6.0: resolved "https://registry.yarnpkg.com/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513" integrity sha1-eZllXoZGwX8In90YfRUNMyTVRRM= -lazy-cache@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - integrity sha1-odePw6UEdMuAhF07O24dpJpEbo4= - lazy-universal-dotenv@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/lazy-universal-dotenv/-/lazy-universal-dotenv-3.0.1.tgz#a6c8938414bca426ab8c9463940da451a911db38" @@ -17619,7 +17385,7 @@ lowlight@~1.11.0: fault "^1.0.2" highlight.js "~9.13.0" -lru-cache@^4.0.1, lru-cache@^4.1.1: +lru-cache@^4.0.1: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== @@ -17692,23 +17458,6 @@ make-error@1.x, make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== -make-fetch-happen@^2.4.13: - version "2.6.0" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-2.6.0.tgz#8474aa52198f6b1ae4f3094c04e8370d35ea8a38" - integrity sha512-FFq0lNI0ax+n9IWzWpH8A4JdgYiAp2DDYIZ3rsaav8JDe8I+72CzK6PQW/oom15YDZpV5bYW/9INd6nIJ2ZfZw== - dependencies: - agentkeepalive "^3.3.0" - cacache "^10.0.0" - http-cache-semantics "^3.8.0" - http-proxy-agent "^2.0.0" - https-proxy-agent "^2.1.0" - lru-cache "^4.1.1" - mississippi "^1.2.0" - node-fetch-npm "^2.0.2" - promise-retry "^1.1.1" - socks-proxy-agent "^3.0.1" - ssri "^5.0.0" - make-fetch-happen@^5.0.0: version "5.0.2" resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz#aa8387104f2687edca01c8687ee45013d02d19bd" @@ -18155,11 +17904,6 @@ mime@^2.3.1: resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.7.tgz#962aed9be0ed19c91fd7dc2ece5d7f4e89a90d74" integrity sha512-dhNd1uA2u397uQk3Nv5LM4lm93WYDUXFn3Fu291FJerns4jyTudqhIWe4W04YLy7Uk1tm1Ore04NpjRvQp/NPA== -mimer@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mimer/-/mimer-1.1.0.tgz#2cb67f7093998e772a0e62c090f77daa1b8a2dbe" - integrity sha512-y9dVfy2uiycQvDNiAYW6zp49ZhFlXDMr5wfdOiMbdzGM/0N5LNR6HTUn3un+WUQcM0koaw8FMTG1bt5EnHJdvQ== - mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" @@ -18321,38 +18065,6 @@ minizlib@^2.0.0, minizlib@^2.1.1: minipass "^3.0.0" yallist "^4.0.0" -mississippi@^1.2.0, mississippi@^1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-1.3.1.tgz#2a8bb465e86550ac8b36a7b6f45599171d78671e" - integrity sha512-/6rB8YXFbAtsUVRphIRQqB0+9c7VaPHCjVtvto+JqwVxgz8Zz+I+f68/JgQ+Pb4VlZb2svA9OtdXnHHsZz7ltg== - dependencies: - concat-stream "^1.5.0" - duplexify "^3.4.2" - end-of-stream "^1.1.0" - flush-write-stream "^1.0.0" - from2 "^2.1.0" - parallel-transform "^1.1.0" - pump "^1.0.0" - pumpify "^1.3.3" - stream-each "^1.1.0" - through2 "^2.0.0" - -mississippi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-2.0.0.tgz#3442a508fafc28500486feea99409676e4ee5a6f" - integrity sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw== - dependencies: - concat-stream "^1.5.0" - duplexify "^3.4.2" - end-of-stream "^1.1.0" - flush-write-stream "^1.0.0" - from2 "^2.1.0" - parallel-transform "^1.1.0" - pump "^2.0.1" - pumpify "^1.3.3" - stream-each "^1.1.0" - through2 "^2.0.0" - mississippi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" @@ -19094,16 +18806,6 @@ npm-normalize-package-bin@^1.0.1: semver "^5.5.0" validate-npm-package-name "^3.0.0" -npm-package-arg@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-5.1.2.tgz#fb18d17bb61e60900d6312619919bd753755ab37" - integrity sha512-wJBsrf0qpypPT7A0LART18hCdyhpCMxeTtcb0X4IZO2jsP6Om7EHN1d9KSKiqD+KVH030RVNpWS9thk+pb7wzA== - dependencies: - hosted-git-info "^2.4.2" - osenv "^0.1.4" - semver "^5.1.0" - validate-npm-package-name "^3.0.0" - npm-package-arg@^8.0.0, npm-package-arg@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.0.1.tgz#9d76f8d7667b2373ffda60bb801a27ef71e3e270" @@ -19140,14 +18842,6 @@ npm-packlist@^2.1.0: npm-bundled "^1.1.1" npm-normalize-package-bin "^1.0.1" -npm-pick-manifest@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-1.0.4.tgz#a5ee6510c1fe7221c0bc0414e70924c14045f7e8" - integrity sha512-MKxNdeyOZysPRTTbHtW0M5Fw38Jo/3ARsoGw5qjCfS+XGjvNB/Gb4qtAZUFmKPM2mVum+eX559eHvKywU856BQ== - dependencies: - npm-package-arg "^5.1.2" - semver "^5.3.0" - npm-pick-manifest@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz#f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7" @@ -19508,13 +19202,6 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -open@^6.3.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/open/-/open-6.4.0.tgz#5c13e96d0dc894686164f18965ecfe889ecfc8a9" - integrity sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg== - dependencies: - is-wsl "^1.1.0" - open@^7.0.2, open@^7.0.3, open@^7.4.2: version "7.4.2" resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" @@ -19568,16 +19255,6 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" -ora@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ora/-/ora-1.4.0.tgz#884458215b3a5d4097592285f93321bb7a79e2e5" - integrity sha512-iMK1DOQxzzh2MBlVsU42G80mnrvUhqsMh74phHtDlrcTZPK0pH6o7l7DRshK+0YsxDyEuaOkziVdvM3T0QTzpw== - dependencies: - chalk "^2.1.0" - cli-cursor "^2.1.0" - cli-spinners "^1.0.1" - log-symbols "^2.1.0" - ora@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/ora/-/ora-3.4.0.tgz#bf0752491059a3ef3ed4c85097531de9fdbcd318" @@ -19609,7 +19286,7 @@ os-filter-obj@^2.0.0: dependencies: arch "^2.1.0" -os-homedir@^1.0.0, os-homedir@^1.0.1: +os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= @@ -19929,33 +19606,6 @@ pacote@^11.1.6: ssri "^8.0.0" tar "^6.0.1" -pacote@^2.7.36: - version "2.7.38" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-2.7.38.tgz#5091f8774298c26c3eca24606037f1bb73db74c1" - integrity sha512-XxHUyHQB7QCVBxoXeVu0yKxT+2PvJucsc0+1E+6f95lMUxEAYERgSAc71ckYXrYr35Ew3xFU/LrhdIK21GQFFA== - dependencies: - bluebird "^3.5.0" - cacache "^9.2.9" - glob "^7.1.2" - lru-cache "^4.1.1" - make-fetch-happen "^2.4.13" - minimatch "^3.0.4" - mississippi "^1.2.0" - normalize-package-data "^2.4.0" - npm-package-arg "^5.1.2" - npm-pick-manifest "^1.0.4" - osenv "^0.1.4" - promise-inflight "^1.0.1" - promise-retry "^1.1.1" - protoduck "^4.0.0" - safe-buffer "^5.1.1" - semver "^5.3.0" - ssri "^4.1.6" - tar-fs "^1.15.3" - tar-stream "^1.5.4" - unique-filename "^1.1.0" - which "^1.2.12" - pako@~1.0.5: version "1.0.10" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.10.tgz#4328badb5086a426aa90f541977d4955da5c9732" @@ -20065,23 +19715,6 @@ parse-filepath@^1.0.1: map-cache "^0.2.0" path-root "^0.1.1" -parse-git-config@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/parse-git-config/-/parse-git-config-0.2.0.tgz#272833fdd15fea146fb75d336d236b963b6ff706" - integrity sha1-Jygz/dFf6hRvt10zbSNrljtv9wY= - dependencies: - ini "^1.3.3" - -parse-git-config@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/parse-git-config/-/parse-git-config-1.1.1.tgz#d3a9984317132f57398712bba438e129590ddf8c" - integrity sha1-06mYQxcTL1c5hxK7pDjhKVkN34w= - dependencies: - extend-shallow "^2.0.1" - fs-exists-sync "^0.1.0" - git-config-path "^1.0.1" - ini "^1.3.4" - parse-git-config@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/parse-git-config/-/parse-git-config-2.0.3.tgz#6fb840d4a956e28b971c97b33a5deb73a6d5b6bb" @@ -20932,13 +20565,6 @@ protocols@^1.1.0, protocols@^1.4.0: resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.7.tgz#95f788a4f0e979b291ffefcf5636ad113d037d32" integrity sha512-Fx65lf9/YDn3hUX08XUc0J8rSux36rEsyiv21ZGUC1mOyeM3lTRpZLcrm8aAolzS4itwVfm7TAPyxC2E5zd6xg== -protoduck@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-4.0.0.tgz#fe4874d8c7913366cfd9ead12453a22cd3657f8e" - integrity sha1-/kh02MeRM2bP2erRJFOiLNNlf44= - dependencies: - genfun "^4.0.1" - protoduck@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.1.tgz#03c3659ca18007b69a50fd82a7ebcc516261151f" @@ -20991,15 +20617,7 @@ public-encrypt@^4.0.0: randombytes "^2.0.1" safe-buffer "^5.1.2" -pump@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.3.tgz#5dfe8311c33bbf6fc18261f9f34702c47c08a954" - integrity sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pump@^2.0.0, pump@^2.0.1: +pump@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== @@ -21099,13 +20717,6 @@ querystring@0.2.0, querystring@^0.2.0: resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= -queue@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/queue/-/queue-6.0.1.tgz#abd5a5b0376912f070a25729e0b6a7d565683791" - integrity sha512-AJBQabRCCNr9ANq8v77RJEv73DPbn55cdTb+Giq4X0AVnNVZvMHlYp7XlQiN+1npCZj1DuSmaA2hYVUUDgxFDg== - dependencies: - inherits "~2.0.3" - quick-lru@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" @@ -21239,7 +20850,7 @@ react-app-polyfill@2.0.0: regenerator-runtime "^0.13.7" whatwg-fetch "^3.4.1" -react-codesandboxer@^3.1.3, react-codesandboxer@^3.1.5: +react-codesandboxer@^3.1.3: version "3.1.5" resolved "https://registry.yarnpkg.com/react-codesandboxer/-/react-codesandboxer-3.1.5.tgz#ae647383be78c01761f6063f052fd817cc3a5942" integrity sha512-gao6ydAfVI9DlmxvXJb1poqWDZt4jCSi2DWvfUCLUBmJAxH8+DkoGtjrO3VJDjdwcCFvumWb+ztg3WxsvrsWJw== @@ -22216,20 +21827,6 @@ remark-squeeze-paragraphs@4.0.0: dependencies: mdast-squeeze-paragraphs "^4.0.0" -remote-origin-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/remote-origin-url/-/remote-origin-url-0.4.0.tgz#4d3e2902f34e2d37d1c263d87710b77eb4086a30" - integrity sha1-TT4pAvNOLTfRwmPYdxC3frQIajA= - dependencies: - parse-git-config "^0.2.0" - -remote-origin-url@^0.5.1: - version "0.5.3" - resolved "https://registry.yarnpkg.com/remote-origin-url/-/remote-origin-url-0.5.3.tgz#b9fc6ced2c826690d0b07218b2b8c17fcec88e87" - integrity sha512-crQ7Xk1m/F2IiwBx5oTqk/c0hjoumrEz+a36+ZoVupskQRE/q7pAwHKsTNeiZ31sbSTELvVlVv4h1W0Xo5szKg== - dependencies: - parse-git-config "^1.1.1" - remove-bom-buffer@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz#c2bf1e377520d324f623892e33c10cac2c252b53" @@ -22450,14 +22047,6 @@ resolve-cwd@^3.0.0: dependencies: resolve-from "^5.0.0" -resolve-dir@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-0.1.1.tgz#b219259a5602fac5c5c496ad894a6e8cc430261e" - integrity sha1-shklmlYC+sXFxJatiUpujMQwJh4= - dependencies: - expand-tilde "^1.2.2" - global-modules "^0.2.3" - resolve-dir@^1.0.0, resolve-dir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" @@ -23306,7 +22895,7 @@ shellwords@^0.1.1: resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== -shortid@^2.2.8, shortid@~2.2.15: +shortid@~2.2.15: version "2.2.16" resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.16.tgz#b742b8f0cb96406fd391c76bfc18a67a57fe5608" integrity sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g== @@ -23414,11 +23003,6 @@ smart-buffer@4.0.2: resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.2.tgz#5207858c3815cc69110703c6b94e46c15634395d" integrity sha512-JDhEpTKzXusOqXZ0BUIdH+CjFdO/CR3tLlf5CN34IypI+xMmXW1uB16OOY8z3cICbJlDAVJzNbwBhNO0wt9OAw== -smart-buffer@^1.0.13: - version "1.1.15" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-1.1.15.tgz#7f114b5b65fab3e2a35aa775bb12f0d1c649bf16" - integrity sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY= - smart-buffer@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" @@ -23530,14 +23114,6 @@ sockjs@^0.3.21: uuid "^3.4.0" websocket-driver "^0.7.4" -socks-proxy-agent@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz#2eae7cf8e2a82d34565761539a7f9718c5617659" - integrity sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA== - dependencies: - agent-base "^4.1.0" - socks "^1.1.10" - socks-proxy-agent@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz#3c8991f3145b2799e70e11bd5fbc8b1963116386" @@ -23555,14 +23131,6 @@ socks-proxy-agent@^5.0.0: debug "4" socks "^2.3.3" -socks@^1.1.10: - version "1.1.10" - resolved "https://registry.yarnpkg.com/socks/-/socks-1.1.10.tgz#5b8b7fc7c8f341c53ed056e929b7bf4de8ba7b5a" - integrity sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o= - dependencies: - ip "^1.1.4" - smart-buffer "^1.0.13" - socks@^2.3.3: version "2.4.1" resolved "https://registry.yarnpkg.com/socks/-/socks-2.4.1.tgz#cea68a280a3bf7cb6333dbb40cfb243d10725e9d" @@ -23827,20 +23395,6 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" -ssri@^4.1.6: - version "4.1.6" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-4.1.6.tgz#0cb49b6ac84457e7bdd466cb730c3cb623e9a25b" - integrity sha512-WUbCdgSAMQjTFZRWvSPpauryvREEA+Krn19rx67UlJEJx/M192ZHxMmJXjZ4tkdFm+Sb0SXGlENeQVlA5wY7kA== - dependencies: - safe-buffer "^5.1.0" - -ssri@^5.0.0, ssri@^5.2.4: - version "5.3.0" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-5.3.0.tgz#ba3872c9c6d33a0704a7d71ff045e5ec48999d06" - integrity sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ== - dependencies: - safe-buffer "^5.1.1" - ssri@^6.0.0, ssri@^6.0.1: version "6.0.2" resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5" @@ -23922,13 +23476,12 @@ store2@^2.12.0: resolved "https://registry.yarnpkg.com/store2/-/store2-2.12.0.tgz#e1f1b7e1a59b6083b2596a8d067f6ee88fd4d3cf" integrity sha512-7t+/wpKLanLzSnQPX8WAcuLCCeuSHoWdQuh9SB3xD0kNOM38DNf+0Oa+wmvxmYueRzkmh6IcdKFtvTa+ecgPDw== -storybook-addon-export-to-codesandbox@0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/storybook-addon-export-to-codesandbox/-/storybook-addon-export-to-codesandbox-0.1.8.tgz#6eadd241d29aaaf52907676dfbeb6d7f0db95117" - integrity sha512-JL/rTzVCtrB43xNJsHiZHed4Lh4oNu80CBvOITT1JGLJBTSOU1qx9M2PjwvRtxa3YejpTofkzop6h0R9UmTGqQ== +storybook-addon-export-to-codesandbox@0.1.9: + version "0.1.9" + resolved "https://registry.yarnpkg.com/storybook-addon-export-to-codesandbox/-/storybook-addon-export-to-codesandbox-0.1.9.tgz#3155c3c51062dd3bef66764a4b9be46de17be703" + integrity sha512-ePZd+/9wKxM2E1VU7dTXCZHY5EJYm6lOQkmyxNkY3P/y78MXmDK3RwShb2FJXnlldzzY4l4YA0+LwCWI5OF9GA== dependencies: - codesandbox "^2.2.3" - react-codesandboxer "^3.1.5" + codesandbox-import-utils "^2.2.3" storybook-addon-outline@^1.4.1: version "1.4.1" @@ -24561,16 +24114,6 @@ tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== -tar-fs@^1.15.3: - version "1.16.3" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.3.tgz#966a628841da2c4010406a82167cbd5e0c72d509" - integrity sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw== - dependencies: - chownr "^1.0.1" - mkdirp "^0.5.1" - pump "^1.0.0" - tar-stream "^1.1.2" - tar-fs@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.0.tgz#d1cdd121ab465ee0eb9ccde2d35049d3f3daf0d5" @@ -24581,7 +24124,7 @@ tar-fs@^2.1.0: pump "^3.0.0" tar-stream "^2.0.0" -tar-stream@^1.1.2, tar-stream@^1.5.2, tar-stream@^1.5.4: +tar-stream@^1.5.2: version "1.6.2" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== @@ -25607,7 +25150,7 @@ uniq@^1.0.1: resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= -unique-filename@^1.1.0, unique-filename@^1.1.1: +unique-filename@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== @@ -25797,7 +25340,7 @@ upath@^1.2.0: resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== -update-notifier@^2.1.0, update-notifier@^2.2.0: +update-notifier@^2.1.0: version "2.5.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6" integrity sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw== @@ -26660,7 +26203,7 @@ which-typed-array@^1.1.2: has-symbols "^1.0.1" is-typed-array "^1.1.3" -which@1.3.1, which@^1.1.1, which@^1.2.1, which@^1.2.12, which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: +which@1.3.1, which@^1.1.1, which@^1.2.1, which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== From 1a8d42ea15f3309cf239e6a5dd0b58741a3bdb69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Wed, 1 Sep 2021 14:54:09 +0200 Subject: [PATCH 39/62] use makeStyles --- .../Button/ButtonDisabled.stories.tsx | 11 +++++++--- .../components/Button/ButtonSize.stories.tsx | 21 ++++++++++++------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx b/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx index c907b9d91e34a..00ba7a6c913f5 100644 --- a/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx @@ -1,18 +1,23 @@ import * as React from 'react'; import { Button } from '@fluentui/react-button'; import { CalendarMonth24Regular } from '@fluentui/react-icons'; +import { makeStyles } from '@fluentui/react-make-styles/src'; + +const useStyles = makeStyles({ + group: { display: 'flex', flexWrap: 'wrap', gap: '0.5em' }, +}); export const Disabled = () => { - const groupStyles: React.CSSProperties = { display: 'flex', flexWrap: 'wrap', gap: '0.5em' }; + const classes = useStyles(); return ( <> -
+
-
+
diff --git a/packages/react-button/src/components/Button/ButtonSize.stories.tsx b/packages/react-button/src/components/Button/ButtonSize.stories.tsx index 69c5e843f75f2..273e7d6a37253 100644 --- a/packages/react-button/src/components/Button/ButtonSize.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonSize.stories.tsx @@ -1,28 +1,33 @@ import * as React from 'react'; import { Button } from '@fluentui/react-button'; import { CalendarMonth24Regular } from '@fluentui/react-icons'; +import { makeStyles } from '@fluentui/react-make-styles/src'; + +const useStyles = makeStyles({ + group: { display: 'flex', flexWrap: 'wrap', gap: '0.5em' }, + header: { width: '100%', margin: 0 }, +}); export const Size = () => { - const groupStyles: React.CSSProperties = { display: 'flex', flexWrap: 'wrap', gap: '0.5em' }; - const headerStyles: React.CSSProperties = { width: '100%', margin: 0 }; + const classes = useStyles(); return ( <> -
-

small

+
+

small

-
-

medium

+
+

medium

-
-

large

+
+

large

- +
); Block.parameters = { docs: { diff --git a/packages/react-button/src/components/Button/ButtonCircular.stories.tsx b/packages/react-button/src/components/Button/ButtonCircular.stories.tsx index e513e1fe2de49..71224436cacdf 100644 --- a/packages/react-button/src/components/Button/ButtonCircular.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonCircular.stories.tsx @@ -6,12 +6,12 @@ import { Button } from '@fluentui/react-button'; import { CalendarMonth24Regular } from '@fluentui/react-icons'; export const Circular = () => ( - <> +
); Circular.parameters = { docs: { diff --git a/packages/react-button/src/components/Button/ButtonDefault.stories.tsx b/packages/react-button/src/components/Button/ButtonDefault.stories.tsx index 88eebb79acc88..841c76f90cc0c 100644 --- a/packages/react-button/src/components/Button/ButtonDefault.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonDefault.stories.tsx @@ -7,4 +7,8 @@ import { Button } from '@fluentui/react-button'; // @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) import { ButtonProps } from './Button.types'; -export const Default = (props: ButtonProps) => ; +export const Default = (props: ButtonProps) => ( +
+ +
+); diff --git a/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx b/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx index 4a2fcd947a206..539b41765e537 100644 --- a/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx @@ -14,7 +14,7 @@ export const Disabled = () => { const classes = useStyles(); return ( - <> +
@@ -31,7 +31,7 @@ export const Disabled = () => { Primary disabled focusable
- +
); }; Disabled.parameters = { diff --git a/packages/react-button/src/components/Button/ButtonEmphasis.stories.tsx b/packages/react-button/src/components/Button/ButtonEmphasis.stories.tsx index d5f5687c69884..93e1fb913ab57 100644 --- a/packages/react-button/src/components/Button/ButtonEmphasis.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonEmphasis.stories.tsx @@ -5,13 +5,13 @@ import * as React from 'react'; import { Button } from '@fluentui/react-button'; export const Emphasis = () => ( - <> +
- +
); Emphasis.parameters = { docs: { diff --git a/packages/react-button/src/components/Button/ButtonSize.stories.tsx b/packages/react-button/src/components/Button/ButtonSize.stories.tsx index a053a1b0dd8e6..daf58ec183457 100644 --- a/packages/react-button/src/components/Button/ButtonSize.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonSize.stories.tsx @@ -14,7 +14,7 @@ const useStyles = makeStyles({ export const Size = () => { const classes = useStyles(); return ( - <> +

small

@@ -37,7 +37,7 @@ export const Size = () => {
- +
); }; Size.parameters = { diff --git a/packages/react-button/src/components/Button/ButtonWithIcon.stories.tsx b/packages/react-button/src/components/Button/ButtonWithIcon.stories.tsx index cd6acf7fa2719..9e22b904fcd9a 100644 --- a/packages/react-button/src/components/Button/ButtonWithIcon.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonWithIcon.stories.tsx @@ -6,13 +6,13 @@ import { Button } from '@fluentui/react-button'; import { CalendarMonth24Regular } from '@fluentui/react-icons'; export const WithIcon = () => ( - <> +
); WithIcon.parameters = { docs: { diff --git a/packages/react-button/src/components/Button/ButtonWithLongText.stories.tsx b/packages/react-button/src/components/Button/ButtonWithLongText.stories.tsx index a5f1cbcf7508b..0e6916c67553e 100644 --- a/packages/react-button/src/components/Button/ButtonWithLongText.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonWithLongText.stories.tsx @@ -5,10 +5,10 @@ import * as React from 'react'; import { Button } from '@fluentui/react-button'; export const WithLongText = () => ( - <> +
- +
); WithLongText.parameters = { docs: { From 2ea8ee042fa8b78f050088055a448f0e0807e38a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Wed, 15 Sep 2021 19:47:33 +0200 Subject: [PATCH 46/62] update addon version --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7171eb4f7fcdd..18a830b5c3d63 100644 --- a/package.json +++ b/package.json @@ -231,7 +231,7 @@ "workspace-tools": "0.12.3", "yargs": "13.3.2", "yargs-parser": "13.1.2", - "storybook-addon-export-to-codesandbox": "0.2.0" + "storybook-addon-export-to-codesandbox": "0.2.2" }, "license": "MIT", "workspaces": { diff --git a/yarn.lock b/yarn.lock index f2f3c3fc00cd8..6448598ce3a7b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23476,10 +23476,10 @@ store2@^2.12.0: resolved "https://registry.yarnpkg.com/store2/-/store2-2.12.0.tgz#e1f1b7e1a59b6083b2596a8d067f6ee88fd4d3cf" integrity sha512-7t+/wpKLanLzSnQPX8WAcuLCCeuSHoWdQuh9SB3xD0kNOM38DNf+0Oa+wmvxmYueRzkmh6IcdKFtvTa+ecgPDw== -storybook-addon-export-to-codesandbox@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/storybook-addon-export-to-codesandbox/-/storybook-addon-export-to-codesandbox-0.2.0.tgz#3bfac9436930069d3e0d6a09fda944decb755e7b" - integrity sha512-ulyGcLmPaKmDEHZZ/WNEuMNFeQk1sowxRPe09yOZ6bZqd+WGV7mznwUWNAXEWdZ4hJZdJnd5f894F1vHF54w5w== +storybook-addon-export-to-codesandbox@0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/storybook-addon-export-to-codesandbox/-/storybook-addon-export-to-codesandbox-0.2.2.tgz#118a2a2d32cf71ca955dc3f18c649fadd1071474" + integrity sha512-Itj/gwZmWPIKBTd0p31TASC4oS94tHf/dwvmD457yVQPRYZCh00WXZIo10JR9OAodKPE3ckJXYAiwkonbH3Wrw== dependencies: codesandbox-import-utils "^2.2.3" From bec2094727bc8f5dc2a217280b80ebaba7d5fbd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Wed, 15 Sep 2021 19:48:24 +0200 Subject: [PATCH 47/62] remove relative import --- .../src/components/Button/ButtonDefault.stories.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/react-button/src/components/Button/ButtonDefault.stories.tsx b/packages/react-button/src/components/Button/ButtonDefault.stories.tsx index 841c76f90cc0c..d2b3709c23f67 100644 --- a/packages/react-button/src/components/Button/ButtonDefault.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonDefault.stories.tsx @@ -1,11 +1,7 @@ import * as React from 'react'; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) -import { Button } from '@fluentui/react-button'; - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) -import { ButtonProps } from './Button.types'; +import { Button, ButtonProps } from '@fluentui/react-button'; export const Default = (props: ButtonProps) => (
From f4b5fc5e8abf7b3de2ffe9fe97769a7c801b26e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Thu, 16 Sep 2021 11:58:18 +0200 Subject: [PATCH 48/62] minor update of package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 18a830b5c3d63..5e2cbc09bb8b6 100644 --- a/package.json +++ b/package.json @@ -231,7 +231,7 @@ "workspace-tools": "0.12.3", "yargs": "13.3.2", "yargs-parser": "13.1.2", - "storybook-addon-export-to-codesandbox": "0.2.2" + "storybook-addon-export-to-codesandbox": "0.2.3" }, "license": "MIT", "workspaces": { From ddc0d31b18a82814fc8629d26a962eedf6e90002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Thu, 16 Sep 2021 12:26:30 +0200 Subject: [PATCH 49/62] remove unnecessary ts-ignores --- .../src/components/Button/Button.stories.tsx | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/packages/react-button/src/components/Button/Button.stories.tsx b/packages/react-button/src/components/Button/Button.stories.tsx index 9138e8e39131e..acaacc0ad0ca7 100644 --- a/packages/react-button/src/components/Button/Button.stories.tsx +++ b/packages/react-button/src/components/Button/Button.stories.tsx @@ -6,36 +6,14 @@ import { Meta } from '@storybook/react'; import descriptionMd from './ButtonDescription.md'; import bestPracticesMd from './ButtonBestPractices.md'; -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) export { Emphasis } from './ButtonEmphasis.stories'; - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) export { Default } from './ButtonDefault.stories'; - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) export { Disabled } from './ButtonDisabled.stories'; -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) export { WithIcon } from './ButtonWithIcon.stories'; - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) export { Circular } from './ButtonCircular.stories'; - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) export { Size } from './ButtonSize.stories'; - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) export { Block } from './ButtonBlock.stories'; - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) export { WithLongText } from './ButtonWithLongText.stories'; export default { From bdf0c54aac497fcb8bd90ddcba977a84ca65b639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Thu, 16 Sep 2021 15:37:43 +0200 Subject: [PATCH 50/62] delete invalid change files --- ...eact-examples-292153ef-66f4-43d3-b6e7-8817fdcf814c.json | 7 ------- ...eact-examples-407aa3fb-fb16-444c-b15f-3e491cd2d8ba.json | 7 ------- ...eact-examples-5f8fef9b-5486-4d10-8ed5-527cbd34ff54.json | 7 ------- 3 files changed, 21 deletions(-) delete mode 100644 change/@fluentui-react-examples-292153ef-66f4-43d3-b6e7-8817fdcf814c.json delete mode 100644 change/@fluentui-react-examples-407aa3fb-fb16-444c-b15f-3e491cd2d8ba.json delete mode 100644 change/@fluentui-react-examples-5f8fef9b-5486-4d10-8ed5-527cbd34ff54.json diff --git a/change/@fluentui-react-examples-292153ef-66f4-43d3-b6e7-8817fdcf814c.json b/change/@fluentui-react-examples-292153ef-66f4-43d3-b6e7-8817fdcf814c.json deleted file mode 100644 index 7b8c7b315bf49..0000000000000 --- a/change/@fluentui-react-examples-292153ef-66f4-43d3-b6e7-8817fdcf814c.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "Donut chart custom accessibility change", - "packageName": "@fluentui/react-examples", - "email": "v-scharde@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-examples-407aa3fb-fb16-444c-b15f-3e491cd2d8ba.json b/change/@fluentui-react-examples-407aa3fb-fb16-444c-b15f-3e491cd2d8ba.json deleted file mode 100644 index 3afe398dc71b4..0000000000000 --- a/change/@fluentui-react-examples-407aa3fb-fb16-444c-b15f-3e491cd2d8ba.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "Update Tooltip examples", - "packageName": "@fluentui/react-examples", - "email": "behowell@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-examples-5f8fef9b-5486-4d10-8ed5-527cbd34ff54.json b/change/@fluentui-react-examples-5f8fef9b-5486-4d10-8ed5-527cbd34ff54.json deleted file mode 100644 index 022bb9610799b..0000000000000 --- a/change/@fluentui-react-examples-5f8fef9b-5486-4d10-8ed5-527cbd34ff54.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "fix: replace class with className in mdx file", - "packageName": "@fluentui/react-examples", - "email": "tristan.watanabe@gmail.com", - "dependentChangeType": "patch" -} From 3874ce07ce9cc58101abdb87a26651236d960789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Thu, 16 Sep 2021 16:23:22 +0200 Subject: [PATCH 51/62] update yarn.lock --- yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index 6448598ce3a7b..2ec2cf7573a25 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23476,10 +23476,10 @@ store2@^2.12.0: resolved "https://registry.yarnpkg.com/store2/-/store2-2.12.0.tgz#e1f1b7e1a59b6083b2596a8d067f6ee88fd4d3cf" integrity sha512-7t+/wpKLanLzSnQPX8WAcuLCCeuSHoWdQuh9SB3xD0kNOM38DNf+0Oa+wmvxmYueRzkmh6IcdKFtvTa+ecgPDw== -storybook-addon-export-to-codesandbox@0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/storybook-addon-export-to-codesandbox/-/storybook-addon-export-to-codesandbox-0.2.2.tgz#118a2a2d32cf71ca955dc3f18c649fadd1071474" - integrity sha512-Itj/gwZmWPIKBTd0p31TASC4oS94tHf/dwvmD457yVQPRYZCh00WXZIo10JR9OAodKPE3ckJXYAiwkonbH3Wrw== +storybook-addon-export-to-codesandbox@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/storybook-addon-export-to-codesandbox/-/storybook-addon-export-to-codesandbox-0.2.3.tgz#dfdb3c04033ab9b220285f26fd462ee2603efe3d" + integrity sha512-I6lk+HGmx4wLbfH7lKnBWWgXqkhQ7F/wTZ2EdkwT7kuM+W2ZCqBPpBX4nqQzKuG2tqnH8NTu+f5CsrJtOtZdCw== dependencies: codesandbox-import-utils "^2.2.3" From eccd64036662cdee2ab2ed01e58406def5f70647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Thu, 16 Sep 2021 16:34:12 +0200 Subject: [PATCH 52/62] add ts-ignore to babel.plugin.js --- .storybook/babel.plugin.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.storybook/babel.plugin.js b/.storybook/babel.plugin.js index 3368fccadda7f..9751a8fad83fe 100644 --- a/.storybook/babel.plugin.js +++ b/.storybook/babel.plugin.js @@ -22,6 +22,7 @@ module.exports = function (babel) { t.identifier('__STORY__'), ), ); + // @ts-ignore const expressionStatement = path.findParent(p => p.isExpressionStatement()); expressionStatement.insertAfter(expression); path.stop(); From c5182fc2545e38151435f01962465b2616be52f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Fri, 17 Sep 2021 22:15:25 +0200 Subject: [PATCH 53/62] Revert "delete invalid change files" This reverts commit bdf0c54aac497fcb8bd90ddcba977a84ca65b639. --- ...eact-examples-292153ef-66f4-43d3-b6e7-8817fdcf814c.json | 7 +++++++ ...eact-examples-407aa3fb-fb16-444c-b15f-3e491cd2d8ba.json | 7 +++++++ ...eact-examples-5f8fef9b-5486-4d10-8ed5-527cbd34ff54.json | 7 +++++++ 3 files changed, 21 insertions(+) create mode 100644 change/@fluentui-react-examples-292153ef-66f4-43d3-b6e7-8817fdcf814c.json create mode 100644 change/@fluentui-react-examples-407aa3fb-fb16-444c-b15f-3e491cd2d8ba.json create mode 100644 change/@fluentui-react-examples-5f8fef9b-5486-4d10-8ed5-527cbd34ff54.json diff --git a/change/@fluentui-react-examples-292153ef-66f4-43d3-b6e7-8817fdcf814c.json b/change/@fluentui-react-examples-292153ef-66f4-43d3-b6e7-8817fdcf814c.json new file mode 100644 index 0000000000000..7b8c7b315bf49 --- /dev/null +++ b/change/@fluentui-react-examples-292153ef-66f4-43d3-b6e7-8817fdcf814c.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Donut chart custom accessibility change", + "packageName": "@fluentui/react-examples", + "email": "v-scharde@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-examples-407aa3fb-fb16-444c-b15f-3e491cd2d8ba.json b/change/@fluentui-react-examples-407aa3fb-fb16-444c-b15f-3e491cd2d8ba.json new file mode 100644 index 0000000000000..3afe398dc71b4 --- /dev/null +++ b/change/@fluentui-react-examples-407aa3fb-fb16-444c-b15f-3e491cd2d8ba.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Update Tooltip examples", + "packageName": "@fluentui/react-examples", + "email": "behowell@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-examples-5f8fef9b-5486-4d10-8ed5-527cbd34ff54.json b/change/@fluentui-react-examples-5f8fef9b-5486-4d10-8ed5-527cbd34ff54.json new file mode 100644 index 0000000000000..022bb9610799b --- /dev/null +++ b/change/@fluentui-react-examples-5f8fef9b-5486-4d10-8ed5-527cbd34ff54.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix: replace class with className in mdx file", + "packageName": "@fluentui/react-examples", + "email": "tristan.watanabe@gmail.com", + "dependentChangeType": "patch" +} From 16d079a472cf79bdbb3dee30e469943addafcfd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Fri, 17 Sep 2021 22:25:21 +0200 Subject: [PATCH 54/62] show full source code --- .../src/components/Button/ButtonDisabled.stories.tsx | 3 +++ .../react-button/src/components/Button/ButtonSize.stories.tsx | 3 +++ 2 files changed, 6 insertions(+) diff --git a/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx b/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx index 539b41765e537..05e6512360a02 100644 --- a/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx @@ -42,5 +42,8 @@ Disabled.parameters = { for screen reader and keyboard users. The primary example of this pattern is when the disabled button is in a menu or a commandbar and is seldom used for standalone buttons.`, }, + source: { + code: __STORY__, + }, }, }; diff --git a/packages/react-button/src/components/Button/ButtonSize.stories.tsx b/packages/react-button/src/components/Button/ButtonSize.stories.tsx index daf58ec183457..66269eb2cc4f6 100644 --- a/packages/react-button/src/components/Button/ButtonSize.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonSize.stories.tsx @@ -45,5 +45,8 @@ Size.parameters = { description: { story: 'A button supports `small`, `medium` and `large` size. Default size is `medium`.', }, + source: { + code: __STORY__, + }, }, }; From 9f048b970521aa66b1dbce51ffecebfc81b50dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Fri, 17 Sep 2021 23:40:37 +0200 Subject: [PATCH 55/62] workaround for ts-ignore --- package.json | 2 +- .../src/components/Button/Button.stories.tsx | 4 +- .../components/Button/ButtonBlock.stories.tsx | 5 +- .../Button/ButtonCircular.stories.tsx | 5 +- .../Button/ButtonDefault.stories.tsx | 4 +- .../Button/ButtonDisabled.stories.tsx | 7 +- .../Button/ButtonEmphasis.stories.tsx | 5 +- .../components/Button/ButtonSize.stories.tsx | 7 +- .../Button/ButtonWithIcon.stories.tsx | 5 +- .../Button/ButtonWithLongText.stories.tsx | 5 +- .../stories/MenuMemoizedMenuItems.stories.tsx | 66 +++++++++++++++++++ yarn.lock | 8 +-- 12 files changed, 84 insertions(+), 39 deletions(-) create mode 100644 packages/react-menu/src/stories/MenuMemoizedMenuItems.stories.tsx diff --git a/package.json b/package.json index 5e2cbc09bb8b6..0fa9e6d39c64b 100644 --- a/package.json +++ b/package.json @@ -231,7 +231,7 @@ "workspace-tools": "0.12.3", "yargs": "13.3.2", "yargs-parser": "13.1.2", - "storybook-addon-export-to-codesandbox": "0.2.3" + "storybook-addon-export-to-codesandbox": "0.3.1" }, "license": "MIT", "workspaces": { diff --git a/packages/react-button/src/components/Button/Button.stories.tsx b/packages/react-button/src/components/Button/Button.stories.tsx index acaacc0ad0ca7..54e81b73ce023 100644 --- a/packages/react-button/src/components/Button/Button.stories.tsx +++ b/packages/react-button/src/components/Button/Button.stories.tsx @@ -1,6 +1,4 @@ -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) -import { Button } from '@fluentui/react-button'; +import { Button } from '../../Button'; // codesandbox-dependency: @fluentui/react-button ^9.0.0-alpha import { Meta } from '@storybook/react'; import descriptionMd from './ButtonDescription.md'; diff --git a/packages/react-button/src/components/Button/ButtonBlock.stories.tsx b/packages/react-button/src/components/Button/ButtonBlock.stories.tsx index 265b4a48c73ea..0d509941cd124 100644 --- a/packages/react-button/src/components/Button/ButtonBlock.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonBlock.stories.tsx @@ -1,8 +1,5 @@ import * as React from 'react'; - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) -import { Button } from '@fluentui/react-button'; +import { Button } from '../../Button'; // codesandbox-dependency: @fluentui/react-button ^9.0.0-alpha export const Block = () => (
diff --git a/packages/react-button/src/components/Button/ButtonCircular.stories.tsx b/packages/react-button/src/components/Button/ButtonCircular.stories.tsx index 71224436cacdf..603c139bb43eb 100644 --- a/packages/react-button/src/components/Button/ButtonCircular.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonCircular.stories.tsx @@ -1,8 +1,5 @@ import * as React from 'react'; - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) -import { Button } from '@fluentui/react-button'; +import { Button } from '../../Button'; // codesandbox-dependency: @fluentui/react-button ^9.0.0-alpha import { CalendarMonth24Regular } from '@fluentui/react-icons'; export const Circular = () => ( diff --git a/packages/react-button/src/components/Button/ButtonDefault.stories.tsx b/packages/react-button/src/components/Button/ButtonDefault.stories.tsx index d2b3709c23f67..bf6f018721133 100644 --- a/packages/react-button/src/components/Button/ButtonDefault.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonDefault.stories.tsx @@ -1,7 +1,5 @@ import * as React from 'react'; -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) -import { Button, ButtonProps } from '@fluentui/react-button'; +import { Button, ButtonProps } from '../../Button'; // codesandbox-dependency: @fluentui/react-button ^9.0.0-alpha export const Default = (props: ButtonProps) => (
diff --git a/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx b/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx index 05e6512360a02..e46551479d44b 100644 --- a/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx @@ -1,8 +1,5 @@ import * as React from 'react'; - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) -import { Button } from '@fluentui/react-button'; +import { Button } from '../../Button'; // codesandbox-dependency: @fluentui/react-button ^9.0.0-alpha import { CalendarMonth24Regular } from '@fluentui/react-icons'; import { makeStyles } from '@fluentui/react-make-styles'; @@ -43,6 +40,8 @@ Disabled.parameters = { the disabled button is in a menu or a commandbar and is seldom used for standalone buttons.`, }, source: { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore code: __STORY__, }, }, diff --git a/packages/react-button/src/components/Button/ButtonEmphasis.stories.tsx b/packages/react-button/src/components/Button/ButtonEmphasis.stories.tsx index 93e1fb913ab57..7f04044181470 100644 --- a/packages/react-button/src/components/Button/ButtonEmphasis.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonEmphasis.stories.tsx @@ -1,8 +1,5 @@ import * as React from 'react'; - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) -import { Button } from '@fluentui/react-button'; +import { Button } from '../../Button'; // codesandbox-dependency: @fluentui/react-button ^9.0.0-alpha export const Emphasis = () => (
diff --git a/packages/react-button/src/components/Button/ButtonSize.stories.tsx b/packages/react-button/src/components/Button/ButtonSize.stories.tsx index 66269eb2cc4f6..654791527ab6c 100644 --- a/packages/react-button/src/components/Button/ButtonSize.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonSize.stories.tsx @@ -1,8 +1,5 @@ import * as React from 'react'; - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) -import { Button } from '@fluentui/react-button'; +import { Button } from '../../Button'; // codesandbox-dependency: @fluentui/react-button ^9.0.0-alpha import { CalendarMonth24Regular } from '@fluentui/react-icons'; import { makeStyles } from '@fluentui/react-make-styles'; @@ -46,6 +43,8 @@ Size.parameters = { story: 'A button supports `small`, `medium` and `large` size. Default size is `medium`.', }, source: { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore code: __STORY__, }, }, diff --git a/packages/react-button/src/components/Button/ButtonWithIcon.stories.tsx b/packages/react-button/src/components/Button/ButtonWithIcon.stories.tsx index 9e22b904fcd9a..f6060b2d13e83 100644 --- a/packages/react-button/src/components/Button/ButtonWithIcon.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonWithIcon.stories.tsx @@ -1,8 +1,5 @@ import * as React from 'react'; - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) -import { Button } from '@fluentui/react-button'; +import { Button } from '../../Button'; // codesandbox-dependency: @fluentui/react-button ^9.0.0-alpha import { CalendarMonth24Regular } from '@fluentui/react-icons'; export const WithIcon = () => ( diff --git a/packages/react-button/src/components/Button/ButtonWithLongText.stories.tsx b/packages/react-button/src/components/Button/ButtonWithLongText.stories.tsx index 0e6916c67553e..6d62e2a0ef511 100644 --- a/packages/react-button/src/components/Button/ButtonWithLongText.stories.tsx +++ b/packages/react-button/src/components/Button/ButtonWithLongText.stories.tsx @@ -1,8 +1,5 @@ import * as React from 'react'; - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - add link to this comment please (see https://github.com/microsoft/fluentui/pull/18695) -import { Button } from '@fluentui/react-button'; +import { Button } from '../../Button'; // codesandbox-dependency: @fluentui/react-button ^9.0.0-alpha export const WithLongText = () => (
diff --git a/packages/react-menu/src/stories/MenuMemoizedMenuItems.stories.tsx b/packages/react-menu/src/stories/MenuMemoizedMenuItems.stories.tsx new file mode 100644 index 0000000000000..5bb2848fa3d5b --- /dev/null +++ b/packages/react-menu/src/stories/MenuMemoizedMenuItems.stories.tsx @@ -0,0 +1,66 @@ +import * as React from 'react'; +import { + Menu, + MenuTrigger, + MenuList, + MenuItemCheckbox, + MenuPopover, + MenuItemCheckboxProps, + // https://github.com/microsoft/fluentui/pull/18695#issuecomment-868432982 + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore +} from '@fluentui/react-menu'; // codesandbox-dependecy: @fluentui/react-button ^9.0.0-alpha + +// https://github.com/microsoft/fluentui/pull/18695#issuecomment-868432982 +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +import { Button } from '@fluentui/react-button'; +import { Edit20Regular as EditIcon } from '@fluentui/react-icons'; + +const MemoCheckbox = React.memo((props: MenuItemCheckboxProps) => { + // use icons in the memo because JSX will always create a new object + // possible to memoize icons but it can be overkill + return ( + } name={props.name} value={props.value}> + {props.children} + + ); +}); + +export const MemoizedMenuItems = () => { + return ( + + + + + + + + Segoe + + + Calibri + + + Arial + + + + + ); +}; + +MemoizedMenuItems.parameters = { + docs: { + description: { + story: [ + '⚠️ _Reredering menu items is a cheap operation and React philosophy encourages rerenders._', + '_Memoization is not free, so use it only when there are concrete benefits to doing so._', + '', + 'Memoized menu items can be created using [React.memo](https://reactjs.org/docs/react-api.html#reactmemo)', + 'to optimize rerenders of menu items if their props have not changed. Can be useful for selectable items,', + 'since each selection will rerender all items in the menu by default.', + ].join('\n'), + }, + }, +}; diff --git a/yarn.lock b/yarn.lock index 2ec2cf7573a25..6983016d4056f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23476,10 +23476,10 @@ store2@^2.12.0: resolved "https://registry.yarnpkg.com/store2/-/store2-2.12.0.tgz#e1f1b7e1a59b6083b2596a8d067f6ee88fd4d3cf" integrity sha512-7t+/wpKLanLzSnQPX8WAcuLCCeuSHoWdQuh9SB3xD0kNOM38DNf+0Oa+wmvxmYueRzkmh6IcdKFtvTa+ecgPDw== -storybook-addon-export-to-codesandbox@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/storybook-addon-export-to-codesandbox/-/storybook-addon-export-to-codesandbox-0.2.3.tgz#dfdb3c04033ab9b220285f26fd462ee2603efe3d" - integrity sha512-I6lk+HGmx4wLbfH7lKnBWWgXqkhQ7F/wTZ2EdkwT7kuM+W2ZCqBPpBX4nqQzKuG2tqnH8NTu+f5CsrJtOtZdCw== +storybook-addon-export-to-codesandbox@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/storybook-addon-export-to-codesandbox/-/storybook-addon-export-to-codesandbox-0.3.1.tgz#b3b3f1bcf9558a7bd6442c900ebb3fb84f87289e" + integrity sha512-tikl8QKWscQJgVC+eAz4XzrhXpb96ZrpllIrG/ZvbJRIXggwJQYbD8pn1ZQxSMYWKoyGSe5XGBYFo29gF6Sg9A== dependencies: codesandbox-import-utils "^2.2.3" From 8bad95ce2dcdde61bc88763ec36b6bc42ce22cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Fri, 17 Sep 2021 23:44:43 +0200 Subject: [PATCH 56/62] Change files --- ...ui-react-menu-96293a65-1e66-4664-8c63-955229640ba0.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@fluentui-react-menu-96293a65-1e66-4664-8c63-955229640ba0.json diff --git a/change/@fluentui-react-menu-96293a65-1e66-4664-8c63-955229640ba0.json b/change/@fluentui-react-menu-96293a65-1e66-4664-8c63-955229640ba0.json new file mode 100644 index 0000000000000..f4d4da4b995f6 --- /dev/null +++ b/change/@fluentui-react-menu-96293a65-1e66-4664-8c63-955229640ba0.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "export to codesandbox", + "packageName": "@fluentui/react-menu", + "email": "peter@draxler.ml", + "dependentChangeType": "patch" +} From f5644abe6984a111465a78013e64d284711e9cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Mon, 20 Sep 2021 09:12:53 +0200 Subject: [PATCH 57/62] dont break menu story --- .../react-menu/src/stories/MenuMemoizedMenuItems.stories.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-menu/src/stories/MenuMemoizedMenuItems.stories.tsx b/packages/react-menu/src/stories/MenuMemoizedMenuItems.stories.tsx index 5bb2848fa3d5b..03dd1c29740cd 100644 --- a/packages/react-menu/src/stories/MenuMemoizedMenuItems.stories.tsx +++ b/packages/react-menu/src/stories/MenuMemoizedMenuItems.stories.tsx @@ -9,7 +9,7 @@ import { // https://github.com/microsoft/fluentui/pull/18695#issuecomment-868432982 // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore -} from '@fluentui/react-menu'; // codesandbox-dependecy: @fluentui/react-button ^9.0.0-alpha +} from '@fluentui/react-menu'; // https://github.com/microsoft/fluentui/pull/18695#issuecomment-868432982 // eslint-disable-next-line @typescript-eslint/ban-ts-comment From d7572e018ad319edc43f0c38b1bb8362a4b0b928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Mon, 20 Sep 2021 17:34:27 +0200 Subject: [PATCH 58/62] fix order of stories --- packages/react-button/src/components/Button/Button.stories.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-button/src/components/Button/Button.stories.tsx b/packages/react-button/src/components/Button/Button.stories.tsx index 54e81b73ce023..41717b8a785f4 100644 --- a/packages/react-button/src/components/Button/Button.stories.tsx +++ b/packages/react-button/src/components/Button/Button.stories.tsx @@ -4,8 +4,8 @@ import { Meta } from '@storybook/react'; import descriptionMd from './ButtonDescription.md'; import bestPracticesMd from './ButtonBestPractices.md'; -export { Emphasis } from './ButtonEmphasis.stories'; export { Default } from './ButtonDefault.stories'; +export { Emphasis } from './ButtonEmphasis.stories'; export { Disabled } from './ButtonDisabled.stories'; export { WithIcon } from './ButtonWithIcon.stories'; From a1e04027d482c72487bbed813a1c74dc08f7fd37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Fri, 24 Sep 2021 16:05:12 +0200 Subject: [PATCH 59/62] update addon to 0.4.0 --- .storybook/preview.js | 21 +++++++++++++++++++++ package.json | 3 ++- yarn.lock | 13 +++++++++---- 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/.storybook/preview.js b/.storybook/preview.js index fef17237e88a9..44efcd08be4c7 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -1,5 +1,6 @@ import { withFluentProvider, withStrictMode } from '@fluentui/react-storybook'; import 'cypress-storybook/react'; +import dedent from 'dedent'; /** @type {NonNullable} */ export const decorators = [withFluentProvider, withStrictMode]; @@ -15,4 +16,24 @@ export const parameters = { excludeDecorators: true, }, }, + exportToCodeSandbox: { + requiredDependencies: { + 'react-dom': 'latest', // for React + 'react-scripts': 'latest', // necessary when using typescript in CodeSandbox + '@fluentui/react-components': '^9.0.0-alpha', // necessary for FluentProvider + }, + indexTsx: dedent` + import * as ReactDOM from 'react-dom'; + import { FluentProvider, webLightTheme } from '@fluentui/react-components'; + import { STORY_NAME as Example } from './example'; + // + // You can edit this example in "example.tsx". + // + ReactDOM.render( + + + , + document.getElementById('root'), + );`, + }, }; diff --git a/package.json b/package.json index ce0fc4c7ee412..9e702a570d200 100644 --- a/package.json +++ b/package.json @@ -115,6 +115,7 @@ "@testing-library/react-hooks": "5.0.3", "@types/babel__helper-plugin-utils": "7.10.0", "@types/copy-webpack-plugin": "6.4.0", + "@types/dedent": "latest", "@types/enhanced-resolve": "3.0.7", "@types/express": "4.17.2", "@types/eslint": "7.2.13", @@ -232,7 +233,7 @@ "workspace-tools": "0.16.2", "yargs": "13.3.2", "yargs-parser": "13.1.2", - "storybook-addon-export-to-codesandbox": "0.3.1" + "storybook-addon-export-to-codesandbox": "0.4.0" }, "license": "MIT", "workspaces": { diff --git a/yarn.lock b/yarn.lock index 108716ce222c1..e9d55c24391f3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4368,6 +4368,11 @@ resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-1.0.10.tgz#d338c7feac93a98a32aac875d1100f92c7b61f4f" integrity sha512-aKf62rRQafDQmSiv1NylKhIMmznsjRN+MnXRXTqHoqm0U/UZzVpdrtRnSIfdiLS616OuC1soYeX1dBg2n1u8Xw== +"@types/dedent@latest": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@types/dedent/-/dedent-0.7.0.tgz#155f339ca404e6dd90b9ce46a3f78fd69ca9b050" + integrity sha512-EGlKlgMhnLt/cM4DbUSafFdrkeJoC9Mvnj0PUCU7tFmTjMjNRT957kXCx0wYm3JuEq4o4ZsS5vG+NlkM2DMd2A== + "@types/deep-assign@^0.1.1": version "0.1.1" resolved "https://registry.yarnpkg.com/@types/deep-assign/-/deep-assign-0.1.1.tgz#c10aa2d6202774015f5820ed303b82ab3b0bde9b" @@ -23293,10 +23298,10 @@ store2@^2.12.0: resolved "https://registry.yarnpkg.com/store2/-/store2-2.12.0.tgz#e1f1b7e1a59b6083b2596a8d067f6ee88fd4d3cf" integrity sha512-7t+/wpKLanLzSnQPX8WAcuLCCeuSHoWdQuh9SB3xD0kNOM38DNf+0Oa+wmvxmYueRzkmh6IcdKFtvTa+ecgPDw== -storybook-addon-export-to-codesandbox@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/storybook-addon-export-to-codesandbox/-/storybook-addon-export-to-codesandbox-0.3.1.tgz#b3b3f1bcf9558a7bd6442c900ebb3fb84f87289e" - integrity sha512-tikl8QKWscQJgVC+eAz4XzrhXpb96ZrpllIrG/ZvbJRIXggwJQYbD8pn1ZQxSMYWKoyGSe5XGBYFo29gF6Sg9A== +storybook-addon-export-to-codesandbox@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/storybook-addon-export-to-codesandbox/-/storybook-addon-export-to-codesandbox-0.4.0.tgz#03184b249a2ef503add3820f39f4a903b75f8291" + integrity sha512-d4hmCNFUiIzbw+Hp9fG5KWDidQMlVez1FL/QkXVk04GtCDQuCUTezZpqyKIiJm31K8Gw59SEOgeFCsmw7dyR8Q== dependencies: codesandbox-import-utils "^2.2.3" From 439617dad0e72e26a03af0c4ef9d0c0225fe8935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Fri, 24 Sep 2021 16:09:47 +0200 Subject: [PATCH 60/62] fix types for babel plugin --- .storybook/babel.plugin.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.storybook/babel.plugin.js b/.storybook/babel.plugin.js index 9751a8fad83fe..4babb454038e5 100644 --- a/.storybook/babel.plugin.js +++ b/.storybook/babel.plugin.js @@ -1,16 +1,23 @@ -// This Babel plugin adds context.parameters.fullSource property to Storybook stories, -// which contains source of of the file where story is present. -// It’s utilized by Export to CodeSandbox. - -// @ts-ignore +/** + * This Babel plugin adds `context.parameters.fullSource` property to Storybook stories, + * which contains source of of the file where story is present. + * It’s utilized by Export to CodeSandbox. + * @param {import('@babel/core')} babel + * @returns {import('@babel/core').PluginObj} + */ module.exports = function (babel) { const { types: t } = babel; + return { name: 'literal-replacer', visitor: { - // @ts-ignore MemberExpression(path) { - if (path.node.property.name === 'parameters' && path.parentPath.isAssignmentExpression()) { + if ( + t.isIdentifier(path.node.property) && + t.isIdentifier(path.node.object) && + path.node.property.name === 'parameters' && + path.parentPath.isAssignmentExpression() + ) { const storyName = path.node.object.name; const expression = t.expressionStatement( t.assignmentExpression( @@ -22,7 +29,6 @@ module.exports = function (babel) { t.identifier('__STORY__'), ), ); - // @ts-ignore const expressionStatement = path.findParent(p => p.isExpressionStatement()); expressionStatement.insertAfter(expression); path.stop(); From 80a0b6c1617fc2e3eb4b6fb3ecc2ce3849f8cd63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Fri, 24 Sep 2021 16:19:13 +0200 Subject: [PATCH 61/62] Button.stories.tsx - revert disscet, update --- .../src/components/Button/Button.stories.tsx | 176 +++++++++++++++++- .../components/Button/ButtonBlock.stories.tsx | 15 -- .../Button/ButtonCircular.stories.tsx | 19 -- .../Button/ButtonDefault.stories.tsx | 8 - .../Button/ButtonDisabled.stories.tsx | 48 ----- .../Button/ButtonEmphasis.stories.tsx | 24 --- .../components/Button/ButtonSize.stories.tsx | 51 ----- .../Button/ButtonWithIcon.stories.tsx | 22 --- .../Button/ButtonWithLongText.stories.tsx | 16 -- 9 files changed, 166 insertions(+), 213 deletions(-) delete mode 100644 packages/react-button/src/components/Button/ButtonBlock.stories.tsx delete mode 100644 packages/react-button/src/components/Button/ButtonCircular.stories.tsx delete mode 100644 packages/react-button/src/components/Button/ButtonDefault.stories.tsx delete mode 100644 packages/react-button/src/components/Button/ButtonDisabled.stories.tsx delete mode 100644 packages/react-button/src/components/Button/ButtonEmphasis.stories.tsx delete mode 100644 packages/react-button/src/components/Button/ButtonSize.stories.tsx delete mode 100644 packages/react-button/src/components/Button/ButtonWithIcon.stories.tsx delete mode 100644 packages/react-button/src/components/Button/ButtonWithLongText.stories.tsx diff --git a/packages/react-button/src/components/Button/Button.stories.tsx b/packages/react-button/src/components/Button/Button.stories.tsx index 41717b8a785f4..60355c9d6adf1 100644 --- a/packages/react-button/src/components/Button/Button.stories.tsx +++ b/packages/react-button/src/components/Button/Button.stories.tsx @@ -1,18 +1,167 @@ -import { Button } from '../../Button'; // codesandbox-dependency: @fluentui/react-button ^9.0.0-alpha +import * as React from 'react'; +import { Button, ButtonProps } from '../../Button'; import { Meta } from '@storybook/react'; - +import { CalendarMonth24Regular } from '@fluentui/react-icons'; import descriptionMd from './ButtonDescription.md'; import bestPracticesMd from './ButtonBestPractices.md'; -export { Default } from './ButtonDefault.stories'; -export { Emphasis } from './ButtonEmphasis.stories'; -export { Disabled } from './ButtonDisabled.stories'; +export const Default = (props: ButtonProps) => ; + +export const ButtonAppearance = () => ( + <> + + + + + + +); +ButtonAppearance.parameters = { + docs: { + description: { + story: + '- `(undefined)`: the button appears with the default style\n' + + '- `primary`: emphasizes the button as a primary action.\n' + + '- `outline`: removes background styling.\n' + + '- `subtle`: minimizes emphasis to blend into the background until hovered or focused\n' + + '- `transparent`: removes background and border styling.\n', + }, + }, +}; + +export const ButtonWithIcon = () => ( + <> + + + + + + +); +ButtonShape.parameters = { + docs: { + description: { + story: 'A button can be rounded, circular, or square.', + }, + }, +}; + +export const ButtonSize = () => { + const groupStyles: React.CSSProperties = { display: 'flex', flexWrap: 'wrap', gap: '0.5em' }; + const headerStyles: React.CSSProperties = { width: '100%', margin: 0 }; + return ( + <> +
+

small

+ + +
+
+

medium

+ + +
+
+

large

+ + +
+ + ); +}; +ButtonSize.parameters = { + docs: { + description: { + story: 'A button supports `small`, `medium` and `large` size. Default size is `medium`.', + }, + }, +}; + +export const BlockButton = () => ( + <> + + +); +BlockButton.parameters = { + docs: { + description: { + story: 'A button can fill the width of its container.', + }, + }, +}; + +export const DisabledButton = () => { + const groupStyles: React.CSSProperties = { display: 'flex', flexWrap: 'wrap', gap: '0.5em' }; -export { WithIcon } from './ButtonWithIcon.stories'; -export { Circular } from './ButtonCircular.stories'; -export { Size } from './ButtonSize.stories'; -export { Block } from './ButtonBlock.stories'; -export { WithLongText } from './ButtonWithLongText.stories'; + return ( + <> +
+ + + +
+
+ + + +
+ + ); +}; +DisabledButton.parameters = { + docs: { + description: { + story: `A button can be \`disabled\` or \`disabledFocusable\`. + \`disabledFocusable\` is used in scenarios where it is important to keep a consistent tab order + for screen reader and keyboard users. The primary example of this pattern is when + the disabled button is in a menu or a commandbar and is seldom used for standalone buttons.`, + }, + }, +}; + +export const ButtonWithLongText = () => ( + <> + + + +); +ButtonWithLongText.parameters = { + docs: { + description: { + story: 'Text truncates after it hits the max width theme token value.', + }, + }, +}; export default { title: 'Components/Button', @@ -24,4 +173,11 @@ export default { }, }, }, + decorators: [ + Story => ( +
+ +
+ ), + ], } as Meta; diff --git a/packages/react-button/src/components/Button/ButtonBlock.stories.tsx b/packages/react-button/src/components/Button/ButtonBlock.stories.tsx deleted file mode 100644 index 0d509941cd124..0000000000000 --- a/packages/react-button/src/components/Button/ButtonBlock.stories.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import * as React from 'react'; -import { Button } from '../../Button'; // codesandbox-dependency: @fluentui/react-button ^9.0.0-alpha - -export const Block = () => ( -
- -
-); -Block.parameters = { - docs: { - description: { - story: 'A button can fill the width of its container.', - }, - }, -}; diff --git a/packages/react-button/src/components/Button/ButtonCircular.stories.tsx b/packages/react-button/src/components/Button/ButtonCircular.stories.tsx deleted file mode 100644 index 603c139bb43eb..0000000000000 --- a/packages/react-button/src/components/Button/ButtonCircular.stories.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import * as React from 'react'; -import { Button } from '../../Button'; // codesandbox-dependency: @fluentui/react-button ^9.0.0-alpha -import { CalendarMonth24Regular } from '@fluentui/react-icons'; - -export const Circular = () => ( -
- -
-); -Circular.parameters = { - docs: { - description: { - story: 'A button can have completely rounded corners.', - }, - }, -}; diff --git a/packages/react-button/src/components/Button/ButtonDefault.stories.tsx b/packages/react-button/src/components/Button/ButtonDefault.stories.tsx deleted file mode 100644 index bf6f018721133..0000000000000 --- a/packages/react-button/src/components/Button/ButtonDefault.stories.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import * as React from 'react'; -import { Button, ButtonProps } from '../../Button'; // codesandbox-dependency: @fluentui/react-button ^9.0.0-alpha - -export const Default = (props: ButtonProps) => ( -
- -
-); diff --git a/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx b/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx deleted file mode 100644 index e46551479d44b..0000000000000 --- a/packages/react-button/src/components/Button/ButtonDisabled.stories.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import * as React from 'react'; -import { Button } from '../../Button'; // codesandbox-dependency: @fluentui/react-button ^9.0.0-alpha -import { CalendarMonth24Regular } from '@fluentui/react-icons'; -import { makeStyles } from '@fluentui/react-make-styles'; - -const useStyles = makeStyles({ - group: { display: 'flex', flexWrap: 'wrap', gap: '0.5em' }, -}); - -export const Disabled = () => { - const classes = useStyles(); - - return ( -
-
- - - -
-
- - - -
-
- ); -}; -Disabled.parameters = { - docs: { - description: { - story: `A button can be \`disabled\` or \`disabledFocusable\`. - \`disabledFocusable\` is used in scenarios where it is important to keep a consistent tab order - for screen reader and keyboard users. The primary example of this pattern is when - the disabled button is in a menu or a commandbar and is seldom used for standalone buttons.`, - }, - source: { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - code: __STORY__, - }, - }, -}; diff --git a/packages/react-button/src/components/Button/ButtonEmphasis.stories.tsx b/packages/react-button/src/components/Button/ButtonEmphasis.stories.tsx deleted file mode 100644 index 7f04044181470..0000000000000 --- a/packages/react-button/src/components/Button/ButtonEmphasis.stories.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import * as React from 'react'; -import { Button } from '../../Button'; // codesandbox-dependency: @fluentui/react-button ^9.0.0-alpha - -export const Emphasis = () => ( -
- - - - - -
-); -Emphasis.parameters = { - docs: { - description: { - story: - '- `primary` button is used for the most important action on the page or in a view\n' + - '- `default` button is used for subordinate actions\n' + - '- `outline` has no background styling and is emphasized through the styling of its content and borders\n' + - '- `transparent` has no background or border styling and is just emphasized through its content styling\n' + - '- `subtle` button blends into its background and becomes less emphasized\n', - }, - }, -}; diff --git a/packages/react-button/src/components/Button/ButtonSize.stories.tsx b/packages/react-button/src/components/Button/ButtonSize.stories.tsx deleted file mode 100644 index 654791527ab6c..0000000000000 --- a/packages/react-button/src/components/Button/ButtonSize.stories.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import * as React from 'react'; -import { Button } from '../../Button'; // codesandbox-dependency: @fluentui/react-button ^9.0.0-alpha -import { CalendarMonth24Regular } from '@fluentui/react-icons'; -import { makeStyles } from '@fluentui/react-make-styles'; - -const useStyles = makeStyles({ - group: { display: 'flex', flexWrap: 'wrap', gap: '0.5em' }, - header: { width: '100%', margin: 0 }, -}); - -export const Size = () => { - const classes = useStyles(); - return ( -
-
-

small

- - -
-
-

medium

- - -
-
-

large

- - -
-
- ); -}; -Size.parameters = { - docs: { - description: { - story: 'A button supports `small`, `medium` and `large` size. Default size is `medium`.', - }, - source: { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - code: __STORY__, - }, - }, -}; diff --git a/packages/react-button/src/components/Button/ButtonWithIcon.stories.tsx b/packages/react-button/src/components/Button/ButtonWithIcon.stories.tsx deleted file mode 100644 index f6060b2d13e83..0000000000000 --- a/packages/react-button/src/components/Button/ButtonWithIcon.stories.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import * as React from 'react'; -import { Button } from '../../Button'; // codesandbox-dependency: @fluentui/react-button ^9.0.0-alpha -import { CalendarMonth24Regular } from '@fluentui/react-icons'; - -export const WithIcon = () => ( -
- - -
-); -WithIcon.parameters = { - docs: { - description: { - story: - 'Button has an `icon` slot that, if specified, renders an icon either `before` or `after` the children, ' + - 'as specified by the `iconPosition` prop.', - }, - }, -}; diff --git a/packages/react-button/src/components/Button/ButtonWithLongText.stories.tsx b/packages/react-button/src/components/Button/ButtonWithLongText.stories.tsx deleted file mode 100644 index 6d62e2a0ef511..0000000000000 --- a/packages/react-button/src/components/Button/ButtonWithLongText.stories.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import * as React from 'react'; -import { Button } from '../../Button'; // codesandbox-dependency: @fluentui/react-button ^9.0.0-alpha - -export const WithLongText = () => ( -
- - -
-); -WithLongText.parameters = { - docs: { - description: { - story: 'Text truncates after it hits the max width theme token value.', - }, - }, -}; From 1d8c1ae185e40f0a3b619a9d603a9878621d9b1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Dr=C3=A4xler?= Date: Wed, 29 Sep 2021 15:19:21 +0200 Subject: [PATCH 62/62] update to 0.5.1 --- .storybook/main.js | 2 +- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.storybook/main.js b/.storybook/main.js index 13cda5ebf36c0..7cc3b60e5db18 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -59,7 +59,7 @@ module.exports = /** @type {Omit} */ ({ use: { loader: 'babel-loader', options: { - plugins: [require('./babel.plugin')], + plugins: [require('storybook-addon-export-to-codesandbox').babelPlugin], }, }, }); diff --git a/package.json b/package.json index 9e702a570d200..ae7aab34cfeee 100644 --- a/package.json +++ b/package.json @@ -233,7 +233,7 @@ "workspace-tools": "0.16.2", "yargs": "13.3.2", "yargs-parser": "13.1.2", - "storybook-addon-export-to-codesandbox": "0.4.0" + "storybook-addon-export-to-codesandbox": "0.5.1" }, "license": "MIT", "workspaces": { diff --git a/yarn.lock b/yarn.lock index e9d55c24391f3..46e96b8f6bf27 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23298,10 +23298,10 @@ store2@^2.12.0: resolved "https://registry.yarnpkg.com/store2/-/store2-2.12.0.tgz#e1f1b7e1a59b6083b2596a8d067f6ee88fd4d3cf" integrity sha512-7t+/wpKLanLzSnQPX8WAcuLCCeuSHoWdQuh9SB3xD0kNOM38DNf+0Oa+wmvxmYueRzkmh6IcdKFtvTa+ecgPDw== -storybook-addon-export-to-codesandbox@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/storybook-addon-export-to-codesandbox/-/storybook-addon-export-to-codesandbox-0.4.0.tgz#03184b249a2ef503add3820f39f4a903b75f8291" - integrity sha512-d4hmCNFUiIzbw+Hp9fG5KWDidQMlVez1FL/QkXVk04GtCDQuCUTezZpqyKIiJm31K8Gw59SEOgeFCsmw7dyR8Q== +storybook-addon-export-to-codesandbox@0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/storybook-addon-export-to-codesandbox/-/storybook-addon-export-to-codesandbox-0.5.1.tgz#828490c522baa705e36a6d5f2cb73184634ba1a8" + integrity sha512-uNb751qS0AF1UJpoHW0iZMWP+2I6MMo8wdxGUQ1QbaXkvMEtGeYo9bcz2fT4uBJ4Vhd1YSbzUzdfiK6VBdFyzg== dependencies: codesandbox-import-utils "^2.2.3"