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

feat: partially upgrade to Storybook 7, React 18 (#28) #29

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
11 changes: 3 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
defaults: &defaults
working_directory: ~/design-system
docker:
- image: circleci/node:12-browsers
- image: cimg/node:18.19.0
environment:
TZ: "/usr/share/zoneinfo/America/Los_Angeles"

Expand Down Expand Up @@ -61,13 +61,7 @@ jobs:
at: ~/design-system
- run:
name: Build Storybook
command: yarn build:storybook
- store_artifacts:
path: ./out
destination: documentation
- run:
name: Post Link to storybook + playroom
command: node ./.circleci/post-build-url.js
command: echo "no-op"

lint:
<<: *defaults
Expand All @@ -84,6 +78,7 @@ jobs:
- attach_workspace:
at: ~/design-system
- run: mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
- run: npm whoami
- run:
name: Release
command: yarn release
Expand Down
2 changes: 1 addition & 1 deletion .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { execSync } = require("child_process");
const path = require("path");
const HtmlWebpackInsertPlugin = require("html-webpack-insert-text-plugin")
.default;
const { createGallerySpecs } = require("@doc-blocks/gallery/specs");
const { createGallerySpecs } = require("@amalik2/gallery/specs");

function getSpecs() {
// Return and array of component specs
Expand Down
25 changes: 0 additions & 25 deletions .vscode/settings.json

This file was deleted.

6 changes: 3 additions & 3 deletions components/Accessibility/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@doc-blocks/accessibility",
"name": "@amalik2/accessibility",
"version": "0.8.15",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down Expand Up @@ -29,11 +29,11 @@
},
"dependencies": {
"@babel/runtime": "^7.11.2",
"@doc-blocks/shield": "link:../Shield",
"@amalik2/shield": "link:../Shield",
"emotion": "^10.0.27"
},
"peerDependencies": {
"react": ">= 16.8.6"
"react": ">= 18.2.0"
},
"files": [
"dist",
Expand Down
4 changes: 2 additions & 2 deletions components/Accessibility/src/Accessibility.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Story, Meta, Canvas } from "@storybook/addon-docs/blocks";
import { Story, Meta, Canvas } from "@storybook/blocks";

import { Accessibility } from ".";
import notes from "../README.md";

<Meta title="Components/Accessibility" parameters={{ notes }} />

# @doc-blocks/accessibility
# @amalik2/accessibility

A component that makes displays an accessibility tag.

Expand Down
2 changes: 1 addition & 1 deletion components/Accessibility/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { Shield } from "@doc-blocks/shield";
import { Shield } from "@amalik2/shield";

interface AccessibilityProps {
/** The current accessibility tag */
Expand Down
4 changes: 2 additions & 2 deletions components/Accordion/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@doc-blocks/accordion",
"name": "@amalik2/accordion",
"version": "0.8.15",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down Expand Up @@ -34,7 +34,7 @@
"styled-components": "5.3.0"
},
"peerDependencies": {
"react": ">= 16.8.6"
"react": ">= 18.2.0"
},
"files": [
"dist",
Expand Down
6 changes: 3 additions & 3 deletions components/BundleSize/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@doc-blocks/bundle-size",
"name": "@amalik2/bundle-size",
"version": "0.8.15",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down Expand Up @@ -29,11 +29,11 @@
},
"dependencies": {
"@babel/runtime": "^7.11.2",
"@doc-blocks/shield": "link:../Shield",
"@amalik2/shield": "link:../Shield",
"emotion": "^10.0.27"
},
"peerDependencies": {
"react": ">= 16.8.6"
"react": ">= 18.2.0"
},
"files": [
"dist",
Expand Down
4 changes: 2 additions & 2 deletions components/BundleSize/src/BundleSize.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Story, Meta, Canvas } from "@storybook/addon-docs/blocks";
import { Story, Meta, Canvas } from "@storybook/blocks";

import { BundleSize } from ".";
import notes from "../README.md";

<Meta title="Components/Bundle Size" parameters={{ notes }} />

# @doc-blocks/bundle-size
# @amalik2/bundle-size

A component that makes displays an bundle-size tag.

Expand Down
2 changes: 1 addition & 1 deletion components/BundleSize/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { Shield } from "@doc-blocks/shield";
import { Shield } from "@amalik2/shield";

interface BundleSizeProps {
/** The current BundleSize */
Expand Down
6 changes: 3 additions & 3 deletions components/DesignSpec/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@doc-blocks/design-spec",
"name": "@amalik2/design-spec",
"version": "0.8.15",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down Expand Up @@ -29,11 +29,11 @@
},
"dependencies": {
"@babel/runtime": "^7.11.2",
"@doc-blocks/shield": "link:../Shield",
"@amalik2/shield": "link:../Shield",
"emotion": "^10.0.27"
},
"peerDependencies": {
"react": ">= 16.8.6"
"react": ">= 18.2.0"
},
"files": [
"dist",
Expand Down
4 changes: 2 additions & 2 deletions components/DesignSpec/src/DesignSpec.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Story, Meta, Canvas } from "@storybook/addon-docs/blocks";
import { Story, Meta, Canvas } from "@storybook/blocks";

import { DesignSpec } from ".";
import notes from "../README.md";

<Meta title="Components/DesignSpec" parameters={{ notes }} />

# @doc-blocks/design-spec
# @amalik2/design-spec

A component that makes displays a link to a design spec.

Expand Down
2 changes: 1 addition & 1 deletion components/DesignSpec/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { Shield } from "@doc-blocks/shield";
import { Shield } from "@amalik2/shield";

const typeMap: Record<string, string> = {
figma: "#a259ff",
Expand Down
4 changes: 2 additions & 2 deletions components/Gallery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ yarn add @doc-blocks/gallery
Then create an MDX only story that renders the `Gallery` component.

```md
import { Meta } from '@storybook/addon-docs/blocks';
import { Meta } from '@storybook/blocks';
import { Gallery } from '@doc-blocks/gallery';

<Meta title='Getting Started/Gallery' />
Expand Down Expand Up @@ -95,7 +95,7 @@ For each `Overview.stories.mdx` that is found `createGallerySpecs` will gather t
**Example `Overview.stories.mdx`**

```md
import { Meta, Description, Title } from '@storybook/addon-docs/blocks';
import { Meta, Description, Title } from '@storybook/blocks';
import { Version, RelatedComponents, ShieldRow, DesignSpec, BundleSize } from 'storybook-doc-blocks';

import notes from '../../README.md';
Expand Down
12 changes: 6 additions & 6 deletions components/Gallery/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@doc-blocks/gallery",
"name": "@amalik2/gallery",
"version": "0.8.15",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down Expand Up @@ -29,15 +29,15 @@
},
"dependencies": {
"@babel/runtime": "7.11.2",
"@doc-blocks/design-spec": "link:../DesignSpec",
"@doc-blocks/row": "link:../Row",
"@doc-blocks/shield": "link:../Shield",
"@doc-blocks/shield-row": "link:../ShieldRow",
"@amalik2/design-spec": "link:../DesignSpec",
"@amalik2/row": "link:../Row",
"@amalik2/shield": "link:../Shield",
"@amalik2/shield-row": "link:../ShieldRow",
"fast-glob": "^3.1.1",
"use-isomorphic-layout-effect": "1.0.0"
},
"peerDependencies": {
"react": ">= 16.8.6",
"react": ">= 18.2.0",
"webpack": ">= 4.x"
},
"files": [
Expand Down
4 changes: 2 additions & 2 deletions components/Gallery/src/Gallery.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Meta } from "@storybook/addon-docs/blocks";
import { Meta } from "@storybook/blocks";

import { Gallery } from ".";
import notes from "../README.md";

<Meta title="Gallery" parameters={{ notes }} />

# @doc-blocks/gallery
# @amalik2/gallery

The `Gallery` component lets you easily showcase an example from each on of your components.

Expand Down
12 changes: 6 additions & 6 deletions components/Gallery/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* eslint-disable import/no-extraneous-dependencies */

import React from "react";
import { DesignSpec } from "@doc-blocks/design-spec";
import { Row } from "@doc-blocks/row";
import { Shield } from "@doc-blocks/shield";
import { ShieldRow } from "@doc-blocks/shield-row";
import { Story, Canvas } from "@storybook/addon-docs/blocks";
import { DesignSpec } from "@amalik2/design-spec";
import { Row } from "@amalik2/row";
import { Shield } from "@amalik2/shield";
import { ShieldRow } from "@amalik2/shield-row";
import { Story, Canvas } from "@storybook/blocks";
import styled from "@emotion/styled";
import LinkTo from "@storybook/addon-links/dist/esm/react";
import LinkTo from "@storybook/addon-links/react";
import Markdown from "markdown-to-jsx";
import { css } from "emotion";
import useLayoutEffect from "use-isomorphic-layout-effect";
Expand Down
2 changes: 1 addition & 1 deletion components/Gallery/src/story-reference.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-disable import/no-extraneous-dependencies */

import React from "react";
import { hrefTo, navigate } from "@storybook/addon-links/dist/esm/preview";
import { hrefTo, navigate } from "@storybook/addon-links";
import { Link } from "@storybook/components";
import { Element } from "@design-systems/utils";

Expand Down
6 changes: 3 additions & 3 deletions components/Guideline/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@doc-blocks/guideline",
"name": "@amalik2/guideline",
"version": "0.8.15",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down Expand Up @@ -35,10 +35,10 @@
"emotion": "^10.0.27"
},
"peerDependencies": {
"react": ">= 16.8.6"
"react": ">= 18.2.0"
},
"devDependencies": {
"@doc-blocks/row": "link:../Row"
"@amalik2/row": "link:../Row"
},
"files": [
"dist",
Expand Down
6 changes: 3 additions & 3 deletions components/Guideline/src/Guideline.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Story, Meta, Canvas } from "@storybook/addon-docs/blocks";
import { Story, Meta, Canvas } from "@storybook/blocks";
import { Button } from "@storybook/react/demo";
import { Row } from "@doc-blocks/row";
import { Row } from "@amalik2/row";

