Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Bump the storybook group across 1 directory with 9 updates #3500

Merged
merged 5 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,17 @@ const config: StorybookConfig = {
'@storybook/addon-docs',
'@storybook/addon-interactions',
'@storybook/addon-viewport',
'@storybook/addon-webpack5-compiler-babel'
],
framework: {
name: '@storybook/react-webpack5',
options: {},
},
docs: {
autodocs: true,
defaultName: 'Documentation',
defaultName: 'Documentation'
},
typescript: {
reactDocgen: 'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldIncludePropTagMap: true,
propFilter: (prop) => {
Expand All @@ -48,8 +49,5 @@ const config: StorybookConfig = {
},
},
},
features: {
storyStoreV7: false, // TODO: Remove this. Temporarily opt out of on-demand story loading as it blocks Percy from running tests
},
};
export default config;
12 changes: 8 additions & 4 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* limitations under the License.
*/

import { ArgsTable } from '@storybook/addon-docs';
import { Title, PRIMARY_STORY } from '@storybook/blocks';
import { ArgTypes } from '@storybook/addon-docs';
import { Title } from '@storybook/blocks';

import '../packages/bpk-stylesheets';
import '../packages/bpk-stylesheets/font';
Expand All @@ -40,7 +40,7 @@
root = document?.querySelector(':root');
(root as HTMLElement).style.setProperty('font-size', fontSize);
} catch(e) {
console.error(e);

Check warning on line 43 in .storybook/preview.tsx

View workflow job for this annotation

GitHub Actions / Build / Build

Unexpected console statement
}
return (
<div>
Expand All @@ -50,6 +50,7 @@
</div>
)},
],

parameters: {
docs: {
source: {
Expand All @@ -58,14 +59,17 @@
page: () => (
<>
<Title />
<ArgsTable story={PRIMARY_STORY} />
<ArgTypes exclude={['zoomEnabled']}/>
</>
)
},
},

args: {
zoomEnabled: false,
}
},

tags: ['autodocs']
};

export default preview;
6 changes: 3 additions & 3 deletions examples/bpk-component-aria-live/stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* limitations under the License.
*/

import { ArgsTable } from '@storybook/addon-docs';
import { Title, Markdown, PRIMARY_STORY } from '@storybook/blocks';
import { ArgTypes } from '@storybook/addon-docs';
import { Title, Markdown } from '@storybook/blocks';

import BpkAriaLive from '../../packages/bpk-component-aria-live/src/BpkAriaLive';

