Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Merge branch 'next-release'
Browse files Browse the repository at this point in the history
  • Loading branch information
lorgan3 committed Aug 22, 2023
2 parents 79e80a8 + 3d6578c commit ae47312
Show file tree
Hide file tree
Showing 106 changed files with 4,374 additions and 6,407 deletions.
28 changes: 14 additions & 14 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
const chromaticTestStories = ['../src/**/*.stories.spec.@(tsx|mdx)'];
const storybookStories = ['./**/*.stories.@(tsx|mdx)', '../src/**/*.stories.@(tsx|mdx)'];

const chromaticTestStories = ['../src/**/__tests__/*.stories.@(tsx|mdx)'];
const storybookStories = ['./**/*.stories.@(tsx|mdx)', '../src/components/*/*.stories.@(tsx|mdx)'];
module.exports = {
stories: process.env.CHROMATIC ? chromaticTestStories : storybookStories,
addons: [
'@storybook/addon-backgrounds',
'storybook-addon-designs',
'@storybook/addon-designs',
'@storybook/addon-docs',
'@storybook/addon-controls',
{
name: '@storybook/addon-postcss',
name: '@storybook/addon-styling',
options: {
postcssLoaderOptions: {
postCss: {
implementation: require('postcss'),
},
cssLoaderOptions: {
sourceMap: true,
modules: {
localIdentName: '[name]__[local]___[hash:base64:5]',
},
importLoaders: 1,
cssModules: {
localIdentName: '[name]__[local]___[hash:base64:5]',
},
},
},
'@storybook/addon-mdx-gfm',
],
features: {
// Use babel config from project root .babelrc file
babelModeV7: true,
},
core: {
builder: 'webpack5',
framework: {
name: '@storybook/react-webpack5',
options: {},
},
docs: {
autodocs: true,
},
};
109 changes: 45 additions & 64 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,76 +1,57 @@
import { addDecorator, addParameters } from '@storybook/react';
import { withDesign } from 'storybook-addon-designs';
import { Preview } from '@storybook/react';
import { COLOR } from '../src/constants';
import '../src/index.css';

import theme from './theme';
import {
ABOUT_AHOY,
CHANGELOG,
COMPOSITIONS,
FOUNDATION,
LOW_LEVEL_BLOCKS,
MARKETING,
MID_LEVEL_BLOCKS,
PLAYGROUND,
} from './utils';

addParameters({
backgrounds: {
values: [
{ name: 'Aqua lightest', value: COLOR.AQUA.LIGHTEST },
{ name: 'Neutral light', value: COLOR.NEUTRAL.LIGHT },
{ name: 'Gold lightest', value: COLOR.GOLD.LIGHTEST },
{ name: 'Mint lightest', value: COLOR.MINT.LIGHTEST },
{ name: 'Ruby lightest', value: COLOR.RUBY.LIGHTEST },
{ name: 'Teal lightest', value: COLOR.TEAL.LIGHTEST },
{ name: 'Violet lightest', value: COLOR.VIOLET.LIGHTEST },
{ name: 'Teal darkest', value: COLOR.TEAL.DARKEST },
],
},
});

addParameters({
options: {
storySort: {
order: [
ABOUT_AHOY,
CHANGELOG,
FOUNDATION,
LOW_LEVEL_BLOCKS,
MID_LEVEL_BLOCKS,
COMPOSITIONS,
MARKETING,
PLAYGROUND,
const preview: Preview = {
parameters: {
backgrounds: {
values: [
{ name: 'Aqua lightest', value: COLOR.AQUA.LIGHTEST },
{ name: 'Neutral light', value: COLOR.NEUTRAL.LIGHT },
{ name: 'Gold lightest', value: COLOR.GOLD.LIGHTEST },
{ name: 'Mint lightest', value: COLOR.MINT.LIGHTEST },
{ name: 'Ruby lightest', value: COLOR.RUBY.LIGHTEST },
{ name: 'Teal lightest', value: COLOR.TEAL.LIGHTEST },
{ name: 'Violet lightest', value: COLOR.VIOLET.LIGHTEST },
{ name: 'Teal darkest', value: COLOR.TEAL.DARKEST },
],
},
},
});

addParameters({
docs: {
theme,
/**
* @todo temporary workaround to avoid JSDOC parameters from being rendered
* remove once there are no longer any @type annotations in any javascript files
*/
description: {
component: ' ',
options: {
storySort: {
order: [
'About Ahoy',
'Changelog',
'Foundation',
'Low level blocks',
'Mid level blocks',
'Compositions',
'Marketing',
'Playground',
],
},
},
},
});

addParameters({
viewMode: 'docs',
previewTabs: {
canvas: {
hidden: process.env.STORYBOOK_HIDE_CANVAS_TAB === 'true',
docs: {
theme,
/**
* @todo temporary workaround to avoid JSDOC parameters from being rendered
* remove once there are no longer any @type annotations in any javascript files
*/
description: {
component: ' ',
},
},
'storybook/docs/panel': {
hidden: process.env.STORYBOOK_HIDE_DOCS_TAB === 'true',
viewMode: 'docs',
previewTabs: {
canvas: {
hidden: process.env.STORYBOOK_HIDE_CANVAS_TAB === 'true',
},
'storybook/docs/panel': {
hidden: process.env.STORYBOOK_HIDE_DOCS_TAB === 'true',
},
},
},
});
};

// addon-designs
addDecorator(withDesign());
export default preview;
3 changes: 1 addition & 2 deletions .storybook/stories/about.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Meta } from '@storybook/addon-docs';
import { ABOUT_AHOY } from '../utils';

<Meta title={ABOUT_AHOY} parameters={{ previewTabs: { canvas: { hidden: true } } }} />
<Meta title="About Ahoy" parameters={{ previewTabs: { canvas: { hidden: true } } }} />

# Ahoy

Expand Down
7 changes: 3 additions & 4 deletions .storybook/stories/changelog.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Meta, Description } from '@storybook/addon-docs';

import changelog from '../../CHANGELOG.md';
import { Meta, Markdown } from '@storybook/blocks';
import Changelog from '../../CHANGELOG.md';

<Meta title="Changelog" />

<Description markdown={changelog} />
<Markdown>{Changelog}</Markdown>
3 changes: 1 addition & 2 deletions .storybook/stories/colors.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Meta } from '@storybook/addon-docs';
import { FOUNDATION } from '../utils';

<Meta title={`${FOUNDATION} / Colors`} parameters={{ previewTabs: { canvas: { hidden: true } } }} />
<Meta title="Foundation / Colors" parameters={{ previewTabs: { canvas: { hidden: true } } }} />

# Colors

Expand Down
3 changes: 1 addition & 2 deletions .storybook/stories/playground/dialogs.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React, { useState } from 'react';
import { addStoryInGroup, PLAYGROUND } from '../../utils';
import { Box, Button, DataGrid, Dialog, Input, TextBody } from '../../../src';
import { rows3 } from '../../../src/static/data/datagrid';

export default {
title: addStoryInGroup(PLAYGROUND, 'Dialog'),
title: 'Playground / Dialog',

parameters: {
info: {
Expand Down
3 changes: 1 addition & 2 deletions .storybook/stories/playground/forms.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React from 'react';
import { Box, Button, ButtonGroup, Input, Label, NumericInput, Textarea } from '../../../src';
import { addStoryInGroup, PLAYGROUND } from '../../utils';

export default {
title: addStoryInGroup(PLAYGROUND, 'Forms'),
title: 'Playground / Forms',

parameters: {
info: {
Expand Down
3 changes: 1 addition & 2 deletions .storybook/stories/playground/numericInput.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React, { ChangeEvent, useState } from 'react';
import { addStoryInGroup, PLAYGROUND } from '../../utils';
import { Banner, Box, NumericInput, UITextBody } from '../../../src';
import { useCallback } from '@storybook/addons';

export default {
title: addStoryInGroup(PLAYGROUND, 'Forms'),
title: 'Playground / Forms',

parameters: {
info: {
Expand Down
Loading

0 comments on commit ae47312

Please sign in to comment.