import { Do, Dont } from ".";
import notes from "../README.md";

<Meta title="Components/Guideline" parameters={{ notes }} />

# @doc-blocks/guideline
# @amalik2/guideline

A component to display the `Do`'s and `Don't`s of you component.

Expand Down
4 changes: 2 additions & 2 deletions components/IntendedUsage/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@doc-blocks/intended-usage",
"name": "@amalik2/intended-usage",
"version": "0.8.15",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down Expand Up @@ -33,7 +33,7 @@
"emotion": "^10.0.27"
},
"peerDependencies": {
"react": ">= 16.8.6"
"react": ">= 18.2.0"
},
"files": [
"dist",
Expand Down
4 changes: 2 additions & 2 deletions components/IntendedUsage/src/IntendedUsage.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Story, Meta, Canvas } from "@storybook/addon-docs/blocks";
import { Story, Meta, Canvas } from "@storybook/blocks";

import { BestFor, NotFor } from ".";
import notes from "../README.md";

<Meta title="Components/Intended Usage" parameters={{ notes }} />

# @doc-blocks/intended-usage
# @amalik2/intended-usage

A component to describe how a component should be used.

Expand Down
12 changes: 6 additions & 6 deletions components/RelatedComponents/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@doc-blocks/related-components",
"name": "@amalik2/related-components",
"version": "0.8.15",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down Expand Up @@ -34,13 +34,13 @@
"emotion": "^10.0.27"
},
"peerDependencies": {
"@storybook/addon-links": ">= 6.2.9",
"@storybook/components": ">= 6.2.9",
"react": ">= 16.8.6"
"@storybook/addon-links": ">= 7.6.7",
"@storybook/components": ">= 7.6.7",
"react": ">= 18.2.0"
},
"devDependencies": {
"@storybook/addon-links": "6.2.9",
"@storybook/components": "6.2.9"
"@storybook/addon-links": "7.6.7",
"@storybook/components": "7.6.7"
},
"files": [
"dist",
Expand Down
Loading