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

Storybook 7; React 18 Build #197

Merged
merged 10 commits into from
Feb 1, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
node-version: [16.x, 18.x]

steps:
- uses: actions/checkout@v2
Expand Down
14 changes: 14 additions & 0 deletions .yarn/versions/aa4d314b.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
declined:
- "@essex/boolean-expression-component"
- "@essex/charts-react"
- "@essex/components"
- "@essex/graphql-api-commons"
- "@essex/hierarchy-browser"
- "@essex/hooks"
- "@essex/msal-interactor"
- "@essex/semantic-components"
- essex-toolkit-stories
- "@essex/styled-components"
- "@essex/thematic-lineup"
- "@essex/toolbox"
- "@essex/toposort"
82 changes: 71 additions & 11 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,55 @@ npmAuthToken: "${NPM_AUTH_TOKEN-emptytoken}"
packageExtensions:
"@fluentui/font-icons-mdl2@*":
peerDependencies:
react: "*"
react: "*"
"@fluentui/style-utilities@*":
peerDependencies:
react: "*"
"@storybook/telemetry@*":
peerDependencies:
"react": "*"
"react-dom": "*"
"@storybook/react-webpack5": "*"
peerDependenciesMeta:
"react":
optional: true
"react-dom":
optional: true
"@storybook/react-webpack5":
optional: true
"@storybook/addon-docs@*":
peerDependencies:
"@babel/core": "*"
"webpack": "*"
"@storybook/react-webpack5": "*"
peerDependenciesMeta:
"@babel/core":
optional: true
"webpack":
optional: true
"@storybook/react-webpack5":
optional: true
react-dom:
optional: true
"@storybook/addon-essentials@*":
peerDependencies:
"react": "*"
"@storybook/react-webpack5": "*"
"webpack": "*"
peerDependenciesMeta:
"@storybook/react-webpack5":
optional: true
"webpack":
optional: true
react-dom:
optional: true
"@storybook/addon-interactions@*":
peerDependencies:
"@storybook/react-webpack5": "*"
"webpack": "*"
"@storybook/addon-controls@*":
peerDependencies:
"webpack": "*"
"@storybook/react-webpack5": "*"
"@storybook/instrumenter@*":
peerDependencies:
"react": "*"
Expand All @@ -34,19 +63,50 @@ packageExtensions:
peerDependencies:
"react": "*"
"react-dom": "*"
"@storybook/testing-library@*":
"@storybook/react-webpack5": "*"
"@storybook/core-common@*":
peerDependencies:
"react": "*"
"react-dom": "*"
"@storybook/mdx1-csf@*":
"@storybook/react-webpack5": "*"
"webpack": ">= 5"
peerDependenciesMeta:
"@storybook/react-webpack5":
optional: true
"webpack":
optional: true
"@storybook/builder-manager@*":
peerDependencies:
"@babel/core": "*"
"@devtools-ds/themes@*":
"@storybook/react-webpack5": "*"
"@storybook/builder-webpack5@*":
peerDependencies:
"@storybook/react-webpack5": "*"
"@storybook/blocks@*":
peerDependencies:
"@storybook/react-webpack5": "*"
"@storybook/preset-react-webpack@*":
peerDependencies:
"@storybook/react-webpack5": "*"
"@storybook/react@*":
peerDependencies:
"@storybook/react-webpack5": "*"
"@storybook/cli@*":
peerDependencies:
"@storybook/react-webpack5": "*"
"@storybook/core-server@*":
peerDependencies:
"@storybook/react-webpack5": "*"
"@storybook/core-webpack@*":
peerDependencies:
"@storybook/react-webpack5": "*"
"storybook@*":
peerDependencies:
"@storybook/react-webpack5": "*"
"@storybook/api@*":
peerDependencies:
react: "*"
"react-dom": "*"
peerDependenciesMeta:
"react-dom":
optional: true
"@storybook/react-webpack5@*":
peerDependencies:
"webpack": "*"

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"devDependencies": {
"@essex/eslint-config": "^20.5.1",
"@essex/scripts": "^24.0.2",
"@essex/scripts": "^24.0.3",
"@types/jest": "^29.4.0",
"@types/node": "^18.11.18",
"@types/react": "^18.0.27",
Expand Down
7 changes: 4 additions & 3 deletions packages/boolean-expression-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
"clean": "essex clean docs",
"fix": "essex fix --formatter none",
"check": "essex check --formatter none",
"check-deps": "essex check-deps",
"check-deps": "essex check-deps --ignore @storybook/addon-essentials",
"release": "yarn npm publish --tolerate-republish --access public"
},
"devDependencies": {
"@essex/scripts": "^24.0.2",
"@essex/scripts": "^24.0.3",
"@fluentui/react": "^8.105.0",
"@mdx-js/react": "^1.6.22",
"@storybook/addon-docs": "^6.5.16",
"@storybook/addon-docs": "^7.0.0-beta.38",
"@storybook/addon-essentials": "^7.0.0-beta.38",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"react": "^18.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,69 +12,77 @@ const meta = {
}
export default meta

