-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
459 changed files
with
21,626 additions
and
33,607 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,23 @@ jobs: | |
steps: | ||
- uses: Codecademy/[email protected] | ||
with: | ||
node-version: 16 | ||
node-version: 20 | ||
command: format:verify | ||
|
||
lint: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
command: ['lint', 'verify'] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: Codecademy/[email protected] | ||
with: | ||
node-version: 20 | ||
command: build | ||
- run: yarn ${{ matrix.command }} | ||
|
||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: Codecademy/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v16.17.0 | ||
v18.18.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,137 @@ | ||
{ | ||
"Component Story": { | ||
"prefix": "component-story", | ||
"Component Doc": { | ||
"prefix": "component-doc", | ||
"body": [ | ||
"import { $1 } from '@codecademy/$2';", | ||
"import title from '@codecademy/macros/lib/title.macro';", | ||
"import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks';", | ||
"import { PropsTable } from '@codecademy/storybook-addon-variance';", | ||
"import { Canvas, Controls, Meta } from '@storybook/blocks';", | ||
"", | ||
"import { ComponentHeader } from '~styleguide/blocks';", | ||
"", | ||
"import * as $1Stories from './$1.stories';", | ||
"", | ||
"export const parameters = {", | ||
"subtitle: `Template component`,", | ||
"design: {", | ||
"type: 'figma',", | ||
"url: 'https: //www.figma.com/file/XXX',", | ||
" },", | ||
"status: 'current',", | ||
"source: {", | ||
"repo: '$2',", | ||
"// this is easy to find by right clicking on the file in VSCode and clicking 'Copy Remote File Url From...' and the selecting 'main' or amending the url path below like so: https://github.com/Codecademy/gamut/blob/main/packages/${2}/src/file/location", | ||
"githubLink:", | ||
"'https: //github.com/Codecademy/gamut/blob/main/packages/gamut/src/Logo',", | ||
" },", | ||
"};", | ||
"<Meta of={$1Stories}/>", | ||
"", | ||
"<ComponentHeader {...parameters} />", | ||
"", | ||
"## Usage", | ||
"", | ||
"Use $1 to [what it should be used for]", | ||
"", | ||
"### Best practices:", | ||
"", | ||
"- [recommendation / best practice for implementation]", | ||
"- [recommendation / best practice for implementation]", | ||
"", | ||
"When NOT to use", | ||
"", | ||
"- [use case]- for [describe the use case], use the [similar component] component.", | ||
"- [use case]- for [describe the use case], use the [similar component] component", | ||
"", | ||
"## Anatomy", | ||
"", | ||
"[Insert image exported from Figma]", | ||
"", | ||
"1. [Element name]", | ||
"- [description including available options and ux writing if relevant]", | ||
"", | ||
"<Meta", | ||
" title={title}", | ||
" component={$1}", | ||
" parameters={{", | ||
" subtitle: '$3',", | ||
" source: '$2',", | ||
" status: 'current' | 'updating' | 'deprecated' | 'static'$4 ,", | ||
" design: {", | ||
" type: 'figma',", | ||
" url: 'https://www.figma.com/file/$5',", | ||
" }", | ||
" }}", | ||
" args={{}}", | ||
"/>", | ||
"## Variants", | ||
"", | ||
"`$1` component summary goes here", | ||
"### [Variant 1 name]", | ||
"", | ||
"## Design Principles", | ||
"Use the [variant 1 name] to [what it should be used for]", | ||
"", | ||
"Design Principles summary", | ||
"<Canvas of={$1Stories.Default} />", | ||
"", | ||
"## Usage Guidelines", | ||
"## Playground", | ||
"", | ||
"Usage summary", | ||
"If you are using a story named 'Default', you can forgo the `of` prop.", | ||
"", | ||
"## Code Playground", | ||
"<Canvas sourceState='shown' of={$1Stories.Default} />", | ||
"", | ||
"<Canvas>", | ||
" <Story name=\"$1\">", | ||
" {(args) => <$1 {...args} />}", | ||
" </Story>", | ||
"</Canvas>", | ||
"<Controls />", | ||
"", | ||
"<PropsTable story=\"$1\"/>" | ||
"## Accessibility considerations", | ||
"", | ||
"- [Accessibility guidance]", | ||
"", | ||
"## UX writing", | ||
"", | ||
"- [content]", | ||
" - [guidance]", | ||
" - [guidance]" | ||
], | ||
"description": "Default Component Story Structure." | ||
"description": "Default Component Doc Structure." | ||
}, | ||
"Table of Contents Story": { | ||
"prefix": "toc-story", | ||
"body": [ | ||
"import title from '@codecademy/macros/lib/title.macro';", | ||
"import { Meta } from '@storybook/addon-docs/blocks';", | ||
"import { Meta } from '@storybook/blocks';", | ||
"import { AboutHeader, TableOfContents } from '~styleguide/blocks';", | ||
"", | ||
"export const parameters = {", | ||
" id: '$1',", | ||
" title: '$1/About',", | ||
" subtitle: '$2',", | ||
" }", | ||
"", | ||
"import { TableOfContents } from '~styleguide/blocks';", | ||
"<Meta title='$1/About' />", | ||
"", | ||
"<Meta", | ||
" title={title}", | ||
" parameters={{", | ||
" subtitle: '$3',", | ||
" }}", | ||
"/>", | ||
"<AboutHeader {...parameters} />", | ||
"", | ||
"<TableOfContents />" | ||
"Foundations make up the smallest scale design values that comprise a design system. Sometimes referred to elsewhere as "tokens", they are the abstract units that comprise and stitch together our atoms, molecules, and organisms.", | ||
"", | ||
"<TableOfContents", | ||
" links={[", | ||
" {", | ||
" id: '$1/Category',", | ||
" subtitle: 'Short description',", | ||
" title: 'Category',", | ||
" }", | ||
" ]}", | ||
"/>" | ||
], | ||
"description": "TOC Story Structure." | ||
}, | ||
"Canvas Block": { | ||
"prefix": "canvas-block", | ||
"body": [ | ||
"<Canvas>", | ||
" <Story name=\"$1\" args={{}}>", | ||
" {(args) => <$2 {...args} />}", | ||
" </Story>", | ||
"</Canvas>" | ||
], | ||
"description": "A single story block wrapped in a canvas" | ||
}, | ||
"Story Block": { | ||
"prefix": "story-block", | ||
"Component Story": { | ||
"prefix": "component-story", | ||
"body": [ | ||
" <Story name=\"$1\" args={{}}>", | ||
" {(args) => <$2 {...args} />}", | ||
" </Story>" | ||
"import { $1 } from '@codecademy/gamut';", | ||
"import type { Meta, StoryObj } from '@storybook/react';", | ||
"", | ||
"const meta: Meta<typeof $1> = {", | ||
" component: $1,", | ||
" args: {},", | ||
"};", | ||
"", | ||
"export default meta;", | ||
"type Story = StoryObj<typeof $1>;", | ||
"", | ||
"export const Default: Story = {", | ||
" args: {", | ||
" children: 'Test'", | ||
" },", | ||
"};", | ||
"", | ||
"export const Secondary: Story = {", | ||
" args: {", | ||
" children: 'Test again',", | ||
" variant: 'secondary'", | ||
" }", | ||
"};" | ||
], | ||
"description": "A single story block without a canvas" | ||
"description": "Default TSX story structure." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ tests | |
powered-test | ||
|
||
# asset directories | ||
docs | ||
website | ||
images | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# Gamut | ||
|
||
// Storybook 8 branch | ||
|
||
_The component library & design system for Codecademy._ ✨ | ||
|
||
--- | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.