Expand All @@ -31,7 +31,7 @@ export default {
page: () => (
<>
<Title />
<ArgsTable of={PRIMARY_STORY} />
<ArgTypes exclude={['zoomEnabled']} />
<Markdown>
{`**Note:** \`aria-relevant\` and \`aria-atomic\` props can also be set.
\`aria-relevant\` determines what sort of changes should be read out. By default it is \`text\` but can be \`additions\`, \`removals\` or \`all\`. [Read more about \`aria-relevant\` on MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-relevant).
Expand Down
8 changes: 4 additions & 4 deletions examples/bpk-component-autosuggest/stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* limitations under the License.
*/

import { ArgsTable } from '@storybook/addon-docs';
import { Title, Markdown, PRIMARY_STORY } from '@storybook/blocks';
import { userEvent, within } from '@storybook/testing-library';
import { ArgTypes } from '@storybook/addon-docs';
import { Title, Markdown } from '@storybook/blocks';
import { userEvent, within } from '@storybook/test';

import BpkAutosuggest from '../../packages/bpk-component-autosuggest/src/BpkAutosuggest';
import BpkAutosuggestSuggestion from '../../packages/bpk-component-autosuggest/src/BpkAutosuggestSuggestion';
Expand All @@ -38,7 +38,7 @@ export default {
page: () => (
<>
<Title />
<ArgsTable of={PRIMARY_STORY} />
<ArgTypes exclude={['zoomEnabled']} />
<Markdown>
{
`**BpkAutosuggest:**
Expand Down
6 changes: 3 additions & 3 deletions examples/bpk-component-image/stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* limitations under the License.
*/

import { ArgsTable } from '@storybook/addon-docs';
import { Title, PRIMARY_STORY, Markdown } from '@storybook/blocks';
import { ArgTypes } from '@storybook/addon-docs';
import { Title, Markdown } from '@storybook/blocks';

import BpkBackgroundImage from '../../packages/bpk-component-image/src/BpkBackgroundImage';
import BpkImage from '../../packages/bpk-component-image/src/BpkImage';
Expand All @@ -44,7 +44,7 @@ export default {
page: () => (
<>
<Title />
<ArgsTable of={PRIMARY_STORY} />
<ArgTypes exclude={['zoomEnabled']} />
<Markdown>
{`**Note:** All [standard img attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Img#Attributes) including \`srcSet\` are also supported.`}
</Markdown>
Expand Down
6 changes: 3 additions & 3 deletions examples/bpk-component-input/stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* limitations under the License.
*/

import { ArgsTable } from '@storybook/addon-docs';
import { Title, Markdown, PRIMARY_STORY } from '@storybook/blocks';
import { ArgTypes } from '@storybook/addon-docs';
import { Title, Markdown } from '@storybook/blocks';

import BpkInput from '../../packages/bpk-component-input/src/BpkInput';

Expand Down Expand Up @@ -50,7 +50,7 @@ export default {
page: () => (
<>
<Title />
<ArgsTable of={PRIMARY_STORY} />
<ArgTypes exclude={['zoomEnabled']} />
<Markdown>
{
`**Note:** Additionally, all native \`input\` attributes such as \`placeholder\` and \`onChange\` are supported.`
Expand Down
6 changes: 3 additions & 3 deletions examples/bpk-component-slider/stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* limitations under the License.
*/

import { ArgsTable } from '@storybook/addon-docs';
import { Title, Markdown, PRIMARY_STORY } from '@storybook/blocks';
import { ArgTypes } from '@storybook/addon-docs';
import { Title, Markdown } from '@storybook/blocks';

import BpkSlider from '../../packages/bpk-component-slider/src/BpkSlider';

Expand All @@ -38,7 +38,7 @@ export default {
page: () => (
<>
<Title />
<ArgsTable of={PRIMARY_STORY} />
<ArgTypes exclude={['zoomEnabled']} />
<Markdown>
{`
**Note**: minDistance and step props are multiplied to calculate the minimum distance allowed between thumbs
Expand Down
6 changes: 3 additions & 3 deletions examples/bpk-component-switch/stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* limitations under the License.
*/

import { ArgsTable } from '@storybook/addon-docs';
import { Title, Markdown, PRIMARY_STORY } from '@storybook/blocks';
import { ArgTypes } from '@storybook/addon-docs';
import { Title, Markdown } from '@storybook/blocks';

import BpkSwitch from '../../packages/bpk-component-switch/src/BpkSwitch';

Expand All @@ -31,7 +31,7 @@ export default {
page: () => (
<>
<Title />
<ArgsTable of={PRIMARY_STORY} />
<ArgTypes exclude={['zoomEnabled']} />
<Markdown>
{
`This component uses a hidden [\`input type=checkbox\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox), so it supports all the same properties as it (for example \`checked\`).`
Expand Down
6 changes: 3 additions & 3 deletions examples/bpk-scrim-utils/stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
*/


import { ArgsTable } from '@storybook/addon-docs';
import { Title, Markdown, PRIMARY_STORY } from '@storybook/blocks';
import { ArgTypes } from '@storybook/addon-docs';
import { Title, Markdown } from '@storybook/blocks';

import BpkScrim from '../../packages/bpk-scrim-utils/src/BpkScrim';

Expand All @@ -37,7 +37,7 @@ export default {
page: () => (
<>
<Title />
<ArgsTable of={PRIMARY_STORY} />
<ArgTypes exclude={['zoomEnabled']} />
<Markdown>
{`\`withScrim\` sends all props it receives down to the component, except \`getApplicationElement\` and \`padded\`. It also adds some props that are used for a11y and closing the modal:
\`dialogRef\` should be set as the ref on the visible container on top of the scrim; it is used to set focus, \`onClose\` , \`isIphone\``}
Expand Down
Loading
Loading