export const SingleClause = () => {
return (
<FilterExpressionView
operation={BooleanOperation.AND}
filters={[
{
id: 'age',
label: 'Age',
operation: BooleanOperation.AND,
filters: [{ id: 'age.20+', label: '20+' }],
},
]}
/>
)
export const SingleClause = {
render: () => {
return (
<FilterExpressionView
operation={BooleanOperation.AND}
filters={[
{
id: 'age',
label: 'Age',
operation: BooleanOperation.AND,
filters: [{ id: 'age.20+', label: '20+' }],
},
]}
/>
)
},

name: 'Single Clause',
}

SingleClause.storyName = 'Single Clause'
export const TwoClausesInAttribute = {
render: () => {
return (
<FilterExpressionView
operation={BooleanOperation.AND}
filters={[
{
id: 'age',
label: 'Age',
operation: BooleanOperation.AND,
filters: [
{ id: 'age.20+', label: '20-29' },
{ id: 'age.30+', label: '30-39' },
],
},
]}
/>
)
},

export const TwoClausesInAttribute = () => {
return (
<FilterExpressionView
operation={BooleanOperation.AND}
filters={[
{
id: 'age',
label: 'Age',
operation: BooleanOperation.AND,
filters: [
{ id: 'age.20+', label: '20-29' },
{ id: 'age.30+', label: '30-39' },
],
},
]}
/>
)
name: 'Two Clauses in Single Attribute',
}
TwoClausesInAttribute.storyName = 'Two Clauses in Single Attribute'

export const TwoAttributes = () => {
return (
<FilterExpressionView
operation={BooleanOperation.AND}
filters={[
{
id: 'age',
label: 'Age',
operation: BooleanOperation.AND,
filters: [
{ id: 'age.20+', label: '20-29' },
{ id: 'age.30+', label: '30-39' },
],
},
{
id: 'location',
label: 'Location',
operation: BooleanOperation.OR,
filters: [
{ id: 'us', label: 'USA' },
{ id: 'canada', label: 'Canada' },
],
},
]}
/>
)
export const TwoAttributes = {
render: () => {
return (
<FilterExpressionView
operation={BooleanOperation.AND}
filters={[
{
id: 'age',
label: 'Age',
operation: BooleanOperation.AND,
filters: [
{ id: 'age.20+', label: '20-29' },
{ id: 'age.30+', label: '30-39' },
],
},
{
id: 'location',
label: 'Location',
operation: BooleanOperation.OR,
filters: [
{ id: 'us', label: 'USA' },
{ id: 'canada', label: 'Canada' },
],
},
]}
/>
)
},

name: 'Two Attributes',
}
TwoAttributes.storyName = 'Two Attributes'
10 changes: 7 additions & 3 deletions packages/charts-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"build": "essex build --docs",
"fix": "essex fix --formatter none",
"check": "essex check --formatter none",
"check-deps": "essex check-deps",
"check-deps": "essex check-deps --ignore @storybook/addon-essentials,react-dom",
"release": "yarn npm publish --tolerate-republish --access public"
},
"dependencies": {
Expand All @@ -41,10 +41,11 @@
"lodash-es": "^4.17.21"
},
"devDependencies": {
"@essex/scripts": "^24.0.2",
"@essex/scripts": "^24.0.3",
"@essex/tsconfig-base": "^1.0.2",
"@mdx-js/react": "^1.6.22",
"@storybook/addon-docs": "^6.5.16",
"@storybook/addon-docs": "^7.0.0-beta.38",
"@storybook/addon-essentials": "^7.0.0-beta.38",
"@thematic/d3": "^2.0.19",
"@thematic/react": "^2.1.6",
"@types/d3-scale": "^4.0.2",
Expand All @@ -53,12 +54,15 @@
"@types/lodash-es": "^4.17.6",
"@types/node": "^18.11.18",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.9.5"
},
"peerDependencies": {
"@thematic/d3": ">= 2",
"@thematic/react": ">= 2",
"@types/react-dom": "*",
"react": ">= 18"
},
"peerDependenciesMeta": {
Expand Down
11 changes: 4 additions & 7 deletions packages/charts-react/src/__tests__/Sparkbar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project.
*/
import type { ComponentStory } from '@storybook/react'
import type { StoryFn } from '@storybook/react'

import type { SparkbarProps } from '../Sparkbar.js'
import { Sparkbar } from '../Sparkbar.js'
Expand All @@ -18,9 +18,6 @@ const meta = {
}
export default meta

const Template: ComponentStory<typeof Sparkbar> = (args: SparkbarProps) => (
<Sparkbar {...args} />
)

export const Primary = Template.bind({})
Primary.storyName = 'Sparkbar'
export const Primary = {
name: 'Sparkbar',
}
11 changes: 4 additions & 7 deletions packages/charts-react/src/__tests__/Sparkline.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project.
*/
import type { ComponentStory } from '@storybook/react'
import type { StoryFn } from '@storybook/react'

import type { SparklineProps } from '../Sparkline.js'
import { Sparkline } from '../Sparkline.js'
Expand All @@ -18,9 +18,6 @@ const meta = {
}
export default meta

const Template: ComponentStory<typeof Sparkline> = (args: SparklineProps) => (
<Sparkline {...args} />
)

export const Primary = Template.bind({})
Primary.storyName = 'Sparkline'
export const Primary = {
name: 'Sparkline',
}
Loading