docs(frontend): add design system overview page (#10157)
### Changes 🏗️ <img width="800" alt="Screenshot 2025-06-13 at 18 29 27" src="https://github.com/user-attachments/assets/6a2f9c23-860f-4f92-8a7a-eeb7839940fd" /> - Add a nice overview page for the 👶🏽 baby AutoGPT design system - Customise the logo on Storybook to show AutoGPT one ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run Storybook - [x] You see the Overview page which looks good
7
autogpt_platform/frontend/.storybook/manager.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { addons } from "@storybook/manager-api";
|
||||
|
||||
import { theme } from "./theme";
|
||||
|
||||
addons.setConfig({
|
||||
theme: theme,
|
||||
});
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
Subtitle,
|
||||
Title,
|
||||
} from "@storybook/blocks";
|
||||
import { theme } from "./theme";
|
||||
|
||||
// Initialize MSW
|
||||
initialize();
|
||||
@@ -22,6 +23,7 @@ const preview: Preview = {
|
||||
appDirectory: true,
|
||||
},
|
||||
docs: {
|
||||
theme,
|
||||
page: () => (
|
||||
<>
|
||||
<Title />
|
||||
|
||||
9
autogpt_platform/frontend/.storybook/theme.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { create } from "@storybook/theming/create";
|
||||
|
||||
export const theme = create({
|
||||
base: "light",
|
||||
brandTitle: "AutoGPT Platform",
|
||||
brandUrl: "https://autogpt.com",
|
||||
brandTarget: "_self",
|
||||
brandImage: "/storybook/autogpt-logo-storybook.png",
|
||||
});
|
||||
@@ -98,10 +98,12 @@
|
||||
"@storybook/addon-links": "8.6.14",
|
||||
"@storybook/addon-onboarding": "8.6.14",
|
||||
"@storybook/blocks": "8.6.14",
|
||||
"@storybook/manager-api": "8.6.14",
|
||||
"@storybook/nextjs": "8.6.14",
|
||||
"@storybook/react": "8.6.14",
|
||||
"@storybook/test": "8.6.14",
|
||||
"@storybook/test-runner": "0.22.1",
|
||||
"@storybook/theming": "8.6.14",
|
||||
"@types/canvas-confetti": "1.9.0",
|
||||
"@types/lodash": "4.17.17",
|
||||
"@types/negotiator": "0.6.4",
|
||||
|
||||
6
autogpt_platform/frontend/pnpm-lock.yaml
generated
@@ -225,6 +225,9 @@ importers:
|
||||
'@storybook/blocks':
|
||||
specifier: 8.6.14
|
||||
version: 8.6.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.6.14(prettier@3.5.3))
|
||||
'@storybook/manager-api':
|
||||
specifier: 8.6.14
|
||||
version: 8.6.14(storybook@8.6.14(prettier@3.5.3))
|
||||
'@storybook/nextjs':
|
||||
specifier: 8.6.14
|
||||
version: 8.6.14(@swc/core@1.11.31)(esbuild@0.24.2)(next@15.3.3(@babel/core@7.27.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.52.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.6.14(prettier@3.5.3))(type-fest@4.41.0)(typescript@5.8.3)(webpack-hot-middleware@2.26.1)(webpack@5.99.9(@swc/core@1.11.31)(esbuild@0.24.2))
|
||||
@@ -237,6 +240,9 @@ importers:
|
||||
'@storybook/test-runner':
|
||||
specifier: 0.22.1
|
||||
version: 0.22.1(@types/node@22.15.30)(storybook@8.6.14(prettier@3.5.3))
|
||||
'@storybook/theming':
|
||||
specifier: 8.6.14
|
||||
version: 8.6.14(storybook@8.6.14(prettier@3.5.3))
|
||||
'@types/canvas-confetti':
|
||||
specifier: 1.9.0
|
||||
version: 1.9.0
|
||||
|
||||
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 28 KiB |
BIN
autogpt_platform/frontend/public/autogpt-logo-dark-bg.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
autogpt_platform/frontend/public/autogpt-logo-light-bg.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
autogpt_platform/frontend/public/storybook/atoms.png
Normal file
|
After Width: | Height: | Size: 374 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
4
autogpt_platform/frontend/public/storybook/docs.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="none" viewBox="0 0 32 32">
|
||||
<path fill="#1E88E5" d="M31.3313 8.44657C30.9633 7.08998 29.8791 6.02172 28.5022 5.65916C26.0067 5.00026 16 5.00026 16 5.00026C16 5.00026 5.99333 5.00026 3.4978 5.65916C2.12102 6.02172 1.03665 7.08998 0.668678 8.44657C0 10.9053 0 16.0353 0 16.0353C0 16.0353 0 21.1652 0.668678 23.6242C1.03665 24.9806 2.12102 26.0489 3.4978 26.4116C5.99333 27.0703 16 27.0703 16 27.0703C16 27.0703 26.0067 27.0703 28.5022 26.4116C29.8791 26.0489 30.9633 24.9806 31.3313 23.6242C32 21.1652 32 16.0353 32 16.0353C32 16.0353 32 10.9053 31.3313 8.44657Z"/>
|
||||
<path fill="#fff" d="M11 10H20V22H11V10ZM13 12V13H18V12H13ZM13 15V16H18V15H13ZM13 18V19H18V18H13Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 743 B |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
autogpt_platform/frontend/public/storybook/molecules.png
Normal file
|
After Width: | Height: | Size: 300 KiB |
BIN
autogpt_platform/frontend/public/storybook/tokens.png
Normal file
|
After Width: | Height: | Size: 284 KiB |
|
Before Width: | Height: | Size: 716 B After Width: | Height: | Size: 716 B |
@@ -40,7 +40,7 @@ export const FeaturedAgentCard: React.FC<FeaturedStoreCardProps> = ({
|
||||
<CardContent className="flex-1 p-4">
|
||||
<div className="relative aspect-[4/3] w-full overflow-hidden rounded-xl">
|
||||
<Image
|
||||
src={agent.agent_image || "/AUTOgpt_Logo_dark.png"}
|
||||
src={agent.agent_image || "/autogpt-logo-dark-bg.png"}
|
||||
alt={`${agent.agent_name} preview`}
|
||||
fill
|
||||
sizes="100%"
|
||||
|
||||
@@ -1,451 +0,0 @@
|
||||
import { Meta } from "@storybook/blocks";
|
||||
import Image from "next/image";
|
||||
|
||||
import Github from "./assets/github.svg";
|
||||
import Discord from "./assets/discord.svg";
|
||||
import Youtube from "./assets/youtube.svg";
|
||||
import Tutorials from "./assets/tutorials.svg";
|
||||
import Styling from "./assets/styling.png";
|
||||
import Context from "./assets/context.png";
|
||||
import Assets from "./assets/assets.png";
|
||||
import Docs from "./assets/docs.png";
|
||||
import Share from "./assets/share.png";
|
||||
import FigmaPlugin from "./assets/figma-plugin.png";
|
||||
import Testing from "./assets/testing.png";
|
||||
import Accessibility from "./assets/accessibility.png";
|
||||
import Theming from "./assets/theming.png";
|
||||
import AddonLibrary from "./assets/addon-library.png";
|
||||
|
||||
export const RightArrow = () => (
|
||||
<svg
|
||||
viewBox="0 0 14 14"
|
||||
width="8px"
|
||||
height="14px"
|
||||
style={{
|
||||
marginLeft: "4px",
|
||||
display: "inline-block",
|
||||
shapeRendering: "inherit",
|
||||
verticalAlign: "middle",
|
||||
fill: "currentColor",
|
||||
"path fill": "currentColor",
|
||||
}}
|
||||
>
|
||||
<path d="m11.1 7.35-5.5 5.5a.5.5 0 0 1-.7-.7L10.04 7 4.9 1.85a.5.5 0 1 1 .7-.7l5.5 5.5c.2.2.2.5 0 .7Z" />
|
||||
</svg>
|
||||
);
|
||||
|
||||
<Meta title="Configure your project" />
|
||||
|
||||
<div className="sb-container">
|
||||
<div className='sb-section-title'>
|
||||
# Configure your project
|
||||
|
||||
Because Storybook works separately from your app, you'll need to configure it for your specific stack and setup. Below, explore guides for configuring Storybook with popular frameworks and tools. If you get stuck, learn how you can ask for help from our community.
|
||||
|
||||
</div>
|
||||
<div className="sb-section">
|
||||
<div className="sb-section-item">
|
||||
<Image
|
||||
src={Styling}
|
||||
alt="A wall of logos representing different styling technologies"
|
||||
width={0}
|
||||
height={0}
|
||||
style={{ width: '100%', height: 'auto' }}
|
||||
/>
|
||||
<h4 className="sb-section-item-heading">Add styling and CSS</h4>
|
||||
<p className="sb-section-item-paragraph">Like with web applications, there are many ways to include CSS within Storybook. Learn more about setting up styling within Storybook.</p>
|
||||
<a
|
||||
href="https://storybook.js.org/docs/configure/styling-and-css/?renderer=react"
|
||||
target="_blank"
|
||||
>Learn more<RightArrow /></a>
|
||||
</div>
|
||||
<div className="sb-section-item">
|
||||
<Image
|
||||
width={0}
|
||||
height={0}
|
||||
style={{ width: '100%', height: 'auto' }}
|
||||
src={Context}
|
||||
alt="An abstraction representing the composition of data for a component"
|
||||
/>
|
||||
<h4 className="sb-section-item-heading">Provide context and mocking</h4>
|
||||
<p className="sb-section-item-paragraph">Often when a story doesn't render, it's because your component is expecting a specific environment or context (like a theme provider) to be available.</p>
|
||||
<a
|
||||
href="https://storybook.js.org/docs/writing-stories/decorators/?renderer=react#context-for-mocking"
|
||||
target="_blank"
|
||||
>Learn more<RightArrow /></a>
|
||||
</div>
|
||||
<div className="sb-section-item">
|
||||
<Image
|
||||
width={0}
|
||||
height={0}
|
||||
style={{ width: '100%', height: 'auto' }}
|
||||
src={Assets}
|
||||
alt="A representation of typography and image assets"
|
||||
/>
|
||||
<div>
|
||||
<h4 className="sb-section-item-heading">Load assets and resources</h4>
|
||||
<p className="sb-section-item-paragraph">To link static files (like fonts) to your projects and stories, use the
|
||||
`staticDirs` configuration option to specify folders to load when
|
||||
starting Storybook.</p>
|
||||
<a
|
||||
href="https://storybook.js.org/docs/configure/images-and-assets/?renderer=react"
|
||||
target="_blank"
|
||||
>Learn more<RightArrow /></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="sb-container">
|
||||
<div className='sb-section-title'>
|
||||
# Do more with Storybook
|
||||
|
||||
Now that you know the basics, let's explore other parts of Storybook that will improve your experience. This list is just to get you started. You can customise Storybook in many ways to fit your needs.
|
||||
|
||||
</div>
|
||||
|
||||
<div className="sb-section">
|
||||
<div className="sb-features-grid">
|
||||
<div className="sb-grid-item">
|
||||
<Image
|
||||
width={0}
|
||||
height={0}
|
||||
style={{ width: '100%', height: 'auto' }}
|
||||
src={Docs}
|
||||
alt="A screenshot showing the autodocs tag being set, pointing a docs page being generated"
|
||||
/>
|
||||
<h4 className="sb-section-item-heading">Autodocs</h4>
|
||||
<p className="sb-section-item-paragraph">Auto-generate living,
|
||||
interactive reference documentation from your components and stories.</p>
|
||||
<a
|
||||
href="https://storybook.js.org/docs/writing-docs/autodocs/?renderer=react"
|
||||
target="_blank"
|
||||
>Learn more<RightArrow /></a>
|
||||
</div>
|
||||
<div className="sb-grid-item">
|
||||
<Image
|
||||
width={0}
|
||||
height={0}
|
||||
style={{ width: '100%', height: 'auto' }}
|
||||
src={Share}
|
||||
alt="A browser window showing a Storybook being published to a chromatic.com URL"
|
||||
/>
|
||||
<h4 className="sb-section-item-heading">Publish to Chromatic</h4>
|
||||
<p className="sb-section-item-paragraph">Publish your Storybook to review and collaborate with your entire team.</p>
|
||||
<a
|
||||
href="https://storybook.js.org/docs/sharing/publish-storybook/?renderer=react#publish-storybook-with-chromatic"
|
||||
target="_blank"
|
||||
>Learn more<RightArrow /></a>
|
||||
</div>
|
||||
<div className="sb-grid-item">
|
||||
<Image
|
||||
width={0}
|
||||
height={0}
|
||||
style={{ width: '100%', height: 'auto' }}
|
||||
src={FigmaPlugin}
|
||||
alt="Windows showing the Storybook plugin in Figma"
|
||||
/>
|
||||
<h4 className="sb-section-item-heading">Figma Plugin</h4>
|
||||
<p className="sb-section-item-paragraph">Embed your stories into Figma to cross-reference the design and live
|
||||
implementation in one place.</p>
|
||||
<a
|
||||
href="https://storybook.js.org/docs/sharing/design-integrations/?renderer=react#embed-storybook-in-figma-with-the-plugin"
|
||||
target="_blank"
|
||||
>Learn more<RightArrow /></a>
|
||||
</div>
|
||||
<div className="sb-grid-item">
|
||||
<Image
|
||||
width={0}
|
||||
height={0}
|
||||
style={{ width: '100%', height: 'auto' }}
|
||||
src={Testing}
|
||||
alt="Screenshot of tests passing and failing"
|
||||
/>
|
||||
<h4 className="sb-section-item-heading">Testing</h4>
|
||||
<p className="sb-section-item-paragraph">Use stories to test a component in all its variations, no matter how
|
||||
complex.</p>
|
||||
<a
|
||||
href="https://storybook.js.org/docs/writing-tests/?renderer=react"
|
||||
target="_blank"
|
||||
>Learn more<RightArrow /></a>
|
||||
</div>
|
||||
<div className="sb-grid-item">
|
||||
<Image
|
||||
width={0}
|
||||
height={0}
|
||||
style={{ width: '100%', height: 'auto' }}
|
||||
src={Accessibility}
|
||||
alt="Screenshot of accessibility tests passing and failing"
|
||||
/>
|
||||
<h4 className="sb-section-item-heading">Accessibility</h4>
|
||||
<p className="sb-section-item-paragraph">Automatically test your components for a11y issues as you develop.</p>
|
||||
<a
|
||||
href="https://storybook.js.org/docs/writing-tests/accessibility-testing/?renderer=react"
|
||||
target="_blank"
|
||||
>Learn more<RightArrow /></a>
|
||||
</div>
|
||||
<div className="sb-grid-item">
|
||||
<Image
|
||||
width={0}
|
||||
height={0}
|
||||
style={{ width: '100%', height: 'auto' }}
|
||||
src={Theming}
|
||||
alt="Screenshot of Storybook in light and dark mode"
|
||||
/>
|
||||
<h4 className="sb-section-item-heading">Theming</h4>
|
||||
<p className="sb-section-item-paragraph">Theme Storybook's UI to personalize it to your project.</p>
|
||||
<a
|
||||
href="https://storybook.js.org/docs/configure/theming/?renderer=react"
|
||||
target="_blank"
|
||||
>Learn more<RightArrow /></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='sb-addon'>
|
||||
<div className='sb-addon-text'>
|
||||
<h4>Addons</h4>
|
||||
<p className="sb-section-item-paragraph">Integrate your tools with Storybook to connect workflows.</p>
|
||||
<a
|
||||
href="https://storybook.js.org/addons/"
|
||||
target="_blank"
|
||||
>Discover all addons<RightArrow /></a>
|
||||
</div>
|
||||
<div className='sb-addon-img'>
|
||||
<Image
|
||||
width={650}
|
||||
height={347}
|
||||
src={AddonLibrary}
|
||||
alt="Integrate your tools with Storybook to connect workflows."
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="sb-section sb-socials">
|
||||
<div className="sb-section-item">
|
||||
<Image
|
||||
width={32}
|
||||
height={32}
|
||||
layout="fixed"
|
||||
src={Github}
|
||||
alt="Github logo"
|
||||
className="sb-explore-image"
|
||||
/>
|
||||
Join our contributors building the future of UI development.
|
||||
|
||||
<a
|
||||
href="https://github.com/storybookjs/storybook"
|
||||
target="_blank"
|
||||
>Star on GitHub<RightArrow /></a>
|
||||
</div>
|
||||
<div className="sb-section-item">
|
||||
<Image
|
||||
width={33}
|
||||
height={32}
|
||||
layout="fixed"
|
||||
src={Discord}
|
||||
alt="Discord logo"
|
||||
className="sb-explore-image"
|
||||
/>
|
||||
<div>
|
||||
Get support and chat with frontend developers.
|
||||
|
||||
<a
|
||||
href="https://discord.gg/storybook"
|
||||
target="_blank"
|
||||
>Join Discord server<RightArrow /></a>
|
||||
</div>
|
||||
</div>
|
||||
<div className="sb-section-item">
|
||||
<Image
|
||||
width={32}
|
||||
height={32}
|
||||
layout="fixed"
|
||||
src={Youtube}
|
||||
alt="Youtube logo"
|
||||
className="sb-explore-image"
|
||||
/>
|
||||
<div>
|
||||
Watch tutorials, feature previews and interviews.
|
||||
|
||||
<a
|
||||
href="https://www.youtube.com/@chromaticui"
|
||||
target="_blank"
|
||||
>Watch on YouTube<RightArrow /></a>
|
||||
</div>
|
||||
</div>
|
||||
<div className="sb-section-item">
|
||||
<Image
|
||||
width={33}
|
||||
height={32}
|
||||
layout="fixed"
|
||||
src={Tutorials}
|
||||
alt="A book"
|
||||
className="sb-explore-image"
|
||||
/>
|
||||
<p>Follow guided walkthroughs on for key workflows.</p>
|
||||
|
||||
<a
|
||||
href="https://storybook.js.org/tutorials/"
|
||||
target="_blank"
|
||||
>Discover tutorials<RightArrow /></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<style>
|
||||
{`
|
||||
.sb-container {
|
||||
margin-bottom: 48px;
|
||||
}
|
||||
|
||||
.sb-section {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
img {
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.sb-section-title {
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.sb-section a:not(h1 a, h2 a, h3 a) {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.sb-section-item, .sb-grid-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sb-section-item-heading {
|
||||
padding-top: 20px !important;
|
||||
padding-bottom: 5px !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
.sb-section-item-paragraph {
|
||||
margin: 0;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.sb-chevron {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.sb-features-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-gap: 32px 20px;
|
||||
}
|
||||
|
||||
.sb-socials {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
}
|
||||
|
||||
.sb-socials p {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.sb-explore-image {
|
||||
max-height: 32px;
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.sb-addon {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
background-color: #EEF3F8;
|
||||
border-radius: 5px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.05);
|
||||
background: #EEF3F8;
|
||||
height: 180px;
|
||||
margin-bottom: 48px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sb-addon-text {
|
||||
padding-left: 48px;
|
||||
max-width: 240px;
|
||||
}
|
||||
|
||||
.sb-addon-text h4 {
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
.sb-addon-img {
|
||||
position: absolute;
|
||||
left: 345px;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
width: 200%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sb-addon-img img {
|
||||
width: 650px;
|
||||
transform: rotate(-15deg);
|
||||
margin-left: 40px;
|
||||
margin-top: -72px;
|
||||
box-shadow: 0 0 1px rgba(255, 255, 255, 0);
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
.sb-addon-img {
|
||||
left: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
.sb-section {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sb-features-grid {
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
|
||||
.sb-socials {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
|
||||
.sb-addon {
|
||||
height: 280px;
|
||||
align-items: flex-start;
|
||||
padding-top: 32px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sb-addon-text {
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
.sb-addon-img {
|
||||
right: 0;
|
||||
left: 0;
|
||||
top: 130px;
|
||||
bottom: 0;
|
||||
overflow: hidden;
|
||||
height: auto;
|
||||
width: 124%;
|
||||
}
|
||||
|
||||
.sb-addon-img img {
|
||||
width: 1200px;
|
||||
transform: rotate(-12deg);
|
||||
margin-left: 0;
|
||||
margin-top: 48px;
|
||||
margin-bottom: -40px;
|
||||
margin-left: -24px;
|
||||
}
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
466
autogpt_platform/frontend/src/stories/Overview.stories.tsx
Normal file
@@ -0,0 +1,466 @@
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
import Image from "next/image";
|
||||
|
||||
function RightArrow() {
|
||||
return (
|
||||
<svg
|
||||
viewBox="0 0 14 14"
|
||||
width="8px"
|
||||
height="14px"
|
||||
className="ml-1 inline-block fill-current"
|
||||
>
|
||||
<path d="m11.1 7.35-5.5 5.5a.5.5 0 0 1-.7-.7L10.04 7 4.9 1.85a.5.5 0 1 1 .7-.7l5.5 5.5c.2.2.2.5 0 .7Z" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
function OverviewComponent() {
|
||||
const linkStyle = "font-bold text-blue-600 hover:text-blue-800";
|
||||
return (
|
||||
<div className="mx-auto max-w-6xl space-y-24 p-8">
|
||||
{/* Header Section */}
|
||||
<div className="space-y-8">
|
||||
<div className="space-y-4">
|
||||
<h1 className="text-4xl font-bold text-gray-900">
|
||||
AutoGPT Design System
|
||||
</h1>
|
||||
<p className="text-xl leading-relaxed text-gray-600">
|
||||
Welcome to the AutoGPT Design System - a comprehensive collection of
|
||||
reusable components, design tokens, and guidelines that power the
|
||||
AutoGPT Platform. This system ensures consistency, accessibility,
|
||||
and efficiency across all our user interfaces.
|
||||
</p>
|
||||
<div className="inline-flex items-center">
|
||||
<strong className="text-lg">
|
||||
<a
|
||||
href="https://www.figma.com/design/nO9NFynNuicLtkiwvOxrbz/AutoGPT-Design-System?node-id=3-2083&m=dev"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={`${linkStyle} text-md`}
|
||||
>
|
||||
📋 Figma Reference
|
||||
</a>
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Foundation Cards */}
|
||||
<div className="grid grid-cols-1 gap-6 md:grid-cols-3">
|
||||
<div className="flex flex-col space-y-4">
|
||||
<Image
|
||||
src="/storybook/tokens.png"
|
||||
alt="Design tokens representing colors, typography, and spacing"
|
||||
width={0}
|
||||
height={0}
|
||||
className="h-auto w-4/5 rounded-lg"
|
||||
/>
|
||||
<h4 className="text-lg font-bold text-gray-900">Design Tokens</h4>
|
||||
<p className="text-sm leading-relaxed text-gray-600">
|
||||
The foundation of our design system. Tokens define colors,
|
||||
typography, spacing, shadows, and other visual properties that
|
||||
ensure consistency across all components and layouts.
|
||||
</p>
|
||||
<a
|
||||
href="?path=/docs/design-tokens--docs"
|
||||
className={`inline-flex items-center text-sm ${linkStyle}`}
|
||||
>
|
||||
Explore Tokens
|
||||
<RightArrow />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col space-y-4">
|
||||
<Image
|
||||
src="/storybook/atoms.png"
|
||||
alt="Basic UI elements like buttons, inputs, and icons"
|
||||
width={0}
|
||||
height={0}
|
||||
className="h-auto w-4/5 rounded-lg"
|
||||
/>
|
||||
<h4 className="text-lg font-bold text-gray-900">Atoms</h4>
|
||||
<p className="text-sm leading-relaxed text-gray-600">
|
||||
The smallest building blocks of our interface. Atoms include
|
||||
buttons, inputs, icons, labels, and other fundamental UI elements
|
||||
that cannot be broken down further.
|
||||
</p>
|
||||
<a
|
||||
href="?path=/docs/atoms--docs"
|
||||
className={`inline-flex items-center text-sm ${linkStyle}`}
|
||||
>
|
||||
View Atoms
|
||||
<RightArrow />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col space-y-4">
|
||||
<Image
|
||||
src="/storybook/molecules.png"
|
||||
alt="Combined UI components like cards, dropdowns, and search bars"
|
||||
width={0}
|
||||
height={0}
|
||||
className="h-auto w-4/5 rounded-lg"
|
||||
/>
|
||||
<h4 className="text-lg font-bold text-gray-900">Molecules</h4>
|
||||
<p className="text-sm leading-relaxed text-gray-600">
|
||||
Combinations of atoms that work together as a unit. Examples
|
||||
include search bars, card components, dropdown menus, and other
|
||||
composite UI elements.
|
||||
</p>
|
||||
<a
|
||||
href="?path=/docs/molecules--docs"
|
||||
className={`inline-flex items-center text-sm ${linkStyle}`}
|
||||
>
|
||||
Browse Molecules
|
||||
<RightArrow />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Technical Foundation */}
|
||||
<div className="space-y-8">
|
||||
<div className="space-y-4">
|
||||
<h2 className="text-3xl font-bold text-gray-900">
|
||||
Technical Foundation
|
||||
</h2>
|
||||
<p className="text-lg text-gray-600">
|
||||
Our design system is built on proven technologies while maintaining
|
||||
strict design consistency through custom tokens and components.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 gap-12 md:grid-cols-3">
|
||||
<div className="space-y-4">
|
||||
<h4 className="text-lg font-semibold text-gray-900">
|
||||
🎨 Built with Tailwind & shadcn/ui
|
||||
</h4>
|
||||
<p className="text-sm leading-relaxed text-gray-600">
|
||||
The AutoGPT Design System leverages{" "}
|
||||
<a
|
||||
href="https://tailwindcss.com/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={linkStyle}
|
||||
>
|
||||
Tailwind CSS
|
||||
</a>{" "}
|
||||
for utility-first styling and{" "}
|
||||
<a
|
||||
href="https://ui.shadcn.com/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={linkStyle}
|
||||
>
|
||||
shadcn/ui
|
||||
</a>{" "}
|
||||
as a foundation for accessible, well-tested components.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="space-y-4">
|
||||
<h4 className="text-lg font-semibold text-gray-900">
|
||||
🔧 Why This Matters
|
||||
</h4>
|
||||
<ul className="space-y-2 text-sm text-gray-600">
|
||||
<li>
|
||||
<strong>Visual Consistency:</strong> All interfaces look and
|
||||
feel cohesive
|
||||
</li>
|
||||
<li>
|
||||
<strong>Accessibility:</strong> Our tokens include proper
|
||||
contrast ratios and focus states
|
||||
</li>
|
||||
<li>
|
||||
<strong>Brand Compliance:</strong> All colors and styles match
|
||||
AutoGPT's brand
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div className="space-y-4">
|
||||
<h4 className="text-lg font-semibold text-gray-900">
|
||||
📚 Getting Started
|
||||
</h4>
|
||||
<ol className="list-decimal space-y-2 text-sm text-gray-600">
|
||||
<li>
|
||||
Review the Design Tokens, Atoms,Molecules and Contextual
|
||||
Components for your use case
|
||||
</li>
|
||||
<li>
|
||||
If you need something new,{" "}
|
||||
<a
|
||||
href="https://github.com/Significant-Gravitas/AutoGPT/issues/new?template=design-system.md"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={linkStyle}
|
||||
>
|
||||
create an issue first
|
||||
</a>{" "}
|
||||
and get feedback
|
||||
</li>
|
||||
<li>
|
||||
Always test your changes and ensure it renders well on all
|
||||
screen sizes
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Contributing Section */}
|
||||
<div className="space-y-8">
|
||||
<div className="space-y-4">
|
||||
<h2 className="text-3xl font-bold text-gray-900">
|
||||
Contributing to the Design System
|
||||
</h2>
|
||||
<p className="text-lg text-gray-600">
|
||||
Help us improve and expand the AutoGPT Design System. Whether
|
||||
you're fixing bugs, adding new components, or enhancing
|
||||
existing ones, your contributions are valuable to the community.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="relative rounded-xl bg-gradient-to-r from-blue-50 via-purple-50 to-pink-50 p-6">
|
||||
<div className="absolute inset-0 rounded-xl bg-gradient-to-r from-blue-500 via-purple-500 to-pink-500 p-[2px]">
|
||||
<div className="h-full w-full rounded-xl bg-white"></div>
|
||||
</div>
|
||||
<div className="relative space-y-6">
|
||||
<div className="text-center">
|
||||
<h4 className="bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600 bg-clip-text text-xl font-bold text-transparent">
|
||||
⚠️ Design System Guidelines
|
||||
</h4>
|
||||
<p className="mt-2 text-gray-700">
|
||||
Contributors must <strong>ONLY</strong> use the design tokens
|
||||
and components defined in this system
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="grid gap-6 md:grid-cols-2">
|
||||
<div className="space-y-4">
|
||||
<h5 className="text-lg font-semibold text-red-600">
|
||||
❌ Don't Do This
|
||||
</h5>
|
||||
<div className="space-y-3">
|
||||
<div>
|
||||
<p className="mb-2 text-sm font-medium text-gray-700">
|
||||
Default Tailwind classes:
|
||||
</p>
|
||||
<pre className="overflow-x-auto rounded-md bg-gray-100 p-3 text-sm">
|
||||
<code className="text-red-600">{`className="text-blue-500 p-4 bg-gray-200"`}</code>
|
||||
</pre>
|
||||
</div>
|
||||
<div>
|
||||
<p className="mb-2 text-sm font-medium text-gray-700">
|
||||
Arbitrary values:
|
||||
</p>
|
||||
<pre className="overflow-x-auto rounded-md bg-gray-100 p-3 text-sm">
|
||||
<code className="text-red-600">{`className="text-[#1234ff] w-[420px]"`}</code>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="space-y-4">
|
||||
<h5 className="text-lg font-semibold text-green-600">
|
||||
✅ Do This Instead
|
||||
</h5>
|
||||
<div className="space-y-3">
|
||||
<div>
|
||||
<p className="mb-2 text-sm font-medium text-gray-700">
|
||||
Design tokens:
|
||||
</p>
|
||||
<pre className="overflow-x-auto rounded-md bg-gray-100 p-3 text-sm">
|
||||
<code className="text-green-600">{`className="text-primary bg-surface space-4"`}</code>
|
||||
</pre>
|
||||
</div>
|
||||
<div>
|
||||
<p className="mb-2 text-sm font-medium text-gray-700">
|
||||
System components:
|
||||
</p>
|
||||
<pre className="overflow-x-auto rounded-md bg-gray-100 p-3 text-sm">
|
||||
<code className="text-green-600">{`<Button variant="primary" size="md">
|
||||
Click me
|
||||
</Button>`}</code>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
|
||||
<div className="space-y-4">
|
||||
<h4 className="text-lg font-semibold text-gray-900">
|
||||
🧢 Development Workflow
|
||||
</h4>
|
||||
<p className="text-md leading-relaxed text-gray-600">
|
||||
All design system changes should follow our established workflow
|
||||
to ensure quality and consistency.
|
||||
</p>
|
||||
<div className="text-md space-y-4">
|
||||
<div>
|
||||
<strong className="text-gray-900">
|
||||
For External Contributors:
|
||||
</strong>
|
||||
<ol className="mt-2 list-decimal space-y-1 pl-4 text-gray-600">
|
||||
<li>
|
||||
Create a GitHub issue first to discuss your proposed changes
|
||||
</li>
|
||||
<li>
|
||||
Wait for maintainer approval before starting development
|
||||
</li>
|
||||
<li>Fork the repository and create a feature branch</li>
|
||||
<li>Implement changes following our coding standards</li>
|
||||
<li>Submit a pull request with detailed description</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div>
|
||||
<strong className="text-gray-900">
|
||||
For Internal Team Members:
|
||||
</strong>
|
||||
<ol className="mt-2 list-decimal space-y-1 pl-4 text-gray-600">
|
||||
<li>Create a feature branch from main</li>
|
||||
<li>Implement changes and update Storybook documentation</li>
|
||||
<li>Test components across different scenarios</li>
|
||||
<li>Submit pull request for team review</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="space-y-4">
|
||||
<h4 className="text-lg font-semibold text-gray-900">
|
||||
📋 Component Guidelines
|
||||
</h4>
|
||||
<p className="text-md leading-relaxed text-gray-600">
|
||||
Follow these principles when creating or modifying components:
|
||||
</p>
|
||||
<ul className="text-md space-y-2 text-gray-600">
|
||||
<li>
|
||||
<strong className="text-gray-900">Accessibility First</strong>
|
||||
<ul>
|
||||
<li>
|
||||
All components must meet{" "}
|
||||
<a
|
||||
href="https://www.w3.org/WAI/standards-guidelines/wcag/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={`${linkStyle} font-semibold`}
|
||||
>
|
||||
WCAG 2.1 AA standards
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<strong className="text-gray-900">Design Token Usage</strong>
|
||||
<ul>
|
||||
<li>Use design tokens for all styling properties</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<strong className="text-gray-900">Responsive Design</strong>
|
||||
<ul>
|
||||
<li>Components should work across all screen sizes</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<strong className="text-gray-900">TypeScript</strong>
|
||||
<ul>
|
||||
<li>All components must be fully typed</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<strong className="text-gray-900">Documentation</strong>
|
||||
<ul>
|
||||
<li>
|
||||
Include comprehensive Storybook stories and JSDoc comments
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<strong className="text-gray-900">Testing</strong>
|
||||
<ul>
|
||||
<li>Write unit tests for component logic and interactions</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Social Links */}
|
||||
<div className="space-y-8">
|
||||
<h3 className="text-3xl font-bold text-gray-900">Get Involved</h3>
|
||||
<p className="text-md leading-relaxed text-gray-600">
|
||||
Join the AutoGPT community and help build the future of AI automation.
|
||||
</p>
|
||||
<div className="grid grid-cols-1 gap-6 md:grid-cols-4">
|
||||
{[
|
||||
{
|
||||
icon: "/storybook/github.svg",
|
||||
title:
|
||||
"Contribute to the AutoGPT Platform and help build the future of AI automation.",
|
||||
link: "https://github.com/Significant-Gravitas/AutoGPT",
|
||||
linkText: "Star on GitHub",
|
||||
},
|
||||
{
|
||||
icon: "/storybook/discord.svg",
|
||||
title: "Get support and chat with the AutoGPT community.",
|
||||
link: "https://discord.gg/autogpt",
|
||||
linkText: "Join Discord",
|
||||
},
|
||||
{
|
||||
icon: "/storybook/youtube.svg",
|
||||
title: "Watch AutoGPT tutorials and feature demonstrations.",
|
||||
link: "https://www.youtube.com/@AutoGPT-Official",
|
||||
linkText: "Watch on YouTube",
|
||||
},
|
||||
{
|
||||
icon: "/storybook/docs.svg",
|
||||
title: "Read the complete platform documentation and guides.",
|
||||
link: "https://docs.agpt.co",
|
||||
linkText: "View Documentation",
|
||||
},
|
||||
].map((item, index) => (
|
||||
<div key={index} className="space-y-4">
|
||||
<Image
|
||||
src={item.icon}
|
||||
alt={`${item.linkText} logo`}
|
||||
width={32}
|
||||
height={32}
|
||||
className="h-8 w-8"
|
||||
/>
|
||||
<p className="text-sm leading-relaxed text-gray-600">
|
||||
{item.title}
|
||||
</p>
|
||||
<a
|
||||
href={item.link}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex items-center text-sm text-blue-600 hover:text-blue-800"
|
||||
>
|
||||
{item.linkText}
|
||||
<RightArrow />
|
||||
</a>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const meta: Meta<typeof OverviewComponent> = {
|
||||
title: "Overview",
|
||||
component: OverviewComponent,
|
||||
parameters: {
|
||||
layout: "fullscreen",
|
||||
controls: { disable: true },
|
||||
},
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof meta>;
|
||||
|
||||
export const Default: Story = {};
|
||||
|
Before Width: | Height: | Size: 41 KiB |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="none" viewBox="0 0 48 48"><title>Accessibility</title><circle cx="24.334" cy="24" r="24" fill="#A849FF" fill-opacity=".3"/><path fill="#A470D5" fill-rule="evenodd" d="M27.8609 11.585C27.8609 9.59506 26.2497 7.99023 24.2519 7.99023C22.254 7.99023 20.6429 9.65925 20.6429 11.585C20.6429 13.575 22.254 15.1799 24.2519 15.1799C26.2497 15.1799 27.8609 13.575 27.8609 11.585ZM21.8922 22.6473C21.8467 23.9096 21.7901 25.4788 21.5897 26.2771C20.9853 29.0462 17.7348 36.3314 17.3325 37.2275C17.1891 37.4923 17.1077 37.7955 17.1077 38.1178C17.1077 39.1519 17.946 39.9902 18.9802 39.9902C19.6587 39.9902 20.253 39.6293 20.5814 39.0889L20.6429 38.9874L24.2841 31.22C24.2841 31.22 27.5529 37.9214 27.9238 38.6591C28.2948 39.3967 28.8709 39.9902 29.7168 39.9902C30.751 39.9902 31.5893 39.1519 31.5893 38.1178C31.5893 37.7951 31.3639 37.2265 31.3639 37.2265C30.9581 36.3258 27.698 29.0452 27.0938 26.2771C26.8975 25.4948 26.847 23.9722 26.8056 22.7236C26.7927 22.333 26.7806 21.9693 26.7653 21.6634C26.7008 21.214 27.0231 20.8289 27.4097 20.7005L35.3366 18.3253C36.3033 18.0685 36.8834 16.9773 36.6256 16.0144C36.3678 15.0515 35.2722 14.4737 34.3055 14.7305C34.3055 14.7305 26.8619 17.1057 24.2841 17.1057C21.7062 17.1057 14.456 14.7947 14.456 14.7947C13.4893 14.5379 12.3937 14.9873 12.0715 15.9502C11.7493 16.9131 12.3293 18.0044 13.3604 18.3253L21.2873 20.7005C21.674 20.8289 21.9318 21.214 21.9318 21.6634C21.9174 21.9493 21.9053 22.2857 21.8922 22.6473Z" clip-rule="evenodd"/></svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 456 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 829 B |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 43 KiB |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="33" height="32" fill="none" viewBox="0 0 33 32"><g clip-path="url(#clip0_10031_177597)"><path fill="#B7F0EF" fill-rule="evenodd" d="M17 7.87059C17 6.48214 17.9812 5.28722 19.3431 5.01709L29.5249 2.99755C31.3238 2.64076 33 4.01717 33 5.85105V22.1344C33 23.5229 32.0188 24.7178 30.6569 24.9879L20.4751 27.0074C18.6762 27.3642 17 25.9878 17 24.1539L17 7.87059Z" clip-rule="evenodd" opacity=".7"/><path fill="#87E6E5" fill-rule="evenodd" d="M1 5.85245C1 4.01857 2.67623 2.64215 4.47507 2.99895L14.6569 5.01848C16.0188 5.28861 17 6.48354 17 7.87198V24.1553C17 25.9892 15.3238 27.3656 13.5249 27.0088L3.34311 24.9893C1.98119 24.7192 1 23.5242 1 22.1358V5.85245Z" clip-rule="evenodd"/><path fill="#61C1FD" fill-rule="evenodd" d="M15.543 5.71289C15.543 5.71289 16.8157 5.96289 17.4002 6.57653C17.9847 7.19016 18.4521 9.03107 18.4521 9.03107C18.4521 9.03107 18.4521 25.1106 18.4521 26.9629C18.4521 28.8152 19.3775 31.4174 19.3775 31.4174L17.4002 28.8947L16.2575 31.4174C16.2575 31.4174 15.543 29.0765 15.543 27.122C15.543 25.1674 15.543 5.71289 15.543 5.71289Z" clip-rule="evenodd"/></g><defs><clipPath id="clip0_10031_177597"><rect width="32" height="32" fill="#fff" transform="translate(0.5)"/></clipPath></defs></svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB |