-
Notifications
You must be signed in to change notification settings - Fork 555
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from primer/release-0.0.6-beta
0.0.6-beta release tracking
- Loading branch information
Showing
75 changed files
with
2,464 additions
and
823 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"presets": ["env", "react"] | ||
} | ||
"presets": ["env", "stage-0", "react"] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": [ | ||
"plugin:github/es6", | ||
"plugin:github/react", | ||
"plugin:jsx-a11y/recommended" | ||
], | ||
"rules": { | ||
"jsx-a11y/no-autofocus": "warn", | ||
"react/prop-types": "warn", | ||
"react/sort-prop-types": "warn" | ||
} | ||
} |
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,2 +1,4 @@ | ||
.DS_Store | ||
dist/ | ||
node_modules | ||
npm-debug.log |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
save=true | ||
save-exact=true |
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
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
|
||
<title>primer-react</title> | ||
|
||
<script> | ||
sessionStorage.redirect = location.href; | ||
</script> | ||
|
||
<meta http-equiv="refresh" content="0;URL='/primer-react'"></meta> | ||
</head> | ||
|
||
<body> | ||
| ||
| ||
| ||
</body> |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
<!DOCTYPE html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="generator" content="Compositor x0"><title>primer-react</title><style>*{box-sizing:border-box}body{margin:0;font-family:system-ui,sans-serif}</style></head><div id="root"><head><title>primer-react</title><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="generator" content="Compositor X0"><link rel="stylesheet" href="https://unpkg.com/primer-buttons/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-forms/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-layout/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-navigation/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-product/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-tooltips/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-utilities/build/build.css"><link rel="icon" href="assets/favicon.png"><link rel="apple-touch-icon" href="assets/apple-touch-icon.png"><meta name="og:title" content="Primer React"><meta name="description" content="Primer components built with React.js."></head><style>* { box-sizing: border-box; } | ||
<!DOCTYPE html><html><head><title>primer-react</title><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="generator" content="Compositor X0"><link rel="stylesheet" href="https://unpkg.com/primer-buttons/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-forms/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-layout/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-navigation/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-product/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-tooltips/build/build.css"><link rel="stylesheet" href="https://unpkg.com/primer-utilities/build/build.css"><link rel="icon" href="assets/favicon.png"><link rel="apple-touch-icon" href="assets/apple-touch-icon.png"><meta name="og:title" content="Primer React"><meta name="description" content="Primer components built with React.js."></head><body><script>(function(){ | ||
var redirect = sessionStorage.redirect; | ||
delete sessionStorage.redirect; | ||
if (redirect && redirect != location.href) { | ||
history.replaceState(null, null, redirect); | ||
} | ||
})();</script><div id="root"><style>* { box-sizing: border-box; } | ||
body { | ||
margin: 0; | ||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; | ||
line-height: 1.5; | ||
}</style><div class="text-dark-gray"><nav class="UnderlineNav"><div class="UnderlineNav-body"><a class="UnderlineNav-item no-underline" href="/primer-react/components">primer-react</a><a class="UnderlineNav-item no-underline" href="/primer-react/demos">Demos</a><a class="UnderlineNav-item no-underline selected" aria-current="page" href="/primer-react/sandbox">Sandbox</a></div></nav><div class="react-live"><div class="nano13x0vfn"><div class="react-live-preview"><div><div class="p-4"><h1 class="m-0 f1">Hello World!</h1><span>To get started with the Sandbox, start adding some primer-react components</span></div></div></div><div mt="2" class="nano1c0guhj"><pre class="prism-code nano11r6mrt" spellcheck="false" contenteditable="true"> | ||
}</style><div class="text-dark-gray"><nav class="UnderlineNav"><div class="UnderlineNav-body"><a class="UnderlineNav-item no-underline" href="/primer-react/components">primer-react</a><a class="UnderlineNav-item no-underline" href="/primer-react/demos">Demos</a><a class="UnderlineNav-item no-underline selected" aria-current="page" href="/primer-react/sandbox">Sandbox</a></div></nav><div class="react-live"><div class="nano13x0vfn"><div class="react-live-preview"><div><div class="p-4"><h1 class="m-0 f1">Hello World!</h1><span class="">To get started with the Sandbox, start adding some primer-react components</span></div></div></div><div mt="2" class="nano1c0guhj"><pre class="prism-code nano11r6mrt" spellcheck="false" contenteditable="true"> | ||
|
||
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>Block</span> <span class="token attr-name">p</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token number">4</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span> | ||
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>Heading</span><span class="token punctuation">></span></span>Hello World<span class="token operator">!</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>Heading</span><span class="token punctuation">></span></span> | ||
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>Text</span><span class="token punctuation">></span></span>To <span class="token keyword">get</span> started <span class="token keyword">with</span> the Sandbox<span class="token punctuation">,</span> start adding some primer<span class="token operator">-</span>react components<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>Text</span><span class="token punctuation">></span></span> | ||
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>Block</span><span class="token punctuation">></span></span></pre><style>.nano11r6mrt{font-family:Menlo, monospace;font-size:14px;padding:8px;background-color:#f6f6f6;outline:none}</style></div><style>.nano1c0guhj{margin-top:8px}</style><div w="1" class="nanoxtup2y"></div><style>.nanoxtup2y{width:100%}</style></div></div></div></div><script src="/primer-react/bundle.js"></script> | ||
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>Block</span><span class="token punctuation">></span></span></pre><style>.nano11r6mrt{font-family:Menlo, monospace;font-size:14px;padding:8px;background-color:#f6f6f6;outline:none}</style></div><style>.nano1c0guhj{margin-top:8px}</style><div w="1" class="nanoxtup2y"></div><style>.nanoxtup2y{width:100%}</style></div></div></div></div></body></html><script src="/primer-react/bundle.js"></script> |
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,23 +1,22 @@ | ||
import React from 'react' | ||
import { Detail } from '@compositor/kit' | ||
import Octicon from '@github/octicons-react' | ||
import { BranchName } from '../../src' | ||
import Octicon, {GitBranch} from '@github/octicons-react' | ||
import {Detail} from '@compositor/kit' | ||
import ExampleHeading from '../doc-components/ExampleHeading' | ||
import {BranchName} from '../../src' | ||
|
||
const BranchNameExample = | ||
{ | ||
name: 'BranchName', | ||
element: ( | ||
<div> | ||
<BranchName>a_new_feature_branch</BranchName> | ||
<Detail> | ||
<ExampleHeading mt={3}>Linked BranchName</ExampleHeading> | ||
<BranchName tag='a' href='/'>a_new_feature_branch</BranchName> | ||
<ExampleHeading mt={3}>BranchName with Octicon</ExampleHeading> | ||
<BranchName><Octicon name='git-branch' /> a_new_feature_branch</BranchName> | ||
</Detail> | ||
</div> | ||
) | ||
} | ||
const BranchNameExample = { | ||
name: 'BranchName', | ||
element: ( | ||
<div> | ||
<BranchName>a_new_feature_branch</BranchName> | ||
<Detail> | ||
<ExampleHeading mt={3}>Linked BranchName</ExampleHeading> | ||
<BranchName tag='a' href='/'>a_new_feature_branch</BranchName> | ||
<ExampleHeading mt={3}>BranchName with Octicon</ExampleHeading> | ||
<BranchName><Octicon icon={GitBranch} /> a_new_feature_branch</BranchName> | ||
</Detail> | ||
</div> | ||
) | ||
} | ||
|
||
export default BranchNameExample |
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,14 +1,14 @@ | ||
import React from 'react' | ||
import { CircleOcticon } from '../../src' | ||
import {Check} from '@github/octicons-react' | ||
import {CircleOcticon} from '../../src' | ||
|
||
const CircleOcticonExample = | ||
{ | ||
name: 'CircleOcticon', | ||
element: ( | ||
<div className='d-flex'> | ||
<CircleOcticon name='check' size='32' bg='green' color='white'/> | ||
</div> | ||
) | ||
} | ||
const CircleOcticonExample = { | ||
name: 'CircleOcticon', | ||
element: ( | ||
<div className='d-flex'> | ||
<CircleOcticon icon={Check} size={32} bg='green' color='white' /> | ||
</div> | ||
) | ||
} | ||
|
||
export default CircleOcticonExample |
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 |
---|---|---|
@@ -0,0 +1,85 @@ | ||
import React from 'react' | ||
import { PropsForm } from '@compositor/kit' | ||
import { FlexContainer, FlexItem, Block, Text, theme } from '../../src' | ||
import ExampleHeading from '../doc-components/ExampleHeading' | ||
|
||
const propObj = { | ||
wrap: ['wrap', 'nowrap'], | ||
direction: ['row', 'row-reverse', 'column'], | ||
justifyContent: ['start', 'end', 'center', 'between', 'around'], | ||
alignItems: ['start', 'end', 'center', 'baseline', 'stretch'], | ||
alignContent: ['start', 'end', 'center', 'between', 'around', 'stretch'], | ||
} | ||
|
||
const FlexExample = { | ||
name: 'Flex', | ||
element: ( | ||
<Block p={2}> | ||
<ExampleHeading mt={2}>FlexContainer</ExampleHeading> | ||
<PropsForm> | ||
<FlexContainer | ||
wrap='wrap' | ||
direction='row' | ||
justifyContent='start' | ||
alignItems='start' | ||
alignContent='start' | ||
flexAuto={true} | ||
alignSelf='start' | ||
width={300} | ||
height={300} | ||
border={true} | ||
> | ||
<Block p={3} bg='blue'>Item 1</Block> | ||
<Block p={3} bg='green'>Item 2</Block> | ||
<Block p={3} bg='yellow'>Item 3</Block> | ||
<Block p={3} bg='red'>Item 4</Block> | ||
<Block p={3} bg='purple'>Item 5</Block> | ||
</FlexContainer> | ||
{Object.keys(propObj).map(key => | ||
<PropsForm.Select name={key}> | ||
{propObj[key].map((value, i) => ( | ||
<option>{value}</option>))} | ||
</PropsForm.Select> | ||
)} | ||
</PropsForm> | ||
<ExampleHeading mt={2}>FlexContainer + FlexItems set to flexAuto</ExampleHeading> | ||
<FlexContainer wrap='nowrap' width={300} height={300} border={true}> | ||
<FlexItem flexAuto> | ||
<Block p={3} bg='blue'>Item 1</Block> | ||
</FlexItem> | ||
<FlexItem flexAuto> | ||
<Block p={3} bg='green'>Item 2</Block> | ||
</FlexItem> | ||
<FlexItem flexAuto> | ||
<Block p={3} bg='yellow'>Item 3</Block> | ||
</FlexItem> | ||
</FlexContainer> | ||
<ExampleHeading mt={2}>FlexContainer + FlexItems with first item set to alignSelf='center'</ExampleHeading> | ||
<FlexContainer wrap='nowrap' width={300} height={300} border={true}> | ||
<FlexItem alignSelf='center'> | ||
<Block p={3} bg='blue'>Item 1</Block> | ||
</FlexItem> | ||
<FlexItem> | ||
<Block p={3} bg='green'>Item 2</Block> | ||
</FlexItem> | ||
<FlexItem> | ||
<Block p={3} bg='yellow'>Item 3</Block> | ||
</FlexItem> | ||
</FlexContainer> | ||
<ExampleHeading mt={2}>FlexContainer + FlexItems using tag prop set to "p"</ExampleHeading> | ||
<FlexContainer wrap='nowrap' width={300} height={300} border={true}> | ||
<FlexItem tag="p"> | ||
<Block p={3} bg='blue'>Item 1</Block> | ||
</FlexItem> | ||
<FlexItem tag="p"> | ||
<Block p={3} bg='green'>Item 2</Block> | ||
</FlexItem> | ||
<FlexItem tag="p"> | ||
<Block p={3} bg='yellow'>Item 3</Block> | ||
</FlexItem> | ||
</FlexContainer> | ||
</Block> | ||
) | ||
} | ||
|
||
export default FlexExample |
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react' | ||
import ComponentPage from './components' | ||
|
||
const Index = () => { | ||
return ( | ||
<ComponentPage/> | ||
) | ||
} | ||
|
||
export default Index |
Oops, something went wrong.