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

Upgrade to breaking kickstartDS 3.0.0 #117

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d737de8
feature: upgrade of storybook
julrich Apr 20, 2023
034446a
Merge branch 'fix/update-to-stable' into feature/upgrade-to-storybook7
julrich Apr 20, 2023
83b1620
fix: update core canary
julrich Apr 20, 2023
549034e
fix: update index.css
julrich Apr 20, 2023
a28b080
Merge branch 'fix/update-to-stable' into feature/upgrade-to-storybook7
julrich Apr 20, 2023
b7b8a1a
Merge branch 'master' into feature/upgrade-to-storybook7
julrich Jun 29, 2023
c3b110d
fix: advance upgrade
julrich Aug 14, 2023
06fb73f
fix: mostly migrate stories to Storybook 7
julrich Sep 10, 2023
c5bfa6b
Merge branch 'master' into feature/upgrade-to-storybook7
lmestel Sep 28, 2023
aada084
feat: convert stories to storybook 7
lmestel Sep 28, 2023
022f31c
docs: bring back json schema addon
lmestel Sep 29, 2023
0bd292b
build: update kds
lmestel Sep 29, 2023
74c662b
fix: add type for _ks on window
julrich Sep 30, 2023
b446d60
fix: add type for _ks on window
lmestel Oct 2, 2023
dcc6ac4
build: fix declaration files location on build
lmestel Oct 2, 2023
42fc2b8
docs: add missing story titles for teaser-box & visual
lmestel Oct 2, 2023
4af948c
docs: fix stories order in sidebar
lmestel Oct 5, 2023
eb78665
build(deps): update @kickstartds/storybook-addon-jsonschema
lmestel Oct 5, 2023
c3a4caa
docs: add unpack decorator to storybook html addon
lmestel Oct 5, 2023
c0d7e07
feature: switch bundler, schema tooling, upgrade to kds 3
julrich Oct 11, 2023
50c8b8b
fix(ci): update node version in use
julrich Oct 11, 2023
b141714
feat: update props and component templates
julrich Nov 8, 2023
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 .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1

defaults: &defaults
docker:
- image: cimg/node:16.14
- image: cimg/node:18.16
working_directory: /mnt/ramdisk
resource_class: large

Expand Down
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,13 @@ dist
# Local Netlify folder
.netlify

# TypeScript definition files
*.d.ts

# Style Dictionary related, generated files
/.storybook/IconSprite.js
/.storybook/icons.html
/.storybook/tokens.css
/.storybook/tokens.js
/.storybook/icons.svg

/.storybook/preview.jsx
/src/_token-map.scss
/src/icon-sprite.html
/src/tokens.css
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.14
18.16
47 changes: 0 additions & 47 deletions .storybook/main.js

This file was deleted.

32 changes: 32 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { StorybookConfig } from "@storybook/react-vite";

const config: StorybookConfig = {
stories: [
"../docs/**/*.mdx",
"../src/**/*.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)",
],
addons: [
"@storybook/addon-essentials",
"@storybook/addon-a11y",
"@kickstartds/storybook-addon-component-tokens",
"@whitespace/storybook-addon-html",
"@kickstartds/storybook-addon-jsonschema",
{
name: "storybook-design-token",
options: {
designTokenGlob: ".storybook/*.{css,svg}",
},
},
],
staticDirs: ["../static"],
framework: {
name: "@storybook/react-vite",
options: {},
},
docs: {
autodocs: true,
},
};

export default config;
87 changes: 0 additions & 87 deletions .storybook/preview.js

This file was deleted.

76 changes: 76 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import { PropsWithChildren } from "react";
import { actions } from "@storybook/addon-actions";
import { Preview } from "@storybook/react";
import { DocsContainer, DocsContainerProps } from "@storybook/addon-docs";
import { Decorator } from "@storybook/react";
import { defaultDecorateStory } from "@storybook/preview-api";
// @see https://github.com/aFarkas/lazysizes/tree/gh-pages/plugins/attrchange
import "lazysizes/plugins/attrchange/ls.attrchange";
import { unpackDecorator } from "@kickstartds/core/lib/storybook";

import "@kickstartds/base/lib/global/base.js";
import "@kickstartds/base/lib/global/base.css";
import "../src/index.js";
import "../static/index.css";
import { IconSprite } from "../src/icon-sprite/IconSpriteComponent";
import Providers from "../src/Providers";
import { LinkProvider } from "../docs/LinkProvider";

const myActions = actions("radio");
window._ks.radio.on("*", myActions.radio);

const providerDecorator: Decorator = (Story, context) => (
<Providers>{Story(context)}</Providers>
);

const preview: Preview = {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
html: {
prettier: {
tabWidth: 4,
},
decorator: (Story, context) =>
defaultDecorateStory(Story, [unpackDecorator, providerDecorator])(
context
),
},
options: {
storySort: {
order: ["Welcome", "Design Token", "*", "Custom", "Recipes", "Pages"],
method: "alphabetical",
},
},
designToken: {
disable: true,
},
docs: {
container: (props: PropsWithChildren<DocsContainerProps>) => (
<LinkProvider>
<Providers>
<IconSprite />
<DocsContainer {...props} />
</Providers>
</LinkProvider>
),
},
},
decorators: [
unpackDecorator,
providerDecorator,
(Story) => (
<>
<IconSprite />
<Story />
</>
),
],
};

export default preview;
6 changes: 4 additions & 2 deletions docs/Welcome.story.mdx → docs/Welcome.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from "@storybook/addon-docs";
import { Meta, Unstyled } from "@storybook/blocks";
import { Welcome } from "./WelcomePage";

<Meta
Expand All @@ -8,4 +8,6 @@ import { Welcome } from "./WelcomePage";
}}
/>

<Welcome />
<Unstyled>
<Welcome />
</Unstyled>
10 changes: 2 additions & 8 deletions docs/WelcomePage.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { Button } from "@kickstartds/base/lib/button";
import { Picture } from "@kickstartds/base/lib/picture";
import { Section } from "@kickstartds/base/lib/section";
import { TeaserBox } from "@kickstartds/base/lib/teaser-box";
import { ContentBox } from "@kickstartds/base/lib/content-box";
import { Headline } from "@kickstartds/base/lib/headline";
import { Visual } from "@kickstartds/content/lib/visual";
import { Inline } from "@bedrock-layout/primitives";

export const Welcome = () => (
<>
Expand Down Expand Up @@ -60,7 +56,6 @@ export const Welcome = () => (
align: "center",
content: "Getting started with ...",
level: "h2",
pageHeader: false,
}}
className="col-four"
mode="tile"
Expand Down Expand Up @@ -121,6 +116,7 @@ export const Welcome = () => (
}}
/>
</Section>

<Section
className="col-four"
spaceAfter="small"
Expand Down Expand Up @@ -151,8 +147,8 @@ export const Welcome = () => (
variant: "solid",
}}
/>

</Section>

<Section
className="col-four"
spaceAfter="small"
Expand Down Expand Up @@ -191,14 +187,12 @@ export const Welcome = () => (
align: "left",
content: "Next-gen UI-development toolkit",
level: "h2",
pageHeader: false,
subheadline: "and framework for Design System creation",
}}
mode="list"
spaceAfter="small"
spaceBefore="small"
width="max"
deko="true"
pattern="1"
ks-inverted="true"
>
Expand Down
Loading